Application program management method and device, electronic equipment and storage medium

By dynamically adjusting the keep-alive and frozen state of the application, the increase in power consumption caused by data transmission between Bluetooth low-power devices and electronic devices is solved, and low-power data transmission is achieved and user experience is improved.

CN120255686APending Publication Date: 2025-07-04VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510427494.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, data transmission between Bluetooth low-power devices and electronic devices requires keeping the application running in the background, resulting in increased power consumption of electronic devices, especially when waiting for airport scenes at night.

Method used

By dynamically adjusting the keep-alive and frozen state of the application, dynamically adjusting the keep-alive and frozen state of the application according to the data transmission situation and screen status, to avoid the application being continuously in the keep-alive state to increase device power consumption.

Benefits of technology

While ensuring data transmission between devices, it reduces the power consumption of electronic devices, optimizes resource usage, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255686A_ABST
    Figure CN120255686A_ABST
Patent Text Reader

Abstract

The invention discloses an application program management method and device, electronic equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: under the condition that a first device establishes a Bluetooth connection with a second device and a target application program is in a keep-alive state, if a first condition is met, controlling the target application program to enter a frozen state; the keep-alive state indicates that the target application program is maintained to run in the background; the freezing state indicates that all processes of the target application program are frozen; wherein the first condition comprises any one of the following items: the target application program does not transmit data with the second equipment through the Bluetooth module of the first equipment within the preset duration; the screen of the first equipment is in a screen-off state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technologies, and particularly relates to an application management method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of electronic devices, the Bluetooth Low Energy (BLE) technology can meet the requirements of low-power wireless connection between small battery-powered BLE devices and electronic devices. Taking a BLE device as a smart bracelet as an example, an electronic device can establish a Bluetooth connection with the smart bracelet, so that the smart bracelet sends health data such as blood pressure data, heart rate data, and sleep data of the detected human body to the electronic device.

[0003] In the related art, in order to ensure the application data transmission between the BLE device and the electronic device, the electronic device needs to keep the application programs in the electronic device alive to prevent the application programs from being killed by the system when running in the background, resulting in the inability to perform application data transmission between the BLE device and the electronic device. For example, in order to ensure the normal transmission of health data between the smart bracelet and the electronic device, the electronic device needs to keep the health management application program in the electronic device alive so that the smart bracelet can transmit the health data to the electronic device.

[0004] However, when the application programs in the electronic device keep running in the background, it will increase the power consumption of the electronic device. Summary of the Invention

[0005] The objective of the embodiments of this application is to provide an application management method, apparatus, electronic device, and storage medium, which can reduce the power consumption of the electronic device while ensuring data transmission between devices.

[0006] In a first aspect, the embodiments of this application provide an application management method, which is applied to a first device, and the first device includes a target application program; the method includes: when a Bluetooth connection is established between the first device and a second device and the target application program is in a keep-alive state, if a first condition is satisfied, controlling the target application program to enter a frozen state; the keep-alive state indicates maintaining the target application program running in the background; the frozen state indicates freezing all processes of the target application program; where the first condition includes any one of the following: the target application program does not transmit data to the second device through the Bluetooth module of the first device within a preset duration; the screen of the first device is in a screen-off state.

[0007] Second aspect, an embodiment of the present application provides an application management device, which is applied to a first device. The first device includes a target application. The device includes: a processing module; the processing module is configured to, when a Bluetooth connection is established between the first device and a second device and the target application is in a keep-alive state, if a first condition is met, control the target application to enter a frozen state; the keep-alive state indicates maintaining the target application to run in the background; the frozen state indicates freezing all processes of the target application; wherein, the first condition includes any one of the following: the target application does not transmit data to the second device through the Bluetooth module of the first device within a preset duration; the screen of the first device is in a screen-off state.

[0008] Third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0009] Fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] Fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or instruction to implement the method described in the first aspect.

[0011] Sixth aspect, an embodiment of the present application provides a computer program / program product, which is stored in a storage medium. The program / program product is executed by at least one processor to implement the method described in the first aspect.

[0012] In the embodiment of the present application, when the target application in the first device is in a keep-alive state, the target application in the first device may not transmit data to the second device within a certain duration, which will increase the power consumption of the electronic device at this time and cause waste of resources. In the embodiment of the present application, when the target application does not transmit data to the second device through the first device within a certain duration or when the screen of the first device is in a screen-off state, the target application is frozen, that is, according to the data transmission situation between the target application and the second device, or the screen state of the first device, the keep-alive state and the frozen state of the target application are dynamically adjusted, avoiding the target application continuously being in the keep-alive state and increasing the power consumption of the device. Therefore, while ensuring data transmission between devices, the power consumption of the first device is reduced. Description of the Drawings

[0013] Figure 1It is one of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0014] Figure 2 It is the second of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0015] Figure 3 It is an example schematic diagram of data transmission between devices provided by an embodiment of the present application;

[0016] Figure 4 It is the third of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0017] Figure 5 It is the fourth of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0018] Figure 6 It is the fifth of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0019] Figure 7 It is the sixth of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0020] Figure 8 It is the seventh of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0021] Figure 9 It is the eighth of the schematic flowcharts of an application management method provided by an embodiment of the present application;

[0022] Figure 10 It is a schematic structural diagram of an application management device provided by an embodiment of the present application;

[0023] Figure 11 It is one of the schematic hardware structures of an electronic device provided by an embodiment of the present application;

[0024] Figure 12 It is the second of the schematic hardware structures of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0025] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope protected by the present application.

[0026] The terms "first", "second", etc. in the specification of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0027] The terms "at least one (item)", "at least one of", etc. in the specification of this application refer to any one, any two or more combinations of the objects it contains. For example, at least one (item) of a, b, and c can represent: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" means two or more, and its meaning is similar to that of "at least one (item)".

[0028] The application program management method provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0029] The application program management method in the embodiments of this application can be applied to the scenario of transmitting application data between devices.

