A keep-alive method, communication system, electronic equipment and medium

By configuring Bluetooth low energy pulse broadcast parameters in the soft bus system of the application processor, and controlling the Bluetooth chip to broadcast keep-alive by the co-processor, the problem of long keep-alive intervals between devices is solved and the communication between devices is realized. Fast discovery and connection maintenance improve the user experience.

CN118368694BActive Publication Date: 2025-01-21HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410338999.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-01-21
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

In the prior art, the keep-alive interval between devices is long, resulting in the disconnection of new devices and connected devices that cannot be discovered in time, affecting the user experience.

Method used

By pre-configuring the broadcast parameters of Bluetooth low energy pulse broadcast in the soft bus system of the application processor, and controlling the Bluetooth chip to perform broadcast keep-alive by the co-processor, rapid discovery and connection maintenance between devices are achieved.

Benefits of technology

On the premise of ensuring that power consumption does not increase significantly, the keep-alive interval is reduced, allowing electronic devices to discover new devices in a timely manner and sense the disconnection of connected devices, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368694B_ABST
    Figure CN118368694B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and discloses a keep-alive method, a communication system, an electronic device, and a medium. The communication system includes a first electronic device and a second electronic device, and the first electronic device includes an application processor, a coprocessor, and a Bluetooth chip. The keep-alive method includes: the application processor obtains broadcast parameter information; the application processor broadcasts parameter information to the Bluetooth chip; the application processor determines that the first electronic device and the second electronic device are connected; the application processor sends a keep-alive instruction to the coprocessor; the coprocessor controls the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information. Based on the above scheme, by controlling the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information through the coprocessor, it is not necessary to wake up the application processor when sending each group of broadcasts, which can effectively reduce the power consumption of the application processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a keep-alive method, a communication system, an electronic device and a medium. Background Art

[0002] With the rapid development of smart terminals (mobile phones, tablets, watches, car computers, large screens, VR, audio, etc.), data transmission, interaction and transmission between multiple devices are becoming more and more common. In order to achieve real-time transmission between devices, it is necessary to keep the devices alive, that is, the devices maintain the connection relationship between the networked devices through wireless local area networks (WLAN) or Bluetooth, and send broadcasts regularly through Bluetooth or detection messages regularly sent by the TCP protocol stack to sense when the connected devices are disconnected and discover new devices.

[0003] When the frequency of broadcasting between devices and the frequency of sending detection messages are high, the power consumption of devices will be greatly increased. In order to reduce the impact on device power consumption, the interval of Bluetooth Low Energy (BLE, also known as low-power Bluetooth) broadcasting is generally set to 5 minutes, and the interval of sending detection messages by the TCP protocol stack is set to 10 minutes. However, the interval between broadcasting or sending detection messages in this solution is long, so it will lead to the inability to detect the online connection of new devices and the disconnection of connected devices in time, resulting in the inability to transmit data between devices normally, affecting the user experience. Summary of the invention

[0004] To solve the above problems, the present application provides a keep-alive method, a communication system, an electronic device and a medium.

[0005] In a first aspect, the present application provides a keep-alive method, which is applied to a communication system, characterized in that the communication system includes a first electronic device and a second electronic device, the first electronic device includes an application processor, a coprocessor and a Bluetooth chip, and the method includes: the application processor obtains broadcast parameter information; the application processor sends the broadcast parameter information to the Bluetooth chip; the application processor determines that the first electronic device and the second electronic device are connected; the application processor sends a keep-alive instruction to the coprocessor; the coprocessor controls the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information.

[0006] In this application, the broadcast parameters can be directly configured in the application processor, and the broadcast control can be performed by the Bluetooth chip. In this way, the application processor does not need to be woken up when each group of broadcasts is sent, which can effectively reduce the power consumption of the application processor side. In the embodiment of the present application, new device discovery and device keep-alive are realized through the coprocessor side. Since the working power consumption of the coprocessor is generally below 1MA, the power consumption is relatively low. Therefore, even if the keep-alive interval, i.e., the interval between each group of broadcasts, is reduced to a large extent in the embodiment of the present application, the power consumption will not increase significantly, and the keep-alive interval is reduced under the premise of ensuring power consumption, so that the electronic device can promptly discover new devices and promptly perceive the disconnection of connected devices.

[0007] It can be understood that the application processor soft bus system can be called and run by the application processor, and the coprocessor soft bus system can be called and run by the coprocessor, that is, the application processor can execute the functions of the application processor soft bus system, and the coprocessor can execute the functions of the coprocessor soft bus system.

[0008] In a possible implementation, the coprocessor controls the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information, including: the coprocessor controls the Bluetooth chip to send Bluetooth low energy pulse broadcast to perform broadcast keep-alive based on the broadcast parameter information.

[0009] In the present application, the broadcasting form of Bluetooth low energy pulse broadcasting is a form of sending a group of broadcasts at a set interval. Therefore, by adopting Bluetooth low energy pulse broadcasting, it is possible to pre-configure the interval time of adjacent broadcast frames in each group of broadcasts, the duration of each group of broadcasts, and the interval time between two adjacent groups of broadcasts.

[0010] In one possible implementation, the broadcast parameter information includes a first broadcast parameter and a second broadcast parameter; the coprocessor controls the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information, including: when the coprocessor determines that the first electronic device and the second electronic device are not in a clock synchronization state, the broadcast keep-alive is performed based on the first broadcast parameter; when the coprocessor determines that the first electronic device and the second electronic device are in a clock synchronization state, the broadcast keep-alive is performed based on the second broadcast parameter.

[0011] In a possible implementation, the first broadcast parameter includes a first interval between two adjacent groups of broadcasts, a first duration of each group of broadcasts, and a second interval between consecutive broadcast frames within each group of broadcasts. The second broadcast parameter includes a third interval between two adjacent groups of broadcasts, a second duration of each group of broadcasts, and a fourth interval between consecutive broadcast frames within each group of broadcasts; wherein the third interval is greater than the first interval, and the second duration is less than the first duration.

