Task management method and electronic equipment
By adopting a dual-chip structure in smart wearable devices, using the combination of high-performance chips and low-power chips, power consumption reduction and battery life improvement are achieved through management lists and task switching, solving the battery life problem caused by high power consumption.
Patent Information
- Application Number
- CN202311394948.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
Smart Images

Figure CN119882984A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a task management method and electronic device. Background Art
[0002] Users have higher and higher functional requirements for smart wearable devices. In order to realize various functions, wearable devices are equipped with high-performance chips. After being equipped with high-performance chips, although the functions are diversified and convenient, the battery life problem caused by high-power chips has also become prominent, affecting the user experience. Summary of the invention
[0003] The embodiments of the present application provide a task management method and an electronic device for reducing the power consumption of the electronic device and improving the battery life.
[0004] In a first aspect, a task management method is provided, which is applied to an electronic device, wherein the electronic device includes a first chip and a second chip, and the electronic device includes a first application, the first application includes multiple tasks, some of the multiple tasks are deployed on the first chip, and another part of the tasks are deployed on the second chip, and there is no overlap between the one part of the tasks and the other part of the tasks, and the method includes: the electronic device runs on the first chip; the electronic device receives a first operation, the first operation is used to open a first interface of the first application, and the first interface corresponds to a first task; the electronic device determines that the first task is deployed on the second chip according to a management list, and the management list is used to record tasks deployed on the first chip and / or tasks deployed on the second chip; the electronic device switches from the first chip to the second chip, and creates a first task stack on the second chip, adds the first task to the first task stack, and the first task is located at the top of the first task stack; the electronic device displays the first interface.
[0005] In an embodiment of the present application, the electronic device may include dual chips, such as a high-performance chip and a low-power chip. In this way, the electronic device does not need to run on the high-performance chip all the time, thereby improving battery life. Moreover, multiple tasks in an application can be deployed on different chips respectively, and the tasks on the two chips do not overlap. In this way, for each task, the developer does not need to develop it twice, which reduces the developer's workload and improves efficiency. In addition, the electronic device determines which tasks are deployed on which chip based on the management list to switch chips, without the need to switch chips frequently.
[0006] In one possible design, the first chip includes a first management list, which is used to record tasks deployed on the first chip; the electronic device determines that the first task is deployed on the second chip based on the management list, including: the electronic device determines that the first task is not recorded in the first management list.
[0007] In the embodiment of the present application, the electronic device can deploy a management list in one chip to record which tasks are deployed on the chip, and for tasks not recorded in the management list, they are run on another chip. In this way, there is no need to deploy a list on two chips respectively, which reduces the workload of developers and saves memory space.
[0008] In one possible design, the first chip includes a first management list, and the first management list is used to record tasks deployed on the first chip; the second chip includes a second management list, and the second management list is used to record tasks deployed on the second chip; the first chip is used to obtain the second management list from the second chip; the electronic device determines that the first task is deployed on the second chip based on the management list, including: the electronic device determines that the first task is not recorded in the first management list; and / or the electronic device determines that the first task is recorded in the second management list.
[0009] In the embodiment of the present application, the electronic device can deploy a management list in each of the two chips to record which tasks are deployed on the chip. This method is more accurate and avoids erroneous switching between chips.
[0010] In one possible design, the method also includes: the electronic device receives a second operation, the second operation is used to open a second interface of the first application, and the second interface corresponds to a second task; the electronic device determines, based on a management list, that the second task is deployed on the first chip; the electronic device switches from the second chip to the first chip, and creates a second task stack on the first chip, adds the second task to the second task stack, and the second task is located at the top of the second task stack; the electronic device displays the second interface.
[0011] In the embodiment of the present application, after the electronic device switches from the first chip to the second chip, if it is determined according to the management list that the next task is deployed on the first chip, it switches back to the first chip. If the next task is deployed on the second chip, it continues to run on the second chip. In this way, frequent switching between chips can be avoided.
[0012] In one possible design, the first chip includes a second task, the second chip includes a proxy task of the second task, and the proxy task is used to start the second task. The method also includes: the electronic device receives a second operation, the second operation is used to open a second interface of the first application, and the second interface corresponds to the second task; the electronic device adds the proxy task of the second task to the first task stack and is located at the top of the second task stack; the electronic device switches from the second chip to the first chip, creates a second task stack on the first chip, adds the second task to the second task stack and the second task is located at the top of the second task stack; the electronic device displays the second interface.
[0013] In the embodiment of the present application, after the electronic device switches from the first chip to the second chip, the next task is run on the second chip. If the next task is a proxy task, it is switched back to the first chip to run the task brought by the proxy task on the first chip. In this way, the second chip switches to the first chip through the proxy task, so the management list does not need to be deployed in the second chip, reducing memory space.
[0014] In one possible design, after the electronic device adds a proxy task of the second task in the second task stack and before the electronic device displays the second interface, the method further includes: the electronic device displays the first interface or a third interface, and the third interface is an interface corresponding to the proxy task.
[0015] In an embodiment of the present application, when an electronic device runs a proxy task on a chip, the foreground can display the previous interface or the interface corresponding to the proxy task to avoid interface interruptions in the foreground and affect the user's visual experience.
[0016] In a possible design, the third interface is a null interface.
[0017] In an embodiment of the present application, when an electronic device runs a proxy task on a certain chip, an empty interface may be displayed on the foreground to prompt the user that a chip switch is about to be performed.
[0018] In one possible design, after the electronic device switches from the second chip to the first chip, the method further includes: the electronic device destroying the first task stack or destroying the first task in the first task stack.
[0019] In an embodiment of the present application, after an electronic device switches from one chip to another, the task stack or tasks in the task stack created on the original chip can be destroyed, which can save memory space on the one hand and reduce power consumption and improve battery life on the other hand.
[0020] In a possible design, the first chip is an AP and the second chip is an MCU, or the first chip is an MCU and the second chip is an AP. In short, the embodiments of the present application do not limit the specific types of the first chip and the second chip, and any type of chip may be used.
[0021] In a second aspect, an electronic device is also provided, including:
[0022] a processor, a memory, and one or more programs;
[0023] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method steps provided in the first aspect above.
[0024] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed on a computer, the computer executes the method according to the first aspect.
[0025] According to a fourth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is run on a computer, the computer is enabled to execute the method according to the first aspect.
[0026] In a fifth aspect, a chip is also provided, which is coupled to a memory in an electronic device and is used to call a computer program stored in the memory and execute the technical solution of the first aspect of the embodiment of the present application. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0027] For the technical effects that can be achieved by the above-mentioned second to fifth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1A A schematic diagram of a dual-chip structure of a wearable device provided in one embodiment of the present application;
[0029] Figure 1B A schematic diagram of a dual-chip collaborative operation application of a wearable device provided in an embodiment of the present application;
[0030] Figure 2A Another schematic diagram of a dual-chip structure of a wearable device provided in one embodiment of the present application;
[0031] Figure 2B Another schematic diagram of a dual-chip collaborative operation application of a wearable device provided by an embodiment of the present application;
[0032] Figure 3A Another schematic diagram of a dual-chip structure of a wearable device provided in an embodiment of the present application;
[0033] Figure 3B Another schematic diagram of a dual-chip collaborative operation application of a wearable device provided by an embodiment of the present application;
[0034] Figure 4A Another schematic diagram of a dual-chip structure of a wearable device provided in an embodiment of the present application;
[0035] Figure 4B Another schematic diagram of a dual-chip collaborative operation application of a wearable device provided by an embodiment of the present application;
[0036] Figure 5 A schematic diagram of the hardware structure of a wearable device provided in one embodiment of the present application;
[0037] Figure 6 Another schematic diagram of the hardware structure of a wearable device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0038] Below, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0039] At least one involved in the embodiments of the present application includes one or more; wherein, more than one means greater than or equal to two. In addition, it should be understood that in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first chip and the second chip, the first task stack and the second task stack, the first subtask and the second subtask, etc. do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated with each other are in an "or" relationship.
[0040] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the specification. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0041] As used in this specification, the term “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrase “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0042] The interface display method provided in the embodiment of the present application is applicable to wearable devices. Exemplarily, the wearable device can be a wristband device such as a bracelet or a watch, or it can also be a device such as a necklace or glasses, or it can also be shoes, clothing, etc. The embodiment of the present application does not limit the type of wearable device. In addition to wearable devices, the technical solution provided in the embodiment of the present application can also be applied to other devices, such as mobile phones or tablet computers. In short, the technical solution provided in the embodiment of the present application can be applied to any electronic device with dual chips or multiple chips.
[0043] For ease of understanding, this article mainly uses watches as an example.
[0044] In order to realize a variety of functions, the watch is equipped with a high-performance chip. After being equipped with a high-performance chip, although the watch has achieved a variety of functions, it has brought about a battery life problem. In order to solve the battery life problem, in an embodiment of the present application, the watch can be equipped with dual chips, for example, chip A and chip B. Optionally, the performance of chip A can be higher than that of chip B. For example, the main frequency, memory, etc. of chip A are higher than those of chip B. It should be understood that chip A is a high-performance chip, and when the watch runs on chip A, it will generate more power consumption and consume more electricity; chip B is a low-power chip, and when the watch runs on chip B, it generates less power consumption and consumes less electricity. Therefore, by carrying dual chips, the watch does not need to run on a high-performance chip all the time, which reduces power consumption and improves battery life.
[0045] It should be noted that the embodiment of the present application does not limit the chip type of chip A and chip B, and any type of chip can be used, as long as the performance of chip A is higher than that of chip B. In addition, it should be noted that the "dual chip" in this article can also be replaced by "dual processor" or "dual core" and the like. Take a dual processor as an example, that is, a watch is equipped with dual processors, a main processor, and an auxiliary processor or coprocessor. The performance of the main processor is higher than that of the coprocessor. The embodiment of the present application does not limit the types of the main processor and the coprocessor. For example, the main processor can be an application processor (application processor, AP), a central processing unit, a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU) and other processors. The coprocessor can be a microcontroller unit (Microcontroller Unit, MCU).
[0046] After the watch is equipped with dual chips, the dual chips need to work together, for example, the dual chips work together to run an application in the watch. The present application embodiment provides three solutions for the dual chips in the watch to work together to run applications, and each solution will be described in turn below. For ease of understanding, the following mainly uses the exercise application as an example for description.
[0047] The first option
[0048] The exercise application includes multiple subtasks, for example, an exercise list subtask, a preparation subtask, an exercise subtask, and an exercise record subtask. Different subtasks correspond to different interfaces. For example, the exercise list subtask corresponds to the exercise list interface, the preparation subtask corresponds to the preparation interface, the exercise subtask corresponds to the exercise interface, and the exercise record subtask corresponds to the exercise record interface. It should be noted that the "subtask" in this article is only an example, and other descriptions, such as "task" or "ability (Ability)", can also be used, and the embodiments of the present application are not limited to this.
[0049] In the first approach, each subtask in the exercise app is deployed once in each of the two chips in the watch.
[0050] For example, Figure 1A, the watch includes chip A and chip B. Please refer to the previous description of chip A and chip B, which will not be repeated here. Chip A includes the exercise list subtask A, preparation subtask A, exercise subtask A, and exercise record subtask A of the exercise application. Chip B includes the exercise list subtask B, preparation subtask B, exercise subtask B, and exercise record subtask B of the exercise application. Taking exercise list subtask A and exercise list subtask B as examples, a possible implementation method is that for the exercise list subtask, the developer develops it twice to obtain two sets of program codes for the subtask, one set of program codes can run normally on chip A, namely, exercise list subtask A, and the other set of program codes can run normally on chip B, namely, exercise list subtask B. The same principle applies to other subtasks (for example, preparation subtask A and preparation subtask B, exercise subtask A and exercise subtask B, exercise record subtask A and exercise record subtask B), which will not be repeated.
[0051] Optionally, continuing to take the exercise list subtask A and the exercise list subtask B as examples, the exercise list subtask A corresponds to the exercise list interface A. The exercise list subtask B corresponds to the exercise list interface B. The exercise list interface A and the exercise list interface B may be exactly the same or not exactly the same. For example, since chip A is a high-performance chip and chip B is a low-power chip, the exercise list interface A can be cooler than the exercise list interface B, for example, including more buttons and / or functions. The same principle applies to the preparation interface A and the preparation interface B, the exercise interface A and the exercise interface B, and the exercise record interface A and the exercise record interface, and no repetition is given. It should be noted that, for the sake of ease of understanding, this article takes the example that the exercise list interface A is exactly the same as the exercise list interface B, the preparation interface A is exactly the same as the preparation interface B, the exercise interface A is exactly the same as the exercise interface B, and the exercise record interface A is exactly the same as the exercise record interface B.
[0052] therefore, Figure 1A When the watch is running on chip A, it can display the exercise list interface A, the preparation interface A, the exercise interface A, the exercise record interface A, etc. When the watch is running on chip B, it can display the exercise list interface B, the preparation interface B, the exercise interface B, the exercise record interface B, etc.
[0053] For example, Figure 1B(a), the watch is currently running on chip A. When the watch receives an operation for opening the exercise list interface in the exercise application (not shown in the figure), task stack 1 is established in chip A, and exercise list subtask A is added to task stack 1 and is located at the top of task stack 1. It should be noted that since the watch is currently running on chip A, the subtask located at the top of task stack 1 of chip A is configured to be displayed through the watch foreground, so the watch foreground displays the exercise list interface, such as Figure 1B (a). It should be noted that the exercise list interface here is the exercise list interface A corresponding to the exercise list subtask A. Since this article takes the exercise list interface A and the exercise list interface B as an example, Figure 1B There is no distinction between exercise list interface A and exercise list interface B, and they are unified as the exercise list interface.
[0054] Optionally, since chip A is a high-power chip, in order to avoid the watch running on chip A all the time, under some conditions, the watch can switch from chip A to chip B to reduce power consumption.
[0055] For example, Figure 1B In (a), when the watch determines that the screen-off condition is met, the display screen turns off, such as Figure 1B (b). When the watch receives a screen-on operation, it can switch from chip A to chip B, that is, the watch runs on chip B. Optionally, the screen-off condition may include: receiving a screen-off operation or not receiving any input operation within a preset time. Exemplarily, the preset time may be, for example, 2s, 3s, 5s, 10s, etc., and the specific time is not limited in the embodiments of the present application. Optionally, the screen-on operation may include: raising the wrist to light up the screen or pressing a button to light up the screen, etc., which are not limited in the embodiments of the present application.
[0056] Understandably, Figure 1B In (a), before the display screen turns off, the watch is running on chip A, and the exercise list interface is displayed in the foreground, indicating that the user may operate in the exercise list interface. In order to ensure the continuity of user operations, the exercise list interface can still be displayed in the foreground of the watch after the display screen turns on. However, since the watch switches from chip A to chip B after the display screen turns on, it is necessary to ensure that the exercise list interface is displayed in the foreground of the watch after switching to chip B. A possible implementation method is, Figure 1B (c) When the watch receives the screen-on operation, it switches from chip A to chip B, creates task stack 2 in chip B, and adds exercise list subtask B to task stack 2 and places it at the top of task stack 2. It should be noted that since the watch is currently running on chip B, the subtask at the top of task stack 2 of chip B is configured to be displayed through the watch foreground, so the watch foreground displays the exercise list interface, such as Figure 1B(c). It can be understood that the exercise list interface here is the exercise list interface B corresponding to the exercise list subtask B. Since it is exactly the same as the exercise list interface A, it is collectively referred to as the exercise list interface. Therefore, in the process of turning the watch screen off and then on, the switch from the high-performance chip A to the low-power chip B is completed, reducing power consumption.
[0057] Optional, Figure 1B In (c), after the watch switches from chip A to chip B, task stack 1 in chip A can be retained, and the subtasks in task stack 1 can also be retained. Alternatively, considering that the watch has less memory, in order to reduce memory usage, Figure 1B In (c), after the watch switches from chip A to chip B, task stack 1 in chip A can be destroyed, or the subtask in task stack 1 can be popped out.
[0058] Figure 1B In (c), when the watch receives an operation for the skipping option in the exercise list interface, the preparation subtask B is added to the task stack 2 of chip B and is located at the top of the task stack 2, such as Figure 1B (d), so the watch foreground displays the preparation interface. The preparation interface here is the preparation interface B corresponding to the preparation subtask B. Since this article takes the preparation interface A and the preparation interface B as an example, Figure 1B There is no distinction between preparation interface A and preparation interface B, and they are all referred to as preparation interface.
[0059] In the embodiment of the present application, when the watch displays the preparation interface, the countdown can be started, and when the countdown reaches 0, the next subtask, namely the exercise subtask B, will automatically run. Optionally, the countdown can run in the background or can also be displayed in the foreground, for example, in the preparation interface (not shown in the figure). Figure 1B In (d), when the countdown reaches 0, the watch adds the next subtask, namely, the exercise subtask B, to the task stack 2 of chip B and places it at the top of the task stack 2, as shown in Figure 1B (e), so the watch front shows the exercise interface. The exercise interface here is the exercise interface B corresponding to the exercise subtask B. Since this article takes the exercise interface A and the exercise interface B as an example, Figure 1B There is no distinction between the training interface A and the training interface B, and they are unified as the training interface.
[0060] Optional, Figure 1B In (e), after the watch displays the exercise interface, if the exercise is finished, the next subtask, namely exercise recording subtask B, can be performed. Optionally, the exercise end may include: manual end or automatic end. Manual end, for example, ends by pressing a button, and automatic end, for example, the exercise interface includes a countdown (not shown in the figure), and when the countdown reaches 0, it ends automatically. Therefore, Figure 1B In (e), after the exercise is completed, the watch adds the next subtask, namely, exercise record subtask B, to task stack 2 of chip B and places it at the top of task stack 2, as shown in FIG. Figure 1B (f), so the watch displays the exercise record interface on the foreground. The exercise record interface here is the exercise record interface B corresponding to the exercise record subtask B. Since this article takes the exercise record interface A and the exercise record interface B as an example, Figure 1B In the exercise record interface, there is no distinction between the exercise record interface A and the exercise record interface B, and they are unified as the exercise record interface. Optionally, the exercise record interface can display information such as exercise duration and calories consumed.
[0061] Figure 1B In (f), when the watch receives the operation of returning to the desktop, it switches from chip B to chip A, such as Figure 1B (g) The desktop is displayed in the foreground of the watch. Figure 1B In (g), since the watch has switched to running on chip A, when the watch receives an operation to open an application from the desktop, the subtask of the application runs on chip A.
[0062] Second option
[0063] In the second solution, all subtasks of the exercise application are deployed in the chip A of the watch, and some of the subtasks are replaced by proxy subtasks. It is not necessary to deploy all subtasks of the exercise application in chip B, but only the subtasks that are proxied by the proxy subtasks in chip A.
[0064] For example, Figure 2A , the watch includes chip A and chip B. Please refer to the previous description of chip A and chip B, which will not be repeated here. Chip A includes the exercise list subtask, preparation-proxy subtask, exercise-proxy subtask, and exercise record subtask of the exercise application. Chip B includes the preparation subtask and exercise subtask of the exercise application. The subtask represented by the preparation-proxy subtask in chip A is the preparation subtask in chip B. The subtask represented by the exercise-proxy subtask in chip A is the exercise subtask in chip B.
[0065] Taking the preparing-proxy subtask in chip A and the preparing-neutral subtask in chip B as examples, the preparing-proxy subtask can be understood as a shortcut or trigger condition for starting the preparing-neutral subtask in chip B. Here, "starting" can be understood as starting the operation.
[0066] For example, Figure 2B(a), the watch is currently running on chip A. When the watch receives an operation for opening the exercise list interface in the exercise application (not shown in the figure), task stack 1 is established in chip A, and the exercise list subtask is added to task stack 1 and placed at the top of the stack. Since the watch is currently running on chip A, the subtask at the top of task stack 1 in chip A is configured to be displayed on the watch foreground, so Figure 2B In (a), the watch displays the exercise list interface on the foreground. Figure 2B In (a), when the watch receives an operation for the skipping option in the exercise list interface, the preparing-agent subtask is added to the task stack 1 of chip A and is located at the top of the task stack 1, such as Figure 2B (b).
[0067] It should be noted that Figure 2B In (b), the Prepare-Proxy subtask is already at the top of Task Stack 1, so the watch foreground should display the interface corresponding to the Prepare-Proxy subtask. One possible implementation is that the Prepare-Proxy subtask is only a shortcut for launching the Prepare-Proxy subtask in chip B and does not correspond to any interface. In this case, in order to ensure the continuity of the watch foreground interface, Figure 2B In (b), when the Preparation-Proxy subtask is at the top of Task Stack 1, the foreground can continue to display the previous interface, i.e., the Exercise List interface. Another possible implementation is that the Preparation-Proxy subtask corresponds to an empty interface. In this case, Figure 2B (b), when the Preparing-Proxy subtask is at the top of task stack 1, the watch foreground can display the empty interface. It should be noted that the empty interface can be a blank interface with a black or white background, which does not include any buttons or icons. Optionally, the Preparing-Proxy subtask may not correspond to an empty interface, but to another interface, which may be similar to the Preparing interface, but the development amount may be less than that of the Preparing interface. In short, the embodiment of the present application does not limit the interface corresponding to the Preparing-Proxy subtask.
[0068] Figure 2B In (b), the Prepare-Proxy subtask is at the top of task stack 1, and because the Prepare-Proxy subtask is used to pull up the Prepare Neutron subtask in chip B, the watch switches from chip A to chip B, and creates task stack 2 in chip B, and adds the Prepare Neutron subtask to task stack 2 and places it at the top of the stack, as shown in Figure 2B (c) The watch front displays the preparation interface.
[0069] Figure 2B In (c), after the watch displays the preparation interface, the countdown starts. When the countdown reaches 0, it switches back to chip A from chip B, and adds the next subtask, i.e., the training-agent subtask, to the task stack 1 of chip A and places it at the top of the stack. Figure 2B(d).
[0070] It should be noted that Figure 2B In (d), the "Exercise-Proxy" subtask is already at the top of task stack 1, so the watch foreground should display the interface corresponding to the "Exercise-Proxy" subtask. One possible implementation is that the "Exercise-Proxy" subtask is only a shortcut to launch the "Exercise" subtask in chip B and does not correspond to any interface. In this case, in order to ensure the continuity of the watch foreground interface, Figure 2B In (d), when the training-agent subtask is at the top of task stack 1, the foreground can continue to display the previous interface, that is, the preparation interface. Another possible implementation is that the training-agent subtask corresponds to an empty interface. In this case, Figure 2B In (d), when the "Exercise-Proxy" subtask is at the top of task stack 1, the watch foreground may display the empty interface. Optionally, the "Exercise-Proxy" subtask may not correspond to an empty interface, but to another interface, which may be similar to the "Exercise" interface, but the development amount may be less than that of the "Exercise" interface. In short, the embodiment of the present application does not limit the interface corresponding to the "Exercise-Proxy" subtask.
[0071] Figure 2B In (d), the Exercise-Proxy subtask is at the top of Task Stack 1. Since the Exercise-Proxy subtask is used to pull up the Exercise-Subtask in Chip B, the watch switches from Chip A to Chip B, and adds the Exercise-Subtask to Task Stack 2 of Chip B and places it at the top of Task Stack 2. Figure 2B (e) The watch front displays the exercise interface.
[0072] Figure 2B In (e), after the exercise is finished, the watch switches from chip B to chip A, and adds the next subtask, the exercise record subtask, to the task stack 1 of chip A and places it at the top of the stack, as shown in Figure 2B (f) The watch displays the exercise record interface on the front page. Figure 2B In (f), since the exercise record subtask is not a proxy subtask, there is no need to switch to chip B.
[0073] Therefore, in the second solution, the watch mainly runs on chip A. Only when running to a proxy subtask will it switch from chip A to chip B, and run the subtask represented by the proxy subtask in chip B, so that the interface corresponding to the subtask is displayed in the foreground. When it is necessary to enter the next subtask, switch from chip B to chip A. If the next subtask is a proxy subtask after switching to chip A, continue to switch to chip B. If the next subtask is not a proxy subtask, there is no need to switch to chip B.
[0074] Compared with the first solution, the second solution does not require developers to develop each subtask twice. For example, Figure 2A In the training list, the subtasks only need to be developed once, which reduces the workload of developers and improves efficiency. Figure 2A Although both chip A and chip B include preparation subtasks and exercise subtasks, the development workload is relatively small because chip A only includes preparation-agent subtasks and exercise-agent subtasks. This is because only a shortcut needs to be compiled without the need to compile the specific content of the subtasks, which further reduces the developer's workload.
[0075] The third option
[0076] In the third solution, for all subtasks of the exercise application, some of the subtasks are deployed in chip A of the watch, and the other subtasks are deployed in chip B. There are no identical subtasks in chip A and chip B.
[0077] For example, Figure 3A , the watch includes chip A and chip B. Please refer to the previous description of chip A and chip B, which will not be repeated here. Chip A includes the exercise list subtask of the exercise application. Chip B includes the preparation subtask, exercise subtask and exercise record subtask of the exercise application. In short, an application includes multiple subtasks, some of which are deployed on chip A, and the rest are deployed on chip B, realizing the distributed deployment of subtasks.
[0078] like Figure 3A , chip A also includes an application management module 1 for managing the various subtasks deployed on chip A. For example, application management module 1 stores list 1, which includes an identifier for identifying the subtasks deployed on chip A. Chip B also includes an application management module 2 for managing the various subtasks deployed on chip B. For example, application management module 2 stores list 2, which includes an identifier for identifying the subtasks deployed on chip B.
[0079] Optionally, each subtask has a unique subtask identifier, for example, the subtask identifier of the exercise list subtask is list Ability, the subtask identifier of the preparation subtask is Pre Ability, the subtask identifier of the exercise subtask is Workout Ability, and the subtask identifier of the exercise record subtask is Record Ability. Therefore, the identifier in List 1 may include the subtask identifier of the exercise list subtask (i.e., list Ability). The identifier in List 2 may include the subtask identifier of the preparation subtask (i.e., Pre Ability), the subtask identifier of the exercise subtask (i.e., WorkoutAbility), and the subtask identifier of the exercise record subtask (i.e., Record Ability). Optionally, each application has a unique application identifier, for example, the application identifier of the exercise application is com.sport, and List 1 and / or List 2 may also include the application identifier of the exercise application (i.e., com.sport).
[0080] Optionally, application management module 1 and application management module 2 can share lists with each other. For example, application management module 1 sends list 1 to application management module 2. Application management module 2 sends list 2 to application management module 1. Therefore, when the watch runs on chip A, application management module 1 can determine which subtasks run on chip A through list 1, and which subtasks run on chip B through list 2. For subtasks that need to run on chip B, the watch switches from chip A to chip B. Similarly, when the watch runs on chip B, application management module 2 can determine which subtasks run on chip B through list 2, and which subtasks run on chip A through list 1. For subtasks that need to run on chip A, the watch switches from chip B to chip A.
[0081] For example, Figure 3B (a), the watch is currently running on chip A. When the watch receives an operation for opening the exercise list interface in the exercise application (not shown in the figure), the application management module 1 in chip A determines whether the subtask identifier of the exercise list subtask exists in list 1 by querying list 1. After querying, it is determined that it exists in list 1, so the watch establishes task stack 1 in chip A, such as Figure 3B (a), and the exercise list subtask is added to task stack 1 and is at the top of the stack. Therefore, the exercise list interface is displayed on the foreground of the watch.
[0082] Figure 3BIn (a), when the watch receives an operation for the skipping rope option in the exercise list interface, the application management module 1 in chip A queries list 1 for the subtask identifier of the next subtask, i.e., the subtask being prepared. After querying, it is determined that the subtask identifier of the subtask being prepared does not exist in list 1, and then the query continues in list 2. After querying, it is determined that the subtask identifier of the subtask being prepared exists in list 2, so the watch switches from chip A to chip B and establishes task stack 2 in chip B, as shown in FIG. Figure 3B (b) The Prepare subtask is added to task stack 2 and is located at the top of the stack, so the watch foreground displays the Prepare interface.
[0083] Optionally, after the watch switches from chip A to chip B, task stack 1 in chip A and the exercise list subtask in task stack 1 can be retained. Alternatively, considering that the watch has less memory, in order to save memory space as much as possible, after the watch switches from chip A to chip B, task stack 1 in chip A can be destroyed, or task stack 1 can be retained but the exercise list subtask in task stack 1 can be destroyed.
[0084] Figure 3B In (b), after the watch displays the preparation interface, the countdown starts. When the countdown reaches 0, the application management module 2 in chip B queries list 2 to see whether there is a subtask identifier of the next subtask, namely, the exercising subtask. After querying, it is determined that there is a subtask identifier of the exercising subtask in list 2, so the watch continues to run on chip B, that is, the watch adds the exercising subtask to the task stack 2 in chip B and it is at the top of the stack. Figure 3B (c) The watch front displays the exercise interface.
[0085] Figure 3B In (c), after the watch displays the exercise interface foreground, when the exercise is finished, the application management module 2 in chip B queries list 2 whether there is a subtask identifier of the next subtask, namely the exercise record subtask. After querying, it is determined that the subtask identifier of the exercise record subtask exists in list 2, so the watch continues to run on chip B, and adds the exercise record subtask to the task stack 2 in chip B and places it at the top of the stack, as shown in FIG. Figure 3B (d), so the watch displays the exercise record interface on the foreground.
[0086] Figure 3BIn (d), when the watch receives an operation for opening the exercise list interface (not shown in the figure), the application management module 2 in chip B queries whether there is a subtask identifier of the exercise list subtask in list 2. After querying, it is determined that there is no subtask identifier of the exercise list subtask in list 2, so the query continues in list 1. After querying, it is determined that there is a subtask identifier of the exercise list subtask in list 1, so the watch switches from chip B to chip A. In the above text, after the watch switches from chip A to chip B, task stack 1 in chip A and the exercise list subtask in task stack 1 are retained, so Figure 3B In (e), after the watch switches from chip B to chip A, there is no need to create a task stack in chip B, because task stack 1 already exists in chip A and the exercise subtask is at the top of the stack, so the watch displays the exercise record interface in the foreground.
[0087] Compared with the first solution, in the third solution, the subtasks deployed on chip A and the subtasks deployed on chip B do not overlap. In other words, for each subtask, the developer only needs to develop it once, which greatly reduces the developer's workload.
[0088] Compared with the second solution, the third solution, on the one hand, does not need to deploy proxy subtasks, further reducing the development workload. On the other hand, the second solution requires frequent switching between chips, such as Figure 2B , when the watch is running on chip B, if it wants to run the next subtask, it needs to switch to chip A. After switching to chip A, if the next subtask is a proxy subtask, it still needs to switch to chip B to run, so the chip switching is relatively frequent. In the third solution, the watch can determine which subtasks are on chip A and which subtasks are on chip B according to the list in the application management module, and there is no need to switch between chip A and chip B frequently.
[0089] Optionally, there are multiple variations of the third solution.
[0090] The first variant, Figure 3AIn the embodiment, the application management module 1 in chip A and the application management module 2 in chip B do not share lists, that is, there is only list 1 in the application management module 1 and only list 2 in the application management module 2. This variant can reduce power consumption to a certain extent, because there is no need to transfer lists between the two chips. In this case, when the watch is running on chip A, if an operation for opening interface 1 is received, the application management module 1 in chip A can query whether there is an identifier of subtask 1 corresponding to interface 1 in list 1. If so, it continues to run on chip A, for example, creating a task stack on chip A and adding subtask 1 to the task stack to display interface 1 in the foreground. If there is no identifier of subtask 1 in list 1, the watch can directly switch from chip A to chip B (since there is no list 2 in the application management list 1, the application management module 1 will not query whether there is an identifier of subtask 1 in list 2). Optionally, after the watch switches to chip B, the application management module 2 in chip B can query whether there is an identifier of subtask 1 in list 2. If so, a task stack is created on chip B and subtask 1 is added to the task stack to display interface 1 in the foreground.
[0091] Similarly, when the watch is running on chip B, if an operation for opening interface 2 is received, the application management module 2 in chip B can query whether there is an identifier of subtask 2 corresponding to interface 2 in list 2. If so, it continues to run on chip B, for example, creating a task stack on chip B, and adding subtask 2 to the task stack to display interface 2 in the foreground. If the identifier of subtask 2 does not exist in list 2, the watch can switch directly from chip B to chip A (since there is no list 1 in the application management list 2, the application management module 2 will not query whether there is an identifier of subtask 2 in list 1). Optionally, after the watch switches to chip A, the application management module 1 in chip A can query whether there is an identifier of subtask 2 in list 1. If so, a task stack is created on chip A and subtask 2 is added to the task stack to display interface 2 in the foreground.
[0092] The second variant, Figure 3AIn the embodiment, there can be only one of the application management module 1 in chip A and the application management module 2 in chip B. This variant not only saves memory space in the watch, but also facilitates the development and maintenance of applications. For example, there is only application management module 1, but no application management module 2. Or, there is only application management module 2, but no application management module 1. Take the case where there is only application management module 1, but no application management module 2 as an example. In this case, application management module 1 includes list 1, and list 1 includes an identifier for identifying the subtasks deployed on chip A. When the watch is running on chip A, if an operation to open interface 1 is received, the application management module 1 in chip A queries list 1 for the identifier of subtask 1 corresponding to interface 1. If so, it continues to run on chip A, for example, a task stack is created on chip A, and subtask 1 is added to the task stack to display interface 1 in the foreground. If the identifier of subtask 1 does not exist in list 1, switch from chip A to chip B. Since the application management module 2 does not exist in the chip B, the chip B can directly run the subtask 1, for example, create a task stack on the chip B and add the subtask 1 to the task stack, so that the interface 1 is displayed in the foreground.
[0093] Similarly, after the watch runs on chip B, if an operation to open interface 2 is received, since chip B does not include an application management module, the mobile phone directly switches from chip B to chip A. Optionally, the application management module 1 in chip A queries whether there is an identifier of subtask 2 corresponding to interface 2 in list 1. If so, it continues to run on chip A. For example, a task stack is created on chip A, and subtask 2 is added to the task stack to display interface 2 in the foreground. If the identifier of subtask 2 does not exist in list 1, switch from chip A to chip B. For example, a task stack is created on chip B and subtask 2 is added to the task stack to display interface 2 in the foreground.
[0094] The fourth option
[0095] The fourth option can be understood as a combination of the second and third options.
[0096] For example, Figure 4A , the watch includes chip A and chip B. Please refer to the previous description of chip A and chip B, which will not be repeated here. Chip A includes the exercise list subtask and the preparation-agent subtask of the exercise application. Chip B includes the preparation subtask, exercise subtask and exercise record subtask of the exercise application. The preparation-agent subtask in chip A is used to pull up the preparation subtask in chip B. Chip B also includes an application management module for managing the various subtasks deployed on chip B. For example, the application management module stores a list, and the list includes an identifier for identifying the subtasks deployed on chip B. It can be understood that, Figure 4AIn the example, since chip A includes the proxy subtask, chip A can determine when to switch to chip B, so chip A does not need to include the application management module, that is, chip A does not need to use the application management module to determine which subtasks need to be run on chip B. Chip B includes the application management module, so chip B can use the application management module to determine which subtasks need to be run on chip A.
[0097] like Figure 4B (a), the watch is currently running on chip A. When the watch receives an operation for opening the exercise list interface in the exercise application (not shown in the figure), the watch establishes task stack 1 in chip A, such as Figure 4B (a), and the exercise list subtask is added to task stack 1 and is at the top of the stack. Therefore, the exercise list interface is displayed on the foreground of the watch.
[0098] Figure 4B In (a), when the watch receives an operation for the skipping option in the exercise list interface, the preparing-agent subtask is added to the task stack 1 of chip A and is located at the top of the stack, such as Figure 4B (b).
[0099] It should be noted that Figure 4B In (b), the Preparing-Proxy subtask is already at the top of Task Stack 1, so the watch foreground should display the interface corresponding to the Preparing-Proxy subtask. One possible implementation is that the Preparing-Proxy subtask does not correspond to any interface. In this case, in order to ensure the continuity of the watch foreground interface, Figure 4B In (b), when the Preparation-Proxy subtask is at the top of Task Stack 1, the watch foreground can continue to display the previous interface, i.e., the exercise list interface. Another possible implementation is that the Preparation-Proxy subtask corresponds to an empty interface. In this case, Figure 4B In (b), when the Preparing-Agent subtask is at the top of task stack 1, the watch foreground can display the empty interface.
[0100] Figure 4B In (b), since the Prepare-Proxy subtask is already at the top of Task Stack 1 and is used to pull up the Prepare Neutron task in chip B, the watch switches from chip A to chip B, creates Task Stack 2 in chip B, and adds the Prepare Neutron task to Task Stack 2 and places it at the top of Task Stack 2, as shown in Figure 4B (c) The watch front displays the preparation interface.
[0101] Optionally, after the watch switches from chip A to chip B, task stack 1 in chip A and the exercise list subtask in task stack 1 can be retained. Alternatively, considering that the watch has less memory, in order to save memory space as much as possible, after the watch switches from chip A to chip B, task stack 1 in chip A can be destroyed, or task stack 1 can be retained but the exercise list subtask in task stack 1 can be destroyed.
[0102] Figure 4B In (c), when the watch displays the preparation interface, the countdown starts. When the countdown reaches 0, the application management module in chip B queries the list to determine whether the subtask identifier of the next subtask, i.e., the exercise subtask, exists in the list. If it is determined to exist in the list, it continues to run on chip B and adds the exercise subtask to the task stack 2 in chip B and places it at the top of the stack. Figure 4B (d) So the watch displays the exercise interface on the foreground.
[0103] Figure 4B In (d), after the watch displays the exercise interface on the foreground, when the exercise is finished, the application management module in chip B in the watch queries the list to determine whether the subtask identifier of the next subtask, namely the exercise record subtask, exists in the list. If it is determined to exist in the list after query, it will continue to run on chip B and add the exercise record subtask to the task stack 2 in chip B and place it at the top of the stack, such as Figure 4B (e) So the watch displays the exercise record interface on the foreground.
[0104] Figure 4B In (e), when the watch receives an operation for opening the exercise list interface (not shown in the figure), the application management module in chip B of the watch queries the list to determine whether the subtask identifier of the exercise list subtask exists in the list. After the query, it is determined that it does not exist in the list, so the watch switches from chip B to chip A. In the above text, after the watch switches from chip A to chip B, task stack 1 in chip A and the exercise list subtask in task stack 1 can be retained, so Figure 4B In (e), after the watch switches from chip B to chip A, there is no need to create a task stack in chip A. The watch only needs to move the exercise list subtask in task stack 1 in chip A to the top of the stack, such as Figure 4B (f), so the watch displays the exercise record interface on the foreground.
[0105] It should be noted that Figure 4A and Figure 4B In the example, chip A includes an agent subtask and chip B includes an application management module. Optionally, chip B may include an agent subtask and chip A may include an application management module, which is not limited in the embodiments of the present application.
[0106] Compared with the first solution, in the fourth solution, developers do not need to develop each subtask twice, for example, Figure 4A In the training list subtask, the training neutron subtask, and the training record subtask only need to be developed once, which reduces the workload of developers and improves efficiency. Figure 4A Although both chip A and chip B include the preparation subtask, the development workload of chip A is relatively small, which further reduces the developer workload.
[0107] Compared with the second solution, in the fourth solution, chip B can determine which subtasks are deployed on chip B through the application management module. Only for subtasks not included on chip B will it switch to chip A, which does not require frequent chip switching like the second solution.
[0108] Compared with the third solution, in the fourth solution, there is no need to deploy application management modules on chip A and chip B respectively. Only one application management module needs to be deployed, which saves memory space and reduces application development and maintenance costs.
[0109] It should be noted that the task management method provided in the embodiment of the present application can be applied to electronic devices with dual chips or to electronic devices with multiple chips. For example, the above four solutions are mainly described by taking a watch with dual chips as an example. It is understandable that when a watch includes multiple chips, the above four solutions can also be adopted.
[0110] Figure 5 FIG. 1 shows a schematic diagram of the structure of an electronic device. The electronic device may be, for example, the watch mentioned above. Figure 5As shown, the electronic device 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.
[0111] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
[0112] Optionally, the processor 110 may include two processors, a main processor and an auxiliary processor or a coprocessor. Optionally, the main processor may be an application processor (AP) and the coprocessor may be a microcontroller unit (MCU).
[0113] Among them, the processor 110 can be used to execute the process of the task management method provided in the embodiment of the present application. For example, the processor 110 includes a main processor and a coprocessor. The electronic device includes a first application, the first application includes multiple subtasks, the first part of the subtasks in the multiple subtasks are deployed on the main processor, and the second part of the subtasks are deployed on the coprocessor, and there is no overlap between the first part of the subtasks and the second part of the subtasks. When the electronic device runs on the main processor, it receives a first operation, the first operation is used to open the first interface of the first application, and the first interface corresponds to the first subtask; the main processor determines that the first subtask is deployed on the coprocessor according to the management list, and the management list is used to record the subtasks deployed on the main processor and / or the subtasks deployed on the coprocessor. The electronic device switches the coprocessor from the main processor, creates a first task stack on the coprocessor, adds the first subtask to the first task stack, and the first subtask is located at the top of the first task stack. The electronic device displays the first interface. For the specific implementation process, please refer to the above description.
[0114] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0115] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0116] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0117] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0118] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0119] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0120] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0121] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0122] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0123] The wireless communication function of the electronic device can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0124] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. 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.
[0125] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0126] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0127] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194.
[0128] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0129] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application program, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device, 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 memory, etc.
[0130] 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. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as pictures and videos are stored in the external memory card.
[0131] The electronic device 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.
[0132] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0133] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.
[0134] The receiver 170B, also called a "earpiece", may be one or more and is used to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the voice can be received by placing the receiver 170B close to the ear.
[0135] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0136] The earphone jack 170D is used to connect a wired earphone.
[0137] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0138] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting.
[0139] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0140] The magnetic sensor 180D includes a Hall sensor. For example, the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
[0141] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes), and can detect the magnitude and direction of gravity when the electronic device is stationary.
[0142] Distance sensor 180F, used to measure distance. Electronic devices can measure distance through infrared or laser.
[0143] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light outward through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0144] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
[0145] The fingerprint sensor 180H is used to collect fingerprints.
[0146] The temperature sensor 180J is used to detect the temperature.
[0147] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
[0148] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of a human vocal part.
[0149] The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive the button input and generate a key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device.
[0150] Understandably, Figure 5 The components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present application may include Figure 5 In addition, Figure 5 The combination / connection relationship between the components can also be adjusted and modified.
[0151] Figure 6 The electronic device 600 provided in the embodiment of the present application is a schematic diagram of the structure. The electronic device 600 may be the watch mentioned above. Figure 6 As shown, the electronic device 600 may include: one or more processors 601; one or more memories 602; a communication interface 603, and one or more computer programs 604, and the above-mentioned devices may be connected via one or more communication buses 605. The one or more computer programs 604 are stored in the above-mentioned memory 602 and are configured to be executed by the one or more processors 601, and the one or more computer programs 604 include instructions. For example, when the electronic device 600 is the watch mentioned above, the instruction can be used to execute the relevant steps of the watch in the corresponding embodiment above. The communication interface 603 is used to realize the communication between the electronic device 600 and other devices, for example, the communication interface can be a transceiver.
[0152] In the embodiments provided by the present application, the method provided by the embodiments of the present application is introduced from the perspective of an electronic device (e.g., a watch) as an execution subject. In order to implement the functions in the methods provided by the embodiments of the present application, the electronic device may include a hardware structure and / or a software module, and the functions are implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0153] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc. In the absence of conflict, the solutions of the above embodiments can be used in combination.
[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0155] The present application is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0156] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0157] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0158] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A task management method, characterized in that: Applied to an electronic device, the electronic device includes a first chip and a second chip, the electronic device includes a first application, the first application includes a plurality of tasks, a first part of the plurality of tasks is deployed on the first chip, a second part of the tasks is deployed on the second chip, and the part of the tasks does not overlap with the other part of the tasks, the method includes: The electronic device runs on the first chip; The electronic device receives a first operation, where the first operation is used to open a first interface of the first application, where the first interface corresponds to a first task; The electronic device determines, according to a management list, that the first task is deployed on the second chip, wherein the management list is used to record the first part of the tasks deployed on the first chip and / or the second part of the tasks deployed on the second chip; The electronic device switches from the first chip to the second chip, creates a first task stack on the second chip, adds the first task to the first task stack and places the first task at the top of the first task stack; The electronic device displays the first interface.
2. The method according to claim 1, characterized in that The first chip includes a first management list, and the first management list is used to record the first part of tasks deployed on the first chip; The electronic device determines, according to the management list, that the first task is deployed on the second chip, including: The electronic device determines that the first task is not recorded in the first management list.
3. The method according to claim 1, characterized in that The first chip includes a first management list, and the first management list is used to record the first part of tasks deployed on the first chip; the second chip includes a second management list, and the second management list is used to record the second part of tasks deployed on the second chip; the first chip is used to obtain the second management list from the second chip; The electronic device determines, according to the management list, that the first task is deployed on the second chip, including: The electronic device determines that the first task is not recorded in the first management list; and / or, The electronic device determines that the first task is recorded in the second management list.
4. The method according to claim 1, characterized in that: The method further comprises: The electronic device receives a second operation, where the second operation is used to open a second interface of the first application, where the second interface corresponds to a second task; The electronic device determines, according to the management list, that the second task is deployed on the first chip; The electronic device switches from the second chip to the first chip, creates a second task stack on the first chip, adds the second task to the second task stack and places the second task at the top of the second task stack; The electronic device displays the second interface.
5. The method according to claim 1, characterized in that: The first chip includes a second task, the second chip includes a proxy task of the second task, and the proxy task is used to start the second task. The method further includes: The electronic device receives a second operation, where the second operation is used to open a second interface of the first application, where the second interface corresponds to the second task; The electronic device adds a proxy task of the second task to the first task stack and places it at the top of the second task stack; The electronic device switches from the second chip to the first chip, creates a second task stack on the first chip, adds the second task to the second task stack and places the second task at the top of the second task stack; The electronic device displays the second interface.
6. The method according to claim 5, characterized in that After the electronic device adds a proxy task of the second task to the second task stack and before the electronic device displays the second interface, the method further includes: The electronic device displays the first interface or the third interface, and the third interface is an interface corresponding to the proxy task.
7. The method according to claim 6, characterized in that The third interface is a null interface.
8. The method according to claim 4 or 5, characterized in that: After the electronic device switches from the second chip to the first chip, the method further includes: The electronic device destroys the first task stack or destroys the first task in the first task stack.
9. An electronic device, characterized in that: include: a processor, a memory, and one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the processor, enable the electronic device to perform the method steps as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.