A method and apparatus for linking a Bluetooth keyboard, and a Bluetooth keyboard

By monitoring the working status and battery level of the Bluetooth keyboard in real time, and automatically performing connection detection and power consumption rate calculation, the problems of complex connection and high power consumption of traditional Bluetooth keyboards are solved, achieving simplified operation and energy saving.

CN119883008BActive Publication Date: 2026-04-17JING MOLD ELECTRONICS TECHSHENZHEN
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JING MOLD ELECTRONICS TECHSHENZHEN
Filing Date
2024-09-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional Bluetooth keyboards are complex to connect to and consume a lot of power, resulting in poor ease of use and unnecessary power consumption.

Method used

By acquiring the Bluetooth keyboard's working status and remaining battery power, performing connection detection and search operations, calculating the power consumption rate, and determining the appropriate threshold, a command to shut down the Bluetooth module is sent to achieve automatic sleep mode for the Bluetooth keyboard.

Benefits of technology

It simplifies the connection process between the Bluetooth keyboard and the device, reduces the power consumption of the Bluetooth connection, and improves ease of operation and battery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883008B_ABST
    Figure CN119883008B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of wireless communication, and discloses a Bluetooth keyboard linking method and device and a Bluetooth keyboard. The method comprises the following steps: in the working process of Bluetooth linking of the Bluetooth keyboard, the working state and the residual power of the Bluetooth keyboard are acquired; according to the working state, a detection linking operation is carried out to obtain a linking condition; according to the linking condition, a searching operation is carried out to obtain a linking result; according to the linking result and the residual power, a power consumption rate calculation operation is carried out to obtain a power consumption rate; according to the power consumption rate, a threshold comparison judgment operation is carried out to obtain a keyboard closing instruction, the keyboard closing instruction is sent to the Bluetooth keyboard, so that the Bluetooth module of the Bluetooth keyboard is closed after the Bluetooth keyboard receives the keyboard closing instruction. The application can simplify the Bluetooth keyboard and device linking operation and reduce the power consumption of Bluetooth linking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication technology, and in particular to a Bluetooth keyboard connection method, apparatus, and Bluetooth keyboard. Background Technology

[0002] Currently, with the widespread use of electronic devices, there are more and more external interfaces based on wireless technology. Bluetooth is a commonly used interface in electronic devices in recent years, and the release of Bluetooth 5.0 has brought Bluetooth technology closer to maturity. The main difference between Bluetooth and Wi-Fi is that Wi-Fi can accommodate 128 user devices per square kilometer simultaneously. While peripheral input and operation devices based on Bluetooth technology, such as Bluetooth mice, Bluetooth keyboards, Bluetooth headsets, and Bluetooth TV remotes, are becoming increasingly widespread, Bluetooth keyboards are not yet widely used due to cost and power consumption considerations.

[0003] Traditional Bluetooth keyboards use a one-click start operation to enter "exploration mode" or "discoverable mode," and constantly perform environmental recognition, checking for the presence of preset devices nearby and scanning for user operations. This not only hinders the automatic connection and convenient operation of Bluetooth keyboards but also increases the power consumption of Bluetooth keyboard connections.

[0004] The above Bluetooth connection methods complicate the connection process between the Bluetooth keyboard and the device and increase the power consumption of the Bluetooth connection. Summary of the Invention

[0005] This invention provides a Bluetooth keyboard connection method, device, and Bluetooth keyboard to simplify the connection operation between the Bluetooth keyboard and the device and reduce the power consumption of the Bluetooth connection.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a Bluetooth keyboard connection method, comprising:

[0007] During the Bluetooth connection process of the Bluetooth keyboard, the working status and remaining battery power of the Bluetooth keyboard are obtained;

[0008] Based on the described working status, a link detection operation is performed to obtain the link status;

[0009] Based on the aforementioned link information, a search operation is performed to obtain the link results;

[0010] Based on the link result and the remaining battery power, a power consumption rate calculation operation is performed to obtain the power consumption rate;

[0011] A keyboard shutdown command is obtained by performing a threshold comparison and judgment operation based on the power consumption rate, and the keyboard shutdown command is sent to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

[0012] As an optional implementation, the step of performing a link detection operation based on the working state to obtain the link status includes:

[0013] When the conditions for the Bluetooth keyboard to be in a working state are met, it is determined that the working state is the Bluetooth keyboard being turned on, and a connection detection operation is performed to obtain the connection status, wherein the connection status includes being connected and not connected.

[0014] As an optional implementation, the activation state can be either timer-started or manually started, wherein timer-started includes a preset time period for the timer.

[0015] As an optional implementation, the step of performing a search operation based on the link information to obtain link results includes:

[0016] If the link status is "already linked", then the "already linked" result is obtained;

[0017] If the link status is unlinked, a search operation is performed to obtain the link results, which include both linked and unlinked results.