[0012] It can be understood that when the broadcast and scanning windows of the two devices are not aligned, the second electronic device may need to scan the broadcast frame sent by the first electronic device within several cycles, while when the broadcast and scanning windows of the two devices are aligned, the second electronic device can directly and quickly scan the broadcast frame sent by the first electronic device. Therefore, when the windows are aligned, the interval time of the broadcast can be increased and the duration of the broadcast can be reduced. In this way, the power consumption of the device can be further reduced.

[0013] In a possible implementation, broadcast keep-alive is performed based on the first broadcast parameter, including: sending a keep-alive frame based on the first broadcast parameter; wherein the keep-alive frame includes clock synchronization information.

[0014] In a possible implementation, the clock synchronization information includes a second broadcast parameter.

[0015] It can be understood that adding the second broadcast parameter to the clock synchronization information of the keep-alive frame facilitates the second electronic device to achieve window alignment with the first electronic device based on the second broadcast parameter after receiving the broadcast frame.

[0016] In a possible implementation, it includes: after the second electronic device receives the keep-alive frame, determining the corresponding scanning parameters of the second electronic device based on the second broadcast parameters; when the second electronic device determines that the first electronic device and the second electronic device are in a clock synchronization state, performing device scanning based on the scanning parameters.

[0017] It can be understood that after receiving the clock synchronization information, the second electronic device can set the scanning interval and scanning duration to be consistent with the broadcasting interval and broadcasting duration of the first electronic device.

[0018] In a possible implementation, the application processor soft bus system determines that the first electronic device is connected to the second electronic device, and then further includes: the application processor determines whether the second electronic device is a trusted device;

[0019] When determining that the second electronic device is a trusted device, the application processor stores the device information of the second electronic device.

[0020] In a possible implementation, it also includes: when the application processor determines that the network state of the first electronic device changes from the first state to the second state, the application processor sends a call instruction to the coprocessor; the coprocessor controls the Bluetooth chip to broadcast based on the broadcast parameter information to perform device search.

[0021] It can be understood that determining that the network state of the first electronic device changes from the first state to the second state means detecting that the network state of the first electronic device has changed. For example, when monitoring the opening and closing of the WLAN, the plugging and unplugging of the Ethernet, or the change of the Bluetooth state, it can be determined that the network change has been detected.

[0022] In a second aspect, the present application provides a communication system, which includes a first electronic device and a second electronic device, the first electronic device including an application processor, a coprocessor and a Bluetooth chip; the application processor is used to obtain broadcast parameter information; the application processor is used to send the broadcast parameter information to the Bluetooth chip; the application processor is used to determine that the first electronic device and the second electronic device are connected; the application processor is used to send a keep-alive instruction to the coprocessor; the coprocessor is used to control the Bluetooth chip to perform broadcast keep-alive based on the broadcast parameter information.

[0023] In a third aspect, the present application provides an electronic device, comprising: a memory for storing a computer program, the computer program comprising program instructions; a processor, the processor comprising an application processor and a coprocessor, the processor being used to execute program instructions so that the electronic device executes the above-mentioned keep-alive method.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions, and the program instructions are executed by an electronic device to enable the electronic device to perform the above-mentioned keep-alive method. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 According to some embodiments of the present application, a schematic diagram of connecting multiple electronic devices is shown.

[0026] Figure 2 According to some embodiments of the present application, a schematic diagram of a process of establishing communication connections and keeping multiple devices alive is shown.

[0027] Figure 3a According to some embodiments of the present application, a schematic diagram of BLE broadcasting is shown.

[0028] Figure 3b According to some embodiments of the present application, a schematic diagram of BLE Burst broadcasting is shown.

[0029] Figure 4 According to some embodiments of the present application, a schematic diagram of a software architecture of an electronic device is shown.

[0030] Figure 5 According to some embodiments of the present application, a schematic flow chart of a keep-alive method is shown.

[0031] Figure 6a According to some embodiments of the present application, a schematic diagram of device A and device B performing broadcasting and scanning respectively is shown.

[0032] Figure 6bAccording to some embodiments of the present application, a schematic diagram of device A and device B performing broadcasting and scanning respectively is shown.

[0033] Figure 7 According to some embodiments of the present application, a schematic flow chart of a keep-alive method is shown.

[0034] Figure 8 According to some embodiments of the present application, a schematic diagram of the format of a keep-alive frame is shown.

[0035] Fig. 9 According to some embodiments of the present application, a schematic diagram of the hardware structure of an electronic device is shown.

[0036] Fig.10 According to some embodiments of the present application, a schematic diagram of the hardware structure of an electronic device is shown. DETAILED DESCRIPTION

[0037] The illustrative embodiments of the present application include, but are not limited to, a keep-alive method, a communication system, an electronic device, and a medium.

[0038] See also Figure 1 , Figure 1 A schematic diagram of connecting multiple electronic devices is shown. Figure 1 As shown, the mobile phone 100, the tablet computer 200, the mobile phone 300, and the tablet computer 400 can establish a wireless communication connection through a wireless communication method such as WLAN, Bluetooth (BlueTooth, BT), or establish a wired communication connection through a connecting line.

[0039] Below, taking the first electronic device and the second electronic device as examples, the process of establishing a communication connection and keeping alive multiple devices in some embodiments is briefly described. Figure 2 As shown, the first electronic device may include a first ad hoc network monitoring module, a first discovery module, a first state machine module, a first account module, a first authentication module, and a first keep-alive module. The second electronic device may include a second ad hoc network monitoring module, a second discovery module, a second state machine module, a second account module, a second authentication module, and a second keep-alive module. The communication connection and keep-alive process may include:

