Method and system for generalizing Bluetooth voice remote controller
By building a heterogeneous remote control feature model and designing a private feature set precompilation framework, combining backoff strategy and carousel method, the unified control of multi-brand and multi-series home appliances of BLE voice remote control is achieved, solving the problem of insufficient general design in the existing technology, and improving compatibility, flexibility and user experience.
Patent Information
- Application Number
- CN202411823689.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing BLE voice remote control has significant shortcomings in general design, and it is impossible to achieve one-to-many control of multi-brand and multi-series home appliances, resulting in users requiring multiple models of remote controls, increasing procurement and management costs, and affecting user experience.
By building a heterogeneous remote control feature model, a private feature set precompilation framework for remote control combination is designed to decouple the business module and the remote control feature set, and a backoff strategy and carousel method are used to achieve the connection between different hosts, identify the remote control model and load the target remote control feature set and resources.
It realizes compatibility and flexibility of functions between different remote controls, improves the efficient utilization of system resources, supports unified control of multi-brand and multi-series home appliances, reduces user procurement and management costs, and improves user experience.
Smart Images

Figure CN119649590A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and in particular to a method and system for universalizing a Bluetooth voice remote control. Background Art
[0002] With the increasing popularity of smart home appliances and consumers' increasing requirements for user experience, the remote control methods of home appliances are also constantly developing and evolving. Traditional infrared remote controls have long occupied the main market for home appliance control due to their low cost, mature technology, and reliable use. However, with the maturity of low-power Bluetooth (BLE) technology, smart home appliance manufacturers are gradually inclined to adopt BLE remote controls. BLE remote controls have the characteristics of "no need to aim", "controllable around corners", "long control distance", and "higher transmission bandwidth". They excel in providing convenient operation and rich interactive functions. They are particularly suitable for scenarios such as smart TVs, projectors, and set-top boxes, and are gradually becoming an important direction for future remote control technology.
[0003] Existing BLE remote controls generally achieve one-to-one control through a specific pairing protocol between the host and the remote control. To ensure pairing accuracy, host manufacturers usually customize exclusive BLE broadcast package content for different brands or series of home appliances, and initiate pairing after identifying 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, such as infrared code trigger pairing or cloud-based learning of device characteristics, are usually required to achieve compatibility and control between the remote control and the host. These technical methods have their own characteristics and meet the needs of users in different scenarios.
[0004] However, the existing BLE voice remote control technology has significant deficiencies in universal design. When users need to operate multi-brand and multi-series home appliances, they often need multiple remote controls of different models to achieve control, which not only increases the purchase and management costs of the remote control, but also causes troubles to the user experience. Therefore, how to design a universal BLE voice remote control method that can achieve one-to-many control of multi-brand and multi-series home appliances without relying on additional hardware and external assistance has become a technical problem that needs to be solved in the industry. Summary of the invention
[0005] This application provides a Bluetooth voice remote control universalization method and system, and provides a universal design method that does not rely on additional hardware, ensuring the compatibility between different remote controls, functional flexibility, and efficient use of system resources. This application provides the following technical solutions:
[0006] In a first aspect, the present application provides a method for generalizing a Bluetooth voice remote control, the method comprising:
[0007] Construct heterogeneous remote control feature model;
[0008] Design a private feature set pre-compilation framework for remote control combinations based on heterogeneous remote control feature models;
[0009] Decoupling of business modules and remote control feature sets is achieved based on a private feature set precompilation framework;
[0010] The carousel method based on the backoff strategy realizes the connection of different hosts;
[0011] Identify the remote control model and load the target remote control feature set and resources.
[0012] In a specific implementation scheme, constructing a heterogeneous remote control feature model includes:
[0013] Analyze and extract 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 controls, where the feature set of each remote control is mapped through this data structure;
[0015] Map the feature set of each remote control into the common_char_set_t structure to generate a unified remote control feature model;
[0016] Instantiate a global remote control feature object through g_common_char_set to represent the currently effective remote control scheme;
[0017] A standardized access interface to the remote control feature model is provided, including calling the led_task_action() interface to process lighting effect requests and calling the keypad_task_send_key() interface to send key information.
[0018] In a specific implementation scheme, the constructing of a heterogeneous remote control feature model further includes:
[0019] Define the common_char_set_t data structure to describe the common features of different remote control solutions, and map the feature set 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 processing lighting control requests and keypad_task_send_key() for transmitting key information, ensuring that external modules can interact with remote control features through these interfaces;
[0022] When the remote control features change, the common_char_set_t structure is expanded to support the new features and maintain the consistency of the interface.
[0023] In a specific implementation scheme, the private feature set pre-compilation framework for designing remote control combinations based on heterogeneous remote control feature models includes:
[0024] A plurality of remote control schemes and their feature sets are stored in the remote control MCU hardware, each remote control scheme including a plurality of remote control feature sets;
[0025] Precompile and store the feature set of each remote control solution in FLASH, and each feature set is stored as an independent module;
[0026] Each remote control feature set is linked from FLASH to RAM through a linker, and each feature set is stored and linked as an independent module;
[0027] For general coders, use the cross-compilation toolchain and Massif heap analyzer to analyze static data footprint and organize dynamic memory usage;
[0028] Use static data structure instead of dynamic memory allocation strategy to reduce memory usage, and link the optimized encoder library file to the firmware, store it in the FLASH area, and link it to the RAM area;
[0029] Use the linker's overlay technology to bring all the RAM data required by the encoder into the same memory area;
[0030] Design an on-demand loading mechanism. When the specific remote control model and encoder type are identified, the encoder resources are loaded from FLASH to RAM on demand through the linker, and the required resources are loaded into the overlay area of RAM using the osal_overlay_load() function.
[0031] In a specific possible implementation scheme, the decoupling of the service module and the remote control feature set based on the private feature set pre-compilation framework includes:
[0032] When it is detected that the user triggers pairing or reconnection, the presentation layer API is called, such as adv_task_handle_pair_adv(), which matches and sends the corresponding broadcast entry according to the currently effective remote control scheme;
[0033] In the key control operation, call the keypad_task_send_key() API and pass in the key sequence number parameter. The API automatically matches the appropriate transmission channel and sends the key information according to the current remote control solution;
[0034] During the voice interaction process, call the voice_task_encoder_init() API to initialize the encoder, complete the audio encoding through voice_task_encoder_encode(), and then send the encoded audio frame to the Bluetooth protocol stack through voice_task_encoder_send();
[0035] During the voice interaction process, decide whether to retry or terminate the sending of audio data based on the error code (such as EAGAIN or EFAULT) returned by the API.
[0036] In a specific implementation scheme, the carousel method based on the backoff strategy realizes the connection of different hosts, including:
[0037] Arrange broadcast items into broadcast sets, divide them into levels, and form multiple broadcast sets of different sizes;
[0038] In the broadcast set, broadcast items are sent one by one in a carousel manner, the broadcast interval is set to 20ms, and different broadcast sets can be selected through shortcut keys;
[0039] The carousel cycle is divided into five equal parts, of which the first four parts are working cycles and the fifth part is a backoff cycle. Each broadcast entry is broadcast for 2 seconds in the working cycle.
[0040] Provides a combination key function, through which two pairs of combination keys can be used to increase or decrease the carousel cycle time, each time by 0.5 seconds, and the adjusted time cannot exceed the range of 0.5 seconds to 5 seconds;
[0041] The current carousel cycle is fed back through the difference in lighting effects. The number of flashes of the lighting effect N indicates that the current cycle is 0.5*N seconds.
[0042] Provides a recovery function. Use the third pair of key combinations to restore the carousel interval to the default value.
[0043] In a specific implementation scheme, identifying the remote control model and loading the target remote control feature set and resources includes:
[0044] When a BLE_CONNECTED event is detected, the broadcast is stopped and the carousel stage is exited, indicating that the remote control is connected to the host;
[0045] Get the currently used broadcast set and broadcast item number, and switch to the remote control matching stage;
[0046] According to the broadcast set and the broadcast item sequence number, the private feature set database is indexed to determine the remote control scheme;
[0047] After determining the remote control model, fill in the attributes of the global remote control object g_common_char_set;
[0048] Dynamically load remote control services and private features according to the determined remote control scheme;
[0049] According to the detected remote control scheme, the encoder resources are dynamically loaded through the API osal_overlay_load to ensure that the encoder is started and functions when it is actually used.
[0050] In the second aspect, the present application provides a Bluetooth voice remote control universal system, which adopts the following technical solutions:
[0051] A universal system for a Bluetooth voice remote controller, comprising:
[0052] A model building module, used to build a heterogeneous remote control feature model;
[0053] A framework design module is used to design a private feature set pre-compilation framework for remote control combinations based on heterogeneous remote control feature models;
[0054] A service decoupling module is used to realize the decoupling of the service module and the remote control feature set based on the private feature set pre-compilation framework;
[0055] A host connection module, used to realize the connection of different hosts based on the carousel method of 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] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; the memory stores a program, and the program is loaded and executed by the processor to implement a method for generalizing a Bluetooth voice remote control as described in the first aspect.
[0058] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and when the program is executed by a processor, the program is used to implement a method for generalizing a Bluetooth voice remote control as described in the first aspect.
[0059] In summary, the beneficial effects of this application include at least:
[0060] 1) Make full use of the limited FLASH and RAM resources of the Bluetooth MCU, and pre-compile the private feature sets of multiple voice remote control solutions into the system to achieve the coexistence of different remote control solutions. This design allows more remote control solutions to be supported within a limited storage space, without relying on external devices (such as mobile phones, hosts or clouds) for interaction or assistance, thereby improving the versatility and compatibility of Bluetooth remote controls.
[0061] 2) By building a heterogeneous remote control feature set model and introducing a presentation 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, reduces the coupling between modules, and improves the scalability and maintainability of the system. Even if there are new remote control solutions with added or reduced functions in the future, only the private feature set needs to be adjusted, without making large-scale changes to the entire universal design, thus ensuring the long-term scalability of the system.
[0062] By building a heterogeneous remote control feature model, unified control of multi-brand and multi-series home appliances can be achieved. The solution first builds a universal model based on the features of different remote controls. By defining a universal feature set and providing a standardized operation interface, it simplifies the management and control of different remote controls. Then, a pre-compilation framework for private feature sets is designed to enable multiple remote control feature sets to coexist efficiently in a hardware environment with limited resources, and optimize resource utilization through on-demand loading and memory time-division multiplexing technology. Further, by decoupling the business module from the remote control feature set, the operation logic of the business layer is simplified, and the scalability and stability of the system are improved. Finally, the backoff strategy and carousel method are used to achieve fast connection of different hosts, and the dynamic loading technology is used to accurately match the remote control features, ensuring the efficient compatibility and function realization of the remote control in a multi-host environment.
[0063] This solution solves the problem that existing BLE voice remote controls cannot achieve unified control of multi-brand and multi-series devices, and provides a universal design method that does not rely on additional hardware, ensuring compatibility between different remote controls, functional flexibility, and efficient use of system resources.
[0064] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a flow chart of the method for generalizing the Bluetooth voice remote control in an embodiment of the present application.
[0066] Figure 2 It is a schematic diagram of a use case of the overlay technology using the linker in an embodiment of the present application.
[0067] Figure 3 It is a use case diagram of the layered architecture and interface abstraction in the embodiments of the present application.
[0068] Figure 4 It is a block diagram of an electronic device that is universal for Bluetooth voice remote control in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.
[0070] Optionally, the present application takes the Bluetooth voice remote control generalization method provided in each embodiment as an example of being used in an electronic device, where the electronic device is a terminal or a server. The terminal may be a mobile phone, a computer, a tablet computer, etc. This embodiment does not limit the type of electronic device.
[0071] Reference Figure 1 , is a flow chart of a method for generalizing a Bluetooth voice remote controller provided by an embodiment of the present application, the method comprising at least the following steps:
[0072] Step S101: construct a heterogeneous remote control feature model.
[0073] In step S101, the heterogeneous remote control feature model is the basis for realizing the universal design of the 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 the subsequent feature set organization and operation.
[0074] Specifically, the voice remote control features mainly include device type information, DIS information, broadcast items, key value table, HID device descriptor (HIDMAP), HID report list, audio GATT service table, OTA service table, non-standard customized service table, encoder, lighting effect and combination key, etc., as shown in Table 1.
[0075] Table 1 Description of voice remote control features
[0076]
[0077]
[0078] In implementation, in order to manage these features in a unified manner, it is necessary to abstract and integrate the above-mentioned features. The specific operations 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 regarded as a model template, which contains various possible remote control feature items. Through the common_char_set_t structure, the features of each remote control are mapped to the common model. Each remote control may have a different feature set, so 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 effective remote control solution object.
[0079] After completing the construction of the feature model, it is necessary to provide standardized access and operation interfaces for these features. In this way, external modules can interact with different features of the remote control through a unified interface. The specific interfaces include: calling led_task_action(), which is used to process requests related to lighting effects and control the lighting effect display of the remote control. Calling keypad_task_send_key(), which is used to send the key information of the remote control to ensure that the key events can be accurately transmitted. The above interface encapsulates the complexity of the underlying hardware and protocols of the remote control, allowing upper-level applications to complete complex operations through simple interface calls, improving the ease of use of the system.
[0080] Finally, through the above steps, not only a feature set model with efficient operation capabilities is obtained, but also the model is scalable and can support new remote control features in the future. For example, if a new type of remote control needs to be added, it is only necessary to expand the feature items in the common_char_set_t structure and manage and access them through the corresponding interface without redesigning the entire system. A universal feature set model is constructed by analyzing, abstracting and unifying the features of different remote controls in detail. The 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(), 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: designing a private feature set pre-compilation framework of remote control combinations based on heterogeneous remote control feature models.
[0082] In step S102, based on the heterogeneous remote control feature model constructed in step S101, a private feature set precompilation framework for the remote control combination is designed. In order to achieve one-to-many control and interaction of voice remote controls, the system needs to support private feature sets of multiple voice remote control solutions. These feature sets will be precompiled and stored in the system, coexisting with a set of remote control MCU hardware and firmware. Due to the limited resources of the MCU, especially the small capacity of RAM, it is necessary to design an efficient feature set coexistence solution to achieve compact RAM resource time-division multiplexing using FLASH.
[0083] Specifically, in order to achieve one-to-many voice remote control and interaction, it is necessary to store multiple remote control solutions and their feature sets in a remote control MCU hardware system. These remote control feature sets need to coexist in the same set of hardware and firmware, and because the MCU's FLASH and RAM resources are limited, especially in terms of RAM, these resources need to be fully utilized through time division multiplexing. Figure 2 As shown in the figure, taking the conventional BLE remote control MCU as an example, it is usually configured with 64KB RAM and 512KB FLASH, while the system modules (such as RTOS, driver and BLE protocol stack, etc.) running in RAM occupy about 50KB RAM, and the remaining RAM space is less than 20KB that can be used for the development of remote control applications. In addition, the original 150KB firmware can be increased to 400KB by replacing the double backup OTA with a single backup OTA. In order to achieve the coexistence of multiple remote control solutions in such a hardware environment, the problem of tight RAM resources is effectively solved by precompiling and storing the feature set in FLASH and cooperating with the technology of memory time division multiplexing. After the instantiation of each remote control feature set is completed, these feature sets will be organized and stored in independent C source files. Each remote control feature set is stored as an independent module separately from other feature sets. These modules will be stored in the FLASH (LMA) area through the link operation of the linker and linked to the RAM (VMA).
[0084] For some common encoders (such as SBC, OPUS, etc.), use the cross-compilation toolchain and Massif heap analyzer to organize their static data footprint and analyze their dynamic memory usage. For these encoders, static data structures are used instead of dynamic memory allocation strategies for fine-tuning to reduce memory usage. After adjustment, the compiled encoder library files will be linked to the firmware and stored in the FLASH (LMA) area and linked to the RAM (VMA) area. By using the linker's overlay (OVERLAY) technology, the RAM data required by all encoders is concentrated in the same memory area to avoid memory fragmentation and ensure that the data of each module can efficiently share the same RAM area.
[0085] Finally, in order to further optimize memory usage and improve the dynamic management of resources, a mechanism for loading on demand is designed. When the system recognizes a specific remote control model and its encoder type, the linker will load the corresponding encoder resources from FLASH to RAM as needed. The linker defines two symbols for each section described by OVERLAY: __load_start_SECNAME and __load_stop_SECNAME, which represent the LMA start address and end address of the section in FLASH, respectively. When it is necessary to load the resources of a specific encoder, the required resources are loaded from FLASH to the overlay area on demand by calling the osal_overlay_load() function. This on-demand loading mechanism can effectively reduce memory usage, because the required encoder data will only be loaded into RAM when it is actually used, without occupying system memory. In this way, the private feature set pre-compilation framework can effectively realize the coexistence of feature sets of multiple remote control solutions, and through time-division multiplexing and on-demand loading of memory resources, ensure that the system can still run efficiently under limited hardware resources.
[0086] Step S103: Decoupling the service module from the remote control feature set based on the private feature set pre-compilation framework.
[0087] In step S103, refer to Figure 3 , a private feature set precompilation framework based on heterogeneous remote control feature models was designed before, which achieved efficient feature set coexistence for the remote control solution under limited hardware resources. Based on this framework, step S103 further promotes the decoupling of the business module and the private feature set of the remote control. Through the introduction of the feature model, the communication interface between the business layer and the feature set is standardized and constrained, thereby achieving an organic combination of the two. Specifically, the business layer no longer needs to care about which remote control instance is currently in effect, nor does it need to make logical or process adjustments for the specific remote control instance, which allows the operation of the business module to remain stable and unaffected when the feature set is switched or changed.
[0088] Specifically, in the design of the Bluetooth voice remote control, the core business module involves operations such as pairing with the host, controlling the host functions through buttons, and realizing human-computer dialogue through voice. In order to decouple the business layer from the remote control feature set, the following strategies and steps are introduced:
[0089] When the system detects that the user triggers pairing or reconnection, the business module does not need to care about 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 right time. This API locates and matches the corresponding broadcast entry and sends it out according to the currently effective remote control scheme. This design makes the business module not need to pay attention to the specific implementation details of the broadcast packet, ensuring the simplicity of operation.
[0090] When executing key control, the business module does not need to care about key values, key value length, or Bluetooth channel details. It only needs to call the keypad_task_send_key() API at the right time and pass in the key sequence number parameter. The API will automatically match the appropriate transmission channel according to the current remote control solution and complete the key data transmission. In this way, the business module completely hands over the complexity of key control to the presentation layer, greatly simplifying the business logic.
[0091] During the voice interaction process, the business module does not need to care about the specific encoder type used, nor does it need to pay attention to the initialization details of the encoder. The business layer only needs to call voice_task_encoder_init() to initialize the encoder. Subsequently, during the voice recording process, voice_task_encoder_encode() is called to complete the audio encoding, and the encoded audio frame is sent to the underlying Bluetooth protocol stack through voice_task_encoder_send(). 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 sending 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 designs a private feature set precompilation framework based on heterogeneous remote control feature models, which enables efficient coexistence of different remote control solutions under limited hardware resources. On this basis, step S103 decouples 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 operating or perceiving specific remote control features when operating the remote control. In this way, the system can cope with the switching of different remote control solutions without adjusting the business layer logic, thereby ensuring the independence and scalability of the business layer.
[0093] Step S104: connecting different hosts using a carousel method based on a backoff strategy.
[0094] In step S104, after successfully decoupling the business module from the specific feature set of the remote control through the feature model, the flexible calling of the remote control function and the compatibility of multiple functions are ensured. On this basis, step S104 further realizes the connection of multiple hosts, adopts a carousel method with a backoff strategy, ensures fast compatibility and connection between different hosts, optimizes connection efficiency and improves user experience. This step designs an efficient carousel mechanism that supports flexible connection of remote controllers of different brands, series, and models with multiple hosts, and improves the connection success rate through a backoff strategy to meet the needs of infrared-free and multi-host control.
[0095] Specifically, in order to achieve the connection of different hosts, the incompatible and heterogeneous broadcast items (broadcast packets and scan response packets) are first sorted into a list named a broadcast set. The items in the broadcast set are hierarchically divided according to brand, series, model, etc. to form multiple broadcast sets of different sizes. Each broadcast set contains different broadcast items, ensuring compatibility with various hosts. In the broadcast set, the broadcast items are sent one by one in a carousel method. In order to improve the efficiency of the carousel, the most efficient 20ms broadcast interval is set to ensure the frequency and stability of the broadcast. Through this high-frequency broadcast, all target hosts can be covered in a shorter time, improving the connection success rate. For the convenience of user operation, different shortcut keys are designed to select different broadcast sets. The mapping relationship between each shortcut key and a specific broadcast set is described in detail in the user manual to ensure that users can easily and quickly select the appropriate broadcast set for connection. In order to further optimize the connection success rate, a backoff strategy is introduced, inspired by the host scanning behavior control in the BLE specification. The carousel cycle is divided into five equal parts, of which the first four are working cycles and the fifth is a backoff cycle. Each broadcast entry is broadcast within the working cycle to ensure that the broadcast is not too frequent and to avoid interference with connection attempts. With this backoff strategy, the system can efficiently rotate between different hosts while avoiding the waste of system resources when trying to connect multiple times. By default, each broadcast entry is broadcast for 2 seconds. In order to improve the user experience, users are allowed to adjust the carousel interval through combination keys. Through two pairs of combination keys, users can increase or decrease the time of the carousel cycle by 0.5 seconds each time, and the adjusted time cannot exceed the maximum limit of 5 seconds or the minimum limit of 0.5 seconds. In addition, the system will feedback the current carousel cycle to the user through the difference in lighting effects. For example, the number of flashes of the lighting effect N means that the current cycle is 0.5*N seconds. In order to provide a better user experience, the manual will recommend the optimal carousel cycle for different broadcast sets, and restore the carousel interval through the third pair of combination keys.
[0096] Step S105: Identify the remote control model and load the target remote control feature set and resources.
[0097] In step 105, after achieving fast connection and compatibility of multiple hosts through backoff strategy and efficient carousel method, the remote control model is further identified according to the detected connection event, and the corresponding feature set and resources are loaded. This step ensures that the functional features and resources of the remote control can be accurately matched after connection through optimized model identification method and dynamic loading technology, 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 stage, indicating that a host and remote control have successfully established a connection. Next, the system obtains the currently used broadcast set and broadcast item number, and switches to the remote control matching stage to load the feature set and resources that match the remote control. The conventional remote control model identification method mainly relies on the device information on the host side (such as PID, VID, PVER, etc.) to determine the model of the remote control. As an improvement, this step adopts a more efficient method: through the broadcast set and broadcast item number, index the private feature set database, accurately determine the remote control scheme, and obtain the host brand, model, category and other information. In this way, the remote control private feature set can be quickly located, thereby providing accurate remote control features for subsequent operations. After confirming the remote control model, the system will continue to process the various attributes of the globally effective remote control object g_common_char_set. According to the determined remote control scheme, the system will fill in the attributes of the object, including key value table, service table, HID device descriptor, lighting effect, combination key, encoder and other configurations. By filling in these configurations, the association between the feature set and the presentation layer is established, so that the business layer can seamlessly call and manage various functions of the remote control. Unlike conventional Bluetooth remote controls that register services and features in a static manner during the initialization phase, this step dynamically loads remote control services and private features during the matching phase. This includes registering DIS services and setting private device information, updating HID MAP and registering HID services, audio GATT services, OTA services, 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 use its features immediately after connection. For the processing of the voice encoder, the conventional solution requires that all resources required for operation be pre-allocated when the system is initialized. However, this step first determines the required voice encoder resources and uses the APIosal_overlay_load to dynamically load the required resources for the encoder. Specifically, the system will dynamically load the encoder resources stored in FLASH into RAM through this API according to the detected remote control scheme, ensuring that the encoder can start quickly and function when actually used.
[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 function and resource configuration according to its model and the needs of the host. The combination of the two ensures the compatibility and efficiency of the Bluetooth voice remote control in a multi-host environment.
[0100] In summary, by building a heterogeneous remote control feature model, unified control of multi-brand and multi-series home appliances can be achieved. The solution first builds a universal model based on different remote control features, simplifies the management and control of different remote controls by defining a universal feature set and providing a standardized operation interface. Then, a pre-compilation framework for private feature sets is designed to enable multiple remote control feature sets to coexist efficiently in a hardware environment with limited resources, and optimize resource utilization through on-demand loading and memory time-division multiplexing technology. Further, by decoupling the business module from the remote control feature set, the operation logic of the business layer is simplified, and the scalability and stability of the system are improved. Finally, the backoff strategy and carousel method are used to achieve fast connection of different hosts, and the dynamic loading technology is used to accurately match the remote control features, ensuring the efficient compatibility and function realization of the remote control in a multi-host environment.
[0101] This solution solves the problem that existing BLE voice remote controls cannot achieve unified control of multi-brand and multi-series devices, and provides a universal design method that does not rely on additional hardware, ensuring compatibility between different remote controls, functional flexibility, and efficient use of system resources.
[0102] An embodiment of the present application also provides a Bluetooth voice remote control universal system, which includes at least the following modules:
[0103] A model building module, used to build a heterogeneous remote control feature model;
[0104] A framework design module is used to design a private feature set pre-compilation framework for remote control combinations based on heterogeneous remote control feature models;
[0105] A service decoupling module is used to realize the decoupling of the service module and the remote control feature set based on the private feature set pre-compilation framework;
[0106] A host connection module, used to realize the connection of different hosts based on the carousel method of 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, refer to the above method embodiment.
[0109] Figure 4 4 is a block diagram of an electronic device provided by an embodiment of the present application. The device at least includes a processor 401 and a memory 402.
[0110] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing 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 a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the Bluetooth voice remote control generalization method provided in the method embodiment of the present application.
[0112] In some embodiments, the electronic device may further optionally include: a peripheral device interface and at least one peripheral device. The processor 401, the memory 402 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.
[0113] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.
[0114] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the Bluetooth voice remote control generalization method of the above method embodiment.
[0115] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the Bluetooth voice remote control generalization method of the above method embodiment.
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for generalizing a Bluetooth voice remote control, characterized in that: The method comprises: Construct heterogeneous remote control feature model; Design a private feature set pre-compilation framework for remote control combinations based on heterogeneous remote control feature models; Decoupling of business modules and remote control feature sets is achieved based on a private feature set precompilation framework; The carousel method based on the backoff strategy realizes the connection of different hosts; Identify the remote control model and load the target remote control feature set and resources.
2. The method for generalizing a Bluetooth voice remote controller according to claim 1, characterized in that: The constructing of the heterogeneous remote control feature model comprises: Analyze and extract characteristic parameters of different remote controls; Define a data structure common_char_set_t to summarize and describe the common features of all remote controls, where the feature set of each remote control is mapped through this data structure; Map the feature set of each remote control into the common_char_set_t structure to generate a unified remote control feature model; Instantiate a global remote control feature object through g_common_char_set to represent the currently effective remote control scheme; A standardized access interface to the remote control feature model is provided, including calling the led_task_action() interface to process lighting effect requests and calling the keypad_task_send_key() interface to send key information.
3. The method for generalizing a Bluetooth voice remote controller according to claim 2, characterized in that: The constructing of the heterogeneous remote control feature model further comprises: Define the common_char_set_t data structure to describe the common features of different remote control solutions, and map the feature set 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 processing lighting control requests and keypad_task_send_key() for transmitting key information, ensuring that external modules can interact with remote control features through these interfaces; When the remote control features change, the common_char_set_t structure is expanded to support the new features and maintain the consistency of the interface.
4. The method for universalizing a Bluetooth voice remote controller 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: A plurality of remote control schemes and their feature sets are stored in the remote control MCU hardware, each remote control scheme including a plurality of remote control feature sets; Precompile and store the feature set of each remote control solution in FLASH, and each feature set is stored as an independent module; Each remote control feature set is linked from FLASH to RAM through a linker, and each feature set is stored and linked as an independent module; For general coders, use the cross-compilation toolchain and Massif heap analyzer to analyze static data footprint and organize dynamic memory usage; Use static data structure instead of dynamic memory allocation strategy to reduce memory usage, and link the optimized encoder library file to the firmware, store it in the FLASH area, and link it to the RAM area; Use the linker's overlay technology to bring all the RAM data required by the encoder into the same memory area; Design an on-demand loading mechanism. When the specific remote control model and encoder type are identified, the encoder resources are loaded from FLASH to RAM on demand through the linker, and the required resources are loaded into the overlay area of RAM using the osal_overlay_load() function.
5. The method for universalizing a Bluetooth voice remote controller according to claim 1, characterized in that: The decoupling of the service module and the remote control feature set based on the private feature set pre-compilation framework includes: When it is detected that the user triggers pairing or reconnection, the presentation layer API is called, such as adv_task_handle_pair_adv(), which matches the corresponding broadcast entry and sends it according to the currently effective remote control scheme; In the key control operation, call the keypad_task_send_key() API and pass in the key sequence number parameter. The API automatically matches the appropriate transmission channel and sends the key information according to the current remote control scheme; During the voice interaction process, the voice_task_encoder_init() API is called to initialize the encoder, and the audio encoding is completed through voice_task_encoder_encode(), and then the encoded audio frame is sent to the Bluetooth protocol stack through voice_task_encoder_send(); During the voice interaction process, the error code (such as EAGAIN or EFAULT) returned by the API determines whether to retry or terminate the sending of audio data.
6. The method for universalizing a Bluetooth voice remote controller according to claim 1, characterized in that: The carousel method based on the backoff strategy realizes the connection of different hosts, including: Arrange broadcast items into broadcast sets, divide them into levels, and form multiple broadcast sets of different sizes; In the broadcast set, broadcast items are sent one by one in a carousel manner, the broadcast interval is set to 20ms, and different broadcast sets can be selected through shortcut keys; The carousel cycle is divided into five equal parts, of which the first four parts are working cycles and the fifth part is a backoff cycle. Each broadcast entry is broadcast for 2 seconds in the working cycle. Provides a combination key function, through which two pairs of combination keys can be used to increase or decrease the carousel cycle time, each time by 0.5 seconds, and the adjusted time cannot exceed the range of 0.5 seconds to 5 seconds; The current carousel cycle is fed back through the difference in lighting effects. The number of flashes of the lighting effect N indicates that the current cycle is 0.5*N seconds. Provides a recovery function. Use the third pair of key combinations to restore the carousel interval to the default value.
7. The method for universalizing a Bluetooth voice remote controller according to claim 1, characterized in that: The identification of the remote control model and loading of the target remote control feature set and resources include: When a BLE_CONNECTED event is detected, the broadcast is stopped and the carousel stage is exited, indicating that the remote control is connected to the host; Get the currently used broadcast set and broadcast item number, and switch to the remote control matching stage; According to the broadcast set and the broadcast item sequence number, the private feature set database is indexed to determine the remote control scheme; After determining the remote control model, fill in the attributes of the global remote control object g_common_char_set; Dynamically load remote control services and private features according to the determined remote control scheme; According to the detected remote control scheme, the encoder resources are dynamically loaded through the osa l_overl ay_load API to ensure that the encoder is started and functions when it is actually used.
8. A universal system for Bluetooth voice remote control, characterized in that: include: A model building module, used to build a heterogeneous remote control feature model; A framework design module is used to design a private feature set pre-compilation framework for remote control combinations based on heterogeneous remote control feature models; A service decoupling module is used to realize the decoupling of the service module and the remote control feature set based on the private feature set pre-compilation framework; A host connection module, used to realize the connection of different hosts based on the carousel method of 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.
9. An electronic device, characterized in that: The device includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement a Bluetooth voice remote control generalization method 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, which, when executed by a processor, is used to implement a method for generalizing a Bluetooth voice remote control 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
Automatic generation method of embedded controller program framework
CN105786500A
Response method, device and system based on Bluetooth remote controller, and readable storage medium
CN107635214A
Script design method for infrared remote control
CN110308897A