[0018] As an optional implementation, after performing a search operation based on the link information and obtaining the link results, the method further includes:

[0019] Based on the unlinked result, a timed detection operation is performed to obtain a stop detection instruction, wherein the stop detection instruction includes a link success instruction and an instruction that the set detection number threshold has been exceeded.

[0020] As an optional implementation, the step of calculating the power consumption rate based on the link result and the remaining power to obtain the power consumption rate includes:

[0021] The power consumption rate is calculated using the following formula:

[0022] ,

[0023] in, This refers to the rate of power consumption. For the first The remaining power at each detection point For the first The remaining power at each detection point As the largest detection point, This is the first point.

[0024] As an optional implementation, the step of obtaining a keyboard shutdown command by performing a threshold comparison based on the power consumption rate, and sending the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command, includes:

[0025] Based on the power consumption rate and the preset power consumption rate threshold, a threshold comparison judgment operation is performed to obtain a keyboard shutdown command, wherein the keyboard shutdown command includes the communication address of the Bluetooth keyboard;

[0026] Based on the communication address, the keyboard shutdown command is sent to the Bluetooth keyboard, so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command.

[0027] As an optional implementation, the method further includes:

[0028] When the number of detection points reaches the preset maximum number of detections, detection stops and a timer starts. After a preset waiting time, the detection mode is restarted.

[0029] Secondly, the present invention provides a Bluetooth keyboard connection device, comprising:

[0030] The information acquisition module is used to acquire the working status and remaining battery power of the Bluetooth keyboard during the Bluetooth connection process.

[0031] The link detection module is used to perform link detection operations based on the working status to obtain the link status;

[0032] The link result judgment module is used to perform a search operation based on the link information to obtain the link results;

[0033] The power consumption calculation module is used to perform a power consumption rate calculation operation based on the link result and the remaining power to obtain the power consumption rate;

[0034] The device module is used to perform a threshold comparison and judgment operation based on the power consumption rate to obtain a keyboard shutdown command, and send the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

[0035] Thirdly, the present invention provides a Bluetooth keyboard for communicating with a linking device of the Bluetooth keyboard as described above, and for receiving keyboard-on and keyboard-off commands.

[0036] Fourthly, the present invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the Bluetooth keyboard linking method as described above.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] This invention provides a Bluetooth keyboard connection method, comprising: during the Bluetooth keyboard's Bluetooth connection process, acquiring the Bluetooth keyboard's working state and remaining battery power; performing a connection detection operation based on the working state to obtain a connection status; performing a search operation based on the connection status to obtain a connection result; performing a power consumption rate calculation operation based on the connection result and the remaining battery power to obtain a power consumption rate; performing a threshold comparison judgment operation based on the power consumption rate to obtain a keyboard shutdown command; and sending the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command.

[0039] The Bluetooth keyboard connection method of this invention enables automatic connection to devices such as mobile phones, tablets, and laptops; it also incorporates a sleep / wake-up mechanism for the Bluetooth module, significantly reducing power consumption. This Bluetooth keyboard connection method not only automatically establishes communication with mobile phones, tablets, or laptops through Bluetooth broadcasting and sleep / wake-up mechanisms, allowing for automatic Bluetooth connection, but also enables the Bluetooth keyboard to automatically connect to the Bluetooth keyboards of mobile phones, tablets, or laptops, making the Bluetooth keyboard convenient to use. The connection method of this invention is simple to operate and reduces time. It also features fast key response and low latency, and the automatic sleep mode of the Bluetooth keyboard, which shuts down the Bluetooth module, greatly reduces power consumption and avoids wasting power when not in use. Therefore, the connection operation between the Bluetooth keyboard and the device is simplified, and the power consumption of the Bluetooth connection is greatly reduced. Attached Figure Description

[0040] Figure 1 This is a flowchart illustrating a Bluetooth keyboard connection method provided in an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of the connection device for the Bluetooth keyboard provided in an embodiment of the present invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] It's worth noting that with the widespread use of electronic devices, the number of external interfaces based on wireless technology is also increasing. Bluetooth has become a common interface widely adopted by electronic devices in recent years, and the release of Bluetooth 5.0 has brought Bluetooth technology closer to maturity. The main difference between Bluetooth and Wi-Fi is that Wi-Fi can accommodate 128 user devices simultaneously per square kilometer. While peripheral input and operation devices based on Bluetooth technology, such as Bluetooth mice, keyboards, headsets, and TV remotes, are becoming increasingly widespread, Bluetooth keyboards are not as common due to cost and power consumption considerations. Traditional Bluetooth keyboard connections use a one-button start operation to enter "exploration mode" or "discoverable mode," constantly identifying the environment, checking for nearby pre-set devices, and scanning for user interaction. This hinders automatic connection and convenient operation while increasing power consumption. These Bluetooth connection methods complicate the connection process between Bluetooth keyboards and devices and increase power consumption.