[0030] With the popularization of the Internet of Things and smart wearable devices, Bluetooth Low Energy technology has become the core solution for short-range wireless communication due to its low energy consumption, low cost and other characteristics. However, the rapid increase in the number of BLE devices and the expansion of complex application scenarios have also exposed the contradiction between connection stability and the power consumption of electronic devices. Because, to ensure the transmission of application data between BLE devices and electronic devices, it is necessary to ensure that the application programs in the electronic devices run in the background, but continuously running in the background will increase the power consumption of the electronic devices, especially in the night standby scenario. Therefore, while ensuring the transmission of application data between BLE devices and electronic devices, and maintaining the power consumption of electronic devices at a relatively low level will greatly enhance the user experience on BLE devices.

[0031] Currently, after a user connects to a BLE device, there are several common ways to handle the connection stability. The first is to let the user choose. After connecting to the BLE device, the electronic device does not handle it additionally. The user needs to manually lock the applications running in the background or add the applications to the list of applications with high power consumption in the background to prevent the applications from being killed by the system and causing the connection to be disconnected. This method requires manual operation by the user and is relatively cumbersome. The second is for the electronic device to keep the application alive. After the application connects to the BLE device, that is, after the application can transmit data with the BLE device, the electronic device automatically locks the application in the background or adds the application to the list of applications with high power consumption in the background. The advantage is that the user is unaware and the BLE device connection is stable. However, in this way, since the application is always in the background, it will increase the power consumption of the electronic device, especially in some long standby scenarios at night.

[0032] Scenario 1, when a Bluetooth connection is established between the electronic device and the smart bracelet, and the health application corresponding to the smart bracelet in the electronic device is in the keep-alive state, if the health application does not transmit data with the smart bracelet within 30 seconds, the electronic device can freeze the health application.

[0033] Scenario 2, when a Bluetooth connection is established between the electronic device and the electronic weighing scale, and the calorie management application corresponding to the electronic weighing scale in the electronic device is in the keep-alive state, if the screen of the electronic device enters the screen-off state, the electronic device can freeze the calorie management application.

[0034] In the application management method, device, electronic device, and storage medium provided in the embodiments of the present application, when the target application in the first device is in the keep-alive state, the target application in the first device may not transmit data with the second device within a certain period of time. At this time, it will increase the power consumption of the electronic device and cause waste of resources. In the embodiments of the present application, when the target application does not transmit data with the second device through the first device within a certain period of time or when the screen of the first device is in the screen-off state, the target application is frozen, that is, according to the data transmission situation between the target application and the second device, or the screen state of the first device, the keep-alive state and freeze state of the target application are dynamically adjusted, avoiding the target application continuously being in the keep-alive state and increasing the power consumption of the device. Therefore, while ensuring data transmission between devices, the power consumption of the first device is reduced.

[0035] The execution subject of the application management method provided in the embodiments of the present application may be an application management device. The application management device may be an electronic device, or a functional module or entity in the electronic device. Hereinafter, taking the electronic device as an example, the technical solution provided in the embodiments of the present application will be described.

[0036] An embodiment of the present application provides an application management method. The application management method provided by the embodiment of the present application may include the following step 201. Hereinafter, taking the first device executing this method as an example, an exemplary description will be given.

[0037] Step 201, when a Bluetooth connection is established between the first device and the second device and the target application included in the first device is in a keep-alive state, if the first condition is satisfied, the first device controls the target application to enter a frozen state.

[0038] In some embodiments of the present application, the above-mentioned second device is a Bluetooth device, which can also be called a BLE device.

[0039] In some examples, the above-mentioned second device can be any one of the following: smart bracelet, smart watch, electronic weighing scale, smart home, etc. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0040] In some embodiments of the present application, the above-mentioned Bluetooth connection can be a BLE connection.

[0041] In some embodiments of the present application, the above-mentioned target application can be any application in the first device that can perform data transmission with the second device through a Bluetooth module.

[0042] Exemplarily, the above-mentioned target application can be any one of the following: communication application, health management application, calorie management application, home management application, payment application, sports application, etc. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0043] In some embodiments of the present application, the above-mentioned target application can also be understood as the application corresponding to the second device.

[0044] In some examples, when the above-mentioned second device is a smart bracelet, the target application in the first device can be the health management application corresponding to the second device.

[0045] In some examples, when the above-mentioned second device is an electronic weighing scale, the target application in the first device can be the calorie management application corresponding to the second device.

[0046] In some examples, when the above-mentioned second device is a smart home, the target application in the first device can be the home management application corresponding to the second device.

[0047] In some embodiments of the present application, when the target application is the application corresponding to the second device, the target application can be understood as the application in the first device used to initiate a Bluetooth connection with the second device.

[0048] It can be understood that after the first device starts the target application, the target application can scan for nearby Bluetooth devices. When the BLE broadcast sent by the second device is scanned, the first device can establish a Bluetooth connection with the second device.

[0049] Therefore, establishing a Bluetooth connection between the first device and the second device can also be understood as: the first device establishing a Bluetooth connection with the second device through the Bluetooth module. After the first device and the second device establish a Bluetooth connection, the target application in the first device can transmit data to the second device through the Bluetooth module.

[0050] It can be understood that the user can download and install the target application corresponding to the second device in the first device, so that after the first device and the second device establish a Bluetooth connection, the target application in the first device can transmit data to the second device through the Bluetooth module.

[0051] In the embodiments of the present application, the above-mentioned keep-alive state indication maintains the target application running in the background.

[0052] It can be understood that the function of keeping the target application alive is: when the system resource load is high and background applications are killed, the target application is prevented from being killed to ensure data transmission between the target application and the second device.

[0053] In the embodiments of the present application, the above-mentioned freeze state indication freezes all processes of the target application.

[0054] It can be understood that after the target application enters the freeze state, the target application does not use the resources of the first device, such as Central Processing Unit (CPU) resources, Input / Output (IO) resources, etc.