[0040] S1: When the first ad hoc network monitoring module detects a change in the communication state, it sends a start instruction to the first discovery module.

[0041] In an embodiment of the present application, the communication status may include the network status and the Bluetooth status. When the first self-organizing network monitoring module detects network changes (such as turning WLAN on and off, plugging and unplugging Ethernet, etc.) or Bluetooth status changes, it can call the first discovery module, that is, send a start instruction to the first discovery module to search for new devices.

[0042] S2: The first discovery module controls the Bluetooth broadcast of the first electronic device to perform device discovery.

[0043] In the embodiment of the present application, the discovery module can control the Bluetooth transmission of the first electronic device, such as BLE broadcast, to perform device discovery.

[0044] S3: After discovering the device, the first discovery module sends a notification message to the first ad hoc network monitoring module.

[0045] S4: The first ad hoc network monitoring module and the second ad hoc network monitoring module establish a connection relationship between the first electronic device and the second electronic device.

[0046] S5: After the first ad hoc network monitoring module determines that the first electronic device and the second electronic device are connected, it sends a device trust verification instruction to the first state machine module.

[0047] S6: The first state machine module sends a device trusted verification instruction to the first authentication module.

[0048] It can be understood that the first authentication module can be used to determine whether the second electronic device is a trusted device.

[0049] S7: The first authentication module and the second authentication module perform device trusted authentication.

[0050] In some embodiments, the way in which the first authentication module and the second authentication module perform device trusted authentication can be: the first authentication module can receive identification information of the second electronic device sent by the second authentication module, and send the identification information to the query module. After receiving the identification information, the query module will query whether the second electronic device has a trust relationship with the first electronic device (for example, whether the account is the same, etc.) to perform device trusted authentication, and send the authentication result to the first authentication module.

[0051] S8: After determining that the second electronic device is a trusted device, the first account module and the second account module exchange and store device information.

[0052] It can be understood that in the embodiment of the present application, the first authentication module can send a notification message to the first account module when it is determined that there is a trusted device relationship between the first electronic device and the second electronic device, that is, after determining that the second electronic device is a trusted device, the first account module can send the device information of the first electronic device to the second account module, and the second account module can send the device information of the second electronic device to the first account module. The first account module can store the device information of the second electronic device, and the second account module can store the device information of the first electronic device.

[0053] S9: The first keep-alive module controls the first electronic device to send a BLE broadcast at a set time interval to keep the first electronic device and the second electronic device alive.

[0054] It is understood that the second electronic device will also send BLE broadcasts at set intervals to keep the first electronic device and the second electronic device alive. It is understood that each BLE broadcast sent can be a group of BLE broadcasts, that is, multiple broadcast frames or keep-alive frames. The first electronic device can send a second group of BLE broadcasts at set intervals after sending the first group of BLE broadcasts.

[0055] In some embodiments, the aforementioned first self-organizing network monitoring module, first discovery module, first state machine module, first account book module, first authentication module and first keep-alive module are all arranged on the application processor (AP) side, that is, the entire communication connection and keep-alive process are executed on the soft bus system on the AP side.

[0056] like Figure 3a As shown, the BLE broadcast is sent in a uniform manner, that is, a broadcast frame is sent once every set time interval, that is, BLE broadcast only supports configuring the interval time of each broadcast frame in a keep-alive broadcast. It can be understood that each keep-alive broadcast includes multiple broadcast frames, that is, each keep-alive broadcast is essentially a group of broadcasts ( Figure 3a The figure shows a group of broadcasts). The duration of each group of broadcasts, when to start broadcasting, and when to stop broadcasting all require waking up the AP for control. For example, when the first group of broadcasts needs to be sent, the AP will be awakened to send the first group of keep-alive broadcasts according to the interval length of the broadcast frames in the set group, and control the first group of keep-alive broadcasts to stop based on the set broadcast duration. After the set interval time between each adjacent group of broadcasts is reached, the AP will be awakened a second time to control the sending of the second group of broadcasts. In this way, the AP needs to be awakened for each group of keep-alive broadcasts, which significantly increases the power consumption of the AP. In this way, due to the power consumption limit of the AP, the interval time of each group of broadcasts will be set longer, making it difficult for electronic devices to discover new devices in time and difficult to perceive the disconnection of connected devices in time.

[0057] To solve the above problems, the embodiment of the present application provides a keep-alive method for electronic devices, which may include an AP, a coprocessor (Sensorhub, SH) and a Bluetooth chip. The method includes: pre-configuring the broadcast parameters of BLE Burst (Bluetooth low energy pulse) broadcast in the soft bus subsystem on the AP side, such as the interval duration of each broadcast frame in each group of broadcasts, the duration of each group of broadcasts, the interval duration between two adjacent groups of broadcasts, and other parameters, and sending the broadcast parameters to the Bluetooth chip, and the soft bus system of the coprocessor controls the Bluetooth chip to broadcast according to the broadcast parameters to achieve keep-alive and device discovery. The soft bus system on the AP side implements device trusted authentication, device information exchange, and notification of upper-layer applications.

[0058] It can be understood that the broadcast form of BLE Burst in the embodiment of the present application is as follows Figure 3b As shown, a group of broadcasts is sent at a set time for each interval, that is, BLE Burst can not only support the configuration of the interval time of adjacent broadcast frames in each group of broadcasts, but also support the configuration of the duration of each group of broadcasts and the configuration of the interval time between two adjacent groups of broadcasts.