[0044] In response to the above problems, refer to Figure 1 The first embodiment of the present invention provides a method for connecting a Bluetooth keyboard, including the following steps:

[0045] S11, during the Bluetooth connection process of the Bluetooth keyboard, obtain the working status and remaining battery power of the Bluetooth keyboard;

[0046] S12, based on the working state, perform a connection detection operation to obtain the connection status;

[0047] S13, Based on the link information, perform a search operation to obtain the link results;

[0048] S14, Based on the link result and the remaining power, perform a power consumption rate calculation operation to obtain the power consumption rate;

[0049] S15, a keyboard shutdown command is obtained by performing a threshold comparison and judgment operation based on the power consumption rate, and the keyboard shutdown command is sent to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

[0050] In step S11, during the Bluetooth connection process of the Bluetooth keyboard, the working status and remaining battery power of the Bluetooth keyboard are obtained.

[0051] In the above embodiments, during the Bluetooth keyboard connection process, it is first necessary to ensure that the Bluetooth keyboard is correctly turned on and in working condition. At this time, the keyboard's working status and remaining battery power can be retrieved in detail through a specific Bluetooth protocol. The keyboard transmits its operating status (e.g., whether it is normally turned on or turned off due to a malfunction) and remaining battery power information to the paired device via the Bluetooth protocol. This allows the user to obtain the keyboard's status information in real time and continuously monitor its battery power. The system will effectively manage based on this information, ensuring that the Bluetooth keyboard is always in working condition and has sufficient power during the Bluetooth connection process, thereby optimizing the user experience. It also calculates the remaining battery power to prevent operation interruption due to insufficient power or other problems, and on this basis, provides hardware protection for subsequent Bluetooth connections and provides an effective data foundation for subsequent calculation of power consumption rate.

[0052] It's important to note that there are two main methods for activating a Bluetooth keyboard: button activation and manual activation. For button activation, a timer is preferred. This timer is set to automatically activate the Bluetooth module after a certain time interval from when the keyboard is turned on, enabling precise control and automated operation. The timer can be set to a specific time interval to ensure the Bluetooth module activates within the predetermined time, thus optimizing the startup process. On the other hand, manual activation is preferred before or during keyboard power-on. The user manually activates the Bluetooth module during the power-on phase, directly establishing a connection with the electronic device. This method allows users to handle connection needs immediately during device startup, enabling more direct and flexible operation. Combining these two activation methods improves the Bluetooth keyboard's startup efficiency and connection stability, ensuring efficient and reliable operation in various usage scenarios.

[0053] It should also be noted that when the Bluetooth keyboard enters working mode and is turned on, it will automatically search for Bluetooth devices to identify connectable electronic devices. This search process prioritizes establishing a connection with mobile phones, followed by tablets or laptops. The electronic device should be a Bluetooth-enabled unit capable of establishing a connection via the Bluetooth protocol for data communication. This automatic search mechanism ensures that the Bluetooth keyboard can quickly and efficiently connect to the preferred device, thereby optimizing the user experience and device compatibility.

[0054] It's worth noting that to improve the convenience and operational efficiency of the Bluetooth keyboard, a dedicated power button can be designed and installed to enable one-click quick activation of the Bluetooth module. This power button can connect directly to the Bluetooth module, simplifying the Bluetooth activation process. The installation options for this button are flexible; it can be integrated into the computer's driver or related application (APP), or into mobile applications. By operating the relevant APP or driver on these platforms, users can monitor the keyboard's status in real time and promptly address Bluetooth module connection issues. This design does not require the power button to be physically installed on the Bluetooth module; instead, it operates through a software interface, providing users with a more convenient management method. This approach effectively reduces the complexity of hardware modification while enhancing the intelligence of device operation and user experience, making Bluetooth module management and troubleshooting more efficient.

[0055] It's also worth noting that the Bluetooth keyboard features user key selection and a keyboard reset mode to optimize connectivity with various electronic devices. The keyboard reset function primarily involves activating the Bluetooth module and automatically searching for nearby connectable electronic devices. During this process, users can manually select the target device, such as a mobile phone, tablet, or laptop, and establish a connection by entering the device's address code according to the Bluetooth protocol. This not only ensures effective pairing of the keyboard with the selected device but also allows users to adjust its settings via the Bluetooth keyboard. The reset process includes enabling Bluetooth, performing a search and selecting the target device, and then performing the necessary pairing and connection. Once the connection is established, users can modify the settings via the Bluetooth keyboard or manage the keyboard's input methods and configurations using a connected mobile phone, tablet, or laptop. This flexible management function allows users to customize the keyboard's operation according to specific needs, thereby improving input efficiency and ease of use. The combination of reset and manual selection functions aims to provide users with a more precise and efficient connection process, ensuring that the Bluetooth keyboard can smoothly interact with various Bluetooth-enabled devices and meet input needs in different scenarios. Through this automated and manual selection mechanism, Bluetooth keyboards not only simplify the device pairing process but also enhance the user experience and device compatibility.