[0055] In some embodiments of the present application, the first device controlling the target application to enter the freeze state can specifically be: the first device obtains all normal and native processes of the target application and cancels the JobScheduler tasks corresponding to the processes to control the target application to enter the freeze state.

[0056] In some embodiments of the present application, the first device can obtain all normal and native processes of the target application according to the application package name and user identification (User ID, UID) of the target application.

[0057] It can be understood that after the target application is frozen, it still runs in the background of the first device, but all processes of the target application are frozen and the target application cannot send or receive data.

[0058] In the embodiments of the present application, the above first condition includes any one of the following:

[0059] The target application fails to transmit data to the second device through the Bluetooth module of the first device within a preset duration;

[0060] The screen of the first device is in the screen-off state.

[0061] In some embodiments of the present application, when the target application in the first device is in the keep-alive state, the first device can start a timer. When the target application fails to transmit data to the second device through the Bluetooth module of the first device within the timing duration of the timer (i.e., the above preset duration), the first device controls the target application to enter the frozen state. When the target application transmits data to the second device through the Bluetooth module of the first device within the timing duration of the timer, the first device resets the timer.

[0062] For example: After the target application is successfully kept alive, the first device can start a 30-second timer (which can be specifically set according to the actual situation), and detect whether the target application transmits data to the second device through the Bluetooth module of the first device during the 30 seconds. If there is no data transmission, the first device controls the target application to enter the frozen state.

[0063] In some embodiments of the present application, when the target application in the first device is in the keep-alive state, if it is detected that the screen of the first device is in the screen-off state, the first device controls the target application to enter the frozen state.

[0064] Specifically, when the target application in the first device is in the keep-alive state, the Bluetooth module of the first device can listen for the screen-off broadcast. When the screen-off broadcast is detected, the Bluetooth module can send a broadcast for freezing the target application in the Bluetooth interface, and the package name and UID of the target application are carried in the broadcast. After the operating system of the first device receives the broadcast, it can control the target application to enter the frozen state according to the package name and UID of the target application carried in the broadcast.

[0065] Specifically, after the operating system of the first device receives the broadcast for freezing the target application sent by the Bluetooth module in the Bluetooth interface, it can first determine whether the target application is in the frozen state. When the target application is not in the frozen state, it controls the target application to enter the frozen state according to the package name and UID of the target application carried in the broadcast.

[0066] Example 1. In combination with Scenario 1, when the first device establishes a Bluetooth connection with the smart bracelet (i.e., the second device mentioned above) and the health application corresponding to the smart bracelet in the first device (i.e., the target application mentioned above) is in the keep-alive state, if the smart bracelet does not transmit the health data of the user's body to the first device within 30 seconds, that is, the health management application does not receive the data sent by the smart bracelet through the Bluetooth module of the first device within 30 seconds, the first device can control the health management application to be in the frozen state.

[0067] Example 2. In combination with Scenario 2, when the first device establishes a Bluetooth connection with the electronic weighing scale (i.e., the second device mentioned above) and the calorie management application corresponding to the electronic weighing scale in the first device (i.e., the target application mentioned above) is in the keep-alive state, if the user turns off the screen of the first device, causing the screen of the first device to enter the screen-off state, the first device can control the calorie management application to be in the frozen state.

[0068] In some embodiments of the present application, when the first device establishes a Bluetooth connection with the second device and it is detected that the target application transmits data with the second device through the Bluetooth module of the first device, the first device can keep the target application in the first device alive.

[0069] In some embodiments of the present application, when the first device establishes a Bluetooth connection with the second device and it is detected that the target application is running in the background, the first device can keep the target application in the first device alive.

[0070] In some embodiments of the present application, when the target application is an application corresponding to the second device, after the first device establishes a Bluetooth connection with the second device, the first device can directly keep the target application alive.

[0071] Specifically, after the first device establishes a Bluetooth connection with the second device, the Bluetooth interface of the first device will receive an interface callback for successful Bluetooth connection. The Bluetooth module of the first device can send a broadcast of successful Bluetooth connection between the first device and the second device in this Bluetooth interface. The broadcast carries the package name and UID of the target application. After the operating system of the first device receives this broadcast, it can keep the target application alive according to the package name and UID of the target application carried in the broadcast.

[0072] In some embodiments of the present application, the ways for the first device to keep the target application alive may include any one of the following: the first device performs background locking on the target application, and the first device adds the target application to the background high-power consumption list.

[0073] In some embodiments of the present application, adding a target application to the background high-power consumption list by the first device can be understood as: the first device sets to allow the target application to consume high power in the background.

[0074] In the application management method provided by the embodiments of the present application, when the target application in the first device is in the keep-alive state, the target application in the first device may not transmit data to the second device within a certain period of time. At this time, the power consumption of the electronic device will increase, resulting in a waste of resources. In the embodiments of the present application, when the target application does not transmit data to the second device through the first device within a certain period of time or when the screen of the first device is in the off state, the target application is frozen, that is, according to the data transmission situation between the target application and the second device, or the screen state of the first device, the keep-alive state and the frozen state of the target application are dynamically adjusted, avoiding the target application continuously being in the keep-alive state and increasing the power consumption of the device. Therefore, while ensuring data transmission between devices, the power consumption of the first device is reduced.

[0075] In some embodiments of the present application, the above first condition includes: the target application does not transmit data to the second device through the Bluetooth module of the first device within a preset period of time; as Figure 1 shown, after the above step 201, the application management method provided by the embodiments of the present application further includes the following step 301.

[0076] Step 301: If the Bluetooth interface of the first device is called, the first device controls the target application to enter the keep-alive state from the frozen state.

[0077] In some embodiments of the present application, when the Bluetooth interface of the first device is called, the first device can determine whether the target application is in the frozen state. When the target application is in the frozen state, the first device can control the target application to enter the keep-alive state from the frozen state.

