Bluetooth voice remote control universalization method and system
Patent Information
- Application Number
- CN202411823689.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-12-11
AI Technical Summary
[0004]然而,现有BLE语音遥控器技术在通用化设计方面存在显著不足
[0059] In summary, the beneficial effects of this application include at least the following:
Smart Images

Figure CN119649590B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and in particular to a universal method and system for Bluetooth voice remote control. Background Technology
[0002] With the increasing popularity of smart home appliances and consumers' rising demands for user experience, the methods of remote control for home appliances are also constantly evolving. Traditional infrared remote controls have long dominated the market due to their low cost, mature technology, and reliable operation. However, with the maturity of Bluetooth Low Energy (BLE) technology, smart home appliance manufacturers are increasingly adopting BLE remote controls. BLE remote controls offer advantages such as "no aiming required," "controllable around curves," "long control distance," and "higher transmission bandwidth," excelling in providing convenient operation and rich interactive functions. They are particularly suitable for smart TVs, projectors, set-top boxes, and other similar applications, and are gradually becoming an important direction for future remote control technology.
[0003] Existing BLE remote controls typically achieve one-to-one control through a specific pairing protocol between the host and the remote. To ensure pairing accuracy, host manufacturers usually customize exclusive BLE broadcast packages for different brands or series of home appliances, and initiate pairing after recognizing these broadcast packages during scanning. For voice remote controls, due to the differentiated design of voice cloud service providers and remote control solutions, specific hardware functions or external assistance are usually required to achieve compatibility and control between the remote and the host, such as infrared code-triggered pairing or cloud-based learning of device characteristics. These technical methods each have their own characteristics, meeting the needs of users in different scenarios.
[0004] However, existing BLE voice remote control technology has significant shortcomings in terms of universal design. When users need to operate multiple brands and series of home appliances, they often need multiple different models of remote controls. This not only increases the procurement and management costs of remote controls but also causes inconvenience to the user experience. Therefore, how to design a universal BLE voice remote control method that can achieve one-to-many control of multiple brands and series of home appliances without relying on additional hardware and external assistance has become a technical problem that the industry urgently needs to solve. Summary of the Invention
[0005] This application provides a universal method and system for Bluetooth voice remote controls, offering a universal design method that does not rely on additional hardware, ensuring compatibility between different remote controls, functional flexibility, and efficient utilization of system resources. This application provides the following technical solutions:
[0006] In a first aspect, this application provides a universal method for Bluetooth voice remote control, the method comprising:
[0007] Construct a feature model for heterogeneous remote controllers;
[0008] Design a pre-compilation framework for private feature sets of remote control combinations based on heterogeneous remote control feature models;
[0009] The decoupling of business modules and remote control feature sets is achieved based on a private feature set pre-compilation framework;
[0010] A carousel method based on a backoff strategy is used to connect different hosts;
[0011] Identify the remote control model and load the target remote control feature set and resources.
[0012] In one specific implementation scheme, the construction of the heterogeneous remote controller feature model includes:
[0013] Analyze and extract the characteristic parameters of different remote controls;
[0014] Define a data structure common_char_set_t to summarize and describe the common features of all remote controllers, where the feature set of each remote controller is mapped through this data structure;
[0015] Each remote control's feature set is mapped to a common_char_set_t structure to generate a unified remote control feature model;
[0016] A global remote control feature object is instantiated using g_common_char_set, representing the currently active remote control scheme;
[0017] A standardized access interface is provided for the remote control feature model, including calling the led_task_action() interface to process lighting effect requests and calling the keypad_task_send_key() interface to send button information.
[0018] In one specific implementation scheme, the construction of the heterogeneous remote controller feature model further includes:
[0019] Define a common_char_set_t data structure to describe the common features of different remote control schemes, and map the feature sets of each remote control through this data structure;
[0020] Instantiate g_common_char_set as a global object to represent the currently selected remote control scheme;
[0021] Define and provide standardized interfaces, including led_task_action() for handling lighting effect control requests and keypad_task_send_key() for transmitting button information, to ensure that external modules can interact with the remote control features through these interfaces;
[0022] When the remote control features change, the common_char_set_t structure is extended to support the new features, maintaining interface consistency.
[0023] In one specific implementation scheme, the pre-compilation framework for designing private feature sets of remote control combinations based on heterogeneous remote control feature models includes:
[0024] Multiple remote control schemes and their feature sets are stored in the remote control MCU hardware, with each remote control scheme including multiple remote control feature sets;
[0025] The feature set of each remote control scheme is pre-compiled and stored in FLASH, and each feature set is stored as an independent module;
[0026] Each remote control feature set is linked from FLASH to RAM via a linker, with each feature set stored and linked as an independent module;
[0027] For general encoders, use cross-compilation toolchains and Massif heap analyzers to analyze static data footprints and analyze dynamic memory usage.
[0028] A static data structure is used instead of a dynamic memory allocation strategy to reduce memory usage. The optimized encoder library file is linked into the firmware, stored in the FLASH area, and linked to the RAM area.
[0029] Use the linker's overlay technique to store all the RAM data required by the encoder in the same memory region;
[0030] The design employs an on-demand loading mechanism. When a specific remote control model and encoder type are identified, the encoder resources are loaded from FLASH to RAM on demand via the linker. The required resources are then loaded into the overlay area of RAM using the osal_overlay_load() function.
[0031] In a specific feasible implementation, the decoupling of the business module and the remote control feature set based on the private feature set pre-compilation framework includes:
[0032] When a user triggers pairing or reconnection, the presentation layer API, such as adv_task_handle_pair_adv(), is called. This API matches the corresponding broadcast entry based on the currently active remote control scheme and sends it.
[0033] In button control operations, the keypad_task_send_key() API is called, and the button number parameter is passed in. The API automatically matches the appropriate transmission channel and sends the button information according to the current remote control scheme.
[0034] During voice interaction, the voice_task_encoder_init() API is called to initialize the encoder, and the voice_task_encoder_encode() is used to complete the audio encoding. Then, the voice_task_encoder_send() is used to send the encoded audio frame to the Bluetooth protocol stack.
[0035] During voice interaction, the system determines whether to retry or terminate the transmission of audio data based on the error code returned by the API (such as EAGAIN or EFAULT).
[0036] In one specific implementation scheme, the carousel method based on the backoff strategy enables connections between different hosts by:
[0037] Broadcast entries are organized into broadcast sets, which are then hierarchically divided to form multiple broadcast sets of different sizes;
[0038] Within a broadcast set, broadcast entries are sent one by one using a carousel method, with a broadcast interval of 20ms set, and different broadcast sets can be selected using shortcut keys;
[0039] The carousel cycle is divided into five equal parts, with the first four parts being the working cycle and the fifth part being the backoff cycle. Each broadcast item is broadcast for 2 seconds within the working cycle.
[0040] It provides a shortcut key function, which allows users to increase or decrease the carousel cycle time by using two pairs of shortcut keys, each time by 0.5 seconds, and the adjusted time cannot exceed the range of 0.5 seconds to 5 seconds;
[0041] The current cycle of the carousel is fed back by the difference in lighting effects. The number of times the lighting effects flash N indicates that the current cycle is 0.5*N seconds.
[0042] Provides a restore function; use the third pair of key combinations to restore the carousel interval to the default value.
[0043] In one specific implementation scheme, the process of identifying the remote control model and loading the target remote control feature set and resources includes:
[0044] When the BLE_CONNECTED event is detected, broadcasting stops and the carousel phase ends, indicating that the remote control is connected to the host.
[0045] Obtain the currently used broadcast set and broadcast entry number, and switch to the remote control matching stage;
[0046] Based on the broadcast set and broadcast entry number, the private feature set database is indexed to determine the remote control scheme;
[0047] After determining the remote control model, populate the various attributes of the globally effective remote control object g_common_char_set;
[0048] Based on the determined remote control scheme, dynamically load the remote control service and private features;
[0049] Based on the detected remote control scheme, encoder resources are dynamically loaded via the API osal_overlay_load to ensure that the encoder starts and functions when actually in use.
[0050] Secondly, this application provides a universal Bluetooth voice remote control system, which adopts the following technical solution:
[0051] A universal Bluetooth voice remote control system, comprising:
[0052] The model building module is used to build feature models for heterogeneous remote controllers;
[0053] The framework design module is used to design a pre-compiled framework for private feature sets of remote control combinations based on heterogeneous remote control feature models;
[0054] The business decoupling module is used to decouple the business module from the remote control feature set based on the private feature set pre-compilation framework;
[0055] The host connection module is used to implement connections between different hosts using a carousel method based on a backoff strategy.
[0056] The identification and loading module is used to identify the remote control model and load the target remote control feature set and resources.
[0057] Thirdly, this application provides an electronic device, the device including a processor and a memory; the memory stores a program, the program being loaded and executed by the processor to implement a universal method for a Bluetooth voice remote control as described in the first aspect.
[0058] Fourthly, this application provides a computer-readable storage medium storing a program that, when executed by a processor, is used to implement a Bluetooth voice remote control universalization method as described in the first aspect.
[0059] In summary, the beneficial effects of this application include at least the following:
[0060] 1) By fully utilizing the limited FLASH and RAM resources of the Bluetooth MCU and pre-compiling the private feature sets of multiple voice remote control schemes into the system, coexistence of different remote control schemes is achieved. This design allows for the support of more remote control schemes within a limited storage space, without relying on external devices (such as mobile phones, host devices, or the cloud) for interaction or assistance, thereby improving the versatility and compatibility of Bluetooth remote controls.
[0061] 2) By constructing a heterogeneous remote control feature set model and introducing a representation layer, the layering and decoupling of the remote control business layer and the feature resource layer are achieved. This design allows the feature sets of different remote control solutions to be managed independently, reducing the coupling between modules and improving the system's scalability and maintainability. Even if new remote control solutions are added or removed in the future, only the private feature sets need to be adjusted, without requiring large-scale changes to the entire general design, thus ensuring the long-term scalability of the system.
[0062] By constructing a heterogeneous remote control feature model, unified control of multi-brand and multi-series home appliances is achieved. The solution first constructs a generalized model based on the features of different remote controls. By defining a common feature set and providing standardized operation interfaces, the management and control of different remote controls are simplified. Next, a pre-compilation framework for private feature sets is designed, enabling multiple remote control feature sets to coexist efficiently in resource-constrained hardware environments. Resource utilization is optimized through on-demand loading and memory time-division multiplexing techniques. Furthermore, by decoupling business modules from remote control feature sets, the operational logic of the business layer is simplified, improving the system's scalability and stability. Finally, a backoff strategy and a carousel method are used to achieve rapid connection between different hosts, and dynamic loading technology accurately matches remote control features, ensuring efficient compatibility and functional implementation of remote controls in multi-host environments.
[0063] This solution addresses the problem that existing BLE voice remote controls cannot achieve unified control of multiple brands and series of devices. It provides a universal design method that does not rely on additional hardware, ensuring compatibility between different remote controls, functional flexibility, and efficient utilization of system resources.
[0064] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0065] Figure 1 This is a flowchart illustrating the method for generalizing Bluetooth voice remote controls in the embodiments of this application.
[0066] Figure 2 This is a schematic diagram of an example of using the overlay technique of a linker in the embodiments of this application.
[0067] Figure 3 This is a use case diagram illustrating the layered architecture and interface abstraction in the embodiments of this application.
[0068] Figure 4 This is a block diagram of an electronic device that uses a Bluetooth voice remote control as a general-purpose device, as described in the embodiments of this application. Detailed Implementation
[0069] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0070] Optionally, this application uses the Bluetooth voice remote control generalization method provided in various embodiments in an electronic device as an example for illustration. The electronic device is a terminal or a server. The terminal can be a mobile phone, computer, tablet computer, etc. This embodiment does not limit the type of electronic device.
[0071] Reference Figure 1 This is a flowchart illustrating a method for generalizing Bluetooth voice remote controls according to an embodiment of this application. The method includes at least the following steps:
[0072] Step S101: Construct a feature model of a heterogeneous remote controller.
[0073] In step S101, the heterogeneous remote control feature model is the foundation for realizing the universal design of Bluetooth voice remote control. By analyzing and extracting the feature parameters of different remote controls, a unified model framework is established, laying the foundation for subsequent feature set organization and operation.
[0074] Specifically, the features of a voice remote control mainly include device type information, DIS information, broadcast entries, key value table, HID device descriptor (HIDMAP), HID report list, audio GATT service table, OTA service table, non-standard customized service table, encoder, lighting effects and key combinations, as shown in Table 1.
[0075] Table 1. Description of features of the voice remote control
[0076]
[0077]
[0078] In implementation, to manage these features uniformly, it is necessary to abstract and integrate the aforementioned features. The specific steps are as follows: Define a data structure of type `common_char_set_t`, which summarizes and describes the common features of all remote controls. This data structure can be viewed as a model template containing various possible remote control feature items. Through the `common_char_set_t` structure, the features of each remote control are mapped to this general model. Each remote control may have a different feature set, therefore `common_char_set_t` provides a unified framework to represent these features. At this point, `g_common_char_set` becomes a global instance, representing the currently active remote control scheme object.
[0079] After constructing the feature model, standardized access and operation interfaces need to be provided for these features. This allows external modules to interact with different features of the remote control through a unified interface. Specific interfaces include: calling `led_task_action()`, which handles requests related to lighting effects and controls the remote control's lighting display; and calling `keypad_task_send_key()`, which sends the remote control's button information, ensuring accurate transmission of button events. These interfaces encapsulate the complexity of the remote control's underlying hardware and protocols, enabling upper-layer applications to perform complex operations through simple interface calls, thus improving system usability.
[0080] Ultimately, through the above steps, not only was a feature set model with efficient operational capabilities obtained, but its scalability was also ensured, enabling it to support future additions of remote control features. For example, if a new remote control type needs to be added, only the feature items in the `common_char_set_t` structure need to be extended, and managed and accessed through the corresponding interface, without needing to redesign the entire system. By conducting detailed analysis, abstraction, and unified organization of the features of different remote controls, a general feature set model was constructed. This model uses the `common_char_set_t` data structure to uniformly describe the common features of different remote controls, and manages and operates these features through standardized access interfaces (such as `led_task_action()` and `keypad_task_send_key()`), ensuring that the functions of different types of remote controls can be called and controlled in a concise, efficient, and unified manner.
[0081] Step S102: Design a pre-compilation framework for the private feature set of remote control combinations based on the feature model of heterogeneous remote controls.
[0082] In step S102, based on the heterogeneous remote control feature model constructed in step S101, a pre-compilation framework for the private feature set of the remote control combination is designed. To achieve one-to-many control and interaction with the voice remote control, the system needs to support the private feature sets of multiple voice remote control schemes. These feature sets will be pre-compiled and stored in the system, coexisting with a set of remote control MCU hardware and firmware. Since the MCU's resources are limited, especially the RAM capacity, an efficient feature set coexistence scheme needs to be designed, utilizing FLASH to achieve compact time-division multiplexing of RAM resources.
[0083] Specifically, to achieve one-to-many voice remote control control and interaction, multiple remote control schemes and their feature sets need to be stored in a single remote control MCU hardware system. These remote control feature sets need to coexist in the same hardware and firmware. Furthermore, due to the limited MCU FLASH and RAM resources, especially RAM, time-division multiplexing is required to fully utilize these resources. For example... Figure 2 As shown, taking a typical BLE remote control MCU as an example, it is usually configured with 64KB RAM and 512KB FLASH. System modules running in RAM (such as RTOS, drivers, and the BLE protocol stack) occupy approximately 50KB of RAM, leaving less than 20KB of RAM available for remote control application development. Furthermore, the firmware size, originally 150KB, can be increased to 400KB by using a single-backup OTA instead of dual-backup OTA. To enable the coexistence of multiple remote control solutions in this hardware environment, the problem of limited RAM resources is effectively solved by pre-compiling and storing feature sets in FLASH, combined with time-division multiplexing of memory. After instantiating each remote control feature set, these feature sets are organized and stored in independent C source files. Each remote control feature set is stored as an independent module, separate from other feature sets. These modules are stored in the FLASH (LMA) area and linked to RAM (VMA) through the linker's linking operation.
[0084] For some general-purpose encoders (such as SBC, OPUS, etc.), the static data footprint is cleaned up using a cross-compilation toolchain and a Massif heap analyzer, and their dynamic memory usage is analyzed. For these encoders, static data structures are used instead of dynamic memory allocation strategies for fine-tuning, thereby reducing memory usage. After adjustment, the compiled encoder library files are linked into the firmware and stored in the FLASH (LMA) area, which is then linked to the RAM (VMA) area. By using the linker's overlay technique, the RAM data required by all encoders is concentrated in the same memory area, avoiding memory fragmentation and ensuring that the data of each module can efficiently share the same RAM area.
[0085] Finally, to further optimize memory usage and improve dynamic resource management, an on-demand loading mechanism was designed. When the system identifies a specific remote control model and its encoder type, the linker loads the corresponding encoder resources from FLASH into RAM as needed. The linker defines two symbols for each section described by OVERLAY: __load_start_SECNAME and __load_stop_SECNAME, representing the LMA start and end addresses of the section in FLASH, respectively. When resources for a specific encoder need to be loaded, the osal_overlay_load() function is called to load the required resources from FLASH into the overlay area on demand. This on-demand loading mechanism effectively reduces memory usage because the required encoder data is only loaded into RAM during actual use, without consuming system memory. Through this approach, the private feature set pre-compilation framework can effectively achieve the coexistence of feature sets from multiple remote control schemes, and through time-division multiplexing of memory resources and on-demand loading, ensures that the system can still operate efficiently with limited hardware resources.
[0086] Step S103: Decouple the business module from the remote control feature set based on the private feature set pre-compilation framework.
[0087] In step S103, refer to Figure 3 Previously, a private feature set pre-compilation framework based on heterogeneous remote control feature models was designed, enabling efficient feature set coexistence in remote control solutions with limited hardware resources. Based on this framework, step S103 further promotes the decoupling of business modules and remote control private feature sets. By introducing feature models, the communication interface between the business layer and feature sets is standardized and constrained, thereby achieving an organic combination of the two. Specifically, the business layer no longer needs to care which remote control instance is currently in effect, nor does it need to make logical or process adjustments for specific remote control instances. This ensures that the operation of the business module remains stable and unaffected when feature sets switch or change.
[0088] Specifically, in the design of the Bluetooth voice remote control, the core business modules involve pairing with the host, controlling the host functions via buttons, and enabling human-machine dialogue via voice. To decouple the business layer from the remote control feature set, the following strategies and steps are introduced:
[0089] When the system detects that a user has triggered pairing or reconnection, the business module does not need to concern itself with the specific content and length of the broadcast packet to be sent. The business layer only needs to call the presentation layer API (such as adv_task_handle_pair_adv()) at the appropriate time. This API locates and matches the corresponding broadcast entry based on the currently active remote control scheme and sends it. This design allows the business module to avoid worrying about the specific implementation details of the broadcast packet, ensuring the simplicity of operation.
[0090] When performing button control, the business module does not need to worry about details such as key values, key value lengths, or Bluetooth transmission channels. It only needs to call the `keypad_task_send_key()` API at the appropriate time, passing in the button sequence number parameter. The API will automatically match the appropriate transmission channel based on the current remote control solution and complete the transmission of the button data. In this way, the business module completely delegates the complexity of button control to the presentation layer, greatly simplifying the business logic.
[0091] During voice interaction, the business module does not need to concern itself with the specific encoder type used, nor with the encoder initialization details. The business layer only needs to call `voice_task_encoder_init()` to initialize the encoder. Subsequently, during voice recording, `voice_task_encoder_encode()` is called to complete the audio encoding, and `voice_task_encoder_send()` is used to send the encoded audio frame to the underlying Bluetooth protocol stack. The business module can also decide whether to retry or terminate the transmission based on the error code returned by the API (such as EAGAIN or EFAULT). In this way, the complex differences between the encoding and transmission processes in voice interaction are encapsulated in the presentation layer API, and the business module only operates through a high-level interface.
[0092] In summary, step S102 designed a private feature set pre-compilation framework based on a heterogeneous remote control feature model, enabling efficient coexistence of different remote control schemes under limited hardware resources. Step S103, building upon this, decoupled the business module from the remote control feature set by introducing a feature model. This decoupling design allows the business module to interact with the presentation layer through a high-level API instead of directly manipulating or perceiving specific remote control features when operating the remote control. In this way, the system can handle switching between different remote control schemes without adjusting the business layer logic, thus ensuring the independence and scalability of the business layer.
[0093] Step S104: The carousel method based on the backoff strategy is used to connect different hosts.
[0094] In step S104, after successfully decoupling the specific feature sets of the business module and the remote control through the feature model, flexible invocation of remote control functions and compatibility of multiple functions are ensured. Building upon this, step S104 further implements multi-host connectivity using a carousel method with a backoff strategy, ensuring rapid compatibility and connection between different hosts, optimizing connection efficiency, and improving user experience. This step designs an efficient carousel mechanism that supports flexible connection between remote controls of different brands, series, and models and multiple hosts, and improves the connection success rate through a backoff strategy, meeting the requirements of infrared-free, multi-host control.
[0095] Specifically, to enable connections between different hosts, incompatible and heterogeneous broadcast entries (broadcast packets and scan response packets) are first compiled into a list, named broadcast sets. Entries within a broadcast set are hierarchically categorized by brand, series, model, etc., forming multiple broadcast sets of varying sizes. Each broadcast set contains different broadcast entries, ensuring compatibility with various host types. Within a broadcast set, broadcast entries are sent one by one using a carousel method. To improve carousel efficiency, a highly efficient 20ms broadcast interval is set, ensuring both frequency and stability. This high-frequency broadcasting allows coverage of all target hosts in a shorter time, improving connection success rates. For ease of use, different shortcut keys are designed to select different broadcast sets. The mapping relationship between each shortcut key and a specific broadcast set is detailed in the user manual, ensuring users can easily and quickly select the appropriate broadcast set for connection. To further optimize connection success rates, a backoff strategy is introduced, inspired by host scanning behavior control in the BLE specification. The carousel cycle is divided into five equal parts, with the first four parts being the working cycle and the fifth part being the backoff cycle. Each broadcast entry is broadcast within its working cycle, ensuring that broadcasts are not too frequent and avoiding interference with connection attempts. This backoff strategy allows the system to efficiently rotate between different hosts while avoiding the waste of system resources from multiple connection attempts. By default, each broadcast entry broadcasts for 2 seconds. To improve user experience, users can adjust the rotation interval using key combinations. Two pairs of key combinations allow users to increase or decrease the rotation cycle time by 0.5 seconds each time, with the adjusted time not exceeding the maximum of 5 seconds or the minimum of 0.5 seconds. Furthermore, the system uses lighting effects to indicate the current rotation cycle. For example, the number of flashes N indicates a current cycle of 0.5*N seconds. To provide an even better user experience, the manual recommends optimal rotation cycles for different broadcast sets and allows users to restore the rotation interval using a third pair of key combinations.
[0096] Step S105: Identify the remote control model and load the target remote control feature set and resources.
[0097] In step 105, after achieving rapid connection and compatibility among multiple hosts through a backoff strategy and an efficient carousel method, the system further identifies the remote control model based on detected connection events and loads the corresponding feature set and resources. This step, through an optimized model identification method and dynamic loading technology, ensures accurate matching of the remote control's functional characteristics and resources after connection, providing the correct remote control solution for subsequent business operations.
[0098] Specifically, when the BLE_CONNECTED event triggered by the protocol stack is detected, the system stops broadcasting and exits the carousel phase, signifying a successful connection between a host and a remote control. Next, the system obtains the currently used broadcast set and broadcast entry number, switching to the remote control matching phase to load the feature set and resources matching the remote control. Conventional remote control model identification methods primarily rely on host-side device information (such as PID, VID, PVER, etc.) to determine the remote control model. As an improvement, this step employs a more efficient method: by indexing the private feature set database using the broadcast set and broadcast entry number, the remote control scheme is accurately determined, and information such as the host brand, model, and category is obtained. This method allows for rapid location of the remote control's private feature set, providing accurate remote control characteristics for subsequent operations. After confirming the remote control model, the system continues processing the various attributes of the globally effective remote control object g_common_char_set. Based on the determined remote control scheme, the system populates the object's attributes, including the key-value table, service table, HID device descriptor, lighting effects, key combinations, encoder configurations, etc. By populating these configurations, the association between the feature set and the presentation layer is established, enabling the business layer to seamlessly call and manage various functions of the remote control. Unlike conventional Bluetooth remote controls that statically register services and features during the initialization phase, this step dynamically loads remote control services and private features during the pairing phase. This includes registering the DIS service and setting private device information, updating the HID MAP and registering the HID service, audio GATT service, OTA service, and other customized services. Through this dynamic loading method, the system can load the corresponding services and feature sets when needed, ensuring that the remote control can immediately use its features after connection. For voice encoder processing, conventional solutions require pre-allocating all resources required for operation during system initialization. However, this step determines the required voice encoder resources first and dynamically loads the encoder's resources using the API `osal_overlay_load`. Specifically, the system dynamically loads the encoder resources stored in FLASH into RAM through this API based on the detected remote control scheme, ensuring that the encoder can quickly start and function during actual use.
[0099] By intelligently identifying the remote control model and loading the corresponding feature set and resources, it ensures that the connected remote control can load the correct functions and resource configurations according to its model and the host's requirements. This combination ensures the compatibility and efficiency of the Bluetooth voice remote control in multi-host environments.
[0100] In summary, by constructing a heterogeneous remote control feature model, unified control of multiple brands and series of home appliances is achieved. The solution first constructs a generalized model based on the features of different remote controls. By defining a common feature set and providing standardized operation interfaces, the management and control of different remote controls are simplified. Next, a pre-compilation framework for private feature sets is designed, enabling multiple remote control feature sets to coexist efficiently in resource-constrained hardware environments. Resource utilization is optimized through on-demand loading and memory time-division multiplexing techniques. Furthermore, by decoupling business modules from remote control feature sets, the operational logic of the business layer is simplified, improving the system's scalability and stability. Finally, a backoff strategy and a carousel method are used to achieve rapid connection between different hosts, and dynamic loading technology accurately matches remote control features, ensuring efficient compatibility and functional implementation of remote controls in multi-host environments.
[0101] This solution addresses the problem that existing BLE voice remote controls cannot achieve unified control of multiple brands and series of devices. It provides a universal design method that does not rely on additional hardware, ensuring compatibility between different remote controls, functional flexibility, and efficient utilization of system resources.
[0102] One embodiment of this application also provides a universal Bluetooth voice remote control system, which includes at least the following modules:
[0103] The model building module is used to build feature models of heterogeneous remote controllers;
[0104] The framework design module is used to design a pre-compiled framework for private feature sets of remote control combinations based on heterogeneous remote control feature models;
[0105] The business decoupling module is used to decouple the business module from the remote control feature set based on the private feature set pre-compilation framework;
[0106] The host connection module is used to implement connections between different hosts using a carousel method based on a backoff strategy.
[0107] The identification and loading module is used to identify the remote control model and load the target remote control feature set and resources.
[0108] For relevant details, please refer to the above method implementation examples.
[0109] Figure 4 This is a block diagram of an electronic device provided in one embodiment of this application. The device includes at least a processor 401 and a memory 402.
[0110] Processor 401 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0111] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 402 are used to store at least one instruction, which is executed by the processor 401 to implement the Bluetooth voice remote control generalization method provided in the method embodiments of this application.
[0112] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, peripheral devices include, but are not limited to: radio frequency circuitry, a touch display screen, audio circuitry, and a power supply.
[0113] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.
[0114] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the Bluetooth voice remote control generalization method of the above method embodiments.
[0115] Optionally, this application also provides a computer product including a computer-readable storage medium storing a program, which is loaded and executed by a processor to implement the Bluetooth voice remote control generalization method of the above method embodiments.
[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A universal method for Bluetooth voice remote control, characterized in that, The method includes: Construct a feature model for heterogeneous remote controllers; A private feature set pre-compilation framework for remote control combinations is designed based on the feature model of heterogeneous remote control. The private feature set pre-compilation framework is used to pre-compile the private feature sets corresponding to multiple remote control schemes and store them as independent feature set modules, so that the private feature sets of the multiple remote control schemes can coexist in the same Bluetooth voice remote control hardware and firmware. The decoupling of business modules and remote control feature sets is achieved based on a private feature set pre-compilation framework. In this framework, a presentation layer access interface for the heterogeneous remote control feature model is provided, which allows business modules to call the presentation layer access interface during pairing or reconnection, button control, and voice interaction. The presentation layer access interface calls the corresponding broadcast entry, button information transmission channel, and encoder interface according to the currently effective remote control scheme, thereby decoupling the business modules from each private feature set. A carousel method based on a backoff strategy is used to connect different hosts; Identify the remote control model and load the target remote control feature set and resources. Specifically, based on the target remote control scheme, populate the various attributes of the globally effective remote control object, establish the association between the target remote control feature set and the presentation layer, and enable the business module to call and manage the remote control functions corresponding to the target remote control scheme through the presentation layer.
2. The universal Bluetooth voice remote control method according to claim 1, characterized in that, The construction of the heterogeneous remote controller feature model includes: Analyze and extract the characteristic parameters of different remote controls; Define a data structure common_char_set_t to summarize and describe the common features of all remote controllers, where the feature set of each remote controller is mapped through this data structure; Each remote control's feature set is mapped to a common_char_set_t structure to generate a unified remote control feature model; A global remote control feature object is instantiated using g_common_char_set, representing the currently active remote control scheme; A standardized access interface is provided for the remote control feature model, including calling the led_task_action() interface to process lighting effect requests and calling the keypad_task_send_key() interface to send button information.
3. The universal Bluetooth voice remote control method according to claim 2, characterized in that, The construction of the heterogeneous remote controller feature model also includes: Define a common_char_set_t data structure to describe the common features of different remote control schemes, and map the feature sets of each remote control through this data structure; Instantiate g_common_char_set as a global object to represent the currently selected remote control scheme; Define and provide standardized interfaces, including led_task_action() for handling lighting effect control requests and keypad_task_send_key() for transmitting button information, to ensure that external modules can interact with the remote control features through these interfaces; When the remote control features change, the common_char_set_t structure is extended to support the new features, maintaining interface consistency.
4. The universal Bluetooth voice remote control method according to claim 1, characterized in that, The private feature set pre-compilation framework for designing remote control combinations based on heterogeneous remote control feature models includes: Multiple remote control schemes and their feature sets are stored in the remote control MCU hardware, with each remote control scheme including multiple remote control feature sets; The feature set of each remote control scheme is pre-compiled and stored in FLASH, and each feature set is stored as an independent module; Each remote control feature set is linked from FLASH to RAM via a linker, with each feature set stored and linked as an independent module; For general encoders, use cross-compilation toolchains and Massif heap analyzers to analyze static data footprints and analyze dynamic memory usage. A static data structure is used instead of a dynamic memory allocation strategy to reduce memory usage. The optimized encoder library file is linked into the firmware, stored in the FLASH area, and linked to the RAM area. Use the linker's overlay technique to store all the RAM data required by the encoder in the same memory region; The design employs an on-demand loading mechanism. When a specific remote control model and encoder type are identified, the encoder resources are loaded from FLASH to RAM on demand via the linker. The required resources are then loaded into the overlay area of RAM using the osal_overlay_load() function.
5. The method for universalizing Bluetooth voice remote control according to claim 1, characterized in that, The decoupling of business modules and remote control feature sets based on the private feature set pre-compilation framework includes: When a user triggers pairing or reconnection, the presentation layer API is invoked. The API matches the corresponding broadcast entry based on the currently active remote control scheme and sends it. In button control operations, the keypad_task_send_key() API is called, and the button number parameter is passed in. The API automatically matches the appropriate transmission channel and sends the button information according to the current remote control scheme. During voice interaction, the voice_task_encoder_init() API is called to initialize the encoder, and the voice_task_encoder_encode() is used to complete the audio encoding. Then, the voice_task_encoder_send() is used to send the encoded audio frame to the Bluetooth protocol stack. During voice interaction, the system determines whether to retry or terminate the transmission of audio data based on the error code returned by the API.
6. The universal Bluetooth voice remote control method according to claim 1, characterized in that, The carousel method based on the backoff strategy enables connections between different hosts, including: Broadcast entries are organized into broadcast sets, which are then hierarchically divided to form multiple broadcast sets of different sizes; Within a broadcast set, broadcast entries are sent one by one using a carousel method, with a broadcast interval of 20ms set, and different broadcast sets can be selected using shortcut keys; The carousel cycle is divided into five equal parts, with the first four parts being the working cycle and the fifth part being the backoff cycle. Each broadcast item is broadcast for 2 seconds within the working cycle. It provides a shortcut key function, which allows users to increase or decrease the carousel cycle time by using two pairs of shortcut keys, each time by 0.5 seconds, and the adjusted time cannot exceed the range of 0.5 seconds to 5 seconds; The current cycle of the carousel is fed back by the difference in lighting effects. The number of times the lighting effects flash N indicates that the current cycle is 0.5*N seconds. Provides a restore function; use the third pair of key combinations to restore the carousel interval to the default value.
7. The universal Bluetooth voice remote control method according to claim 1, characterized in that, The process of identifying the remote control model and loading the target remote control feature set and resources includes: When the BLE_CONNECTED event is detected, broadcasting stops and the carousel phase ends, indicating that the remote control is connected to the host. Obtain the currently used broadcast set and broadcast entry number, and switch to the remote control matching stage; Based on the broadcast set and broadcast entry number, the private feature set database is indexed to determine the remote control scheme; After determining the remote control model, populate the various attributes of the globally effective remote control object g_common_char_set; Based on the determined remote control scheme, dynamically load the remote control service and private features; Based on the detected remote control scheme, encoder resources are dynamically loaded via the API osal_overlay_load to ensure that the encoder starts and functions when actually in use.
8. A universal Bluetooth voice remote control system, characterized in that, include: The model building module is used to build feature models for heterogeneous remote controllers; The framework design module is used to design a private feature set pre-compilation framework for remote control combinations based on the feature model of heterogeneous remote control. The private feature set pre-compilation framework is used to pre-compile the private feature sets corresponding to multiple remote control schemes and store them as independent feature set modules, so that the private feature sets of the multiple remote control schemes can coexist in the same Bluetooth voice remote control hardware and firmware. The business decoupling module is used to decouple the business module from the remote control feature set based on the private feature set pre-compilation framework. It provides a presentation layer access interface for the heterogeneous remote control feature model, so that the business module can call the presentation layer access interface during pairing or reconnection, button control and voice interaction. The presentation layer access interface calls the corresponding broadcast entry, button information transmission channel and encoder interface according to the currently effective remote control scheme, so as to decouple the business module from each private feature set. The host connection module is used to implement connections between different hosts using a carousel method based on a backoff strategy. The identification and loading module is used to identify the remote control model and load the target remote control feature set and resources. Specifically, it fills in the various attributes of the globally effective remote control object according to the target remote control scheme, establishes the association between the target remote control feature set and the presentation layer, and enables the business module to call and manage the remote control functions corresponding to the target remote control scheme through the presentation layer.
9. An electronic device, characterized in that, The device includes a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement a universal method for a Bluetooth voice remote control as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program that, when executed by a processor, is used to implement a Bluetooth voice remote control universalization method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
System and method for setting up a universal remote controller
CN101129076A
Method for generating remote controller code
CN101226472A