[0056] In step S12, a link detection operation is performed based on the working state to obtain the link status.

[0057] In the above embodiment, the process first requires ensuring that the Bluetooth keyboard is turned on and that the keyboard and the device to be connected are within the normal working distance. Subsequently, the system will perform a series of operations to complete the connection, including scanning for nearby Bluetooth devices, initiating a connection request to the target device, receiving and parsing the target device's response, and confirming the connection status. The system will continuously monitor the status changes during the connection process, evaluating the stability and effectiveness of the connection in real time. If the connection is successful, the system will display a successful connection status and enable data exchange; if the connection fails, the system will generate a detailed error message, providing feedback on the connection failure and potentially offering further troubleshooting suggestions. The system will also record detailed logs of connection attempts for subsequent troubleshooting and performance optimization.

[0058] It should be specifically noted that the connection between the Bluetooth keyboard and electronic devices is automatic, such as between a Bluetooth watch and its related electronic devices (smartphones, tablets, laptops, smart TVs / set-top boxes, smart wearables, Bluetooth headsets). The preferred Bluetooth connection mode is Bluetooth 4.0 or higher, which includes BLE (Bluetooth Low Energy). The Bluetooth keyboard has user-selectable key settings and a keyboard reset function, automatically connecting to connectable electronic devices. The keyboard reset function of this invention refers to enabling Bluetooth, searching and selecting, manually selecting the address code of a mobile phone, tablet, or laptop, and manually establishing a connection according to the Bluetooth protocol. This allows the user to change keyboard settings via the Bluetooth keyboard or manage keyboard input using a mobile phone, tablet, or laptop.

[0059] It's also worth noting that Bluetooth primarily uses the 2.4GHz frequency band; Bluetooth 4.0 improves upon Bluetooth 3.0's radio frequency technology through software, offering faster connection speeds, a larger number of connections, and greater range. Its main feature is a connection speed increase to up to 1Mbps. Besides significantly improving performance, Bluetooth 4.0 also further reduces the size of Bluetooth devices. Previously, Bluetooth devices required approximately 16mm x 29mm; now, they only need 6mm x 4mm. Therefore, Bluetooth 4.0 products offer greater design flexibility, allowing for even smaller device shapes. Furthermore, Bluetooth 4.0 and later versions have brought significant advancements in wireless communication technology, primarily in the following aspects: First, Bluetooth 4.0 introduced Bluetooth Low Energy (BLE) technology, a communication method specifically designed for low-power devices, significantly reducing power consumption and enabling low-power devices such as wearables and smart home sensors to operate for extended periods without frequent battery replacements. Second, Bluetooth 4.0 improved data transmission, increasing packet size and transmission speed, while enhancing privacy and security, supporting stronger data encryption and privacy protection features.

[0060] Furthermore, Bluetooth 5.0 and later versions offer even greater performance improvements. Bluetooth 5.0 not only increases data transfer rates (up to 2 Mbps) but also extends communication range, allowing devices to maintain stable connections over longer distances. It also enhances broadcast capabilities, enabling devices to broadcast more information. Bluetooth versions 5.1 and 5.2 introduced positioning features such as direction finding and distance measurement, providing greater accuracy for Internet of Things (IoT) and smart home applications. These advancements have made Bluetooth technology more widely and efficiently used across multiple fields.

[0061] In step S13, a search operation is performed based on the link information to obtain the link results.

[0062] In one embodiment, after performing a search operation based on the link status and obtaining the link results, the method further includes: performing a timed detection operation based on the unlinked results to obtain a stop detection instruction, wherein the stop detection instruction includes a link success instruction and an instruction that the number of detections has exceeded a set threshold.

[0063] In one embodiment, the method further includes: when the number of detection points reaches a preset maximum number of detections, stopping the detection and starting a timer, and after a preset waiting time, restarting the detection mode.

[0064] In the above embodiments, the Bluetooth keyboard determines whether a search operation is needed based on different connection statuses. When the connection status is "connected," it directly outputs the "connected" result. When the connection status is "not connected," it performs a search operation. If an electronic device is found, a connection operation is performed, and a "connected" result is obtained. If no electronic device is found, a timed detection operation is entered. Under this operation, the timed detection operation stops when an electronic device is detected or the maximum number of detections is reached. Under the search operation, on the basis of automatic connection, further searching for electronic devices within the Bluetooth connection working range can be performed, reducing the cumbersomeness of manual Bluetooth connection operation and simplifying the Bluetooth connection process.