[0078] In some embodiments of the present application, when the Bluetooth interface of the first device is called, it indicates that there is data to be transmitted between the first device and the second device, that is, there is a need to unfreeze the target application. Therefore, the first device can unfreeze the target application and keep the target application alive to ensure data transmission between the first device and the second device.

[0079] It can be understood that since the target application transmits data to the second device through a standard Bluetooth interface, the first device can determine whether there is data to be transmitted between the first device and the second device according to whether the Bluetooth interface is called.

[0080] In some embodiments of the present application, the data transmission between the first device and the second device is divided into the first device transmitting data to the second device, or the second device transmitting data to the first device.

[0081] In some embodiments of the present application, when the first device transmits data to the second device, there will be a call to GattService.writeCharacteristic() or a call to GattService.readCharacteristic().

[0082] In some embodiments of the present application, when the second device transmits data to the first device, there will be a call to GattService.onNotify().

[0083] Exemplarily, as Figure 2 shown, it is a schematic diagram of an example of data transmission after Bluetooth connection between devices provided by an embodiment of the present application. Method 1: The target application in the first device can send data to the Bluetooth module of the first device through the writeCharacteristic method, and the Bluetooth module can send data to the second device through the writeNative method; the second device can send a data transmission callback to the Bluetooth module of the first device through the write_cb method 1, and then the Bluetooth module can send a data transmission callback to the target application through the onWriteCharacteristic method 2; Method 2: The target application in the first device can send data to the Bluetooth module of the first device through the readCharacteristic method, and the Bluetooth module can send data to the second device through the readNative method; the second device can send a data transmission callback to the Bluetooth module of the first device through the read_cb method 3, and then the Bluetooth module can send a data transmission callback to the target application through the onReadCharacteristic method 4; Method 3: The second device can send data to the Bluetooth module of the first device through the notify_cb method 1, and the Bluetooth module can send data to the target application through the onNotify method 2.

[0084] In some embodiments of the present application, when the Bluetooth interface of the first device is called, the Bluetooth module of the first device can send an application thawing broadcast, which carries the package name and UID of the target application. After receiving the broadcast, the operating system of the first device can thaw the target application according to the package name and UID of the target application carried in the broadcast, and resume all processes and JobScheduler tasks of the target application.

[0085] It can be understood that after the target application freezes, since it is still in the background, the BLE connection between the target application and the second device will be maintained, so there will be a need for data transmission. However, when the target application process freezes, it will cause the target application to be unable to transmit data with the second device. Therefore, it is necessary to unfreeze the target application at an appropriate time (for example, when it is determined that data needs to be transmitted between the devices) to restore the keep-alive state of the target application so that data can be transmitted between the target application and the second device.

[0086] In some embodiments of the present application, after controlling the target application to enter the keep-alive state from the frozen state, the first device can start a timer. When the target application does not transmit data with the second device through the Bluetooth module of the first device within the timing duration of the timer (i.e., the above-mentioned preset duration), the target application is controlled to enter the frozen state again.

[0087] In this way, since after the first device establishes a Bluetooth connection with the second device and the first device keeps the target application alive, the first device can actually determine whether there is data transmission between the target application and the second device by listening to the Bluetooth interface, and dynamically switch the keep-alive and frozen states of the target application according to whether there is data transmission. Therefore, the target application is prevented from continuously being in the keep-alive state, thereby reducing the power consumption of the first device.

[0088] In the embodiments of the present application, a dynamic keep-alive and freezing mechanism is proposed, which automatically adjusts the keep-alive and freezing states of the application according to the BLE connection status and data interaction between the devices, and minimizes the device power consumption while not affecting the data interaction between the target application and the BLE device.

[0089] In some embodiments of the present application, the above first condition includes: the screen of the first device is in the screen-off state; combined with Figure 1 , as Figure 3 shown, after the above step 201, the application management method provided by the embodiments of the present application further includes the following step 401.

[0090] Step 401: If the screen of the first device is in the screen-on state, the first device controls the target application to enter the keep-alive state from the frozen state.

[0091] It can be understood that when the screen of the first device changes from the screen-off state to the screen-on state, the first device can control the target application to enter the keep-alive state from the frozen state.

[0092] In some embodiments of the present application, when the screen of the first device changes from the screen-off state to the screen-on state, the first device can determine whether the target application is in a frozen state. When the target application is in a frozen state, the first device can control the target application to change from the frozen state to the keep-alive state.

[0093] In some embodiments of the present application, when the target application in the first device is in a frozen state, the Bluetooth module of the first device can listen for the screen-on broadcast. When the screen-on broadcast is detected, the Bluetooth module can send a broadcast for unfreezing the target application in the Bluetooth interface. The broadcast carries the package name and UID of the target application. After the operating system of the first device receives this broadcast, it can control the target application to change from the frozen state to the keep-alive state according to the package name and UID of the target application carried in the broadcast.

[0094] It can be understood that after the target application is frozen, since it is still in the background, the BLE connection between the target application and the second device will be maintained, so there will be a need for data transmission. However, when the target application process is frozen, it will cause the target application to be unable to transmit data with the second device. Therefore, it is necessary to unfreeze the target application at an appropriate time (for example, when the screen of the first device is in the screen-on state) to restore the keep-alive state of the target application, so that data transmission can be carried out between the target application and the second device.

[0095] Example 3, in combination with Example 2, after the first device freezes the heat management application when the screen of the first device enters the screen-off state, if the user turns on the screen of the first device, causing the screen of the first device to enter the screen-on state, the first device can unfreeze the heat management application and restore the keep-alive state of the heat management application.

[0096] In some embodiments of the present application, after controlling the target application to change from the frozen state to the keep-alive state, if the screen of the first device enters the screen-off state again, the target application is controlled to enter the frozen state again.

[0097] In this way, since after the first device establishes a Bluetooth connection with the second device and the first device keeps the target application alive, the first device can dynamically switch the keep-alive and frozen states of the target application according to the screen state of the first device. Therefore, it is avoided that the target application is continuously in the keep-alive state, thereby reducing the power consumption of the first device.