[0059] In the embodiment of the present application, by directly configuring the broadcast parameters of the BLE Burst broadcast in the soft bus subsystem on the AP side, and the broadcast control by the Bluetooth chip, it is not necessary to wake up the AP when sending each group of broadcasts, which can effectively reduce the power consumption on the AP side. In the embodiment of the present application, new device discovery and device keep-alive are realized through the soft bus subsystem on the SH side. Since the working power consumption of SH is generally below 1MA, the power consumption is relatively low. Therefore, even if the keep-alive interval, i.e., the interval between each group of broadcasts, is reduced to a large extent in the embodiment of the present application, the power consumption will not increase significantly, and the keep-alive interval is reduced under the premise of ensuring power consumption, so that the electronic device can promptly discover new devices and promptly perceive the disconnection of connected devices.

[0060] The following is an introduction to the software system of the electronic device mentioned in this application. Figure 4 As shown, the electronic device may include an AP soft bus system, an SH soft bus system and a transmission system. It can be understood that the AP soft bus system can be called and run by the AP, and the SH soft bus system can be called and run by the SH, that is, the AP can perform the functions of the AP soft bus system, and the SH can perform the functions of the SH soft bus system.

[0061] The AP soft bus system includes a self-organizing network monitoring module, a state machine module, an account book module, an authentication module, a network configuration management module, and a first networking management module.

[0062] The self-organizing network monitoring module is used to monitor changes in communication status. For example, after detecting changes in the network or Bluetooth connection status, the discovery module is called to discover new devices. In addition, the self-organizing network monitoring module can be used to establish a communication connection with the newly discovered device after receiving the device trusted notification information sent by the authentication module, that is, to establish a networking relationship. And the self-organizing network monitoring module can be used to send notification information to the keep-alive module after determining that the local device has established a connection with the new device.

[0063] The state machine module is used to send a trusted device verification instruction to the authentication module according to the notification information sent by the discovery module.

[0064] The authentication module is used to determine whether the newly discovered device is a trusted device. It is understood that the authentication module can determine whether the newly discovered device is a trusted device by determining whether the account information of the newly discovered device is the same as the account information of the local device, or whether the account information of the newly discovered device is consistent with the trusted account information stored in the local device, and if the newly discovered device is determined to be a trusted device, notify the account book module to store the device information of the newly discovered device.

[0065] The ledger module is used to send the device information of the local device to the peer device, receive the device information of the peer device and store it.

[0066] The network configuration module may include a user configuration module and a full ledger module; the user configuration module may be used to obtain network-related parameters configured by the user. The full ledger module may be used to store device information of all devices connected to the current device.

[0067] The AP networking management module may include an AP scene perception module, an AP heartbeat decision module and an AP heartbeat execution module, an AP keep-alive module, a clock synchronization module and a Burst parameter setting module.

[0068] AP sensing module: used to sense the scene where the electronic device is located. For example, it can be used to determine that the electronic device is at home when the WIFI name scanned by the electronic device is consistent with the home WIFI name preset by the user. The scene where the electronic device is located is sent to the AP heartbeat decision module.

[0069] The AP heartbeat decision module is used to adjust the parameters of the keep-alive frame based on the scene where the electronic device is located. For example, when it is recognized that the electronic device is at home, the broadcast frequency will be accelerated, that is, the interval between each two groups of broadcasts or the interval between two adjacent broadcast frames between each group of broadcasts will be shortened. In this way, new devices can be discovered as soon as possible.

[0070] AP heartbeat execution module, the user obtains various configuration information of the user broadcast frame, such as broadcast frame type information, broadcast frame identification information, etc.

[0071] The AP keep-alive module is used to control the Bluetooth chip to broadcast, so as to realize the timely discovery of the disconnection of the connected device and the online access of the new device. In the embodiment of the present application, the AP keep-alive module is used to keep alive the device that does not have the SH soft bus system.

[0072] The Burst parameter setting module is used to configure the BLE Burst broadcast parameters.

[0073] The clock synchronization module is used to send clock synchronization information to the newly connected device to achieve clock synchronization with the newly connected device, that is, to align the windows of broadcast time and scan time.

[0074] The SH soft bus system includes a discovery module, a network configuration management submodule, and a second network management submodule.

[0075] The discovery module is used to send BLE burst broadcasts according to the call of the ad hoc network monitoring module to discover new electronic devices. And after discovering new electronic devices, it is used to send notification information to the state machine module.

[0076] The network configuration management submodule includes a trusted device sub-library and a network policy configuration module. The trusted device sub-library stores the information of trusted devices. The network policy configuration module is used to store network-related parameters configured by users.

[0077] The SH networking management module may include an SH scene perception module, an SH heartbeat decision module and an SH heartbeat execution module, an SH keep-alive module, a window alignment module and a frame format assembly module.

[0078] SH perception module: used to perceive the scene where the electronic device is located. For example, it can be used to determine that the electronic device is at home when the WIFI name scanned by the electronic device is consistent with the home WIFI name preset by the user. The scene where the electronic device is located is sent to the heartbeat decision module.

[0079] The SH heartbeat decision module is used to adjust the parameters of the keep-alive frame according to the scenario in which the electronic device is located. For example, when it is recognized that the electronic device is at home, the broadcast frequency will be accelerated, that is, the interval between each two groups of broadcasts or the interval between two adjacent broadcast frames between each group of broadcasts will be shortened.

[0080] SH heartbeat execution module, used to configure BLE Burst broadcast parameters. BLE Burst broadcast parameters may include a first broadcast parameter and a second broadcast parameter. The first broadcast parameter may be a broadcast parameter in a non-window-aligned state, for example, a broadcast parameter when device A and other devices have just established a connection and have not yet synchronized clocks with other devices. The second broadcast parameter may be a broadcast parameter after device A and other devices have established clock synchronization, that is, a broadcast parameter in a window-aligned state.

[0081] The window alignment module is used to obtain the second broadcast parameter configured by the user and send the second broadcast parameter to the frame format assembly module.

[0082] The frame format assembly module is used to assemble the keep-alive frame based on the information required by the keep-alive frame and send the keep-alive frame to the Bluetooth chip. The keep-alive frame includes clock synchronization information, and the clock synchronization information includes the second broadcast parameter.