[0065] It should be noted that when the Bluetooth keyboard connects to electronic devices, if the number of connected devices is greater than one, it will connect to the closest electronic device or the electronic device actively selected by the user. In addition, when the number of connected devices is greater than one, it will detect the strength of the distance between each device and the Bluetooth keyboard and automatically select the closest device to connect to. If multiple devices are connected at the same time, it will prioritize the last connected device, the device for which the user has enabled shortcut keys, and the device whose distance was last detected.

[0066] It's also worth noting that after the Bluetooth keyboard starts up and completes initial testing, if a connection failure occurs, the system will automatically initiate a search mode to identify nearby connectable Bluetooth devices. This process involves scanning all Bluetooth-enabled electronic devices, including but not limited to mobile phones, tablets, and laptops. Among these connectable devices, the system prioritizes pairing with mobile phones to ensure priority connection with the most frequently used device. Mobile phones are prioritized due to their ubiquity and high usage frequency; they are typically the most frequently connected device in most users' daily operations. Furthermore, as Bluetooth-enabled units, these electronic devices can achieve efficient data communication after establishing a connection via the Bluetooth protocol. In this way, the Bluetooth keyboard ensures a smooth and stable Bluetooth connection with the user's primary device during startup and testing, providing a seamless input experience and improving user efficiency. The system's automatic connection function and priority selection mechanism aim to simplify the pairing process, reduce the complexity of manual operation, and optimize the user experience.

[0067] It should be noted that the search time can be set according to the device's broadcast frequency, and the maximum number of detections can also be adjusted according to the actual situation.

[0068] It should also be noted that when the Bluetooth keyboard enters search mode, it scans for connected electronic devices: if an electronic device is searching for the Bluetooth keyboard, the keyboard will immediately connect to it; if an unconnected electronic device is detected, a connection will be automatically established; if no connected or connectable electronic device is detected, it will periodically check until an electronic device is detected; if the maximum number of checks is reached, the detection state will end. Specifically, the detection scans for electronic devices that are already connected to the Bluetooth keyboard. When the maximum number of periodic checks is reached, the detection stops, and after a period of time, the detection mode will restart, waiting for a connection.

[0069] In step S14, based on the link result and the remaining power, a power consumption rate calculation operation is performed to obtain the power consumption rate.

[0070] In the above embodiment, after the Bluetooth keyboard successfully connects to the electronic device, the system monitors the keyboard's battery level in real time and calculates the power consumption rate by analyzing the remaining battery data. This calculation is based on real-time battery data to ensure accurate assessment of battery usage. The system provides detailed battery status feedback to the user based on the calculated power consumption rate, helping the user understand the remaining battery level. Furthermore, the system continuously monitors the user's operating patterns and usage, and automatically sends a shutdown command to interrupt the Bluetooth connection upon detecting inactivity or prolonged inactivity. This measure aims to reduce the Bluetooth keyboard's power consumption during connection, thereby optimizing energy efficiency and extending battery life. Through this intelligent management solution, the Bluetooth keyboard can significantly reduce power consumption while providing high performance, improving the overall user experience.

[0071] It should be noted that the formula for calculating the power consumption rate is as follows:

[0072] ,

[0073] in, This refers to the rate of power consumption. For the first The remaining power at each detection point For the first The remaining power at each detection point As the largest detection point, This is the first point.

[0074] For example, if the battery level of the Bluetooth keyboard is lower than a certain value (this value needs to be set manually; setting the threshold battery level according to different needs can enable personalized use of the Bluetooth keyboard), and the signal strength of the Bluetooth module on the Bluetooth keyboard drops by 20%-50%, the Bluetooth keyboard will consider the relevant reasons and decide to turn off the Bluetooth module.

[0075] In step S15, a keyboard shutdown command is obtained by performing a threshold comparison and judgment operation based on the power consumption rate, and the keyboard shutdown command is sent to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

[0076] In the above embodiments, the Bluetooth keyboard accurately assesses its battery status by monitoring the power consumption rate in real time and comparing it with a preset threshold power consumption rate. This process involves precise measurement of the power consumption rate and real-time analysis using algorithms to determine whether the current battery consumption exceeds a set safe range. When the power consumption rate reaches or falls below the set threshold, the system further considers the signal strength of the Bluetooth module. Measuring signal strength is crucial for determining the actual operating status and power consumption of the Bluetooth module. When the signal strength indicates low Bluetooth module efficiency, the system issues a shutdown command, requiring the Bluetooth module to stop working. At this time, the keyboard shuts down its Bluetooth module according to the received command to reduce battery consumption. After the Bluetooth module is shut down, the Bluetooth keyboard immediately enters sleep mode. Enabling this mode effectively reduces power consumption and avoids wasting battery power due to unnecessary Bluetooth activity. In sleep mode, the keyboard's Bluetooth module will no longer transmit or receive signals, greatly reducing power consumption and effectively extending battery life. Through this series of refined power management measures, the Bluetooth keyboard has achieved significant results in optimizing battery use and reducing power loss. Bluetooth keyboards not only improve battery efficiency but also effectively reduce the risk of Bluetooth functionality interruptions due to low battery. This optimization not only solves the power management problems of traditional Bluetooth keyboards but also enhances the user experience, enabling devices to maintain stable performance and a longer lifespan during extended use.

