Bluetooth state switching method and device in dual system, equipment and medium
By transferring Bluetooth connection information from the first processor to the second processor in a dual-system electronic device and maintaining power supply during sleep, the problem of Bluetooth connection switching latency is solved, achieving seamless Bluetooth connection switching with zero perception and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-07
AI Technical Summary
In dual-system electronic devices, there is a time delay when the first processor switches to the second processor to control the Bluetooth module while the first processor is in sleep mode. This causes users to perceive system latency and Bluetooth connection waiting, affecting the real-time performance and continuity of operation.
Before the first processor enters sleep mode, the Bluetooth connection information is passed to the second processor. The second processor maintains the Bluetooth connection and keeps the Bluetooth module powered during the first processor's sleep mode, thus achieving seamless switching of the Bluetooth connection.
Through the smooth migration of Bluetooth connections, the second processor can quickly maintain the connection, while the first processor continues to supply power after going into sleep mode, ensuring the continuity and stability of the Bluetooth connection and improving the user experience.
Smart Images

Figure CN121815224A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of communication, and more particularly, to a Bluetooth state switching method and device in a dual system, an apparatus, and a medium. BACKGROUND
[0002] For an electronic device with a dual system, when the first processor is in a sleep state, the second processor takes over the system control right. If a user needs to use a Bluetooth function, since the Bluetooth module is integrated in the first processor, the first processor needs to be switched from a sleep state to a working state at this time, the second processor releases the system master control right to the first processor, the first processor quickly powers up the Bluetooth module, and then the user enters a Bluetooth setting interface, so that the first processor performs pairing and connection with an external Bluetooth device, and then uses the external Bluetooth device.
[0003] This brings a problem that there is a certain time consumption in switching between the first processor and the second processor. The user needs to wait for a switching process to enter the Bluetooth setting interface and complete Bluetooth communication connection with the external Bluetooth device. The user can obviously perceive the delay of system switching and the waiting of Bluetooth connection, which destroys the real-time and continuity of operation. SUMMARY
[0004] Embodiments of the present disclosure aim to provide a new technical solution for Bluetooth state switching in a dual system.
[0005] According to a first aspect of embodiments of the present disclosure, a Bluetooth state switching method in a dual system is provided, applied to a first electronic device, the first electronic device including a first processor, a second processor, and a Bluetooth module, and the method includes: Before the first processor enters a sleep state, the first processor sends Bluetooth connection information of a Bluetooth communication connection that has been established with a second electronic device to the second processor; The second processor configures the Bluetooth module to maintain the Bluetooth communication connection with the second electronic device according to the Bluetooth connection information; After the second processor successfully maintains the Bluetooth communication connection, the first processor enters a sleep state and keeps power supply to the Bluetooth module during the sleep. Optionally, after the second processor successfully maintains the Bluetooth communication connection, the first processor enters a sleep state, including: After the second processor successfully maintains the Bluetooth communication connection, the second processor sends a takeover success message to the first processor; The first processor enters a sleep state in response to the takeover success message.
[0006] Optionally, the method further includes: In response to the wake-up request, the first processor sends a status acquisition request to the second processor; In response to the status acquisition request, the second processor sends the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor; The first processor configures the Bluetooth module to restore the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information; After the first processor restores the Bluetooth communication connection, the second processor releases control of the Bluetooth module.
[0007] Optionally, after the first processor restores the Bluetooth communication connection, the second processor releases control of the Bluetooth module, including: After the first processor restores the Bluetooth communication connection, the first processor sends a takeover completion message to the second processor; In response to the takeover completion message, the second processor releases control of the Bluetooth module.
[0008] Optionally, the Bluetooth connection information includes at least one of the following: the device address of the second electronic device, the link key, the currently active Bluetooth profile, and the logical transport channel identifier.
[0009] Optionally, the first processor and the second processor communicate via a dual-machine communication connection. The dual-machine communication connection includes one of the following: Universal Asynchronous Receiver Transmitter (UART), Serial Peripheral Interface (SPI), Universal Serial Bus (USB), or shared memory mechanism.
[0010] Optionally, the first processor is an application processor running the Android operating system, and the second processor is a communication processor running a real-time operating system.
[0011] According to a second aspect of the present disclosure, a Bluetooth state switching device in a dual-system is provided, applied to a first electronic device, the first electronic device including a first processor, a second processor, and a Bluetooth module, the device comprising: The sending module is used to send the Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device to the second processor before the first processor enters a sleep state. A configuration module is used by the second processor to configure the Bluetooth module according to the Bluetooth connection information to maintain the Bluetooth communication connection with the second electronic device; The control module is configured to allow the first processor to enter a sleep state after the second processor successfully maintains the Bluetooth communication connection, and to maintain power supply to the Bluetooth module during the sleep period.
[0012] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a memory for storing executable computer instructions; and a processor for executing the method described in accordance with the first aspect above, under the control of the executable computer instructions. According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, perform the method described in the first aspect above. One beneficial effect of this disclosure is that, for a first electronic device with dual systems, before the first processor goes into sleep mode, the first processor can smoothly migrate the Bluetooth communication connection to the second processor. Since the second processor directly uses the Bluetooth connection information transmitted by the first processor when taking over, the second processor can maintain the existing Bluetooth communication connection in a very short time. After the second processor successfully maintains the Bluetooth communication connection, the first processor enters sleep mode and continues to supply power to the Bluetooth module during sleep mode. This achieves seamless switching of the Bluetooth connection with zero perception, ensures the continuity and stability of the Bluetooth communication connection, and greatly improves the user experience. Other features and advantages of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of this specification.
[0014] Figure 1 This is a schematic diagram of the hardware configuration of the electronic device provided in the embodiments of this disclosure; Figure 2 This is a flowchart illustrating the Bluetooth state switching method in a dual system provided in this embodiment of the disclosure; Figure 3 This is a flowchart illustrating a Bluetooth state switching method in a dual-system as provided in an embodiment of this disclosure. Figure 4 This is a block diagram of a Bluetooth state switching device in a dual system provided in an embodiment of this disclosure; Figure 5 This is a block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0015] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the embodiments of the present disclosure.
[0016] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0017] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0018] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0019] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0020] <Hardware Configuration> Figure 1 This is a block diagram of the hardware configuration of an electronic device 1000 according to an embodiment of the present disclosure.
[0021] Electronic device 1000 can be a first electronic device or a second electronic device. For example, the first electronic device can be a smartwatch or a smart bracelet, and the second electronic device can be a mobile phone or headset.
[0022] In one embodiment, such as Figure 1 As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, etc.
[0023] The processor 1100 may include, but is not limited to, a central processing unit (CPU) or a microprocessor (MCU). The memory 1200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk. The interface device 1300 includes, for example, various bus interfaces, such as serial bus interfaces (including USB interfaces) and parallel bus interfaces. The communication device 1400 is capable of wired or wireless communication. The display device 1500 is, for example, a liquid crystal display (LCD), an LED display, or a touch screen. The input device 1600 includes, for example, a touchscreen, a keyboard, or a gamepad. The electronic device 1000 can output audio information via a speaker 1700 and acquire audio information via a microphone 1800.
[0024] Those skilled in the art should understand that, although in Figure 1 The present specification shows a number of devices of electronic device 1000. However, the electronic device 1000 of the embodiments of this specification may only involve some of the devices, or may also include other devices, which is not limited here.
[0025] In this embodiment, the memory 1200 of the electronic device 1000 is used to store instructions for controlling the processor 1100 to operate in order to implement or support the implementation of a Bluetooth state switching method in a dual system according to any embodiment. Those skilled in the art can design instructions based on the scheme disclosed in this specification. How the instructions control the processor to operate is well known in the art and will not be described in detail here.
[0026] In the above description, those skilled in the art can design instructions based on the solutions provided in this disclosure. How the instructions control the processor to operate is well known in the art, and therefore will not be described in detail here.
[0027] Figure 1 The electronic devices shown are for illustrative purposes only and are not intended to limit this disclosure, its application, or its use.
[0028] <Method Implementation> Figure 2 This disclosure illustrates a Bluetooth state switching method in a dual-system according to an embodiment. This Bluetooth state switching method can be executed by a first electronic device, such as a smartwatch or smart bracelet. The first electronic device may include a first processor, a second processor, and a Bluetooth module. Figure 1 The electronic device shown is 1000. (For example...) Figure 2 As shown, the Bluetooth state switching method in the dual system of this embodiment may include the following steps S2100 to S2300: In step S2100, before the first processor enters a sleep state, the first processor sends the Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device to the second processor.
[0029] In this system, the first processor can be an application processor (AP) running the Android operating system, and the second processor can be a communication processor (CP) running a real-time operating system. The Bluetooth module is typically physically integrated into the hardware platform where the first processor resides. The first processor can be used as the main processor of the first electronic device, and the second processor as its slave processor. At any given time, typically only one processor, such as the first or second processor, has the main control of the first electronic device. That is, only one processor has control over external devices and the user interface at any given time. Furthermore, the first electronic device can switch between the first and second processors based on its own device state.
[0030] The first processor and the second processor can communicate through a dual-machine communication connection, which includes one of the following: Universal Asynchronous Receiver / Transmitter (UART), Serial Peripheral Interface (SPI), Universal Serial Bus (USB), or shared memory mechanism.
[0031] The Bluetooth connection information may include at least one of the following: the device address of the second electronic device, the link key, the currently active Bluetooth profile, and the logical transport channel identifier. The device address of the second electronic device is used to uniquely identify it. The link key is used for encrypted communication and security authentication. The currently active Bluetooth profile can be used to define the type of service currently in use, such as audio transmission or hands-free calling. The logical transport channel identifier ensures precise control of the data transmission pipeline. Using the Bluetooth connection information, the second processor can continue to process the same services (profile) and communicate with the second electronic device using the exact same identity (device address), the same security credentials (link key), and through the same pipeline (logical channel), thus ensuring that the Bluetooth communication connection is never interrupted from the perspective of both the second electronic device and the user.
[0032] In this embodiment, when the first processor is operational, it has primary system control. If the first electronic device needs to establish a Bluetooth communication connection with the second electronic device, the first processor will supply power to the Bluetooth module. The user can complete pairing and connection with the second electronic device through the Bluetooth settings interface of the first processor. The first processor can generate Bluetooth connection information for the currently established Bluetooth communication connection with the second electronic device through the Bluetooth protocol stack.
[0033] Typically, if the user does not operate the first electronic device for an extended period, the first processor will enter a sleep state to reduce system power consumption. Before entering sleep mode, the first processor can send the generated Bluetooth connection information to the second processor via a dual-device communication connection.
[0034] Before the first processor enters sleep mode, in step S2100 above, the first processor sends the Bluetooth connection information of the currently established Bluetooth communication connection with the second electronic device to the second processor, and then proceeds to: In step S2200, the second processor configures the Bluetooth module to maintain the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information.
[0035] In this embodiment, after receiving Bluetooth connection information from the first processor, the second processor's lightweight Bluetooth protocol stack can directly access and configure the Bluetooth module to maintain the Bluetooth communication connection with the second electronic device. This means that the second processor impersonates the first processor and declares takeover to the second electronic device. The second electronic device acknowledges this switch, and the second processor successfully acquires communication rights with the second electronic device. At this point, audio streams or call data can be transmitted through the second processor.
[0036] After executing step S2200 above, in which the second processor configures the Bluetooth module to maintain the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information, the process proceeds to: In step S2300, after the second processor successfully maintains the Bluetooth communication connection, the first processor enters a sleep state and continues to supply power to the Bluetooth module during the sleep period.
[0037] In this embodiment, after the second processor establishes a Bluetooth communication connection with the second electronic device, and sends a takeover success message to the first processor, the second processor will then send a takeover success message to the first processor through the two-machine communication connection. In response to this takeover success message, the first processor enters a low-power sleep state, continuing to supply power to the Bluetooth module during this period. After the first processor enters the sleep state, the second processor officially takes over the main control of the system. The user can operate Bluetooth functions, such as playing music and answering calls, through the second processor's interface or voice commands, with no difference in user experience compared to using the first processor.
[0038] In this embodiment, for a first electronic device with dual systems, before the first processor goes into sleep mode, the first processor can smoothly transfer the Bluetooth communication connection to the second processor. Since the second processor directly uses the Bluetooth connection information transmitted by the first processor when taking over, the second processor can maintain the existing Bluetooth communication connection in a very short time. After the second processor successfully maintains the Bluetooth communication connection, the first processor enters sleep mode and continues to supply power to the Bluetooth module during sleep mode. This achieves seamless switching of the Bluetooth connection with zero perception, ensures the continuity and stability of the Bluetooth communication connection, and greatly improves the user experience.
[0039] In one embodiment, the Bluetooth state switching method in the dual system of this disclosure further includes the following steps S3100 to S3400: In step S3100, the first processor responds to the wake-up request by sending a status acquisition request to the second processor.
[0040] In this embodiment, upon receiving a wake-up request, the first processor can respond to the wake-up request by sending a status acquisition request to the second processor to obtain Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device.
[0041] In step S3200, in response to the status acquisition request, the second processor sends the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor based on the dual-machine communication connection with the first processor.
[0042] In this embodiment, after receiving the status acquisition request, the second processor can respond to the status acquisition request by sending the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor based on the dual-machine communication connection with the first processor.
[0043] In step S3300, the first processor configures the Bluetooth module to restore the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information.
[0044] In this embodiment, after receiving Bluetooth connection information from the second processor, the first processor's Bluetooth protocol stack can re-access and configure the Bluetooth module to restore the Bluetooth communication connection with the second electronic device. The second electronic device acknowledges this switch, and the first processor successfully acquires communication rights with the second electronic device. At this point, audio streams or call data can be transmitted through the first processor.
[0045] In step S3400, after the first processor restores the Bluetooth communication connection, the second processor releases control over the Bluetooth module.
[0046] In this embodiment, after the first processor restores the Bluetooth communication connection with the second electronic device, that is, after the first processor acquires the right to communicate with the second electronic device, the first processor sends a takeover completion message to the second processor through the dual-device communication connection with the second processor. In response to the takeover completion message, the second processor releases control of the Bluetooth module and releases the system master control to the first processor.
[0047] In this embodiment, for a first electronic device with dual systems, when the first processor is woken up, the second processor can smoothly migrate the Bluetooth communication connection to the first processor. Since the first processor directly uses the Bluetooth connection information transmitted by the second processor when taking over, the first processor can restore the existing Bluetooth communication connection in a very short time. This achieves seamless switching of the Bluetooth connection with zero perception, ensures the continuity and stability of the Bluetooth communication connection, and greatly improves the user experience.
[0048] <Example> The following example illustrates a Bluetooth state switching method in a dual-system setup, referring to... Figure 3 The Bluetooth state switching method in this dual system may include the following steps: Step S311: The system is powered on, the first processor obtains the main control of the system, the first processor supplies power to the Bluetooth module, and the system establishes a Bluetooth communication connection with the second electronic device through the Bluetooth configuration interface of the first processor.
[0049] In step S312, before the first processor officially enters the sleep state, it sends the Bluetooth connection information of the Bluetooth communication connection that has been established with the second electronic device to the second processor through the dual-machine communication connection with the second processor.
[0050] In step S321, the second processor directly accesses and configures the Bluetooth module based on the Bluetooth connection information to maintain the Bluetooth communication connection with the second electronic device, that is, the second processor obtains the right to communicate with the second electronic device.
[0051] In step S322, after the second processor obtains the right to communicate with the second electronic device, it sends a takeover success message to the first processor through the dual-machine communication connection with the first processor.
[0052] In step S313, after receiving the takeover success message, the first processor enters a sleep state and maintains power supply to the Bluetooth module during the sleep period, while the second processor acquires the main control of the system.
[0053] In step S314, upon receiving a wake-up command, the first processor sends a status acquisition request to the second processor via a dual-machine communication connection with the second processor.
[0054] In step S323, the second processor receives a status acquisition request and, through a dual-machine communication connection with the first processor, sends the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor.
[0055] In step S315, the first processor directly accesses and configures the Bluetooth module based on the Bluetooth connection information to restore the Bluetooth communication connection with the second electronic device, that is, the first processor restores the communication rights with the second electronic device.
[0056] In step S316, after the first processor regains communication rights with the second electronic device, it sends a takeover completion message to the second processor through the dual-machine communication connection with the second processor.
[0057] In step S324, after receiving the takeover completion message, the second processor releases control of the Bluetooth module and releases the system master control, and the first processor regains the system master control.
[0058] Through this example, firstly, users are completely unaware of the underlying system switching process when using Bluetooth in different system scenarios, resulting in smooth and continuous operation. Secondly, it eliminates the Bluetooth reconnection waiting time caused by system switching, achieving immediate availability of Bluetooth functionality. Thirdly, the underlying Bluetooth hardware resources are efficiently reused during the control periods of the first and second processors, avoiding redundant initialization and waste of resources. Fourthly, while ensuring functional continuity, reasonable power consumption control is achieved by putting the first processor to sleep and maintaining power only for Bluetooth.
[0059] <Device Embodiment> Figure 4 This is a schematic diagram of a Bluetooth state switching device in a dual-system according to one embodiment. The Bluetooth state switching device in the dual-system can be applied to a first electronic device, which includes a first processor, a second processor, and a Bluetooth module. (Refer to...) Figure 4 As shown, the Bluetooth state switching device 400 in the dual system may include a transmitting module 410, a configuration module 420, and a control module 430.
[0060] The sending module 410 is used to send the Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device to the second processor before the first processor enters the sleep state. Configuration module 420 is used for the second processor to configure the Bluetooth module according to the Bluetooth connection information to maintain the Bluetooth communication connection with the second electronic device; The control module 430 is configured to allow the first processor to enter a sleep state after the second processor successfully maintains the Bluetooth communication connection, and to maintain power supply to the Bluetooth module during the sleep period.
[0061] In one embodiment, the control module 430 is specifically configured to, after the second processor successfully maintains the Bluetooth communication connection, send a takeover success message to the first processor; the first processor, in response to the takeover success message, enters a sleep state.
[0062] In one embodiment, the sending module 410 is further configured to send a status acquisition request to the second processor in response to the wake-up request; The sending module 410 is further configured to, in response to the status acquisition request, send the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor; The configuration module 420 is further configured to configure the Bluetooth module to restore the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information; The control module 430 is further configured to allow the second processor to release control of the Bluetooth module after the first processor restores the Bluetooth communication connection.
[0063] In one embodiment, the control module 430 is specifically configured to, after the first processor restores the Bluetooth communication connection, send a takeover completion message to the second processor; and in response to the takeover completion message, the second processor releases control over the Bluetooth module.
[0064] In one embodiment, the Bluetooth connection information includes at least one of the following: the device address of the second electronic device, the link key, the currently active Bluetooth profile, and the logical transport channel identifier. In one embodiment, the first processor and the second processor communicate via a dual-machine communication connection. The dual-machine communication connection includes one of the following: a universal asynchronous transceiver, a serial peripheral interface, a universal serial bus, or a shared memory mechanism. In one embodiment, the first processor is an application processor running the Android operating system, and the second processor is a communication processor running a real-time operating system. According to embodiments of this disclosure, for a first electronic device with dual systems, before the first processor goes into sleep mode, the first processor can smoothly transfer the Bluetooth communication connection to the second processor. Since the second processor directly uses the Bluetooth connection information transmitted by the first processor when taking over, the second processor can maintain the existing Bluetooth communication connection in a very short time. After the second processor successfully maintains the Bluetooth communication connection, the first processor enters sleep mode and continues to supply power to the Bluetooth module during sleep mode. This achieves seamless switching of the Bluetooth connection with zero perception, ensures the continuity and stability of the Bluetooth communication connection, and greatly improves the user experience.
[0065] <Equipment Example> Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to one embodiment. For example... Figure 5 As shown, the electronic device 1000 includes a processor 1100 and a memory 1200.
[0066] The memory 1200 can be used to store executable computer instructions.
[0067] The processor 1100 can be used to execute a Bluetooth state switching method in a dual system according to an embodiment of the present disclosure, under the control of executable computer instructions.
[0068] The electronic device 1000 can be as follows: Figure 1 The electronic device 1000 shown may also be a device with other hardware structures, which are not limited here.
[0069] In another embodiment, the electronic device 1000 may include the Bluetooth state switching device 400 in the above dual system. In one embodiment, each module of the Bluetooth state switching device 400 in the above dual system can be implemented by the processor 1100 running computer instructions stored in the memory 1200.
[0070] Computer-readable storage media This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, perform the Bluetooth state switching method in a dual-system provided in this disclosure.
[0071] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0072] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0073] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0074] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0075] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0076] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0077] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0078] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are equivalent.
[0079] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.
Claims
1. A Bluetooth state switching method in a dual-system, applied to a first electronic device, the first electronic device comprising a first processor, a second processor, and a Bluetooth module, the method comprising: Before the first processor enters sleep mode, the first processor sends the Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device to the second processor; The second processor configures the Bluetooth module according to the Bluetooth connection information to maintain the Bluetooth communication connection with the second electronic device; After the second processor successfully maintains the Bluetooth communication connection, the first processor enters a sleep state and continues to supply power to the Bluetooth module during the sleep period.
2. The method according to claim 1, wherein, After the second processor successfully maintains the Bluetooth communication connection, the first processor enters a sleep state, including: After the second processor successfully maintains the Bluetooth communication connection, the second processor sends a takeover success message to the first processor; The first processor enters a sleep state in response to the takeover success message.
3. The method according to claim 1, wherein, The method further includes: In response to the wake-up request, the first processor sends a status acquisition request to the second processor; In response to the status acquisition request, the second processor sends the Bluetooth connection information of the currently maintained Bluetooth communication connection with the second electronic device to the first processor; The first processor configures the Bluetooth module to restore the Bluetooth communication connection with the second electronic device based on the Bluetooth connection information; After the first processor restores the Bluetooth communication connection, the second processor releases control of the Bluetooth module.
4. The method according to claim 3, wherein, After the first processor restores the Bluetooth communication connection, the second processor releases control of the Bluetooth module, including: After the first processor restores the Bluetooth communication connection, the first processor sends a takeover completion message to the second processor; In response to the takeover completion message, the second processor releases control of the Bluetooth module.
5. The method according to claim 1, wherein, The Bluetooth connection information includes at least one of the following: the device address of the second electronic device, the link key, the currently active Bluetooth profile, and the logical transmission channel identifier.
6. The method according to claim 1, wherein, The first processor and the second processor communicate with each other via a dual-machine communication connection. The dual-machine communication connection includes one of the following: a universal asynchronous transceiver, a serial peripheral interface, a universal serial bus, or a shared memory mechanism.
7. The method according to claim 1, wherein, The first processor is an application processor running the Android operating system, and the second processor is a communication processor running a real-time operating system.
8. A Bluetooth state switching device in a dual-system, applied to a first electronic device, the first electronic device including a first processor, a second processor, and a Bluetooth module, the device comprising: The sending module is used to send the Bluetooth connection information of the Bluetooth communication connection currently established with the second electronic device to the second processor before the first processor enters a sleep state. A configuration module is used by the second processor to configure the Bluetooth module according to the Bluetooth connection information to maintain the Bluetooth communication connection with the second electronic device; The control module is configured to allow the first processor to enter a sleep state after the second processor successfully maintains the Bluetooth communication connection, and to maintain power supply to the Bluetooth module during the sleep period.
9. An electronic device, wherein, include: Memory is used to store executable computer instructions; A processor configured to execute the method according to any one of claims 1-7, under the control of the executable computer instructions.
10. A computer-readable storage medium, wherein, It stores computer instructions that, when executed by a processor, perform the method described in any one of claims 1-7.