[0083] The Bluetooth Host Controller Interface (HCI) is a standard physical and data interface defined between the host and the controller. The Bluetooth core specification divides the Bluetooth system into two parts: the controller and the host. The controller consists of hardware and underlying protocol stack firmware, from the lowest RF physical layer to the interface layer with the host; the host consists of the physical bus firmware that interfaces with the controller and the upper protocol stack and software.

[0084] The transmission system includes the MLPS subsystem and the Bluetooth protocol stack. The Bluetooth protocol stack can be used to receive BLE Burst broadcast parameters and send BLE Burst broadcast parameters to the Bluetooth chip. The MLPS subsystem is used for data transmission between the AP soft bus system and the SH soft bus system.

[0085] The following takes the interaction process between device A and device B as an example to illustrate the keep-alive method provided by this application. Figure 5 A schematic diagram of a keep-alive method of the present application is shown, such as Figure 5 As shown, the communication method may include:

[0086] 501: The AP soft bus system of device A obtains BLE Burst broadcast parameters.

[0087] In some embodiments, the BLE Burst broadcast parameter may include a first broadcast parameter and a second broadcast parameter, wherein the first broadcast parameter may be a broadcast parameter in a non-window-aligned state, for example, a broadcast parameter when device A and other devices have just established a connection and have not yet performed clock synchronization with other devices. The second broadcast parameter may be a broadcast parameter after device A and other devices have established clock synchronization, that is, a broadcast parameter in a window-aligned state.

[0088] The first broadcast parameter and the second broadcast parameter may both include the interval time between two adjacent broadcast groups, the duration of each broadcast group, the interval time between adjacent broadcast frames in each broadcast group, and the like.

[0089] It can be understood that the interval time between each two adjacent groups of broadcasts in the second broadcast parameter can be greater than the interval time between each two adjacent groups of broadcasts in the first broadcast parameter, and the duration of each group of broadcasts in the second broadcast parameter can be less than the duration of each group of broadcasts in the first broadcast parameter.

[0090] It can be understood that when the broadcast and scanning windows of device A and device B are not aligned, the broadcast frame sent by device A may take several cycles for device B to scan, while when the broadcast and scanning windows of device A and device B are aligned, the broadcast frame sent by device A can be directly and quickly scanned by device B. Therefore, when the windows are aligned, the broadcast interval can be increased and the duration of the broadcast can be reduced. In this way, the power consumption of the device can be further reduced.

[0091] 502: The AP soft bus system of device A sends broadcast parameters to the Bluetooth chip.

[0092] It can be understood that in the embodiment of the present application, the AP soft bus system can send broadcast parameters to the Bluetooth protocol stack in the transmission system, and the Bluetooth protocol stack sends the broadcast parameters to the Bluetooth chip.

[0093] 503: The SH soft bus system of device A detects a network change.

[0094] In the embodiment of the present application, the SH soft bus system can determine that a network change is detected when it monitors a network change (such as turning on and off a WLAN, plugging and unplugging an Ethernet, etc.) or a Bluetooth status change.

[0095] 504: The SH soft bus system of device A controls the Bluetooth chip to send a BLE Burst broadcast based on the broadcast parameters.

[0096] It can be understood that in the embodiment of the present application, the Bluetooth chip can send a BLE Burst broadcast based on the first broadcast parameter. While broadcasting, the Bluetooth chip performs a device scan, wherein during the scanning process, broadcast information sent by other devices can be received.

[0097] 505: The SH soft bus system detects device B and sends a notification message to the AP soft bus system.

[0098] It can be understood that the SH soft bus system can determine that device B is detected when the broadcast sent by device B scanned by the Bluetooth chip is obtained. The SH soft bus system can also determine that device B is detected after detecting that the sent BLE Burst broadcast is received by device B and receiving a response message from device B.

[0099] 506: The AP soft bus system of device A sends a connection request to the AP soft bus system of device B.

[0100] 507: The AP soft bus system of device B sends an approval response to the AP soft bus system of device A.

[0101] It can be understood that the AP soft bus system of device A calls the connection interface of the Bluetooth protocol stack through the mac address of device B to send a connection request, and the AP soft bus system of device B sends an approval response to the AP soft bus system of device A. At this time, device A and device B establish a connection.

[0102] It can be understood that in the embodiment of the present application, after the AP soft bus system establishes a connection between device A and device B, it can notify the networking application device B to go online. Among them, the networking application can be used to display various device information of the networked devices. In some embodiments, the networking application can be an application such as a hyperterminal.

[0103] 508: The AP soft bus system of device A determines that device B is a trusted device.

[0104] It can be understood that in the embodiment of the present application, when the AP soft bus system detects device B, it can determine whether device B is a trusted device, for example, by determining whether the account information of device B is the same as that of device A, or whether the account information of device B is consistent with the trusted account information stored in device A, etc., and if it is determined that device B is a trusted device, the device information of device B is stored.

[0105] 509: The AP soft bus system of device A sends the device information of device A to the AP soft bus system of device B.

[0106] It can be understood that the device information of device A may include device identification information, device name information, MAC address and other information of device A.

[0107] 510: The AP soft bus system of device B sends the device information of device B to the AP soft bus system of device A.

[0108] It can be understood that the device information of device B may include device identification information, device name information, MAC address and other information of device B.

[0109] 511: The AP soft bus system of device A sends a keep-alive instruction to the SH soft bus system of device A.

[0110] 512: The SH soft bus system of device A controls the Bluetooth chip to broadcast a keep-alive frame based on the first broadcast parameter, wherein the keep-alive frame includes clock synchronization information.