[0077] For example, when the Bluetooth module's signal strength decreases to between 20% and 50%, and the power consumption rate drops to or below a set threshold, the Bluetooth keyboard will automatically receive and execute a command to shut down the Bluetooth module. This mechanism aims to protect battery life and optimize the overall performance of the device. Furthermore, after the Bluetooth connection is disconnected and remains disconnected for ten minutes, the Bluetooth keyboard will automatically enter sleep mode. In this mode, the device will significantly reduce power consumption to maximize battery life and ensure that the device maintains a certain level of power even when not in use for extended periods. This design not only enhances the user experience but also improves the device's energy efficiency management.

[0078] It should be noted that the Bluetooth keyboard has a sleep mode (preferably, the keyboard enters sleep mode when turned off; and preferably wakes up from sleep mode when turned on) and automatic connection to connectable electronic devices. Bluetooth phones, tablets, or laptops also have sleep and wake-up states. Entering sleep mode involves inactivity for a period of time after being turned off. Ideally, a timer should be set when entering sleep mode to automatically wake the device when the timer expires. Simultaneously, the electronic device (Bluetooth phone, tablet, or laptop) remains in sleep mode and does not actively broadcast. Ideally, a wake-up broadcast should be set at regular intervals for active pairing.

[0079] It's important to note that connection failure may occur when the Bluetooth keyboard and electronic device are more than 300 meters apart. In this case, the system will issue a distance warning and suggest the user move the device to a more stable connection range. Bluetooth technology typically has an effective range of 10 to 100 meters; however, exceeding this range in actual use may cause signal attenuation, affecting the stability of the connection between devices. If the device is moved back to a stable connection range, the keyboard will automatically attempt to reconnect, or the user can manually wake the keyboard by pressing a key to re-establish the connection. When electronic devices are not used for extended periods, they may enter standby or sleep mode, at which point the Bluetooth keyboard may not detect the device. Similarly, when the distance between the keyboard and device exceeds the normal range, or when the keyboard is in an abnormal state, the keyboard may fail to detect the target device. The connection stability of Bluetooth devices depends on the effective distance between devices and their normal operating status; any non-standard conditions will affect the transmission and connection of the Bluetooth signal. Furthermore, if no connectable devices are available in the Bluetooth device list, the system will prompt the user that no devices can be connected. In this case, the user needs to wake the Bluetooth keyboard by pressing a key so that it can re-attempt to establish a connection with the electronic device. In this situation, the Bluetooth keyboard will actively scan for nearby devices and initiate a connection request when a matching device is detected. If the device list is empty, it means there are no connectable Bluetooth devices in the current environment, or the device is turned off or inactive. To resolve these issues, users need to ensure that the Bluetooth device is turned on and in pairing mode, and that the electronic device is within Bluetooth range and the keyboard is functioning properly. Regularly checking and maintaining the keyboard's battery status, Bluetooth module, and ensuring the device's Bluetooth function is working correctly will help improve the connection success rate. Through these measures, users can effectively improve the connection stability and user experience of their Bluetooth devices.

[0080] It's also worth noting that when the distance between the Bluetooth keyboard and the paired device exceeds the preset effective communication range, the Bluetooth keyboard will automatically execute a shutdown command and enter sleep mode. The core purpose of this process is to optimize battery management, reduce energy consumption, and ensure the device's longevity. In practical applications, the Bluetooth keyboard's operating state and power consumption management are highly dependent on the effective communication distance between the device and its paired device. When the distance exceeds the predetermined range, the quality and strength of the Bluetooth signal will significantly decrease, leading to communication interruption or unstable connection. To address this, the Bluetooth keyboard automatically triggers sleep mode, and when the Bluetooth keyboard initiates sleep mode upon detecting that the distance to the paired device has exceeded the communication range, it does not consider the remaining battery power. This design aims to avoid unnecessary power consumption, ensuring that the device's battery resources are effectively utilized when needed, further reducing the Bluetooth keyboard's power waste.

[0081] In summary, the Bluetooth keyboard connection method provided in this embodiment of the invention, executed by the Bluetooth keyboard, includes: during the Bluetooth keyboard's Bluetooth connection process, acquiring the keyboard's operating status and remaining battery power; performing a connection detection operation based on the operating status to obtain a connection status; performing a search operation based on the connection status to obtain a connection result; performing a power consumption rate calculation operation based on the connection result and the remaining battery power to obtain a power consumption rate; performing a threshold comparison judgment operation based on the power consumption rate to obtain a keyboard shutdown command; and sending the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command.

