Computing power scheduling method and apparatus, wearable device, storage medium, and computer program product
By implementing a computing power scheduling method in wearable devices and utilizing the collaborative work of multiple cores and electronic devices, the problem of limited computing power of the device is solved, and task processing efficiency and battery life are improved.
Patent Information
- Application Number
- PCT/CN2024/084858
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-29
- Publication Date
- 2024-10-03
AI Technical Summary
Wearable devices have limited hardware resources, resulting in limited computing capabilities and are unable to effectively handle tasks that require high computing power.
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 electronic devices, to fully utilize the computing power of multiple cores and devices.
It improves the computing power of wearable devices, ensures that high-computing tasks can be effectively processed, extends the device's battery life and reduces power consumption.
Smart Images

Figure CN2024084858_03102024_PF_FP_ABST
Abstract
Description
Computing power scheduling method, device, wearable device, storage medium and computer program product
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 30, 2023, with application number 202310336160.2 and application name “Computing power scheduling method, device, wearable device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of wearable devices, and specifically to a computing power scheduling method, apparatus, wearable device, storage medium, and computer program product. Background Art
[0003] With technological advancements, wearable devices like smartwatches and smart bracelets are becoming increasingly versatile, offering a wide range of functions, including fitness tracking, notifications, and user interaction. However, their computing power is limited by their limited hardware resources.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide a computing power scheduling method, apparatus, wearable device, storage medium, and computer program product, which can improve the computing power of wearable devices.
[0006] A first aspect of an embodiment of the present application provides a computing power scheduling method, which 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 method comprising:
[0007] When a first core obtains a first task to be processed, determining whether computing power required by the first task to be processed exceeds a computing power range of the first core, where the first core is any one of the N cores;
[0008] In a case where the computing power required by the first to-be-processed task exceeds the computing power range of the first core, determining a target computing power provider according to the computing power required by the first to-be-processed task, the computing power ranges of the N cores, and the computing power range of the electronic device, the computing power required by the first to-be-processed task falling within the computing power range of the target computing power provider, and the target computing power provider being at least one of the N cores and the electronic device;
[0009] The first to-be-processed task is processed using the target computing power provider.
[0010] A second aspect of an embodiment of the present application provides a computing power scheduling apparatus, the apparatus being applied to a wearable device, the wearable device including N cores, where N is an integer greater than or equal to 2, and the wearable device establishing a communication connection with an electronic device, the apparatus method comprising:
[0011] a first determining unit, configured to determine, when a first core obtains a first task to be processed, whether a computing power required by the first task to be processed exceeds a computing power range of the first core, where the first core is any one of the N cores;
[0012] a second determining unit, configured to, if the computing power required by the first to-be-processed task exceeds the computing power range of the first core, determine a target computing power provider based on the computing power required by the first to-be-processed task, the computing power ranges of the N cores, and the computing power range of the electronic device, the computing power required by the first to-be-processed task falling within the computing power range of the target computing power provider, and the target computing power provider being at least one of the N cores and the electronic device;
[0013] A task processing unit is used to use the target computing power provider to process the first task to be processed.
[0014] A third aspect of an embodiment of the present application provides a wearable 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 the first core is configured to call the program instructions and execute the step instructions as in the first aspect of the embodiment of the present application.
[0015] 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.
[0016] The fifth aspect of the embodiments of the present application provides a computer program product, wherein the above-mentioned computer program product includes a computer program, and the above-mentioned computer program is operable to enable the first core to execute some or all of the steps described in the first aspect of the embodiments of the present application.
[0017] 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, where 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, a target computing power provider is determined 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, where the computing power required for the first task to be processed falls within the computing power range of the target computing power provider, where the target computing power provider is at least one of the computing power range of the N cores and the electronic device; and 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, 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 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
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0019] FIG1 is a schematic diagram of a connection relationship between a wearable device and an electronic device provided in an embodiment of the present application;
[0020] FIG2 is a flow chart of a computing power scheduling method provided in an embodiment of the present application;
[0021] FIG3 is a flow chart of another computing power scheduling method provided in an embodiment of the present application;
[0022] FIG4 is a flow chart of another computing power scheduling method provided in an embodiment of the present application;
[0023] FIG5 is a schematic diagram of the division of computing power of a triangulation system provided in an embodiment of the present application;
[0024] FIG6 is a schematic diagram of computing power distribution of a triangulation system provided in an embodiment of the present application;
[0025] FIG7 is a schematic diagram of computing power scheduling of a triangle system provided by an embodiment of the present application;
[0026] FIG8 is a schematic diagram of the structure of a computing power scheduling device provided in an embodiment of the present application;
[0027] FIG9 is a schematic structural diagram of a wearable device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0029] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0030] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0031] 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 wireless modems, 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.
[0032] 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.
[0033] Please refer to Figure 1, which is a schematic diagram of the connection relationship between a wearable device and an electronic device provided in an embodiment of the present application. As shown in Figure 1, wearable device 100 may include N cores (such as core 1, core 2, ..., core N in Figure 1), where N is an integer greater than or equal to 2. The N cores may correspond to N computing power providers (CPs), and electronic device 200 may correspond to one CP.
[0034] Each of the N cores and the electronic device can provide different computing power. Generally speaking, compared with N cores, the electronic device 200 can provide higher computing power.
[0035] 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).
[0036] 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, where 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.
[0037] Optionally, the wearable device 100 can operate in a single system, for example, the wearable device 100 can operate in a pure Android system or a pure RTOS system to be compatible with different operating modes. The wearable device 100 can switch between the pure Android system and the pure RTOS system to switch the operating mode.
[0038] Optionally, the wearable device 100 can operate in a dual system. For example, the wearable device 100 can run the Android system and the RTOS system simultaneously. The dual systems operate in coordination, making the wearable device 100 more powerful and improving 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 coordinated operation mode, the functionality of the wearable device 100 can be enhanced, improving the user experience of the wearable device 100. In the 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.
[0039] In a 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 is disabled.
[0040] Based on the connection relationship diagram shown in Figure 1, a computing power scheduling method is provided. Please refer to Figure 2, which is a flow chart of a computing power scheduling method provided in an embodiment of the present application. As shown in Figure 2, the method includes the following steps.
[0041] 201. When a first core obtains a first task to be processed, the first core determines whether computing power required by the first task to be processed exceeds a computing power range of the first core, where the first core is any one of the N cores.
[0042] In an embodiment of the present application, the first pending task 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 proactively initiated by a system running on the wearable device), and the data transmission task is used to transmit data to the electronic device.
[0043] 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), where the message display task is used to display a message received by the electronic device on the wearable device.
[0044] Core computing power generally refers to the core's processing power. For example, taking the central processing unit (CPU) as an example, core computing power refers to the CPU's computing power. The CPU's computing power is related to the CPU's main frequency and the number of floating-point operations performed per cycle. For example, the theoretical computing power of a CPU = CPU main frequency × number of floating-point operations performed by the CPU per clock cycle.
[0045] 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, and the computing power range of the first core may be the capability supported by the computing power of the first core.
[0046] The embodiment 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.
[0047] In the embodiments of the present application, the computing power required for the first pending task is represented by the capability required to process the first pending task; 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 the computing power value, representing it by capability can more intuitively determine whether the capability required to process the first pending task exceeds the capability supported by the computing power of the first core.
[0048] The first core may be a core of an operating system currently running on the wearable device.
[0049] 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.
[0050] 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.
[0051] 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 providers can be determined to be: core 1 and core 2. At this time, the computing power range of the target computing power providers (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 providers.
[0052] If the computing power required for the first task to be processed includes: capability 1 and capability 7, 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 as: core 1 and electronic equipment. At this time, the computing power range of the target computing power provider (core 1 and electronic equipment) 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.
[0053] If the computing power required for the first task to be processed includes: capability 4 and capability 7, 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 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.
[0054] If the computing power required for the first task to be processed includes: capability 1, capability 4 and capability 7, 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 as: core 1, core 2 and electronic equipment. At this time, the computing power range of the target computing power provider (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.
[0055] 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, if N = 2, 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; and the computing power range of the electronic device includes: capability 5 and capability 6.
[0056] 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; and the computing power range of the electronic device includes: capability 7 and capability 8.
[0057] 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 tasks with higher computing power 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.
[0058] The computing power ranges of the N cores and the computing power ranges of the electronic devices 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 devices may be stored in the memory of the first core in the form of a routing table.
[0059] Optionally, in step 202, the electronic device determines a target computing power provider based on the computing power required by the first to-be-processed task, the computing power range of the N cores, and the computing power range of the electronic device, including:
[0060] (11) The first core determines the computing power range within which the computing power required for the first task to be processed falls;
[0061] (12) The first core determines a 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 ranges of the N cores, and the computing power range of the electronic device. 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.
[0062] 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; and the computing power range of the electronic device includes: capability 7 and capability 8. If the computing power required by the first pending task includes: capability 1 and capability 4; then the computing power range within which the computing power required by the first pending task falls includes: the computing power range of core 1 and the computing power range of core 2, and the target computing power providers include: core 1 and core 2. If the computing power required by the first pending task includes: capability 1 and capability 7; then the computing power range within which the computing power required by the first pending task falls includes: the computing power range of core 1 and the computing power range of the electronic device, and the target computing power providers include: core 1 and the electronic device. If the computing power required by the first pending task includes: capability 4 and capability 7; then the computing power range within which the computing power required by the first pending task falls includes: the computing power range of core 2 and the computing power range of the electronic device, and the target computing power providers include: 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.
[0063] 203. The first core uses the target computing power provider to process the first task to be processed.
[0064] 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.
[0065] For example, if N=2, the N cores include core 1 and core 2. If the target computing power provider is core 2, core 1 can send the first pending task to core 2 via a hardware bus for processing. If the target computing power provider is an electronic device, core 1 can send the first pending task to the electronic device via a wireless connection (e.g., Bluetooth connection) for processing.
[0066] If the target computing power providers are 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.
[0067] If the target computing power providers are core 1, core 2, and an electronic device, the first task to be processed can be split into three subtasks, which are respectively assigned to core 1, core 2, and the electronic device for processing. 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.
[0068] 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, 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.
[0069] 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.
[0070] (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, and 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.
[0071] 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.
[0072] If the target computing power provider is one of the N cores other than the first core, the first core can send data processing commands and data to be processed to the target computing power provider through the hardware bus, and 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 if the computing power provider identifier verification is successful, call the corresponding computing power according to the computing power identifier to process the data to be processed.
[0073] The data to be processed is the raw data required to execute the first task to be processed. The hardware bus can be a serial peripheral interface (SPI) bus, an inter-integrated circuit (I2C) bus, etc. Compared with a soft bus, a hardware bus has better connection reliability.
[0074] 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), where 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 verification is successful.
[0075] Optionally, the data processing command and the data to be processed can be placed in a single data packet. The header of this data packet can carry the target computing power provider's computing power identifier 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.
[0076] Table 1
[0077] 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.
[0078] 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.
[0079] Optionally, the data processing command and the data to be processed can be placed in two separate data packets (data packet 1 and data packet 2). Data packet 1 can carry the target computing power provider's computing power identifier 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.
[0080] 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.
[0081] (31) When the target computing power providers include 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, where M is an integer greater than or equal to 2;
[0082] (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.
[0083] 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 for the case where the target computing power provider includes the first core. The following steps (41) to (42) are for the case where the target computing power provider does not include the first core.
[0084] In this embodiment of the present application, the target computing power provider is at least one of the N cores and the electronic device. If the target computing power provider includes the first core and M-1 cores, the M-1 cores may or may not include an electronic device. The cores and electronic devices may be abstracted as computing power providers.
[0085] 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. After the verification is successful, the corresponding computing power is called 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.
[0086] 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. 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.
[0087] 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 to-be-processed task 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 to-be-processed task 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.
[0088] 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.
[0089] (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;
[0090] (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.
[0091] In this embodiment of the present application, the target computing power provider is at least one of the N cores and the electronic device. If the target computing power provider includes M cores, the M cores may or may not include electronic devices. The cores and electronic devices may be abstracted as computing power providers.
[0092] 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.
[0093] 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 results of the first task to be processed.
[0094] In this embodiment of the present application, if 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. The M subtasks are then assigned to the M computing power providers for processing, thereby enabling parallel processing of the subtasks and improving task processing efficiency.
[0095] Optionally, before executing step (41), the following steps may also be executed.
[0096] (51) The first core determines whether the M computing power providers all meet the task execution requirements;
[0097] (52) When the priorities of the M computing power providers all meet the task execution requirements, execute step (41).
[0098] In the embodiments of the present application, whether a computing power provider meets the task execution requirements refers to whether the power level and current load of the computing power provider's device meet the task execution requirements. For example, if the computing power provider's device has low power and cannot execute tasks within the computing power range of the computing power provider, or if the computing power provider is currently executing a task and cannot proceed to a new task, both of these situations would constitute non-compliance with the task execution requirements.
[0099] In the embodiment of the present application, the computing power required for the first pending task 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 pending task can be assigned to a computing power provider that falls within the computing power range and meets the task execution requirements, thereby avoiding assigning the first pending task to a computing power provider that does not meet the task execution requirements, thereby improving task processing efficiency. Optionally, after executing step (51), the following steps can also be performed.
[0100] (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.
[0101] 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, thereby avoiding the situation where the computing power provider is unable to process the subtask, thereby improving the task processing efficiency as much as possible.
[0102] 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 then displayed.
[0103] Optionally, the method shown in FIG2 may further include the following steps.
[0104] If the computing power required for 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.
[0105] Please refer to Figure 3, which is a flow chart of another computing power scheduling method provided by an embodiment of the present application. As shown in Figure 3, the method includes the following steps.
[0106] 301. When a first core obtains a first task to be processed, the first core determines whether computing power required by the first task to be processed exceeds a computing power range of the first core, where the first core is any one of the N cores.
[0107] 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.
[0108] The specific implementation of steps 301 to 302 can refer to the relevant description of steps 201 to 202 above, which will not be repeated here.
[0109] 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.
[0110] 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.
[0111] 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 to-be-processed task.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] In an embodiment of the present application, if the quality of the connection link between the wearable device and the electronic device is less than a 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 of the task assigned to the electronic device being successfully processed. In the case of an unstable connection between the wearable device and the electronic device, the task can be avoided from being assigned 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 thus improving the efficiency of task processing.
[0116] Please refer to Figure 4, which is a flow chart of another computing power scheduling method provided by an embodiment of the present application. As shown in Figure 4, the method includes the following steps.
[0117] 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. The computing power required by the second task to be processed falls within the computing power range of the electronic device.
[0118] In an embodiment of the present application, when the electronic device sends the total task to be processed (the total task to be processed includes the first task to be processed and the 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, it does not need to interact with the electronic device again, thereby improving the processing efficiency of the total task to be processed.
[0119] 402 , the first core determines whether the computing power required by the first to-be-processed task exceeds the computing power range of the first core, where the first core is any one of the N cores.
[0120] 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.
[0121] 404. The first core uses the target computing power provider to process the first task to be processed.
[0122] The specific implementation of steps 402 to 404 may refer to the above steps 201 to 203 and will not be repeated here.
[0123] 405 , the first core merges 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.
[0124] For example, if the total tasks to be processed include a second task to be processed (an image processing task) and a first task to be processed (a text processing task and an image and text display task), the electronic device can first process the image data corresponding to the image processing task to obtain an image processing result. 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 and 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 and text display task: merging the image processing result and the text processing result and displaying them.
[0125] Optionally, before executing step 201 or step 301 or step 402, the following steps may also be executed.
[0126] (61) When the wearable device is turned on, the first core exchanges its own 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, and the N-1 cores are the cores among the N cores other than the first core.
[0127] 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.
[0128] The first core can also publish the computing power range of the first core to N-1 cores when the computing power range of the first core changes. For example, 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 is unable to process tasks related to Capability 3 due to low battery, the computing power range of the first core is changed to: Capability 1 and Capability 2. If the first core is currently processing tasks related to Capability 1 and cannot continue to process tasks related to Capability 1, the computing power range of the first core is changed to: Capability 2 and Capability 3.
[0129] Optionally, before executing step 201 or step 301 or step 402, the following steps may also be executed.
[0130] (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.
[0131] 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 individually publish its own computing power range to the electronic device, 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.
[0132] The computing power range of the first core can be updated regularly based on the load or power level of the first core. The first core periodically publishes its own computing power range, allowing the N-1 cores and electronic devices to obtain the latest computing power range of the first core in a timely manner, thereby improving the accuracy of each core's understanding of the computing power range of other cores and further improving the accuracy of computing power scheduling. In some possible embodiments, the computing power range of the first core can also be fixed.
[0133] In the case where 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 each time the wearable device establishes a communication connection with the electronic device. 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. In this way, all of 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.
[0134] The computing power range of an electronic device can be updated regularly based on the load or power level of the electronic device. The electronic device periodically publishes its own computing power range, allowing the N cores to promptly obtain the latest computing power range of the electronic device, thereby improving the accuracy of each core's acquisition of the computing power range of the electronic device, and further improving the accuracy of computing power scheduling. In some possible embodiments, the computing power range of the electronic device can also be fixed.
[0135] The following example illustrates the computing power scheduling process, using N = 2, P = 2, a mobile phone as the electronic device, and a smartwatch as the wearable device. The N cores include small cores and large cores.
[0136] The small core, the large core and the mobile phone form a triangle system. The small core and the large core are connected via the SPI bus, and the smart watch is connected to the mobile phone via Bluetooth. The division of computing power of the triangle system is shown in Figure 5. Figure 5 is a schematic diagram of the division of computing power of a triangle system provided by an embodiment of the present application. As shown in Figure 5, the small core has low computing power and can delegate tasks such as timing, data acquisition 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 acquisition, 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.
[0137] Please refer to Figure 6, which is a schematic diagram of computing power release of a triangular system provided by an embodiment of the present application. As shown in Figure 6, 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. There is a routing table inside each CP, 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 tell each other about their computing power; when the mobile phone establishes a communication connection with the watch, the mobile phone and the small core tell each other about their computing power, and the mobile phone and the large core tell each other about 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.
[0138] Please refer to Figure 7, which is a schematic diagram of computing power scheduling for a triangle system provided by an embodiment of the present application. Figure 7 uses a small core as an example to perform computing power scheduling.
[0139] If the task to be processed is low-computing work, the small core completes it by itself.
[0140] If the task requires medium computing power, the large core has already released its computing power (corresponding to medium computing power) to the small core, allowing the small core to use the large core's computing power. Specifically, the small core sends a command (CMD) and business data to the large core via the SPI bus. The data header carries {CP1+Token}, indicating the specific computing power to be used, followed by the business data (if decompressed computing power is requested, compressed data is sent; similarly for other computing powers).
[0141] If the task to be processed requires high computing power, the mobile phone has already published its computing power (corresponding to high computing power) to the small core when the Bluetooth connection is successful. Therefore, 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 image computing power, send the image data, and other computing power is similar).
[0142] Because the Bluetooth connection between the phone and the watch can be unstable, it is important to consider the Bluetooth connection before using high-performance computing power. If the Bluetooth connection is not stable enough, you can fall back to using the computing power of large cores to perform similar tasks.
[0143] The command and service data can be in one data packet, as shown in Table 2.
[0144] Table 2
[0145] The CP field is bound to a specific core or phone, and thus to a specific connection (SPI bus or Bluetooth), while the Token identifies a specific hashrate. If the hashrate routing table is designed as an array, the Token can be the index of the corresponding hashrate in the routing array.
[0146] In the embodiment of the present application, on the one hand, the small core can delegate 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 intermediate operations and improving the performance of the triangulation 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 power 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 large cores, small cores, and mobile phones, the timing of computing power scheduling can also be carried out in advance at the source of operations or data, and scheduling can be performed at the source of data. For example, if the image data comes from a mobile phone, the mobile phone will use its own computing power to decode the image 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 large core, the calculation result is returned to the large core). This 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 hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the various examples described in the embodiments provided in this document, 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] Please refer to Figure 8, which is a schematic diagram of the structure of a computing power scheduling device provided in an embodiment of the present application. The computing power scheduling device 800 is applied to a wearable device. The wearable device includes N cores, where N is an integer greater than or equal to 2. 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 a computing power required by the first task to be processed exceeds a 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, if the computing power required by the first to-be-processed task exceeds the computing power range of the first core, determine a target computing power provider based on the computing power required by the first to-be-processed task, the computing power ranges of the N cores, and the computing power range of the electronic device, wherein the computing power required by the first to-be-processed task 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 further include a communication unit 804 .
[0156] The communication unit 804 is configured 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 other than 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 range 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 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, 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, 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 range of the M computing power providers, M is 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 configured to determine whether all of the M computing power providers meet the task execution requirements;
[0165] The task processing unit 803 is further configured to split the first to-be-processed task 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 configured 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 to-be-processed task 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 further include an allocation unit 806 .
[0171] The allocation unit 806 is configured 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, where 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;
[0173] The task processing unit 803 is further configured 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 overall 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] In the embodiment of the present application, the first determination unit 801, the second determination unit 802, the task processing unit 803, the detection unit 805, and the allocation unit 806 may be processors in the wearable device, and the communication unit 804 may be a communication module in the wearable device.
[0177] 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, 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] Please refer to Figure 9, which is a schematic diagram of the structure of a wearable device provided in an embodiment of the present application. As shown in Figure 9, the wearable device 900 includes a processor 901 and a memory 902. The processor 901 and the memory 902 can be interconnected 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, etc. The communication bus 903 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in Figure 9, but this does not mean that there is only one bus or one type of bus. The memory 902 is used to store a computer program, which includes program instructions. The first core in the processor 901 is configured to call the program instructions. The program includes instructions for executing some or all of the steps in the method shown in Figures 2 to 7. 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 type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device 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 compact 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 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 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, 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 this application is not limited by the order of the actions described, because according to this 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 this application.
[0185] In the above embodiments, the description of each embodiment has its own focus. 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 this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, 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 devices or units can be electrical or other forms.
[0187] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0188] In addition, the functional units in the various embodiments of the application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or 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 for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0190] Those skilled in the art will 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 may include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0191] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein 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 those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods 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: In the case where the target computing power provider includes M computing power providers, and the M computing power providers do not include the first core In this case, the first to-be-processed task is split 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, when the computing power required by the first to-be-processed task exceeds the computing power range of the first core, determine Determining 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, wherein 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. The device according to claim 14, characterized in that The device also includes: A communication unit is used for, when the wearable device is turned on, the first core exchanging its own 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.
16. The device according to claim 14 or 15, characterized in that The communication unit is also 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 the wearable device establishes a communication connection with the electronic device, and obtain the computing power range of the electronic device published by the electronic device.
17. The device according to claim 14 or 15, characterized in that The task processing unit uses the target computing power provider to process the first task to be processed, including: 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, 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 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 is successful.
18. 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.
19. 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.
20. A computer program product, characterized in that The computer program product comprises a computer program, and the computer program is operable to cause a computer to execute the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Data processing method and electronic equipment
CN111371849A
Task processing method and device, control equipment and LED display system
CN114220383A
Task processing method and device, task allocation method and device, electronic equipment and medium
CN114546630A
Kernel scheduling method and device, electronic equipment and computer readable storage medium
CN115437778A
Computing power request method, computing power allocation method, computing power execution method, and terminal and network-side device
WO2023020432A1