[0111] For example, Figure 6a As shown, the first broadcast parameter may include: the interval between each two adjacent broadcast groups may be 20s, the duration of each broadcast group may be 660ms, and the interval between two consecutive broadcast frames in each broadcast group is 20ms. It can be understood that at this time, if the scanning interval of device B is 600ms and the scanning duration is 60ms, device B may be able to scan the broadcast frame of device A within 2 cycles.

[0112] It is understandable that the clock synchronization information may include the second broadcast parameter. The clock synchronization information may be used to enable device A and device B to perform broadcast and scan respectively based on the clock synchronization information, so as to achieve alignment of the broadcast and scan windows.

[0113] 513: The SH soft bus system of device B scans a keep-alive frame.

[0114] 514: The SH soft bus system of device B sends a response instruction to the SH soft bus system of device A.

[0115] 515: The SH soft bus system of device A and device B broadcasts keep-alive based on the clock synchronization information in the keep-alive frame.

[0116] It can be understood that device B can determine the scanning parameters of device B based on the second broadcast parameter in the clock synchronization information, so that the broadcast window of device A is aligned with the scanning window of device B. That is, after receiving the clock synchronization information, device B will set the scanning interval and scanning duration to be consistent with the broadcast interval and broadcast duration of device A.

[0117] In some embodiments, the SH soft bus systems of device A and device B can restart broadcasting at the same time, and broadcast or scan respectively based on the clock synchronization information to achieve alignment of the broadcasting windows. Figure 6b As shown in , device A broadcasts based on the second broadcast parameter. In the second broadcast parameter, the interval between each two adjacent broadcast groups may be 600ms, the interval between two consecutive broadcast frames in each broadcast group is 20ms, and the duration of each broadcast group is 60ms.

[0118] Device B performs scanning based on the scanning parameters corresponding to the second broadcast parameters. For example, the duration of the scanning, that is, the scanning window, is 60 ms, and the interval between every two scans is 600 ms.

[0119] It can be understood that the interval between each two adjacent groups of broadcasts in the second broadcast parameter can be greater than the interval between each two adjacent groups of broadcasts in the first broadcast parameter, and the duration of each group of broadcasts in the second broadcast parameter can be less than the duration of each group of broadcasts in the first broadcast parameter. Since the broadcast and scanning windows of device A and device B have been aligned, the interval between broadcasts can be increased and the duration of broadcasts can be reduced. In this way, the power consumption of the device can be further reduced.

[0120] The following describes the keep-alive method of the present application in combination with the software architecture of device A. Figure 7 As shown, the keep-alive method may include:

[0121] 701: The Burst parameter configuration module of the AP soft bus system obtains the BLE Burst broadcast parameters.

[0122] In some embodiments, the BLE Burst broadcast parameter may include a first broadcast parameter and a second broadcast parameter, wherein the first broadcast parameter may be a broadcast parameter in a non-window-aligned state, for example, a broadcast parameter when device A and other devices have just established a connection and have not yet performed clock synchronization with other devices. The second broadcast parameter may be a broadcast parameter after device A and other devices have established clock synchronization, that is, a broadcast parameter in a window-aligned state.

[0123] The first broadcast parameter and the second broadcast parameter may both include the interval time between two adjacent broadcast groups, the duration of each broadcast group, the interval time between adjacent broadcast frames in each broadcast group, and the like.

[0124] It can be understood that the interval time between each two adjacent groups of broadcasts and the interval time between adjacent broadcast frames in each group of broadcasts in the second broadcast parameters can be greater than the interval time between each two adjacent groups of broadcasts and the interval time between adjacent broadcast frames in each group of broadcasts in the first broadcast parameters, and the duration of each group of broadcasts in the second broadcast parameters can be less than the duration of each group of broadcasts in the first broadcast parameters.

[0125] It can be understood that when the broadcast and scanning windows of device A and device B are not aligned, the broadcast frame sent by device A may take several cycles for device B to scan, while when the broadcast and scanning windows of device A and device B are aligned, the broadcast frame sent by device A can be directly and quickly scanned by device B. Therefore, when the windows are aligned, the broadcast interval can be increased and the duration of the broadcast can be reduced. In this way, the power consumption of the device can be further reduced.

[0126] 702: The Burst parameter configuration module of the AP soft bus system sends the broadcast parameters to the Bluetooth protocol stack.

[0127] 703: The Bluetooth protocol stack sends broadcast parameters to the Bluetooth chip.

[0128] It can be understood that in the embodiment of the present application, the AP soft bus system can send broadcast parameters to the Bluetooth protocol stack in the transmission system, and the Bluetooth protocol stack sends the broadcast parameters to the Bluetooth chip.

[0129] 704: The ad hoc network monitoring module of the AP soft bus system detects a network change.

[0130] In the embodiment of the present application, the SH soft bus system can determine that a network change is detected when it monitors a network change (such as turning on and off a WLAN, plugging and unplugging an Ethernet, etc.) or a Bluetooth status change.

[0131] 705: The ad hoc network monitoring module of the AP soft bus system sends a start instruction to the discovery module of the SH soft bus system.

[0132] 706: The discovery module of the SH soft bus system sends a call instruction to the Bluetooth protocol stack.

[0133] 707: The Bluetooth protocol stack controls the Bluetooth chip to send a BLE Burst broadcast based on the broadcast parameters.

[0134] It can be understood that in the embodiment of the present application, the Bluetooth chip can first send a BLE Burst broadcast based on the broadcast parameters. While broadcasting, the Bluetooth chip performs a device scan, wherein during the scanning process, the broadcast information sent by other devices can be received.

[0135] 708: The discovery module of the SH soft bus system detects device B.

[0136] It can be understood that the SH soft bus system can determine that device B is detected when the broadcast sent by device B scanned by the Bluetooth chip is obtained. The SH soft bus system can also determine that device B is detected after detecting that the sent BLE Burst broadcast is received by device B and receiving a response message from device B.