[0082] This invention also provides a Bluetooth keyboard connection device, such as... Figure 2 As shown, it is a structural schematic diagram of the Bluetooth keyboard connection device provided in an embodiment of the present invention, including:

[0083] Information acquisition module 1 is used to acquire the working status and remaining battery power of the Bluetooth keyboard during the Bluetooth connection process.

[0084] Link detection module 2 is used to perform link detection operations based on the working status to obtain the link status;

[0085] The link result judgment module 3 is used to perform a search operation based on the link information to obtain the link results;

[0086] The power consumption calculation module 4 is used to perform a power consumption rate calculation operation based on the link result and the remaining power to obtain the power consumption rate;

[0087] The device module 5 is used to perform a threshold comparison and judgment operation based on the power consumption rate to obtain a keyboard shutdown command, and send the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

[0088] In an optional implementation, the link detection module 2 is further configured to:

[0089] The step of performing a connection detection operation based on the working state to obtain the connection status includes: when the condition that the Bluetooth keyboard is in a working state is met, determining that the working state is the Bluetooth keyboard in an on state, performing a connection detection operation to obtain the connection status, wherein the connection status includes connected and not connected.

[0090] In an alternative embodiment, the device is further configured to:

[0091] The activation state is either timer start or manual start, wherein timer start includes a preset time period for the timer.

[0092] In an optional implementation, the link result determination module 3 is further configured to:

[0093] The step of performing a search operation based on the link status to obtain link results includes: if the link status is linked, then obtaining linked results; if the link status is not linked, then performing a search operation to obtain link results, wherein the link results include linked results and not linked results.

[0094] In an alternative embodiment, the device is further configured to:

[0095] After performing a search operation based on the link information and obtaining the link results, the method further includes: performing a timed detection operation based on the unlinked results to obtain a stop detection instruction, wherein the stop detection instruction includes a link success instruction and an instruction that the set detection count threshold has been exceeded.

[0096] In an optional implementation, the power calculation module 4 is further configured to:

[0097] The step of calculating the power consumption rate based on the link result and the remaining power to obtain the power consumption rate includes: calculating the power consumption rate using the following formula:

[0098] ,

[0099] in, This refers to the rate of power consumption. For the first The remaining power at each detection point For the first The remaining power at each detection point As the largest detection point, This is the first testing point.

[0100] In an optional implementation, the shut-off device module 5 is further configured to:

[0101] The step of obtaining a keyboard shutdown command by performing a threshold comparison operation based on the power consumption rate, and sending the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command, includes: performing a threshold comparison operation based on the power consumption rate and a preset power consumption rate threshold to obtain a keyboard shutdown command, wherein the keyboard shutdown command includes the communication address of the Bluetooth keyboard; and sending the keyboard shutdown command to the Bluetooth keyboard based on the communication address so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command.

[0102] In one alternative embodiment, the device is further used for;

[0103] The method further includes: when the number of detection points reaches the preset maximum number of detections, the detection is stopped and a timer is started; after a preset waiting time, the detection mode is restarted.

[0104] This invention provides a Bluetooth keyboard with the following functions: communication connection with a Bluetooth keyboard linking device, and receiving keyboard open and keyboard close commands; the Bluetooth keyboard implements the Bluetooth keyboard linking method described in the above embodiments.

[0105] The present invention also provides a terminal device. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the Bluetooth keyboard connection method described above.

[0106] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0107] The terminal device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of terminal devices and do not constitute a limitation on the terminal device. It may include more or fewer components than described above, or a combination of certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.

[0108] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0109] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0110] Wherein, if the modules / units integrated in the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0111] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0112] Compared to existing technologies, the beneficial effects of this invention are as follows: The Bluetooth keyboard connection method of this invention achieves an automatic connection mechanism to devices such as mobile phones, tablets, and laptops; and the Bluetooth module's sleep / wake-up mechanism significantly saves Bluetooth module power consumption. This Bluetooth keyboard connection method not only automatically establishes communication with mobile phones, tablets, or laptops through Bluetooth broadcasting and sleep / wake-up mechanisms, enabling automatic Bluetooth connection, but also allows the Bluetooth keyboard to automatically connect to the Bluetooth keyboards of mobile phones, tablets, or laptops, making the Bluetooth keyboard convenient to use. The connection method of this invention is simple to operate and reduces time. It also has the advantages of fast key response and low latency, and the Bluetooth module shuts down when the Bluetooth keyboard enters sleep mode, greatly reducing power consumption. The automatic sleep mode of the Bluetooth keyboard also avoids power waste when not in use. Therefore, the connection operation between the Bluetooth keyboard and the device is simplified and the power consumption of the Bluetooth connection is greatly reduced.