[0098] In the embodiments of the present application, a dynamic keep-alive and freezing mechanism is proposed, which automatically adjusts the keep-alive and freezing states of the application according to the screen state, while not affecting the data interaction between the target application and the BLE device, and minimizing the device power consumption to the greatest extent.

[0099] In some embodiments of the present application, the above first condition includes: the screen of the first device is in the standby state; combined with Figure 1 , as Figure 4 shown, after the above step 201, the application management method provided by the embodiments of the present application further includes the following step 501.

[0100] Step 501, the first device controls the Bluetooth module of the first device to cache the first information.

[0101] In the embodiments of the present application, the above first information includes at least one of the following:

[0102] The second information sent by the second device to the target application during the process that the target application is in the frozen state;

[0103] The third information that the target application is to be transmitted to the second device during the process that the target application is in the frozen state.

[0104] In some embodiments of the present application, the above second information may include at least one of the following: session information, instruction information, image information, audio information, physical health information, user step information, exercise information, sleep information, weight information, etc. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0105] It can be understood that after the first device and the second device establish a Bluetooth connection, the target application can receive the data sent by the second device through the Bluetooth module of the first device. When the target application is in the frozen state, the first device can first cache the second information that the second device needs to send to the target application through the Bluetooth module, and then transmit it to the target application after the target application is thawed.

[0106] In some embodiments of the present application, the above third information may include at least one of the following: session information, instruction information, image information, audio information, physical health information, user step information, exercise information, sleep information, weight information, etc. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0107] In some embodiments of the present application, the third information that the target application is to be transmitted to the second device can be understood as: the information in the target application that is to be transmitted to the second device, or the information that needs to be transmitted to the second device through the target application.

[0108] In some embodiments of the present application, the above third information that needs to be transmitted to the second device through the target application can be: the information that the application other than the target application in the first device needs to send to the second device.

[0109] In some embodiments of the present application, when the target application is an application corresponding to a second device, the above-mentioned third information may be information that needs to be transmitted to the second device through the target application.

[0110] It can be understood that when the target application is an application corresponding to a second device, the information sent by other applications in the first device except the target application to the second device can be sent to the second device through the target application.

[0111] It can be understood that after the first device and the second device establish a Bluetooth connection, the target application can send data to the second device through the Bluetooth module of the first device. When the target application is in a frozen state, the first device can first cache the third information to be transmitted by the target application to the second device, and after the target application is unfrozen, the target application will then send the third information to the second device through the Bluetooth module of the first device.

[0112] In some embodiments of the present application, the first device can design a storage structure, which includes a flag bit for storing information and the specific stored information. The flag bit indicates the specific function of the information, and the flag bit can correspond to onNotify, writeCharacteristic, and readCharacteristic, and the specific stored information is the data content to be sent.

[0113] In some embodiments of the present application, the first device can sequentially store the transmitted information into a queue for caching in order.

[0114] Example 4, combined with Example 1, after the first device freezes the health management application, if the smart bracelet sends user step information (i.e., the above-mentioned second information) to the first device, the Bluetooth module of the first device can first cache the user step information, and after the health management application is unfrozen, it will then transmit the user step information to the health management application.

[0115] Example 5, combined with Example 1, after the first device freezes the health management application, if the health management application in the first device needs to send command information (i.e., the above-mentioned third information) to the smart bracelet, the Bluetooth module of the first device can first cache the command information, and after the health management application is unfrozen, the health management application will then send the command information to the smart bracelet through the Bluetooth module of the first device.

[0116] In this way, since during the process when the target application is in the frozen state, on the one hand, the first device can first cache the second information sent by the second device to the target application, and after the target application is unfrozen, the first device then transmits the second information to the target application. On the other hand, the first device can first cache the third information that the target application is to transmit to the second device, and after the target application is unfrozen, it then sends the third information to the second device through the Bluetooth module of the first device. Therefore, data loss is avoided during the process when the target application is in the frozen state, thus ensuring the security and reliability of data transmission between devices.

[0117] In some embodiments of the present application, the above first information includes: second information; combined Figure 4 , such as Figure 5 As shown, after the above step 501, the application management method provided by the embodiments of the present application further includes the following step 601.

[0118] Step 601: After the target application enters the keep-alive state, the first device transmits the second information to the target application.

[0119] In some embodiments of the present application, the first device can transmit the second information to the target application after unfreezing the target application.

[0120] It can be understood that during the process when the screen of the first device is in the screen-off state and the target application is in the frozen state, the first device can cache the above second information, and after the screen of the first device is in the screen-on state and the target application is unfrozen, the first device can transmit the second information to the target application.

[0121] In some embodiments of the present application, after the target application enters the keep-alive state, the first device can sequentially take out the cached second information from the queue and transmit it to the target application. Among them, the information that enters the queue first is transmitted first, thus ensuring the timing of the information.

[0122] In this way, since during the process when the target application is in the frozen state, the first device can first cache the second information sent by the second device to the target application, and after the target application is unfrozen, the first device then transmits the second information to the target application. Therefore, data loss is avoided during the process when the target application is in the frozen state, thus ensuring the security of data transmission between devices.

[0123] In some embodiments of the present application, the above first information includes: third information; combined Figure 4 , such as Figure 6 As shown, after the above step 501, the application management method provided by the embodiments of the present application further includes the following step 602.

[0124] Step 602: After the target application enters the keep-alive state, the first device sends the third information to the second device via the Bluetooth module of the first device.

[0125] In some embodiments of the present application, the first device may send the third information to the second device via the Bluetooth module of the first device after unfreezing the target application.

[0126] It can be understood that during the process that the screen of the first device is in the screen-off state and the target application is in the frozen state, the first device may cache the above-mentioned third information. After the screen of the first device is in the screen-on state and the target application is unfrozen, the target application may send the third information to the second device via the Bluetooth module of the first device.