[0137] 709: The discovery module of the SH soft bus system sends notification information to the ad hoc network monitoring module.

[0138] 710: The ad hoc network monitoring module of the AP soft bus system and the ad hoc network monitoring module of device B establish a connection between device A and device B.

[0139] It can be understood that the ad hoc network monitoring module of device A can call the connection interface of the Bluetooth protocol stack to send a connection request through the mac address of device B, and the ad hoc network monitoring module of device B sends an approval response to the AP soft bus system of device A. At this time, device A and device B establish a connection.

[0140] It can be understood that in the embodiment of the present application, after the AP soft bus system establishes a connection between device A and device B, it can notify the networking application device B to go online. Among them, the networking application can be used to display various device information of the networked devices. In some embodiments, the networking application can be an application such as a hyperterminal.

[0141] 711: The ad hoc network monitoring module of the SH soft bus system sends connection notification information to the state machine module of the AP soft bus system.

[0142] 712: The state machine module of the AP soft bus system sends a trusted device authentication instruction to the authentication module.

[0143] 713: The authentication module of the AP soft bus system determines that device B is a trusted device and sends device trusted notification information to the account module.

[0144] It can be understood that in the embodiment of the present application, when the AP soft bus system detects device B, it can determine whether device B is a trusted device, for example, by determining whether the account information of device B is the same as that of device A, or whether the account information of device B is consistent with the trusted account information stored in device A, etc., and when it is determined that device B is a trusted device, the device trusted notification information is sent to the account module.

[0145] 714: The account book module of the AP soft bus system obtains and stores the device information of device B.

[0146] It can be understood that the ledger module of device A sends the device information of device A to the ledger module of device B, and the ledger module of device B sends the device information of device B to the ledger module of device A.

[0147] It can be understood that the device information of device A may include device identification information, device name information, MAC address and other information of device A. The device information of device B may include device identification information, device name information, MAC address and other information of device B.

[0148] 715: After the SH keep-alive module of the SH soft bus system determines that device A is connected to device B, it controls the Bluetooth chip to broadcast a keep-alive frame based on the first broadcast parameter, wherein the keep-alive frame includes clock synchronization information.

[0149] For example, the first broadcast parameter may include: the interval between each two adjacent broadcast groups may be 20s, the duration of each broadcast group may be 660ms, and the interval between two consecutive broadcast frames in each broadcast group may be 20ms.

[0150] It can be understood that at this time, if the scanning interval of device B is 600ms and the scanning duration is 60ms, device B may be able to scan the broadcast frame of device A within 2 cycles.

[0151] It is understandable that the clock synchronization information may include the second broadcast parameter. The clock synchronization information may be used to enable device A and device B to perform broadcast and scan respectively based on the clock synchronization information, so as to achieve alignment of the broadcast and scan windows.

[0152] The format of the keep-alive frame in the embodiment of the present application is described below. Figure 8 As shown, the frame header of the keep-alive frame includes fields 1-4, wherein the first field is the "length (LENGTH)" information of the device status synchronization frame, the second field is the version "type (TYPE)" information of the device status synchronization frame (for example: 0x16), and the third and fourth fields are the "universally unique identifier (UUID)" information corresponding to the distributed system involved in this application (for example, FDEE).

[0153] The middle part of the keep-alive frame includes fields 0-19, where field 0 is the "version" information of the device status synchronization frame (for example: 3). Fields 1 and 2 are "business" information, where field 1 is "base" information (for example, 0x20), and field 2 is "extention" information (for example, 0x00 (heartbeat keep-alive frame)). Fields 3 to 10 are "UID" information or "GID" information, for example, where fields 3 and 4 are the "account Hash" used by mobile phone 300, and fields 7 to 10 include some user-related information of electronic devices (for example, bit0-43 is: different account filtering (Filter) information, bit43-46 is: heartbeat version information 0x0 for communication, bit47 is: screen off information, etc.). The 11th field is the "device type" information, and the 12th field to the 19th field are the "device UDID Hash" information (eg, device Id Hash).

[0154] The networking control extended data portion of the keep-alive frame includes fields 20-23, where field 20 is clock synchronization information. For example, bit 7 can be 0 or 1, 0 represents a clock synchronization message, and 1 represents a non-clock synchronization message. In some embodiments, field 20 can also include other data information, Bit 6 can be 0 or 1, 0 represents a master, and 1 represents a master. Bit 4 / 7 can represent (0-3 uniform distribution range).

[0155] In some embodiments, the above-mentioned format of the keep-alive frame is only an example. For example, the keep-alive frame may also include other fields.

[0156] 716: After the SH keep-alive module of the SH soft bus system determines that the clocks of device A and device B have been synchronized, it controls the Bluetooth chip to broadcast a keep-alive frame based on the second broadcast parameter.

[0157] It can be understood that after the keep-alive module of device B scans the keep-alive frame, it can send a response instruction to the SH soft bus system of device A.

[0158] In some embodiments, the keep-alive module of device B may determine the scanning parameters of device B based on the second broadcast parameter in the clock synchronization information, so that the broadcast window of device A is aligned with the scanning window of device B. That is, after receiving the clock synchronization information, device B will set the scanning interval and scanning duration to be consistent with the broadcast interval and broadcast duration of device A.

[0159] In some embodiments, the keep-alive modules of the SH soft bus systems of device A and device B may respectively restart broadcasting, and perform broadcasting or scanning based on clock synchronization information to achieve alignment of the broadcast windows.