[0113] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for connecting a Bluetooth keyboard, characterized in that, include: During the Bluetooth connection process of the Bluetooth keyboard, the working status and remaining battery power of the Bluetooth keyboard are obtained; Based on the described working status, a link detection operation is performed to obtain the link status; Based on the aforementioned link information, a search operation is performed to obtain the link results; Based on the link result and the remaining battery power, a power consumption rate calculation operation is performed to obtain the power consumption rate; A keyboard shutdown command is obtained by performing a threshold comparison and judgment operation based on the power consumption rate, and the keyboard shutdown command is sent to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command; Specifically, based on the aforementioned link information, a search operation is performed to obtain the link results, including: If the connection status is "connected", a "connected" result is obtained. If the connection status is "not connected", a search operation is performed. If an electronic device is found, a connection operation is performed and a "connected" result is obtained. If no electronic device is found, a timed detection operation is entered. The timed detection operation stops when an electronic device is detected or the maximum number of detections is reached. In the search operation, the search can further search for electronic devices within the Bluetooth connection range on the basis of automatic connection. The connection result includes both "connected" and "not connected" results. After the Bluetooth keyboard is started and completes the initial detection, if a connection fails, the system will automatically start the search mode. This process involves scanning all Bluetooth-enabled electronic devices and prioritizing the pairing of mobile phones among these connectable devices to ensure that the connection with the most frequently used device is completed first. When the Bluetooth keyboard enters search mode, it scans for connected electronic devices: if an electronic device is searching for the Bluetooth keyboard, the keyboard immediately connects to it; if an unconnected electronic device is detected, a connection is automatically established; if no connected or connectable electronic device is detected, it performs periodic checks until an electronic device is detected; if the maximum number of checks is reached, the detection state ends. The detection of electronic devices refers to scanning for devices already connected to the Bluetooth keyboard. When the maximum number of periodic checks is reached, the detection stops, and after a period of time, the detection mode restarts, waiting for a connection. The search time is set according to the device's broadcast frequency, and the maximum number of checks is also adjusted according to actual conditions.

2. The Bluetooth keyboard connection method according to claim 1, characterized in that, The step of performing a link detection operation based on the working state to obtain the link status includes: When the conditions for the Bluetooth keyboard to be in a working state are met, it is determined that the working state is the Bluetooth keyboard being turned on, and a connection detection operation is performed to obtain the connection status, wherein the connection status includes being connected and not connected.

3. The Bluetooth keyboard connection method according to claim 2, characterized in that, The activation state is either timer start or manual start, wherein timer start includes a preset time period for the timer.

4. The Bluetooth keyboard connection method according to claim 1, characterized in that, The step of calculating the power consumption rate based on the link result and the remaining power to obtain the power consumption rate includes: The power consumption rate is calculated using the following formula: , in, This refers to the rate of power consumption. For the first The remaining power at each detection point For the first The remaining power at each detection point As the largest detection point, This is the first testing point.

5. The Bluetooth keyboard connection method according to claim 1, characterized in that, The step of obtaining a keyboard shutdown command by performing a threshold comparison based on the power consumption rate, and sending the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command, includes: Based on the power consumption rate and the preset power consumption rate threshold, a threshold comparison judgment operation is performed to obtain a keyboard shutdown command, wherein the keyboard shutdown command includes the communication address of the Bluetooth keyboard; Based on the communication address, the keyboard shutdown command is sent to the Bluetooth keyboard, so that the Bluetooth keyboard shuts down its Bluetooth module upon receiving the keyboard shutdown command.

6. A Bluetooth keyboard connection device, characterized in that, A method for implementing the Bluetooth keyboard connection as described in any one of claims 1 to 5, comprising: The information acquisition module is used to acquire the working status and remaining battery power of the Bluetooth keyboard during the Bluetooth connection process. The link detection module is used to perform link detection operations based on the working status to obtain the link status; The link result judgment module is used to perform a search operation based on the link information to obtain the link results; The power consumption calculation module is used to perform a power consumption rate calculation operation based on the link result and the remaining power to obtain the power consumption rate; The device module is used to perform a threshold comparison and judgment operation based on the power consumption rate to obtain a keyboard shutdown command, and send the keyboard shutdown command to the Bluetooth keyboard so that the Bluetooth keyboard shuts down its Bluetooth module after receiving the keyboard shutdown command.

7. A Bluetooth keyboard, characterized in that, For use in communicating with the linking device of the Bluetooth keyboard as described in claim 6, and for receiving keyboard open and keyboard close commands.

Citation Information

Patent Citations

  • Method and device for automatically switching Bluetooth working mode

    CN107708192A