[0127] In some embodiments of the present application, after the target application enters the keep-alive state, the first device may sequentially retrieve the cached third information from the queue and send it to the second device via the Bluetooth module of the first device. Among them, the information that enters the queue first is sent first, so as to ensure the timing of the information.

[0128] In this way, since during the process that the target application is in the frozen state, the first device may first cache the third information in the target application to be transmitted to the second device, and after the target application is unfrozen, then send the third information to the second device via the Bluetooth module of the first device, data loss during the process that the target application is in the frozen state is avoided. Thus, the security of data transmission between devices is ensured.

[0129] In some embodiments of the present application, the application management method provided by the embodiments of the present application further includes the following step 701.

[0130] It should be noted that in combination with Figure 1 , as Figure 7 shown, the electronic device may execute step 701 after executing step 301; or, the electronic device may execute step 701 after executing step 401.

[0131] Step 701: In the case of disconnecting the Bluetooth connection between the first device and the second device, if the target application is in the keep-alive state, the first device cancels the keep-alive of the target application.

[0132] In some embodiments of the present application, in the case of the user manually disconnecting the Bluetooth connection between the first device and the second device, if the target application is in the keep-alive state, the first device cancels the keep-alive of the target application.

[0133] It can be understood that when the Bluetooth connection between the first device and the second device is disconnected, the first device can determine whether the target application is in a keep-alive state. When the target application is in a keep-alive state, the first device cancels the keep-alive of the target application.

[0134] Specifically, when the Bluetooth connection between the first device and the second device is disconnected, the Bluetooth interface of the first device will receive a callback for the disconnection of the Bluetooth connection. The Bluetooth module of the first device can send a broadcast of the disconnection of the Bluetooth connection between the first device and the second device in this Bluetooth interface. The package name and UID of the target application are carried in this broadcast. Then, after the operating system of the first device receives this broadcast, it can determine whether the target application is in a keep-alive state according to the package name and UID of the target application carried in the broadcast. When the target application is in a keep-alive state, the first device cancels the keep-alive of the target application.

[0135] Example 6: When the first device establishes a Bluetooth connection with a smart bracelet (i.e., the above-mentioned second device) through a health management application (i.e., the above-mentioned target application), if the user manually disconnects the Bluetooth connection between the first device and the smart bracelet, the first device can determine whether the health management application is in a keep-alive state. When the health management application is in a keep-alive state, the first device cancels the keep-alive of the target application.

[0136] Example 7: When the first device establishes a Bluetooth connection with an electronic weighing scale (i.e., the above-mentioned second device) through a calorie management application (i.e., the above-mentioned target application), if the user manually disconnects the Bluetooth connection between the first device and the electronic weighing scale, the first device can determine whether the calorie management application is in a keep-alive state. When the calorie management application is in a keep-alive state, the first device cancels the keep-alive of the calorie management application.

[0137] In this way, since the keep-alive of the target application can be cancelled when the Bluetooth connection between the first device and the second device is disconnected, that is, when there is no need to transmit data between the first device and the second device, it is possible to avoid the problem that the target application still runs in the background when there is no need to transmit data between the first device and the second device, resulting in an increase in the power consumption of the first device, thereby reducing the power consumption of the first device.

[0138] In an embodiment of the present application, one implementation determines the freezing / thawing strategy of the target application according to whether there is data transmission, which is applicable to the situation where the daily-use device is frequently used but the data transmission frequency of the BLE device is low; another implementation determines the freezing / thawing strategy of the target application according to the screen on / off state of the device, which is suitable for reducing the power consumption in the long standby scenario. The ultimate purpose of the two implementations is to maintain the stability of the BLE device connection, ensure data transmission between devices, and minimize the device power consumption to the greatest extent. It has the following advantages: 1) Power consumption optimization: reducing the resource occupation of the target application through the dynamic freezing mechanism; 2) Connection stability: ensuring that the BLE connection is not interrupted by the system; 3) Seamless experience: the data transmission between devices is not affected and the user is unaware.

[0139] In some embodiments of the present application, as Figure 8 shown, the application management method provided by the embodiment of the present application may include the following steps S1 to S4.

[0140] S1. When the first device establishes a Bluetooth connection with the second device and the target application in the first device is in the keep-alive state, the first device starts a timer.

[0141] S2. The first device determines whether the target application transmits data to the second device through the Bluetooth module of the first device within the timing duration of the timer.

[0142] If data is transmitted, execute S1; if no data is transmitted, execute S3 and S4;

[0143] S3. When the target application is not in the frozen state, the first device controls the target application to enter the frozen state.

[0144] S4. When the target application is in the frozen state and the Bluetooth interface of the first device is called, the first device controls the target application to enter the keep-alive state from the frozen state.

[0145] It should be noted that for the relevant descriptions of steps S1 to S4, reference can be made to the content in the above embodiments, which will not be elaborated here.

[0146] In some embodiments of the present application, as Figure 9 shown, the application management method provided by the embodiment of the present application may include the following steps S11 to S14.

[0147] S11. When the first device establishes a Bluetooth connection with the second device and the target application in the first device is in the keep-alive state, the first device monitors the screen state.

[0148] S12. When the screen of the first device is in the screen-off state and the target application is not in the frozen state, the first device controls the target application to enter the frozen state.

[0149] S13. When the target application is in the frozen state, the first device monitors the screen state.

[0150] S14. When the screen of the first device is in the screen-on state, the first device controls the target application to change from the frozen state to the keep-alive state.

[0151] It should be noted that for the relevant descriptions of steps S11 to S14, reference can be made to the content in the above embodiments, and details are not described herein again.

[0152] It should be noted that each of the above method embodiments, or various possible implementation manners in each method embodiment, can be executed independently, or, on the premise of no contradiction, can also be executed in combination with each other. Specifically, it can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0153] It should be noted that for the application management method provided in the embodiments of the present application, the execution subject can be an application management device. In the embodiments of the present application, taking the application management device executing the application management method as an example, the application management device provided in the embodiments of the present application is described.

