Computing power scheduling method and device, wearable equipment and storage medium
By implementing a computing power scheduling method in wearable devices and utilizing the collaborative work of multiple cores and electronic devices, the problem of insufficient computing power of the device is solved and the computing power and battery life are improved.
Patent Information
- Application Number
- CN202310336160.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Wearable devices have limited hardware resources, resulting in limited computing capabilities and are unable to effectively handle tasks with high computing power requirements.
By implementing a computing power scheduling method in wearable devices, communication connections between multiple cores and electronic devices are used to determine whether the range of computing power required for a task exceeds the capabilities of a single core, and the task is assigned to a task that can provide the required computing power. Power target providers, including cores and electronics, to fully utilize the computing power of multiple cores and electronics.
It improves the computing power of wearable devices, ensures that high-computing tasks can be effectively processed, and extends the service life and battery life of the device.
Smart Images

Figure CN118733239A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wearable devices, and in particular to a computing power scheduling method, apparatus, wearable device and storage medium. Background Art
[0002] With the advancement of technology, wearable devices such as smart watches and smart bracelets have more and more functions, such as sports health, information reminders, and interaction with users. However, due to the limited hardware resources of wearable devices, the computing power of wearable devices is limited. Summary of the invention
[0003] The embodiments of the present application provide a computing power scheduling method, apparatus, wearable device, and storage medium, which can improve the computing power of the wearable device.
[0004] A first aspect of an embodiment of the present application provides a computing power scheduling method, the method being applied to a wearable device, the wearable device comprising N cores, N being an integer greater than or equal to 2, the wearable device establishing a communication connection with an electronic device, the method comprising:
[0005] When the first core obtains a first task to be processed, determining whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores;
[0006] In the case where the computing power required by the first task to be processed exceeds the computing power range of the first core, determining a target computing power provider according to the computing power required by the first task to be processed, the computing power ranges of the N cores, and the computing power range of the electronic device, the computing power required by the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device;
[0007] The target computing power provider is used to process the first task to be processed.
[0008] A second aspect of an embodiment of the present application provides a computing power scheduling device, the device is applied to a wearable device, the wearable device includes N cores, N is an integer greater than or equal to 2, the wearable device establishes a communication connection with an electronic device, and the device method includes:
[0009] A first determining unit is used to determine, when a first core obtains a first task to be processed, whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores;
[0010] a second determining unit, configured to determine a target computing power provider according to the computing power required by the first task to be processed, the computing power ranges of the N cores, and the computing power range of the electronic device, when the computing power required by the first task to be processed exceeds the computing power range of the first core, the computing power required by the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device;
[0011] A task processing unit is used to use the target computing power provider to process the first task to be processed.
[0012] A third aspect of an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the processor comprises N cores, the memory is used to store a computer program, the computer program comprises program instructions, and a first core is configured to call the program instructions to execute the step instructions in the first aspect of the embodiment of the present application.
[0013] The fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the first core to execute part or all of the steps described in the first aspect of the embodiment of the present application.
[0014] The fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to enable the first core to execute part or all of the steps described in the first aspect of the embodiments of the present application.
[0015] In an embodiment of the present application, when the first core obtains the first task to be processed, it is determined whether the computing power required for the first task to be processed exceeds the computing power range of the first core, and the first core is any one of the N cores; when the computing power required for the first task to be processed exceeds the computing power range of the first core, the target computing power provider is determined according to the computing power required for the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device, and the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the computing power range of the N cores and the electronic device; the first task to be processed is processed using the target computing power provider. In an embodiment of the present application, after the first core obtains the first task to be processed, if the computing power required for the first task to be processed exceeds the computing power range of the first core, the target computing power provider can be determined so that the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, thereby using the target computing power provider to process the first task to be processed. Since the target computing power provider is at least one of the N cores and the electronic device, the computing power of the N cores and the electronic device can be fully utilized to process the first task to be processed, thereby improving the computing power of the wearable device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is a schematic diagram of a connection relationship between a wearable device and an electronic device provided in an embodiment of the present application;
[0018] Figure 2 It is a flowchart of a computing power scheduling method provided in an embodiment of the present application;
[0019] Figure 3 It is a flowchart of another computing power scheduling method provided in an embodiment of the present application;
[0020] Figure 4 It is a flowchart of another computing power scheduling method provided in an embodiment of the present application;
[0021] Figure 5 This is a schematic diagram of the division of computing power of a triangle system provided in an embodiment of the present application;
[0022] Figure 6 It is a schematic diagram of computing power release of a triangle system provided in an embodiment of the present application;
[0023] Figure 7 It is a schematic diagram of computing power scheduling of a triangle system provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the structure of a computing power scheduling device provided in an embodiment of the present application;
[0025] Fig. 9 It is a structural schematic diagram of a wearable device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0028] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0029] The electronic devices involved in the embodiments of the present application may include various computing devices with communication functions, vehicle-mounted devices, other processing devices connected to a wireless modem, and various forms of user equipment (UE), mobile stations (MS), electronic devices (terminal devices), etc. For the convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
[0030] The wearable devices involved in the embodiments of the present application may include smart watches, smart bracelets, smart head displays, smart glasses, and other devices that can be conveniently worn on users.
[0031] See also Figure 1 , Figure 1 Schematic diagram of the connection relationship between a wearable device and an electronic device provided in an embodiment of the present application. Figure 1 As shown, the wearable device 100 may include N cores (eg Figure 1 In the example, core 1, core 2, ..., core N), N is an integer greater than or equal to 2. The N cores may correspond to N computing power providers (computational providers, CPs), and the electronic device 200 may correspond to one CP.
[0032] Each of the N cores and the electronic device can provide different computing power. Generally speaking, compared with the N cores, the electronic device 200 can provide higher computing power.
[0033] The wearable device 100 and the electronic device 200 can establish a wireless communication connection (eg, a Bluetooth connection, a WiFi connection, etc.) or a wired communication connection (eg, a data line connection).
[0034] Among them, the wearable device 100 can support the operation of multiple operating systems. For example, N cores can run on P operating systems respectively, P is an integer less than or equal to N, and P is an integer greater than or equal to 2. For example, the wearable device 100 can support two operating systems: Android system and real-time operating system (RTOS). Among them, some of the N cores run on the Android system, and another part of the N cores can run on the RTOS system. If N=2, one core runs on the Android system and the other core runs on the RTOS system. If N=4, one core can run on the Android system and the other three cores can run on the RTOS system.
[0035] Optionally, the wearable device 100 can work in a single system, for example, the wearable device 100 can work in a pure Android system or a pure RTOS system to be compatible with different working modes. The wearable device 100 can switch between the pure Android system and the pure RTOS system to switch the working mode.
[0036] Optionally, the wearable device 100 can work in a dual system. For example, the wearable device 100 can run the Android system and the RTOS system at the same time. The dual systems work together, and the functions of the wearable device 100 are more powerful, which can improve the user experience of the wearable device 100. The wearable device 100 can switch between a single system and a dual system. For example, in the dual-system collaborative operation mode, the functions of the wearable device 100 can be improved, and the user experience of the wearable device 100 can be improved. In a pure RTOS system, the power consumption of the wearable device 100 can be reduced, and the battery life of the wearable device 100 can be improved.
[0037] Under the pure RTOS system, the wearable device's capabilities such as motion, notification, and tools are all available, and the embedded subscriber identity module (eSIM) of the wearable device 100 will be turned off.
[0038] based on Figure 1 The connection diagram shown in the figure provides a method for computing power scheduling. Figure 2 , Figure 2 Schematic diagram of a computing power scheduling method provided in an embodiment of the present application. Figure 2 As shown, the method includes the following steps.
[0039] 201. When a first core obtains a first task to be processed, the first core determines whether the computing power required for the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores.
[0040] In the embodiment of the present application, the first task to be processed may be triggered on the wearable device. For example, a user initiates a data transmission task on the wearable device (or a data transmission task actively initiated by a system running on the wearable device), and the data transmission task is used to transmit data to the electronic device.
[0041] The first task to be processed may be triggered on the electronic device, for example, a message display task initiated by the electronic device to the wearable device (or a message display task initiated by the user on the electronic device), the message display task being used to display a message received by the electronic device on the wearable device.
[0042] The core computing power generally refers to the processing power of the core. For example, the core takes the central processing unit (CPU) as an example, and the core computing power refers to the computing power of the CPU. The computing power of the CPU is related to the CPU's main frequency and the floating-point calculation value per cycle. For example, the theoretical computing power of the CPU = the CPU's main frequency × the number of floating-point operations performed by the CPU per clock cycle.
[0043] In the embodiment of the present application, the computing power required for the first task to be processed may be the capability required to process the first task to be processed. The computing power range of the first core may be the capability supported by the computing power of the first core.
[0044] The embodiments of the present application can determine whether the computing power required for the first task to be processed exceeds the computing power range of the first core based on whether the capacity required to process the first task to be processed exceeds the capacity supported by the computing power of the first core. For example, the computing power required for the first task to be processed includes: capacity 1 and capacity 4; the computing power range of the first core includes: capacity 1, capacity 2, and capacity 3; then the computing power required for the first task to be processed exceeds the computing power range of the first core. For another example, the computing power required for the first task to be processed includes: capacity 1 and capacity 2; the computing power range of the first core includes: capacity 1, capacity 2, and capacity 3; then the computing power required for the first task to be processed does not exceed the computing power range of the first core.
[0045] In the embodiment of the present application, the computing power required for the first task to be processed is represented by the capability required to process the first task to be processed; the computing power range of the first core is represented by the capability supported by the computing power of the first core. Compared with directly representing it by computing power values, representing it by capability can more intuitively determine whether the capability required to process the first task to be processed exceeds the capability supported by the computing power of the first core.
[0046] The first core may be a core of an operating system currently running on the wearable device.
[0047] 202. When the computing power required for the first task to be processed exceeds the computing power range of the first core, the first core determines the target computing power provider based on the computing power required for the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device. The computing power required for the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device.
[0048] In an embodiment of the present application, if the computing power required for the first task to be processed exceeds the computing power range of the first core, the first task to be processed cannot be processed by the first core alone. At this time, it is necessary to use the capabilities of other cores and / or electronic devices to process the first task to be processed.
[0049] For example, taking N=2 as an example, N cores include core 1 and core 2. The computing power range of core 1 includes: capability 1, capability 2 and capability 3; the computing power range of core 2 includes: capability 4, capability 5 and capability 6; the computing power range of the electronic device includes: capability 7 and capability 8. If the computing power required for the first task to be processed includes: capability 1 and capability 2; then the computing power required for the first task to be processed does not exceed the computing power range of core 1, and the first task to be processed can be directly processed by core 1. If the computing power required for the first task to be processed includes: capability 1 and capability 4, then the computing power required for the first task to be processed exceeds the computing power range of core 1, then the target computing power provider can be determined to be: core 1 and core 2, and the computing power range of the target computing power provider (core 1 and core 2) is: capability 1, capability 2, capability 3, capability 4, capability 5 and capability 6, and the computing power required for the first task to be processed falls within the computing power range of the target computing power provider.
[0050] If the computing power required for the first task to be processed includes: capability 1 and capability 7, the computing power required for the first task to be processed exceeds the computing power range of core 1, and the target computing power provider can be determined as: core 1 and electronic device. At this time, the computing power range of the target computing power provider (core 1 and electronic device) is: capability 1, capability 2, capability 3, capability 7 and capability 8, and the computing power required for the first task to be processed falls within the computing power range of the target computing power provider.
[0051] If the computing power required for the first task to be processed includes: capability 4 and capability 7, the computing power required for the first task to be processed exceeds the computing power range of core 1, and the target computing power provider can be determined as: core 2 and electronic equipment. At this time, the computing power range of the target computing power provider (core 2 and electronic equipment) is: capability 4, capability 5, capability 6, capability 7 and capability 8, and the computing power required for the first task to be processed falls within the computing power range of the target computing power provider.
[0052] If the computing power required for the first task to be processed includes: capability 1, capability 4 and capability 7, the computing power required for the first task to be processed exceeds the computing power range of core 1, and the target computing power providers can be determined as: core 1, core 2 and electronic equipment. At this time, the computing power range of the target computing power providers (core 1, core 2 and electronic equipment) is: capability 1, capability 2, capability 3, capability 4, capability 5, capability 6, capability 7 and capability 8, and the computing power required for the first task to be processed falls within the computing power range of the target computing power provider.
[0053] Among them, the computing power ranges of any two cores in the N cores are different. The computing power ranges of the N cores and the algorithm ranges of the electronic device are different. For example, taking N=2 as an example, the N cores include core 1 and core 2. The computing power range of core 1 includes: capability 1, capability 2, and capability 3; the computing power range of core 2 includes: capability 3, capability 4, and capability 5; the computing power range of the electronic device includes: capability 5 and capability 6.
[0054] Optionally, the computing power ranges of the N cores do not overlap, and the computing power range of the electronic device does not overlap with the computing power range of the N cores. For example, taking N=2 as an example, the N cores include core 1 and core 2. The computing power range of core 1 includes: capability 1, capability 2, and capability 3; the computing power range of core 2 includes: capability 4, capability 5, and capability 6; the computing power range of the electronic device includes: capability 7 and capability 8.
[0055] In the embodiment of the present application, since the computing power ranges of the N cores and the electronic device do not overlap, when performing computing power scheduling, it can be ensured that low-computing power tasks are assigned to computing power providers with lower computing power capabilities, and higher-computing power tasks are assigned to computing power providers with higher computing power. There will be no situation where low-computing power tasks are assigned to computing power providers with higher computing power, so that computing power providers with higher computing power will not be frequently woken up, thereby reducing the power consumption of the entire computing power scheduling.
[0056] The computing power ranges of the N cores and the computing power ranges of the electronic device may be stored in the memory (non-volatile memory) of the first core. For example, the computing power ranges of the N cores and the computing power ranges of the electronic device may be stored in the memory of the first core in the form of a routing table.
[0057] Optionally, in step 202, the electronic device determines a target computing power provider according to the computing power required by the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device, including:
[0058] (11) The first core determines a computing power range within which the computing power required by the first task to be processed falls;
[0059] (12) The first core determines a target computing power provider based on a computing power range within which the computing power required for the first task to be processed falls, computing power ranges of the N cores, and a computing power range of the electronic device, wherein the computing power range of the target computing power provider includes the computing power range within which the computing power required for the first task to be processed falls.
[0060] In the embodiment of the present application, for example, taking N=2 as an example, the N cores include core 1 and core 2. The computing power range of core 1 includes: capability 1, capability 2 and capability 3; the computing power range of core 2 includes: capability 4, capability 5 and capability 6; the computing power range of the electronic device includes: capability 7 and capability 8. If the computing power required by the first task to be processed includes: capability 1 and capability 4; then the computing power range into which the computing power required by the first task to be processed falls includes: the computing power range of core 1 and the computing power range of core 2, and the target computing power provider includes: core 1 and core 2. If the computing power required by the first task to be processed includes: capability 1 and capability 7; then the computing power range into which the computing power required by the first task to be processed falls includes: the computing power range of core 1 and the computing power range of the electronic device, and the target computing power provider includes: core 1 and the electronic device. If the computing power required by the first task to be processed includes: capability 4 and capability 7; then the computing power range into which the computing power required by the first task to be processed falls includes: the computing power range of core 2 and the computing power range of the electronic device, and the target computing power provider includes: core 2 and the electronic device. If the computing power required for the first task to be processed includes: capability 1, capability 4 and capability 7; then the computing power range within which the computing power required for the first task to be processed falls includes: the computing power range of core 1, the computing power range of core 2 and the computing power range of the electronic device, then the target computing power providers include: core 1, core 2 and the electronic device.
[0061] 203. The first core uses the target computing power provider to process the first task to be processed.
[0062] In the embodiment of the present application, if the target computing power provider includes one, then the target computing power provider is not the first core. If the target computing power provider includes at least two, then the target computing power provider may include the first core or may not include the first core.
[0063] For example, taking N=2 as an example, the N cores include core 1 and core 2. If the target computing power provider is core 2, core 1 can send the first task to be processed to core 2 through the hardware bus for processing. If the target computing power provider is an electronic device, core 1 can send the first task to be processed to the electronic device through a wireless connection (for example, Bluetooth connection) for processing.
[0064] If the target computing power provider is core 2 and the electronic device, the first task to be processed can be split into two subtasks, which are respectively assigned to core 2 and the electronic device for processing. The computing power required for the subtask processed by core 2 is within the computing power range of core 2, and the computing power required for the subtask processed by the electronic device is within the computing power range of the electronic device.
[0065] If the target computing power providers are core 1, core 2 and electronic devices, the first task to be processed can be split into three subtasks, which are respectively assigned to core 1, core 2 and electronic devices for processing. Among them, the computing power required for the subtask processed by core 1 is within the computing power range of core 1, the computing power required for the subtask processed by core 2 is within the computing power range of core 2, and the computing power required for the subtask processed by the electronic device is within the computing power range of the electronic device.
[0066] In the embodiment of the present application, after the first core obtains the first task to be processed, if the computing power required for the first task to be processed exceeds the computing power range of the first core, a target computing power provider can be determined so that the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, thereby using the target computing power provider to process the first task to be processed. Since the target computing power provider is at least one of the N cores and electronic devices, the computing power of the N cores and electronic devices can be fully utilized to process the first task to be processed, thereby improving the computing power of the wearable device.
[0067] Optionally, in step 203, the first core uses the target computing power provider to process the first task to be processed, which may include the following steps.
[0068] (21) When the number of the target computing power providers is equal to 1, and the target computing power provider is one of the N cores or the electronic device, the first core sends a data processing command and data to be processed to the target computing power provider, wherein the data processing command carries the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed; the computing power provider identifier is used for verification of the target computing power provider, and is used for the target computing power provider to call the corresponding computing power according to the computing power identifier to process the data to be processed when the computing power provider identifier verification succeeds.
[0069] In an embodiment of the present application, when the number of target computing power providers is equal to 1, the target computing power provider is not the first core. The target computing power provider may be one of the N cores other than the first core, or the target computing power provider may be an electronic device.
[0070] If the target computing power provider is one of the N cores other than the first core, the first core can send a data processing command and data to be processed to the target computing power provider through a hardware bus, wherein the data processing command carries the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed; the target computing power provider can verify the computing power provider identifier, and call the corresponding computing power according to the computing power identifier to process the data to be processed if the computing power provider identifier verification is successful.
[0071] The data to be processed is the original data required to execute the first task to be processed. The hardware bus can be a serial peripheral interface (SPI) bus, an integrated circuit bus (inter-integrated circuit, I2C), etc. Compared with the soft bus, the connection reliability of the hardware bus is better.
[0072] If the target computing power provider is an electronic device, the first core can send data processing commands and data to be processed to the target computing power provider via a wireless connection (for example, a Bluetooth connection), wherein the data processing command carries the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed; the target computing power provider is used to verify the computing power provider identifier, and to call the corresponding computing power according to the computing power identifier to process the data to be processed if the computing power provider identifier is successfully verified.
[0073] Optionally, the data processing command and the data to be processed can be placed in one data packet. The data header of the data packet can carry the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed. The format of the data packet is shown in Table 1.
[0074] Table 1
[0075] CP1 Token5 Data to be processed
[0076] Among them, CP1 is the computing power provider identifier of the target computing power provider, and Token1 is the computing power identifier of the computing power required for the first task to be processed.
[0077] For example, the computing power provider identifier of the target computing power provider is CP1, and the computing power corresponding to the computing power identifier Token5 is capability 5. After receiving the data packet, the target computing power provider verifies whether its own computing power provider identifier CP1 is the same as the CP1 in the data header of the data packet. If they are the same, the target computing power provider calls the capability 5 corresponding to the computing power identifier Token5 to process the data to be processed.
[0078] Optionally, the data processing command and the data to be processed can be placed in two data packets (data packet 1 and data packet 2) respectively. Data packet 1 can carry the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed. Data packet 2 can carry the data to be processed.
[0079] Optionally, in step 203, the first core uses the target computing power provider to process the first task to be processed, which may include the following steps.
[0080] (31) When the target computing power provider includes M computing power providers, and the M computing power providers include the first core and M-1 computing power providers, the first core splits the first to-be-processed task into a first subtask and M-1 subtasks, the computing power required for the first subtask falls within the computing power range of the first core, and the computing power required for the M-1 subtasks respectively falls within the computing power range of the M-1 computing power providers, and M is an integer greater than or equal to 2;
[0081] (32) The first core processes the first subtask, and processes the second subtask through a first computing power provider, where the first computing power provider is any one of the M-1 computing power providers, and the computing power required for the second subtask falls within the computing power range of the first computing power provider.
[0082] When the number of target computing power providers is greater than or equal to 2, the target computing power provider may or may not include the first core. The above steps (31) to (32) are the case where the target computing power provider includes the first core. The following steps (41) to (42) are the case where the target computing power provider does not include the first core.
[0083] In an embodiment of the present application, the target computing power provider is at least one of the N cores and the electronic device. When the target computing power provider includes the first core and M-1 cores, the M-1 cores may include or not include an electronic device. Among them, the core and the electronic device may be abstracted as a computing power provider.
[0084] In the case where the target computing power provider includes the first core, if the number of target computing power providers is M, the first task to be processed can be split into M subtasks according to the number of target computing power providers: the first subtask and M-1 subtasks. The first subtask is directly processed by the first core, and the M-1 subtasks need to be processed by M-1 computing power providers respectively. Specifically, the first core processes the first subtask, and the first core can send the data processing command corresponding to the second subtask and the to-be-processed data corresponding to the second subtask to the first computing power provider. The data processing command corresponding to the second subtask can carry the computing power provider identifier of the first computing power provider and the computing power identifier of the computing power required for the second subtask. After receiving the data processing command corresponding to the second subtask and the to-be-processed data corresponding to the second subtask, the first computing power provider can verify the computing power provider identifier of the first computing power provider, and after the verification is successful, call the corresponding computing power according to the computing power identifier of the computing power required for the second subtask to process the to-be-processed data corresponding to the second subtask. Specifically, please refer to the relevant description of the above step (21), which will not be repeated here.
[0085] Among them, after the first core assigns M-1 subtasks to M-1 computing power providers for processing, the M-1 computing power providers can transmit the processing results of the M-1 subtasks back to the first core, and the first core can merge the processing results of the first subtask and the processing results of the M-1 subtasks to obtain the processing results of the first task to be processed.
[0086] In an embodiment of the present application, when the target computing power provider includes M computing power providers, and the M computing power providers include the first core and M-1 computing power providers, the first core splits the first task to be processed into a first subtask and M-1 subtasks. The first core directly processes the first subtask, and the M-1 subtasks are assigned to the M-1 computing power providers for processing. By splitting the first task to be processed into M subtasks, one is assigned to itself for processing, and the rest are assigned to the M-1 computing power providers for processing, subtasks can be processed in parallel, thereby improving task processing efficiency.
[0087] Optionally, in step 203, the first core uses the target computing power provider to process the first task to be processed, which may include the following steps.
[0088] (41) when the target computing power provider includes M computing power providers, and the M computing power providers do not include the first core, the first core splits the first to-be-processed task into M subtasks, and the computing power required by the M subtasks respectively falls within the computing power range of the M computing power providers, where M is an integer greater than or equal to 2;
[0089] (42) The first core processes the third subtask through a second computing power provider, where the second computing power provider is any one of the M cores, and the computing power required for the third subtask falls within the computing power range of the second computing power provider.
[0090] In an embodiment of the present application, the target computing power provider is at least one of the N cores and the electronic device. When the target computing power provider includes M cores, the M cores may include electronic devices or not. Among them, the cores and the electronic devices may be abstracted as computing power providers.
[0091] In the case where the target computing power provider does not include the first core, if the number of target computing power providers is M, the first task to be processed can be split into M subtasks according to the number of target computing power providers. Since the target computing power provider does not include the first core, the first core only plays the role of task splitting and does not process the task. The M subtasks need to be processed by M computing power providers respectively. Specifically, the second computing power provider processes the third subtask, and the first core can send the data processing command corresponding to the third subtask and the to-be-processed data corresponding to the third subtask to the second computing power provider. The data processing command corresponding to the third subtask can carry the computing power provider identifier of the second computing power provider and the computing power identifier of the computing power required for the third subtask. After the second computing power provider receives the data processing command corresponding to the third subtask and the to-be-processed data corresponding to the third subtask, it can verify the computing power provider identifier of the second computing power provider. After the verification is successful, the corresponding computing power is called according to the computing power identifier of the computing power required for the third subtask to process the to-be-processed data corresponding to the third subtask. Specifically, please refer to the relevant description of the above step (21), which will not be repeated here.
[0092] Among them, after the first core assigns M subtasks to M computing power providers for processing, the M computing power providers can transmit the processing results of the M subtasks back to the first core, and the first core can merge the processing results of the M subtasks to obtain the processing result of the first task to be processed.
[0093] In the embodiment of the present application, when the target computing power provider includes M computing power providers, and the M computing power providers do not include the first core, the first core splits the first task to be processed into M subtasks. The M subtasks are assigned to the M computing power providers for processing, which can realize parallel processing of subtasks and improve task processing efficiency.
[0094] Optionally, before executing step (41), the following steps may also be performed.
[0095] (51) The first core determines whether the M computing power providers all meet the task execution requirements;
[0096] (52) When the priorities of the M computing power providers all meet the task execution requirements, execute step (41).
[0097] In the embodiment of the present application, the computing power provider meets the task execution requirements, which refers to whether the power of the device where the computing power provider is located and the current load meet the task execution requirements. For example, the power of the device where the computing power provider is located is low and cannot execute tasks within the computing power range of the computing power provider. For example, the computing power provider is executing a certain task and cannot continue to execute new tasks. These are all situations where the task execution requirements are not met.
[0098] In the embodiment of the present application, the computing power required for the first task to be processed falls within the computing power range of the M computing power providers, and the M computing power providers are computing power providers that meet the task execution requirements. The first task to be processed can be assigned to the computing power provider that falls within the computing power range and meets the task execution requirements, avoiding assigning the first task to be processed to the computing power provider that does not meet the task execution requirements, thereby improving the task processing efficiency. Optionally, after executing step (51), the following steps can also be performed.
[0099] (53) When there are Q computing power providers among the M computing power providers that do not meet the task execution requirements, a computing power provider that meets the task execution requirements is selected from the N cores and the electronic device to perform the first task to be processed, where Q is a positive integer less than or equal to M.
[0100] In an embodiment of the present application, if there are Q computing power providers among the M computing power providers that do not meet the task execution requirements, it is necessary to select a computing power provider that meets the task execution requirements from the N cores and the electronic device to execute the first pending task. In an embodiment of the present application, when there is a computing power provider that does not meet the task execution requirements among the M computing power providers, the first pending task can be assigned to a computing power provider that meets the task execution requirements, to avoid the situation where the computing power provider cannot process the subtask, thereby improving the task processing efficiency as much as possible.
[0101] Optionally, after the first core uses the target computing power provider to process the first task to be processed, the processing result of the target computing power provider is displayed, or the processing results of the target computing power provider are merged and displayed.
[0102] Optional, Figure 2 The method shown may also include the following steps.
[0103] When the computing power required by the first task to be processed does not exceed the computing power range of the first core, the first core processes the first task to be processed. In this case, computing power scheduling is not required, which can improve the processing efficiency of the first task to be processed.
[0104] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another computing power scheduling method provided in an embodiment of the present application. Figure 3 As shown, the method includes the following steps.
[0105] 301, when the first core obtains the first task to be processed, the first core determines whether the computing power required by the first task to be processed exceeds the computing power range of the first core, and the first core is any one of the N cores.
[0106] 302. When the computing power required for the first task to be processed exceeds the computing power range of the first core, the first core determines the target computing power provider based on the computing power required for the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device. The computing power required for the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device.
[0107] The specific implementation of step 301 to step 302 can refer to the relevant description of the above-mentioned step 201 to step 202, which will not be repeated here.
[0108] 303, when the target computing power provider includes an electronic device, the first core detects the quality of the connection link between the wearable device and the electronic device.
[0109] In an embodiment of the present application, the quality of the connection link between the wearable device and the electronic device can be measured based on the received signal strength indication detected by the wearable device and the distance between the wearable device and the electronic device.
[0110] 304. When the quality of the connection link between the wearable device and the electronic device is greater than a first threshold, the first core uses the target computing power provider to process the first task to be processed.
[0111] In the embodiment of the present application, the first threshold value can be set in advance, and the first threshold value can be stored in a memory (eg, a non-volatile memory) of the wearable device.
[0112] If the quality of the connection link between the wearable device and the electronic device is greater than the first threshold, the connection between the wearable device and the electronic device is relatively stable, and the first core can use the electronic device to process the first task to be processed.
[0113] 305, when the quality of the connection link between the wearable device and the electronic device is less than a first threshold, the first core transfers the task assigned to the electronic device to the core with the highest computing power among the N cores for processing.
[0114] In the embodiment of the present application, if the quality of the connection link between the wearable device and the electronic device is less than the first threshold, the connection between the wearable device and the electronic device is not stable enough, and the task assigned to the electronic device is transferred to the core with the highest computing power among the N cores for processing, thereby increasing the possibility that the task assigned to the electronic device is successfully processed. When the connection between the wearable device and the electronic device is unstable, it is possible to avoid assigning the task to the electronic device for processing, thereby avoiding the situation where the electronic device cannot transmit the processing result of the task back to the first core, and the task processing efficiency can be improved.
[0115] See also Figure 4 , Figure 4 FIG. 1 is a flow chart of another computing power scheduling method provided in an embodiment of the present application. Figure 4 As shown, the method includes the following steps.
[0116] 401, the first core receives the processing result of the second task to be processed and the total tasks to be processed sent by the electronic device, the total tasks to be processed include the first task to be processed and the second task to be processed, and the computing power required by the second task to be processed falls within the computing power range of the electronic device.
[0117] In an embodiment of the present application, when the electronic device sends a total task to be processed (the total task to be processed includes a first task to be processed and a second task to be processed) to the first core, if the computing power required for the second task to be processed in the total task to be processed falls within the computing power range of the electronic device, the electronic device can process the second task to be processed in advance, obtain the processing result of the second task to be processed, and send the processing result of the second task to be processed and the first task to be processed to the first core. When the first core processes the first task to be processed, there is no need to interact with the electronic device, thereby improving the processing efficiency of the total task to be processed.
[0118] 402 , the first core determines whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores.
[0119] 403. When the computing power required for the first task to be processed exceeds the computing power range of the first core, the first core determines the target computing power provider based on the computing power required for the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device. The computing power required for the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores.
[0120] 404. The first core uses the target computing power provider to process the first task to be processed.
[0121] The specific implementation of steps 402 to 404 may refer to the above steps 201 to 203, which will not be described again here.
[0122] 405 , the first core combines the processing result of the first task to be processed and the processing result of the second task to be processed to obtain the processing result of the total task to be processed.
[0123] For example, if the total tasks to be processed include the second task to be processed (image processing task) and the first task to be processed (text processing task and image text display task), the electronic device can first process the image data corresponding to the image processing task to obtain the image processing result, and after sending the image processing result to the first core, the first core can schedule N cores to process the text processing task and the image text display task. After the first core schedules N cores to process the text processing task, it obtains the text processing result, and then executes the image text display task: the image processing result and the text processing result are merged and displayed.
[0124] Optionally, before executing step 201 or step 301 or step 402, the following steps may also be executed.
[0125] (61) When the wearable device is turned on, the first core exchanges its computing power range with the N-1 cores; when the computing power range of the first core changes, the first core publishes the computing power range of the first core to the N-1 cores, and the N-1 cores are the cores among the N cores except the first core.
[0126] In an embodiment of the present application, the first core can exchange its own computing power range with N-1 cores after the wearable device is turned on or restarted. Specifically, each of the N cores can publish its own computing power range to the other N-1 cores each time the wearable device is turned on or restarted, so that the computing power exchange is completed between the N cores, and each core can know its own computing power range and the computing power range of the other N-1 cores. Each of the N cores can also periodically publish its own computing power range to the other N-1 cores when the wearable device is turned on.
[0127] The first core may also publish the computing power range of the first core to N-1 cores when the computing power range of the first core changes. The computing power range of the first core changes. For example, the original computing power range of the first core is: capability 1, capability 2, and capability 3. If the first core cannot process tasks related to capability 3 due to low power, the computing power range of the first core changes to: capability 1 and capability 2. If the first core cannot continue to process tasks related to capability 1 because it is processing tasks related to capability 1, the computing power range of the first core changes to: capability 2 and capability 3.
[0128] Optionally, before executing step 201 or step 301 or step 402, the following steps may also be executed.
[0129] (71) When the wearable device establishes a communication connection with the electronic device, the computing power range of the first core is published to the electronic device, or the computing power ranges of the N cores are published to the electronic device, and the computing power range of the electronic device published by the electronic device is obtained.
[0130] In an embodiment of the present application, when the wearable device establishes a communication connection with the electronic device, if all N cores can communicate directly with the electronic device, each of the N cores can publish its own computing power range to the electronic device separately, and the electronic device can also publish the computing power range of the electronic device to each of the N cores. If only one core (for example, the first core) among the N cores can communicate directly with the electronic device. Then step (71) is executed after step (61). After executing step (61), the first core can obtain the computing power range of each core in the N cores, and the first core can publish the computing power range of each core in the N cores to the electronic device, so that the electronic device obtains the computing power range of each core in the N cores, and the electronic device can also publish the computing power range of the electronic device to the first core. The electronic device only needs to perform computing power interaction with one of the N cores to obtain the computing power range of each core in the N cores, thereby improving the efficiency of computing power interaction between the electronic device and the N cores. In the case where only one core (e.g., the first core) among the N cores can communicate directly with the electronic device, after executing step (71), the first core can publish the computing power range of the electronic device to the N-1 cores. The first core can publish the computing power range of the first core or the computing power range of each of the N cores to the electronic device each time the wearable device establishes a communication connection with the electronic device. The first core can also periodically publish the computing power range of the first core or the computing power range of each of the N cores to the electronic device when the wearable device establishes a communication connection with the electronic device.
[0131] The computing power range of the first core can be updated regularly according to the load or power of the first core. The first core periodically publishes its own computing power range, so that N-1 cores and electronic devices can obtain the latest computing power range of the first core in a timely manner, thereby improving the accuracy of each core obtaining the computing power range of other cores, thereby improving the accuracy of computing power scheduling. In some possible embodiments, the computing power range of the first core can also be fixed.
[0132] In the case where N cores can communicate directly with the electronic device, each of the N cores can publish its own computing power range to the electronic device each time the wearable device establishes a communication connection with the electronic device, and each of the N cores can also obtain the computing power range of the electronic device published by the electronic device, and each of the N cores can exchange computing power with the electronic device, so that the N cores and the electronic device can exchange computing power. For example, in the case where the wearable device establishes a communication connection with the electronic device, each of the N cores can periodically publish its own computing power range to the electronic device, and the electronic device can also periodically publish the computing power range of the electronic device to the N cores.
[0133] Among them, the computing power range of the electronic device can be updated regularly according to the load or power of the electronic device. The electronic device periodically publishes its own computing power range, so that the N cores can obtain the latest computing power range of the electronic device in a timely manner, thereby improving the accuracy of each core obtaining the computing power range of the electronic device, thereby improving the accuracy of computing power scheduling. In some possible embodiments, the computing power range of the electronic device can also be fixed.
[0134] The following example uses N=2, P=2, the electronic device is a mobile phone, and the wearable device is a smart watch to illustrate the process of computing power scheduling. Among them, N cores include: small cores and large cores.
[0135] The small core, large core and mobile phone form a triangle system. The small core and large core are connected through the SPI bus, and the smart watch and mobile phone are connected through Bluetooth. Figure 5 shown. Figure 5 Schematic diagram of the division of computing power of a triangle system provided by an embodiment of the present application. Figure 5 As shown in the figure, the small core has low computing power, and can delegate tasks such as timing, data collection and processing, and route recording to the small core for execution. The large core has medium computing power, and can delegate compression and decompression, data encryption and decryption to the small core for execution. The mobile phone has high computing power, and can delegate tasks such as image format conversion and image decoding, Javascript compilation, and bytecode generation to the mobile phone. The computing power range of the small core is: timer, data collection, processing, etc. The computing power range of the large core is: compression, decompression, encryption, decryption, etc. The computing power range of the mobile phone is: image format conversion, image decoding, Javascript compilation, bytecode generation, etc.
[0136] See also Figure 6 , Figure 6 Schematic diagram of computing power release of a triangular system provided in an embodiment of the present application. Figure 6As shown, in this triangular system, each core that provides computing power corresponds to a computing power provider (CP), and it can be agreed that the small core corresponds to CP0, the large core corresponds to CP1, and the mobile phone corresponds to CP2. Each CP has a routing table inside, and different capabilities correspond to an item in the routing table, which can be marked with a token. When the watch is turned on, the large core and the small core inform each other of their computing power; when the mobile phone establishes a communication connection with the watch, the mobile phone and the small core inform each other of their computing power, and the mobile phone and the large core inform each other of their computing power. In this way, each CP has a complete set of computing power, part of which is its own computing power, and the remaining computing power comes from the other two CPs.
[0137] See also Figure 7 , Figure 7 It is a schematic diagram of computing power scheduling of a triangle system provided in an embodiment of the present application. Figure 7 Take the small core as an example to schedule computing power.
[0138] If the task to be processed is a low-computing job, the small core completes it by itself.
[0139] If the task to be processed is a medium-power job, the small core can use the computing power of the large core because the large core has already released its computing power (corresponding to the medium computing power) to the small core. The specific method is: the small core sends a command (CMD) and business data to the large core through the SPI bus: the data header carries {CP1+Token} to indicate which specific computing power to use, and then passes the business data (if applying for decompressed computing power, send the compressed data, and other computing powers are similar).
[0140] If the task to be processed is a high-level computing power job, since the mobile phone has already published its own computing power (corresponding to high-level computing power) to the small core when the Bluetooth connection is successful, the small core can use the computing power of the mobile phone. The specific method is: send a command (CMD) and business data to the mobile phone via Bluetooth: the data header carries {CP2+Token} to indicate which specific computing power to use, and then transmits the business data (if applying for the computing power of the image, send the image data, and other computing powers are similar).
[0141] Because the Bluetooth connection between the phone and the watch may be unstable, it is important to consider the Bluetooth connection before using high-level computing power. If the Bluetooth connection is not stable enough, you can use the computing power of the large core to perform similar work.
[0142] The command and the service data may be in one data packet, as shown in Table 2.
[0143] Table 2
[0144] CP Token Business data
[0145] Among them, the CP field is bound to a specific core or mobile phone, which is also bound to a specific connection (SPI bus or Bluetooth), and the Token marks the specific computing power. Token is a tag. If the computing power routing table is designed as an array, the Token can be the index of the corresponding computing power in the routing array.
[0146] In the embodiment of the present application, on the one hand, the small core can delegate the time-consuming and user-impacting operations to the large core or mobile phone. The small core directly obtains the final result and presents it to the user, eliminating the time-consuming operations in the middle and improving the performance of the triangular system. For example, data decompression and decryption, image decoding, and Javascript script compilation are extremely CPU-intensive, and the small core is overwhelmed. These tasks can be delegated to the large core or mobile phone. After the large core or mobile phone is completed, the results are returned to the small core via the SPI bus or Bluetooth.
[0147] On the other hand, the large core can delegate tasks with low computing volume and frequent wake-up, such as scheduled wake-up, data collection, trajectory recording, etc. to the small core, and then go to sleep itself, thereby saving power consumption and improving battery life.
[0148] For the triangle system of big core, small core and mobile phone, the timing of computing power scheduling can also be carried out in advance at the source of operation or data, and scheduling can be carried out at the source of data. For example, if the picture data comes from the mobile phone, the mobile phone will use its own computing power to decode the picture in advance, and then send the decoded data to the watch (if the algorithm scheduling is initiated by the small core, the calculation result is returned to the small core, if the algorithm scheduling is initiated by the big core, the calculation result is returned to the big core), which can improve the efficiency of computing power scheduling.
[0149] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the wearable device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0150] The embodiment of the present application can divide the functional units of the wearable device according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0151] See also Figure 8 , Figure 8 A schematic diagram of the structure of a computing power scheduling device provided in an embodiment of the present application, wherein the computing power scheduling device 800 is applied to a wearable device, wherein the wearable device includes N cores, where N is an integer greater than or equal to 2, and the wearable device establishes a communication connection with an electronic device. The computing power scheduling device 800 may include a first determination unit 801, a second determination unit 802, and a task processing unit 803, wherein:
[0152] A first determining unit 801 is configured to determine, when a first core obtains a first task to be processed, whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores;
[0153] A second determining unit 802 is configured to determine a target computing power provider according to the computing power required by the first task to be processed, the computing power ranges of the N cores, and the computing power range of the electronic device when the computing power required by the first task to be processed exceeds the computing power range of the first core, the computing power required by the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device;
[0154] The task processing unit 803 is used to use the target computing power provider to process the first task to be processed.
[0155] Optionally, the computing power scheduling device 800 may also include a communication unit 804.
[0156] The communication unit 804 is used to publish the computing power range of the first core to N-1 cores and the electronic device, where the N-1 cores are cores other than the first core in the N cores;
[0157] The communication unit 804 is further configured to obtain the computing power range of the electronic device published by the electronic device.
[0158] Optionally, the communication unit 804 is used to exchange its own computing power range with N-1 cores when the wearable device is turned on; when the computing power range of the first core changes, the first core publishes the computing power range of the first core to the N-1 cores; the N-1 cores are the cores among the N cores except the first core.
[0159] Optionally, the communication unit 804 is used to publish the computing power range of the first core to the electronic device or publish the computing power ranges of the N cores to the electronic device when a communication connection is established between the wearable device and the electronic device, and obtain the computing power range of the electronic device published by the electronic device.
[0160] Optionally, the second determination unit 802 determines the target computing power provider based on the computing power required for the first task to be processed, the computing power range of the N cores, and the computing power range of the electronic device, including: determining the computing power range within which the computing power required for the first task to be processed falls; determining the target computing power provider based on the computing power range within which the computing power required for the first task to be processed falls, the computing power range of the N cores, and the computing power range of the electronic device, the computing power range of the target computing power provider including the computing power range within which the computing power required for the first task to be processed falls.
[0161] Optionally, the task processing unit 803 uses the target computing power provider to process the first task to be processed, including: when the number of target computing power providers is equal to 1 and the target computing power provider is one of the N cores or the electronic device, sending a data processing command and data to be processed to the target computing power provider, the data processing command carries the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed; the computing power provider identifier is used for verification of the target computing power provider, and for the target computing power provider to call the corresponding computing power according to the computing power identifier to process the data to be processed when the computing power provider identifier verification is successful.
[0162] Optionally, the task processing unit 803 uses the target computing power provider to process the first task to be processed, including: when the target computing power provider includes M computing power providers, and the M computing power providers include the first core and M-1 computing power providers, splitting the first task to be processed into a first subtask and M-1 subtasks, the computing power required for the first subtask falls within the computing power range of the first core, and the computing power required for the M-1 subtasks falls within the computing power range of the M-1 computing power providers, respectively, and M is an integer greater than or equal to 2; processing the first subtask, processing the second subtask through the first computing power provider, the first computing power provider is any one of the M-1 computing power providers, and the computing power required for the second subtask falls within the computing power range of the first computing power provider.
[0163] Optionally, the task processing unit 803 uses the target computing power provider to process the first task to be processed, including: when the target computing power provider includes M computing power providers and the M computing power providers do not include the first core, splitting the first task to be processed into M subtasks, and the computing power required for the M subtasks respectively falls within the computing power ranges of the M computing power providers, M being an integer greater than or equal to 2; processing the third subtask through a second computing power provider, the second computing power provider is any one of the M cores, and the computing power required for the third subtask falls within the computing power range of the second computing power provider.
[0164] Optionally, the first determining unit 801 is further used to determine whether the M computing power providers all meet the task execution requirements;
[0165] The task processing unit 803 is further configured to split the first task to be processed into M subtasks when the priorities of the M computing power providers all meet the task execution requirements.
[0166] Optionally, the task processing unit 803 is also used to select a computing power provider that meets the task execution requirements from the N cores and the electronic device to execute the first task to be processed when there are Q computing power providers among the M computing power providers that do not meet the task execution requirements.
[0167] Optionally, the computing power scheduling device 800 may further include a detection unit 805 .
[0168] The detection unit 805 is used to detect the quality of the connection link between the wearable device and the electronic device when the target computing power provider includes the electronic device;
[0169] The task processing unit 803 is further configured to process the first task to be processed using the target computing power provider when the quality of the connection link between the wearable device and the electronic device is greater than a first threshold.
[0170] Optionally, the computing power scheduling device 800 may also include an allocation unit 806.
[0171] The allocation unit 806 is used to transfer the task allocated to the electronic device to the core with the highest computing power among the N cores for processing when the quality of the connection link between the wearable device and the electronic device is less than the first threshold.
[0172] Optionally, the communication unit 804 is further configured to receive a processing result of a second task to be processed and a total task to be processed sent by the electronic device, wherein the total task to be processed includes the first task to be processed and the second task to be processed, and the computing power required for the second task to be processed falls within the computing power range of the electronic device;
[0173] The task processing unit 803 is further used to merge the processing result of the first task to be processed and the processing result of the second task to be processed to obtain the processing result of the total task to be processed.
[0174] Optionally, the computing power ranges of the N cores do not overlap with each other, and the computing power range of the electronic device does not overlap with the computing power range of the N cores.
[0175] Optionally, the N cores run on P operating systems respectively, where P is an integer less than or equal to N, and P is an integer greater than or equal to 2.
[0176] The first determination unit 801, the second determination unit 802, the task processing unit 803, the detection unit 805, and the allocation unit 806 in the embodiment of the present application may be processors in the wearable device. The communication unit 804 may be a communication module in the wearable device.
[0177] In the embodiment of the present application, after the first core obtains the first task to be processed, if the computing power required for the first task to be processed exceeds the computing power range of the first core, a target computing power provider can be determined so that the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, thereby using the target computing power provider to process the first task to be processed. Since the target computing power provider is at least one of the N cores and electronic devices, the computing power of the N cores and electronic devices can be fully utilized to process the first task to be processed, thereby improving the computing power of the wearable device.
[0178] See also Fig. 9 , Fig. 9is a schematic diagram of the structure of a wearable device provided in an embodiment of the present application, such as Fig. 9 As shown, the wearable device 900 includes a processor 901 and a memory 902, and the processor 901 and the memory 902 can be connected to each other via a communication bus 903. The processor 901 includes N cores, where N is an integer greater than or equal to 2. The communication bus 903 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 903 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 The memory 902 is used to store computer programs. The computer programs include program instructions. The first core in the processor 901 is configured to call the program instructions. The program includes instructions for executing Figure 2 to Figure 7 Part or all of the steps in the method shown. The first core is any one of the N cores.
[0179] The first core may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
[0180] The memory 902 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0181] The wearable device 900 may further include a communication module 904, which may include common components such as a communication interface and an antenna.
[0182] In the embodiment of the present application, after the first core obtains the first task to be processed, if the computing power required for the first task to be processed exceeds the computing power range of the first core, a target computing power provider can be determined so that the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, thereby using the target computing power provider to process the first task to be processed. Since the target computing power provider is at least one of the N cores and electronic devices, the computing power of the N cores and electronic devices can be fully utilized to process the first task to be processed, thereby improving the computing power of the wearable device.
[0183] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any computing power scheduling method recorded in the above method embodiments.
[0184] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0185] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0186] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0187] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0188] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0189] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0190] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0191] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A computing power scheduling method, characterized in that: The method is applied to a wearable device, the wearable device includes N cores, N is an integer greater than or equal to 2, the wearable device establishes a communication connection with an electronic device, and the method includes: When the first core obtains a first task to be processed, determining whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores; In the case where the computing power required by the first task to be processed exceeds the computing power range of the first core, determining a target computing power provider according to the computing power required by the first task to be processed, the computing power ranges of the N cores, and the computing power range of the electronic device, the computing power required by the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device; The target computing power provider is used to process the first task to be processed.
2. The method according to claim 1, characterized in that Before determining whether the computing power required by the first task to be processed exceeds the computing power range of the first core, the method further includes: When the wearable device is turned on, the first core exchanges its computing power range with N-1 cores; when the computing power range of the first core changes, the first core publishes the computing power range of the first core to the N-1 cores; the N-1 cores are the cores among the N cores except the first core.
3. The method according to claim 1 or 2, characterized in that: Before determining whether the computing power required by the first task to be processed exceeds the computing power range of the first core, the method further includes: When the wearable device establishes a communication connection with the electronic device, the computing power range of the first core is published to the electronic device, or the computing power ranges of the N cores are published to the electronic device, and the computing power range of the electronic device published by the electronic device is acquired.
4. The method according to claim 1 or 2, characterized in that: The using the target computing power provider to process the first task to be processed includes: When the number of the target computing power providers is equal to 1, and the target computing power provider is one of the N cores or the electronic device, a data processing command and data to be processed are sent to the target computing power provider, wherein the data processing command carries the computing power provider identifier of the target computing power provider and the computing power identifier of the computing power required for the first task to be processed; the computing power provider identifier is used for verification of the target computing power provider, and for the target computing power provider to call the corresponding computing power according to the computing power identifier to process the data to be processed when the computing power provider identifier verification is successful.
5. The method according to claim 1 or 2, characterized in that: The using the target computing power provider to process the first task to be processed includes: In the case where the target computing power provider includes M computing power providers, and the M computing power providers include the first core and M-1 computing power providers, the first to-be-processed task is split into a first subtask and M-1 subtasks, the computing power required for the first subtask falls within the computing power range of the first core, the computing power required for the M-1 subtasks respectively falls within the computing power range of the M-1 computing power providers, and M is an integer greater than or equal to 2; The first core processes the first subtask and processes the second subtask through a first computing power provider, the first computing power provider is any one of the M-1 computing power providers, and the computing power required for the second subtask falls within the computing power range of the first computing power provider.
6. The method according to claim 1 or 2, characterized in that: The using the target computing power provider to process the first task to be processed includes: When the target computing power provider includes M computing power providers, and the M computing power providers do not include the first core, split the first to-be-processed task into M subtasks, and the computing power required by the M subtasks respectively falls within the computing power range of the M computing power providers, where M is an integer greater than or equal to 2; The third subtask is processed by a second computing power provider, where the second computing power provider is any one of the M cores, and the computing power required for the third subtask falls within the computing power range of the second computing power provider.
7. The method according to claim 6, characterized in that Before splitting the first to-be-processed task into M subtasks, the method further includes: Determine whether the M computing power providers all meet the task execution requirements; When the priorities of the M computing power providers all meet the task execution requirements, the step of splitting the first to-be-processed task into M subtasks is performed.
8. The method according to claim 7, characterized in that After determining whether the M computing power providers all meet the task execution requirements, the method further includes: In the case that there are Q computing power providers among the M computing power providers that do not meet the task execution requirements, a computing power provider that meets the task execution requirements is selected from the N cores and the electronic device to execute the first task to be processed.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: In a case where the target computing power provider includes the electronic device, detecting the quality of the connection link between the wearable device and the electronic device; When the quality of the connection link between the wearable device and the electronic device is greater than a first threshold, the step of using the target computing power provider to process the first task to be processed is performed.
10. The method according to claim 9, characterized in that The method further comprises: When the quality of the connection link between the wearable device and the electronic device is less than the first threshold, the task assigned to the electronic device is transferred to the core with the highest computing power among the N cores for processing.
11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: receiving a processing result of a second task to be processed and a total task to be processed sent by the electronic device, wherein the total task to be processed includes the first task to be processed and the second task to be processed, and the computing power required by the second task to be processed falls within the computing power range of the electronic device; The processing result of the first task to be processed and the processing result of the second task to be processed are combined to obtain the processing result of the total task to be processed.
12. The method according to any one of claims 1 to 11, characterized in that: The computing power ranges of the N cores do not overlap with each other, and the computing power range of the electronic device does not overlap with the computing power range of the N cores.
13. The method according to any one of claims 1 to 12, characterized in that: The N cores run on P operating systems respectively, where P is an integer less than or equal to N, and P is an integer greater than or equal to 2.
14. A computing power scheduling device, characterized in that: The apparatus is applied to a wearable device, the wearable device includes N cores, N is an integer greater than or equal to 2, the wearable device establishes a communication connection with an electronic device, and the apparatus method includes: A first determining unit is used to determine, when a first core obtains a first task to be processed, whether the computing power required by the first task to be processed exceeds the computing power range of the first core, where the first core is any one of the N cores; a second determining unit, configured to determine a target computing power provider according to the computing power required by the first task to be processed, the computing power ranges of the N cores, and the computing power range of the electronic device, when the computing power required by the first task to be processed exceeds the computing power range of the first core, the computing power required by the first task to be processed falls within the computing power range of the target computing power provider, and the target computing power provider is at least one of the N cores and the electronic device; A task processing unit is used to use the target computing power provider to process the first task to be processed.
15. A wearable device, characterized in that: The method comprises a processor and a memory, wherein the processor comprises N cores, the memory is used to store a computer program, the computer program comprises program instructions, a first core is configured to call the program instructions and execute the method according to any one of claims 1 to 13, and the first core is any one of the N cores.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the first core, the first core executes the method according to any one of claims 1 to 13.