[0160] It can be understood that the interval time between each two adjacent groups of broadcasts in the second broadcast parameter and the interval time between adjacent broadcast frames in each group of broadcasts can be greater than the interval time between each two adjacent groups of broadcasts in the first broadcast parameter, and the duration of each group of broadcasts in the second broadcast parameter can be less than the duration of each group of broadcasts in the first broadcast parameter. For example, the interval time between each two adjacent groups of broadcasts in the second broadcast parameter can be 600ms, the interval between two adjacent broadcast frames in each group of broadcasts is 20ms, and the duration of each group of broadcasts is 60ms. Since the broadcast and scanning windows of device A and device B have been aligned, the interval time of broadcasts can be increased and the duration of broadcasts can be reduced. In this way, the power consumption of the device can be further reduced.

[0161] The hardware structure of the electronic device mentioned in this application is described in detail below. Fig. 9As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0162] The processor 10 may include an application processor (AP) and a coprocessor (SH). The application processor and the coprocessor may run Android, iOS, Windows OS, Liunix, and Hongmeng operating systems, etc. In some other possible implementations, the application processor and the coprocessor may also run specific applications.

[0163] The wireless communication module 160 has a communication function, for example, it can be a WLAN chip to implement a WLAN communication function, or for example, it can be a BT chip to implement a BT communication function, and the BT chip can support a BLE protocol stack. Information can be transmitted between the AP, SH and the communication components.

[0164] like Fig.10 As shown, the AP has a corresponding AP-side soft bus keep-alive system, and the SH has a corresponding SH-side soft bus keep-alive system, wherein the SH-side soft bus keep-alive system can be used to control the Bluetooth chip to broadcast based on broadcast parameters. Among them, the AP and SH are arranged based on the soft bus, that is, based on the soft bus networking, and the AP has at least the trusted device authentication function and the device information storage function. The SH has at least the functions of keeping alive and discovering new devices.

[0165] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0166] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0167] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0168] Among them, the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0169] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0170] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0171] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0172] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0173] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0174] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0175] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0176] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0177] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0178] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0179] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0180] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0181] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0182] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0183] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0184] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0185] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A keep-alive method, applied to a first electronic device, characterized in that: The first electronic device includes an application processor, a coprocessor and a Bluetooth chip, and the method includes: The application processor obtains broadcast parameter information, wherein the broadcast parameter information includes a first broadcast parameter and a second broadcast parameter, the first broadcast parameter includes a first interval time between two adjacent groups of broadcasts, a first duration time of each group of broadcasts, and a second interval time of connected broadcast frames in each group of broadcasts, The second broadcast parameters include a third interval between two adjacent broadcast groups, a second duration of each broadcast group, and a fourth interval between adjacent broadcast frames in each broadcast group. The third interval time is greater than the first interval time, and the second duration time is less than the first duration time; The application processor sends the broadcast parameter information to the Bluetooth chip; The application processor determines that the first electronic device is connected to a second electronic device; The application processor sends a keep-alive instruction to the coprocessor; When the coprocessor determines that the first electronic device and the second electronic device are not in a clock synchronization state, the coprocessor controls the Bluetooth chip to send a keep-alive frame based on the first broadcast parameter, wherein the keep-alive frame includes clock synchronization information; When the coprocessor determines that the first electronic device and the second electronic device are in a clock synchronization state, the coprocessor controls the Bluetooth chip to perform broadcast keep-alive based on the second broadcast parameter.

2. The method according to claim 1, characterized in that When the coprocessor determines that the first electronic device and the second electronic device are in a clock synchronization state, controlling the Bluetooth chip to perform broadcast keep-alive based on the second broadcast parameter includes: The coprocessor controls the Bluetooth chip to send a Bluetooth low energy pulse broadcast to perform broadcast keep-alive based on the second broadcast parameter.

3. The method according to claim 1 or 2, characterized in that: The clock synchronization information includes a second broadcast parameter.

4. The method according to any one of claims 1 to 3, characterized in that: After the application processor soft bus system determines that the first electronic device and the second electronic device are connected, the method further includes: The application processor determines whether the second electronic device is a trusted device; When the application processor determines that the second electronic device is a trusted device, the application processor stores the device information of the second electronic device.

5. The method according to any one of claims 1 to 4, characterized in that: Also includes: When the application processor determines that the network state of the first electronic device changes from the first state to the second state, the application processor sends a call instruction to the coprocessor; The coprocessor controls the Bluetooth chip to broadcast based on the broadcast parameter information to perform device search.

6. A communication system, characterized in that: The communication system includes a first electronic device and a second electronic device, wherein the first electronic device includes an application processor, a coprocessor and a Bluetooth chip; The application processor is used to obtain broadcast parameter information, wherein the broadcast parameter information includes a first broadcast parameter and a second broadcast parameter, the first broadcast parameter includes a first interval time between two adjacent groups of broadcasts, a first duration time of each group of broadcasts, and a second interval time of connected broadcast frames in each group of broadcasts, The second broadcast parameters include a third interval between two adjacent broadcast groups, a second duration of each broadcast group, and a fourth interval between adjacent broadcast frames in each broadcast group. The third interval time is greater than the first interval time, and the second duration time is less than the first duration time; The application processor is used to send the broadcast parameter information to the Bluetooth chip; The application processor is used to determine that the first electronic device and the second electronic device are connected; The application processor is used to send a keep-alive instruction to the coprocessor; The coprocessor is configured to control the Bluetooth chip to send a keep-alive frame based on the first broadcast parameter when determining that the first electronic device and the second electronic device are not in a clock synchronization state, wherein the keep-alive frame includes clock synchronization information; The coprocessor is further configured to control the Bluetooth chip to perform broadcast keep-alive based on the second broadcast parameter when determining that the first electronic device and the second electronic device are in a clock synchronization state.

7. An electronic device, characterized in that: include: A memory for storing a computer program, wherein the computer program includes program instructions; A processor, wherein the processor includes an application processor and a coprocessor, and the processor is used to execute the program instructions so that the electronic device executes the keep-alive method described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the program instructions are executed by an electronic device to enable the electronic device to execute the keep-alive method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • TCP keep-alive method, device and system

    CN114531497A