[0154] Figure 10 FIG. shows a possible structural schematic diagram of the application management device involved in the embodiments of the present application. As Figure 10 shown, the application management device 70 may include: a processing module 71.

[0155] Among them, the processing module 71 is configured to, when the first device establishes a Bluetooth connection with the second device and the target application included in the first device is in the keep-alive state, if the first condition is satisfied, control the target application to enter the frozen state; the keep-alive state indicates maintaining the target application running in the background; the frozen state indicates freezing all processes of the target application;

[0156] Among them, the first condition includes any one of the following:

[0157] The target application does not transmit data to the second device through the Bluetooth module of the first device within a preset duration;

[0158] The screen of the first device is in the screen-off state.

[0159] The embodiments of the present application provide an application management device. When the target application in the first device is in a keep-alive state, the target application in the first device may not transmit data to the second device for a certain period of time. At this time, the power consumption of the electronic device will increase, resulting in a waste of resources. In the embodiments of the present application, when the target application does not transmit data to the second device through the first device within a certain period of time or when the screen of the first device is in the off-screen state, the target application is frozen, that is, according to the data transmission situation between the target application and the second device, or the screen state of the first device, the keep-alive state and the frozen state of the target application are dynamically adjusted, avoiding the continuous keep-alive state of the target application from increasing the power consumption of the device. Therefore, while ensuring data transmission between devices, the power consumption of the first device is reduced.

[0160] In a possible implementation manner, the first condition includes that the target application does not transmit data to the second device through the Bluetooth module of the first device within a preset period of time; the processing module 71 is further configured to, after controlling the target application to enter the frozen state, if the Bluetooth interface of the first device is called, control the target application to enter the keep-alive state from the frozen state.

[0161] In a possible implementation manner, the first condition includes that the screen of the first device is in the off-screen state; the processing module 71 is further configured to, after controlling the target application to enter the frozen state, if the screen of the first device is in the on-screen state, control the target application to enter the keep-alive state from the frozen state.

[0162] In a possible implementation manner, the first condition includes that the screen of the first device is in the off-screen state; the processing module 71 is further configured to, after controlling the target application to enter the frozen state, control the Bluetooth module of the first device to cache the first information;

[0163] Wherein, the first information includes at least one of the following:

[0164] The second information sent by the second device to the target application during the process that the target application is in the frozen state;

[0165] The third information that the target application waits to transmit to the second device during the process that the target application is in the frozen state.

[0166] In a possible implementation manner, the first information includes the second information; the processing module 71 is further configured to, after controlling the Bluetooth module of the first device to cache the first information, after the target application enters the keep-alive state, transmit the second information to the target application.

[0167] In a possible implementation, the first information includes: third information; The application management device 70 provided in the embodiments of the present application further includes: a sending module. The sending module is configured to, after the processing module 71 controls the Bluetooth module of the first device to cache the first information, send the third information to the second device through the Bluetooth module of the first device after the target application enters the keep-alive state.

[0168] In a possible implementation, the processing module 71 is further configured to, when the Bluetooth connection between the first device and the second device is disconnected, cancel the keep-alive of the target application if the target application is in the keep-alive state.

[0169] The application management device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an Augmented Reality (AR) / Virtual Reality (VR) device, a robot, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, or a Personal Digital Assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0170] The application management device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0171] The application management device provided in the embodiments of the present application can implement each process implemented in the above method embodiments. To avoid repetition, it will not be elaborated here.

[0172] Optionally, as Figure 11As shown in the figure, an embodiment of the present application further provides an electronic device 900, including a processor 901 and a memory 902. A program or instruction that can run on the processor 901 is stored on the memory 902. When the program or instruction is executed by the processor 901, each step of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.

[0173] It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.

[0174] Figure 12 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0175] The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110 and other components.

[0176] Those skilled in the art can understand that the electronic device 100 may further include a power source (such as a battery) for supplying power to each component. The power source can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 12 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0177] Among them, the processor 110 is used to control the target application to enter the frozen state if the first condition is met when the first device establishes a Bluetooth connection with the second device and the target application included in the first device is in the keep-alive state; the keep-alive state indicates maintaining the target application running in the background; the frozen state indicates freezing all processes of the target application;

[0178] Among them, the first condition includes any one of the following:

[0179] The target application does not transmit data to the second device through the Bluetooth module of the first device within a preset duration;

[0180] The screen of the first device is in the screen-off state.

[0181] Embodiments of the present application provide an electronic device. When the target application in the first device is in a keep-alive state, the target application in the first device may not transmit data to the second device for a certain period of time. At this time, the power consumption of the electronic device will increase, resulting in a waste of resources. In the embodiments of the present application, when the target application does not transmit data to the second device through the first device within a certain period of time or when the screen of the first device is in the off-screen state, the target application is frozen, that is, according to the data transmission situation between the target application and the second device, or the screen state of the first device, the keep-alive state and the frozen state of the target application are dynamically adjusted, avoiding the continuous keep-alive state of the target application from increasing the power consumption of the device. Therefore, while ensuring data transmission between devices, the power consumption of the first device is reduced.

[0182] In some embodiments of the present application, the first condition includes: the target application does not transmit data to the second device through the Bluetooth module of the first device within a preset period of time; the processor 110 is further configured to, after controlling the target application to enter the frozen state, if the Bluetooth interface of the first device is called, control the target application to enter the keep-alive state from the frozen state.

[0183] In some embodiments of the present application, the first condition includes: the screen of the first device is in the off-screen state; the processor 110 is further configured to, after controlling the target application to enter the frozen state, if the screen of the first device is in the on-screen state, control the target application to enter the keep-alive state from the frozen state.

[0184] In some embodiments of the present application, the first condition includes: the screen of the first device is in the off-screen state; the processor 110 is further configured to, after controlling the target application to enter the frozen state, control the Bluetooth module of the first device to cache the first information;

[0185] Wherein, the first information includes at least one of the following:

[0186] The second information sent by the second device to the target application during the process of the target application being in the frozen state;

[0187] The third information to be transmitted to the second device in the target application during the process of the target application being in the frozen state.

[0188] In some embodiments of the present application, the first information includes: the second information; the processor 110 is further configured to, after controlling the Bluetooth module of the first device to cache the first information, after the target application enters the keep-alive state, transmit the second information to the target application.

[0189] In some embodiments of the present application, the first information includes: third information; a radio frequency unit 101, configured to send the third information to a second device through a Bluetooth module of the first device after a Bluetooth module of the first device caches the first information under the control of a processor 110 and after a target application enters a keep-alive state.

[0190] In some embodiments of the present application, the processor 110 is further configured to cancel the keep-alive of the target application if the target application is in a keep-alive state when the Bluetooth connection between the first device and the second device is disconnected.

[0191] The electronic device provided in the embodiments of the present application can implement each process implemented in the above method embodiments and can achieve the same technical effects. To avoid repetition, details are not described herein again.

[0192] For the beneficial effects of various implementation manners in this embodiment, reference may be specifically made to the beneficial effects of the corresponding implementation manners in the above method embodiments. To avoid repetition, details are not described herein again.

[0193] It should be understood that in the embodiments of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The graphics processing unit 1041 processes image data of a static picture or a video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. The other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.

[0194] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 109 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.

[0195] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor 110 either.

[0196] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0197] Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0198] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above method embodiment, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0199] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0200] The embodiments of the present application provide a computer program / program product. The computer program / program product is stored in a storage medium. The program / program product is executed by at least one processor to implement each process of the above method embodiment, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0201] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed. It may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described method may be executed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0202] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.

[0203] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.

Claims

1. An application management method, applied to a first device, characterized in that, The first device includes a target application, and the method includes: When a Bluetooth connection is established between the first device and the second device and the target application is in a keep-alive state, if a first condition is satisfied, control the target application to enter a frozen state; the keep-alive state indicates maintaining the target application running in the background; the frozen state indicates freezing all processes of the target application; Wherein, the first condition includes any one of the following: The target application does not transmit data to the second device through the Bluetooth module of the first device within a preset duration; The screen of the first device is in a screen-off state.

2. The method according to claim 1, wherein The first condition includes: the target application does not transmit data to the second device through the Bluetooth module of the first device within a preset duration; after controlling the target application to enter the frozen state, the method further includes: If the Bluetooth interface of the first device is called, control the target application to enter the keep-alive state from the frozen state.

3. The method according to claim 1, characterized in that The first condition includes: the screen of the first device is in a screen-off state; after controlling the target application to enter the frozen state, the method further includes: If the screen of the first device is in a screen-on state, control the target application to enter the keep-alive state from the frozen state.

4. The method according to claim 1, wherein The first condition includes: the screen of the first device is in a screen-off state; after controlling the target application to enter the frozen state, the method further includes: controlling the Bluetooth module of the first device to cache first information; Wherein, the first information includes at least one of the following: Second information sent by the second device to the target application during the process that the target application is in the frozen state; Third information to be transmitted by the target application to the second device during the process that the target application is in the frozen state.

5. The method according to claim 4, wherein The first information includes: the second information; after controlling the Bluetooth module of the first device to cache the first information, the method further includes: After the target application enters the keep-alive state, transmit the second information to the target application.

6. The method according to claim 4, characterized in that The first information includes: the third information; after controlling the Bluetooth module of the first device to cache the first information, the method further includes: After the target application enters the keep-alive state, send the third information to the second device through the Bluetooth module of the first device.

7. The method according to claim 1, wherein The method further includes: When the Bluetooth connection between the first device and the second device is disconnected, if the target application is in the keep-alive state, cancel the keep-alive of the target application.

8. An application management device, which is applied to a first device, is characterized in that The first device includes a target application, and the device includes: a processing module; The processing module is configured to, when a Bluetooth connection is established between the first device and the second device and the target application is in a keep-alive state, if a first condition is satisfied, control the target application to enter a frozen state; the keep-alive state indicates maintaining the target application running in the background; the frozen state indicates freezing all processes of the target application; Wherein, the first condition includes any one of the following: The target application fails to transmit data to the second device through the Bluetooth module of the first device within a preset duration; The screen of the first device is in the screen-off state.

9. The device according to claim 8, characterized in that, The first condition includes: the target application fails to transmit data to the second device through the Bluetooth module of the first device within a preset duration; the processing module is further configured to, after controlling the target application to enter the frozen state, if the Bluetooth interface of the first device is called, control the target application to enter the keep-alive state from the frozen state.

10. The device according to claim 8, characterized in that, The first condition includes: the screen of the first device is in the screen-off state; the processing module is further configured to, after controlling the target application to enter the frozen state, if the screen of the first device is in the screen-on state, control the target application to enter the keep-alive state from the frozen state.

11. The device according to claim 8, wherein The first condition includes: the screen of the first device is in the screen-off state; the processing module is further configured to, after controlling the target application to enter the frozen state, control the Bluetooth module of the first device to cache the first information; Wherein, the first information includes at least one of the following: The second information sent by the second device to the target application during the process that the target application is in the frozen state; The third information to be transmitted by the target application to the second device during the process that the target application is in the frozen state.

12. The device according to claim 8, characterized in that, The processing module is further configured to, when the Bluetooth connection between the first device and the second device is disconnected, if the target application is in the keep-alive state, cancel the keep-alive of the target application.

13. An electronic device, characterized in that, It includes a processor and a memory, the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the application program management method according to any one of claims 1-7 are implemented.

14. A readable storage medium, characterized in that, The program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the application program management method according to any one of claims 1-7 are implemented.

15. A computer program product, characterized in that, The computer program product is stored in the storage medium, and the program product is executed by at least one processor to implement the steps of the application program management method according to any one of claims 1-7.