Task scheduling method and device

By using messages containing computing resource information in task scheduling, the task is scheduled to be executed to the appropriate device, which solves the delay problem caused by excessive load of task execution devices in hash load balancing scheme, and realizes load balancing between devices and improve task processing efficiency.

CN119211369APending Publication Date: 2024-12-27HUAWEI TECH CO LTD

Patent Information

Application Number
CN202310758024.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In distributed scenarios, when scheduling tasks between devices or chips, the hash load balancing scheme may cause the task execution device to be overloaded, resulting in a high task processing delay.

Method used

By receiving and sending messages containing computing resource information, the first device knows whether the computing resource idle in the second device supports a specific task during the current cycle, thereby scheduling the task to the appropriate device for execution, reducing the probability of excessive equipment load. And realize load balancing.

Benefits of technology

It reduces the task processing delay, reduces the probability of excessive equipment load, realizes load balancing between devices, and simplifies the task scheduling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211369A_ABST
    Figure CN119211369A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method and device.In the method, a first device can receive a first message, the first message comprises at least one first parameter, and the at least one first parameter corresponds to at least one second device; one first parameter in the at least one first parameter is used for indicating whether idle computing power resources of one second device in the at least one second device in the first period can support a task with a first attribute or not; the first device can also send a second message to a third device in the at least one second device, the idle computing power resource of the third device in the first period can support the task with the first attribute, the second message is used for indicating the third device to execute the first task, and the first task has the first attribute. Therefore, the probability that the equipment is insufficient to process the task is reduced, and the task processing delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of task scheduling, and in particular to a task scheduling method and device. Background Art

[0002] Multiple devices or multiple chips in one device can work together to complete multiple tasks in distributed scenarios. Taking the smart travel scenario as an example, a chip in a vehicle terminal device can simultaneously run multiple tasks such as augmented reality (AR)-vehicle head-up display (HUD), auto driving system (ADS), navigation, video, voice, etc. When the computing power of the chip is not enough to support multiple tasks running at the same time, the vehicle terminal device can dispatch part of the tasks running on the chip to another chip of the vehicle terminal device, or to other terminals such as mobile phones and tablets.

[0003] At present, the load balancing of tasks can be achieved between multiple devices or multiple chips of a device through the hash load balancing solution. In the hash load balancing solution, the task scheduling device does not need to perceive the load status of other devices. It only needs to perform a hash operation based on the task information to obtain an index when its own load is too large, and then schedule the task to the device corresponding to the index. However, the device corresponding to the index may be overloaded, and the remaining computing power may not be enough to process the task, resulting in a high processing delay of the task. Summary of the invention

[0004] The embodiments of the present application provide a task scheduling method and apparatus to reduce the probability that the computing power of a device is insufficient to process a task and reduce the task processing delay.

[0005] In a first aspect, an embodiment of the present application provides a task scheduling method, which can be executed by a first device or a chip in the first device. Taking the method being executed by the first device as an example, the method includes: the first device can receive a first message, the first message includes at least one first parameter, the at least one first parameter corresponds to at least one second device, and one first parameter of the at least one first parameter is used to indicate whether the computing power resources idle in a first cycle of one of the at least one second devices can support tasks with first attributes; the first device can send a second message to a third device in the at least one second device, the computing power resources idle in the first cycle of the third device can support tasks with the first attributes, and the second message is used to instruct the third device to execute a first task, and the first task has the first attribute.

[0006] In the above scheme, the first device can know whether the idle computing resources of the second device in the current cycle support the execution of tasks with the first attribute, so that tasks that do not exceed the computing power of the second device can be scheduled to the second device for execution, reducing the probability of the second device being overloaded and reducing the task processing delay. In addition, the first device can schedule tasks to other devices for execution, so that the first device does not have to execute too many tasks, thereby achieving load balancing between devices.

[0007] In a possible implementation, the first parameter is also used to indicate a first quantity, where the first quantity is the number of tasks with the first attribute supported by idle computing resources of the second device during the first period.

[0008] Through the above information, the number of tasks with the first attribute scheduled by the first device to the second device can be less than or equal to the first number, thereby reducing the probability of excessive load on the second device.

[0009] In one possible implementation, the first number is different from the second number, where the second number is the number of tasks with the first attribute supported by idle computing resources of the second device in a second period, and the second period is a period before the first period.

[0010] When the number of tasks with first attributes supported by idle computing resources of a second device in the current cycle is different from the number of tasks with first attributes supported by idle computing resources of the second device in the cycle before the current cycle, the second device will inform the first device of the first parameter corresponding to the second device to reduce signaling overhead and reduce the transmission of redundant information.

[0011] In one possible implementation, the third device is the second device with the largest number of corresponding tasks among the N second devices, and the number of tasks corresponding to any one of the N second devices is the number of tasks with the first attribute supported by the computing power resources that are idle in the first cycle of any one of the second devices; or, the third device is any one of the N second devices; wherein the N second devices are second devices among the at least one second device whose computing power resources that are idle in the first cycle can support tasks with the first attribute.

[0012] When the first device needs to schedule a task with a first attribute, it can select the second device with the largest number of tasks that can be executed from at least one second device to execute the task, which can ensure that the second device has sufficient computing resources to execute the task and reduce the task processing delay. Alternatively, the first device can also randomly select a second device from at least one second device to execute the task with the attribute, which can simplify the task scheduling process and reduce the task scheduling delay.

[0013] In one possible implementation, the first device sends a second message to a third device among the at least one second device, including: when the idle computing resources of the first device within the first cycle cannot support the task with the first attribute, the first device may send the second message to the third device.

[0014] The first device will dispatch the task to the second device for execution only when it is unable to execute the task with the first attribute. If the first device is able to execute the task, it can execute the task by itself to simplify the task processing process and reduce the task processing delay.

[0015] In one possible implementation, after sending the second message to a third device among the at least one second device, the first device may also update the number of tasks with the first attribute supported by the idle computing resources of the third device during the first period.

[0016] After scheduling a task with the first attribute to the third device, the first device can automatically update the number of tasks with the first attribute supported by the idle computing resources of the third device in the current cycle, so that the third device does not need to inform the first device of the number again, thereby reducing signaling overhead. When the first device schedules a task again, it can also schedule according to the number updated by the third device, which can improve the accuracy of scheduling and facilitate load balancing among multiple devices.

[0017] In one possible implementation, the first message includes at least one third message, one of the at least one third message comes from the second device, the format of the third message is type-length-value TLV format, the third message in the TLV format includes a first TLV field, a second TLV field and a third TLV field, the first TLV field includes an identifier of the second device, the second TLV field includes an identifier of the first attribute, and the third TLV field includes the first parameter.

[0018] The third message can be implemented through the TLV format specified by the existing standard protocol, so that the solution of the embodiment of the present application can be better compatible with the existing standard protocol, and also makes it easier to connect devices from different manufacturers.

[0019] In a second aspect, an embodiment of the present application further provides a task scheduling device. The task scheduling device has the function of implementing the behavior in the method embodiment described in the first aspect or any possible design of the first aspect. The task scheduling device may be the first device described in the first aspect, or a functional module (such as a chip system) configured in the first device, or a larger device including the first device. The first device includes corresponding means (means) or modules for executing the above method. For example, the task scheduling device may include a processing unit (sometimes also referred to as a processing module) and a transceiver unit (sometimes also referred to as a transceiver module).

[0020] Optionally, the transceiver unit is used to receive a first message, the first message including at least one first parameter, the at least one first parameter corresponding to at least one second device, and one first parameter of the at least one first parameter is used to indicate whether the computing power resources idle in a first cycle of one of the at least one second device can support a task with a first attribute; the transceiver unit is also used to send a second message to a third device among the at least one second device, the computing power resources idle in the first cycle of the third device can support a task with the first attribute, and the second message is used to instruct the third device to execute a first task, and the first task has the first attribute.

[0021] In a third aspect, an embodiment of the present application further provides a task scheduling device, which may be a first device, or a chip or chip system used in the first device. The task scheduling device includes a communication interface and a processor, and optionally, also includes a memory. The memory is used to store a computer program, and the processor is coupled to the memory and the communication interface. When the processor reads the computer program or instruction, the task scheduling device executes the method performed by the first device in the first aspect.

[0022] In a fourth aspect, an embodiment of the present application further provides a task scheduling system, which may include a first device and a second device. The first device may execute the method executed by the first device in the first aspect. Optionally, the first device may be implemented by the task scheduling device described in the third aspect.

[0023] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible design of the first aspect.

[0024] In a sixth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any possible design of the first aspect.

[0025] In the seventh aspect, an embodiment of the present application also provides a chip system, including a processor and an interface, wherein the processor is used to call and run instructions from the interface so that the chip system executes the method described in the above-mentioned first aspect or any possible design of the first aspect.

[0026] The beneficial effects of the above-mentioned second to seventh aspects and possible designs thereof can refer to the description of the beneficial effects of the method described in the above-mentioned first aspect and any possible design thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of a smart travel scenario provided in an embodiment of the present application;

[0028] Figure 2 A structural diagram of a task scheduling system provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of task quantity calculation provided for an example of this application;

[0031] Figure 5 A schematic diagram of a first message provided in an example of the present application;

[0032] Figure 6 A schematic diagram of a task scheduling scenario provided for an example of this application;

[0033] Figure 7 A schematic diagram of another task scheduling scenario provided for this application example;

[0034] Figure 8 A schematic diagram of the structure of another task scheduling system provided for this application example;

[0035] Fig. 9 A flowchart of a task scheduling method provided for an example of this application;

[0036] Fig.10 A flowchart of another task scheduling method provided in an embodiment of the present application;

[0037] Fig.11 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0039] Before introducing the specific solutions provided in the embodiments of the present application, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art, and the terms in the present application are not limited.

[0040] (1) In the embodiments of the present application, "multiple" refers to two or more than two. In view of this, in the embodiments of the present application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one means including one, two or more, and there is no restriction on which ones are included. For example, including at least one of A, B and C, then the included ones may be A, B, C, A and B, A and C, B and C, or A, B and C. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the previously and subsequently associated objects are in an "or" relationship.

[0041] Unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects and are not used to limit the order, timing, priority or importance of the multiple objects.

[0042] (2) Computing power coordination refers to the coordination between multiple devices or multiple chips of a device to complete multiple tasks in distributed scenarios. Taking the smart travel scenario as an example, with the increasing number of display screens in vehicle-mounted terminal devices, multi-display and multi-task concurrency will become the norm. For example, vehicle-mounted terminal devices can run multiple tasks such as AR-HUD, ADS, navigation, video, and voice at the same time. Since the computing power of one chip may not be enough to support multi-task concurrency when only one chip is deployed in the vehicle-mounted terminal device, two chips can be deployed on the vehicle-mounted terminal device, or the computing power of chips of other terminals such as mobile phones and tablets can be used as a supplement to the computing power of the chips of the vehicle-mounted terminal device to support the multi-task concurrency of the vehicle-mounted terminal device. Whether the vehicle-mounted terminal device deploys dual-core or coordinates with chips of other terminals, it is necessary to ensure that the load of each chip is balanced during task scheduling.

[0043] (3) Hash load balancing scheme, in which the task initiating device (sometimes also called the task scheduling device) does not need to perceive the load status of other devices. Instead, when its load is too large, it performs a hash operation based on the task information to obtain an index, and selects the device corresponding to the index from other devices as the task execution device. However, the selected task execution device may be overloaded, and the remaining computing power may not be sufficient to process the task, resulting in a high task processing delay. In addition, when multiple devices perform computing power coordination, the number of devices will not be too large. Triggering the computing power coordination of multiple devices only when the load of the task initiating device is too large will itself cause the load of the task execution device to be too large, and the remaining computing power may not be sufficient to process the task, resulting in a high task processing delay.

[0044] Exemplarily, the specific implementation steps of the hash load balancing solution are as follows:

[0045] Maintain a list of online devices to ensure that the networks of multiple devices in the list can communicate with each other;

[0046] The task initiating device in the list determines whether its own load is too large, such as whether the utilization rate of the computing power resources of the central processing unit (CPU) is greater than 70%;

[0047] If the load of the task initiating device is too large, the task initiating device selects a task execution device from other devices in the list except the task initiating device. The selection method may be to perform a hash operation based on the task information (such as a task identity document (ID)) and perform a modulus operation based on the number of multiple devices in the list to obtain an index, and select a device corresponding to the index from other devices in the list except the task initiating device as the task execution device;

[0048] The task initiating device dispatches the task to the task executing device through a network link (such as a wireless fidelity (WiFi) link) between the task initiating device and the task executing device, so that the task executing device executes the task;

[0049] After the task execution device completes the task, the execution result is sent to the task initiating device through the network link between the task initiating device and the task execution device.

[0050] (4) Minimum load balancing scheme. In this scheme, the task initiating device needs to sense the load status of other devices. That is, other devices will periodically detect the load status and inform the task initiating device of the load status so that the task sending device can select the device with the smallest load from other devices as the task execution device. However, within a load detection cycle, all tasks of the task initiating device will be scheduled to the task execution device for operation, resulting in excessive load on the task execution device. The remaining computing power may not be sufficient to process the task, resulting in a high task processing delay. Although the probability of excessive load on the task execution device can be reduced by shortening the load detection cycle, the load detection overhead is too large.

[0051] Exemplarily, the specific implementation steps of the minimum load balancing solution are as follows:

[0052] Maintain a list of online devices to ensure that the networks of multiple devices in the list can communicate with each other;

[0053] The multiple devices in the list periodically detect their own load status, and the other devices in the list except the task initiating device inform the task initiating device in the list of their own load status;

[0054] The task initiating device determines whether its own load is too large, such as whether the CPU computing resource occupancy rate is greater than 70%;

[0055] If the load of the task initiating device is too large, the task initiating device selects a device with the smallest load from other devices in the list except the task initiating device as the task execution device;

[0056] The task initiating device dispatches the task to the task executing device through a network link (such as a WiFi link) between the task initiating device and the task executing device, so that the task executing device executes the task;

[0057] After the task execution device completes the task, the execution result is sent to the task initiating device through the network link between the task initiating device and the task execution device.

[0058] In view of the problem of uneven loads on multiple devices or multiple chips of a device during task scheduling as described above, an embodiment of the present application provides a task scheduling method.

[0059] This method can be applied to distributed scenarios where multiple devices or multiple chips of a device work together to complete various tasks. For example, taking this method applied to smart travel scenarios, see Figure 1 , is a schematic diagram of a smart travel scenario provided by an embodiment of the present application. In this scenario, a chip (for example, called chip 1) of the vehicle terminal device 00 can simultaneously run multiple tasks such as AR-HUD, ADS, navigation, video, and voice. When the computing power of chip 1 is not enough to support the simultaneous operation of multiple tasks, the vehicle terminal device 00 can dispatch part of the tasks run by chip 1 to another chip (for example, called chip 2) of the vehicle terminal device, or dispatch part of the tasks run by chip 1 to a chip (for example, called chip 3) of the mobile phone 10.

[0060] The method can be applied to a task scheduling system including at least one first device (also called a task initiating / scheduling device, used to initiate / scheduling tasks) and at least one second device (also called a task executing device, used to execute tasks). Figure 2 , is a structural diagram of a task scheduling system provided in an embodiment of the present application, such as Figure 2 As shown, the task scheduling system may include a first device; two second devices: a second device A and a second device B. The first device may learn whether the idle computing resources of the second device (e.g., the second device A or the second device B) in the current cycle support the execution of tasks with the first attribute, so that tasks that do not exceed the computing power of the second device can be scheduled to the second device for execution, thereby reducing the probability of the second device being overloaded and reducing the task processing delay. Moreover, the first device can schedule tasks to other devices for execution, so that the first device does not have to execute too many tasks, thereby achieving load balancing between devices.

[0061] It should be understood that Figure 2For ease of understanding only, a task scheduling system is exemplarily shown, but this should not constitute any limitation to the present application. The task scheduling system may also include a larger number of first devices, or a larger number of second devices; the second devices interacting with different first devices may be the same second devices, or different second devices; the number of second devices interacting with different first devices may be the same, or different; the first device and the second device may be different devices, or the same device, and the present application embodiment does not limit this. When the first device and the second device are the same device, the first device and the second device may be different chips on the same device, and the chip may be a CPU, a graphics processing unit (GPU), or an embedded neural network processor (NPU), etc., and the present application embodiment does not specifically limit this. For ease of explanation, the present application embodiment takes the first device and the second device as different devices as an example.

[0062] It should be understood that the first device and the second device can be electronic devices, such as mobile phones, tablet computers, wearable devices with wireless communication functions (such as watches), vehicle-mounted terminal devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other portable devices.

[0063] For example, see Figure 3 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0064] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. The execution of the task scheduling method provided in the embodiment of the present application can be controlled by the processor 110 or completed by calling other components, such as calling the processing program of the embodiment of the present application stored in the internal memory 121, or calling the processing program of the embodiment of the present application stored in the third-party device through the external memory interface 120, so that the first device can know whether the idle computing resources of the second device in the current cycle support the execution of tasks with the first attribute, so that tasks that do not exceed the computing power capacity of the second device can be scheduled to the second device for execution, reducing the probability of the second device being overloaded and reducing the task processing delay. Moreover, the first device can schedule tasks to other devices for execution, so that the first device does not have to execute too many tasks, thereby achieving load balancing between devices.

[0065] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application, etc. The data storage area can store data generated during the use of the electronic device 100 (such as captured images, recorded videos, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0066] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as pictures and videos are stored in the external memory card.

[0067] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

[0068] The wireless communication function of the electronic device 100 may be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, etc. For example, the first device may receive a first message and send a second message to a third device in at least one second device through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, etc.

[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

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

[0071] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0072] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0073] The display screen 194 is used to display the display interface of the application, such as displaying the display page of the application installed on the electronic device 100. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

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

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

[0076] Among them, the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.

[0077] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0078] The touch sensor 180C is also called a "touch panel". The touch sensor 180C can be set on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180C is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180C can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0079] The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device 100 can receive the button input and generate a key signal input related to the user settings and function control of the electronic device 100. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.

[0080] Understandably, Figure 3 The components shown do not constitute a specific limitation on the electronic device 100. The electronic device 100 may also include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. Figure 3 The combination / connection relationship between the components can also be adjusted and modified.

[0081] The above content describes the possible application scenarios and applicable system architecture of the task scheduling method provided in the embodiment of the present application. Figure 2 The structure of the task scheduling system shown and Figure 3 The structure of the electronic device shown further introduces the task scheduling method provided in the embodiment of the present application.

[0082] The execution process of the task scheduling method provided in the embodiment of the present application includes at least five stages: device load state perception, task computing power overhead perception, network state perception, task quantity calculation and notification, and task scheduling. The methods of each stage are described in detail below.

[0083] 1. Equipment load status perception

[0084] In the embodiment of the present application, each of the first device and at least one second device can periodically obtain its own device load status, and the device load status refers to the computing power resources used by the device in the current cycle (for example, referred to as the first cycle) or the computing power resources idle in the current cycle. For example, with 500 milliseconds as a cycle, the first device can obtain the computing power resources used or idle by the first device in the current cycle, the second device A can obtain the computing power resources used or idle by the second device A in the current cycle, and the second device B can obtain the computing power resources used or idle by the second device B in the current cycle.

[0085] Exemplarily, taking the chip of the first device as a CPU as an example, the first device can determine the computing resources used by the CPU of the first device in the current cycle (for example, computing resources 1) and the computing resources idle in the CPU of the first device in the current cycle (for example, computing resources 2) according to the idle value of the CPU of the first device in the current cycle. Among them, the idle value is a percentage used to measure the idleness of the CPU from the perspective of time, and idle can be any value from 0 to 800. For example, when idle is 600 and the computing resources available to the CPU of the first device (for example, computing resources 3) are 800, computing resources 2 should be idle / 800=75%, and computing resources 1 should be 100%-idle / 800=25%. However, in order to prevent the CPU of the first device from being overloaded, the CPU of the first device can set a load safety waterline in advance, such as 90%. At this time, computing resources 2 are actually 90%-25%=65%.

[0086] 2. Task Computing Cost Perception

[0087] In an embodiment of the present application, each of the first device and at least one second device can obtain its own task computing power overhead, which refers to the computing power resources used by the device when executing tasks with different attributes. Among them, the attribute can be the type of task, or the priority of the task, or the capability of the task, etc., and the embodiment of the present application does not impose specific restrictions on this. For example, the first device can obtain the computing power resources used by the first device when executing a task with a first attribute, the second device A can obtain the computing power resources used by the second device A when executing a task with the first attribute, and the second device B can obtain the computing power resources used by the second device B when executing a task with the first attribute.

[0088] Exemplarily, taking the chip of the first device as a CPU as an example, the first device can determine the computing power resources used by the CPU of the first device when executing a task with a first attribute based on the change of the computing power resources used by the CPU of the first device in the current cycle. For example, when the CPU of the first device does not execute the task with the first attribute, the computing power resources used by the CPU of the first device in the current cycle are 50%, and when the CPU of the first device executes the task with the first attribute, the computing power resources used by the CPU of the first device in the current cycle are 60%, then the computing power resources used by the CPU of the first device when executing the task with the first attribute are 10%. In addition, in order to avoid errors in the results of a single determination, an average value can be taken based on the results of multiple determinations. For example, the result of the first determination is that the computing power resources used by the CPU of the first device when executing the task with the first attribute are 10%, the result of the second determination is that the computing power resources used by the CPU of the first device when executing the task with the first attribute are 11%, and the result of the third determination is that the computing power resources used by the CPU of the first device when executing the task with the first attribute are 12%, then the final determination result is that the computing power resources occupied by the CPU of the first device when executing the task with the first attribute are 11.5%.

[0089] 3. Network Status Awareness

[0090] In an embodiment of the present application, the first device and each second device in at least one electronic device can obtain its own network status, which refers to the network quality parameters of the network between the devices. Among them, the network quality parameters may include reference signal receiving power (reference signal receiving power, RSRP), signal to interference plus noise ratio (signal to interference plus noise ratio, SINR), link load, packet loss rate and other parameters, and the embodiment of the present application does not impose specific restrictions on this. For example, the first device and the second device A can obtain the network quality parameters of the network between the first device and the second device A, and the first device and the second device B can obtain the network quality parameters of the network between the first device and the second device B.

[0091] 4. Calculation and notification of task quantity

[0092] In the embodiment of the present application, each of the first device and at least one second device can calculate its own number of tasks based on its own device load status and task computing power overhead after periodically obtaining its own device load status and task computing power overhead. The number of tasks refers to the number of tasks with different attributes supported by the idle computing power resources of the device in the current cycle. For example, the first device can determine the number of tasks with the first attribute supported by the idle computing power resources of the first device in the current cycle, the second device A can determine the number of tasks with the first attribute supported by the idle computing power resources of the second device A in the current cycle, and the second device B can determine the number of tasks with the first attribute supported by the idle computing power resources of the second device B in the current cycle.

[0093] For example, see Figure 4 , which is a schematic diagram of task quantity calculation provided in this application example, such as Figure 4 As shown, taking the chip of the first device as a CPU as an example, the load safety waterline of the CPU of the first device is 70%, and the computing power resources used by the CPU of the first device in the current cycle are 30%, then the idle computing power resources of the CPU of the first device in the current cycle are 70%-30%=40%. The computing power resources used by the CPU of the first device when executing tasks with the first attribute are 10%, then the number of tasks with the first attribute supported by the idle computing power resources of the first device in the current cycle is 40% / 10%=4.

[0094] In an embodiment of the present application, after each second device in the at least one second device calculates its own number of tasks based on its own device load status and task computing power overhead, each second device in the at least one second device can determine the task execution capability corresponding to the second device based on the number of tasks corresponding to the second device, and the task execution capability refers to whether the computing power resources idle in the device in the current cycle can support tasks with different attributes. For example, when the number of tasks with the first attribute supported by the computing power resources idle in the current cycle of a second device in at least one second device is 0, the computing power resources idle in the current cycle of the second device cannot support tasks with the first attribute; when the number of tasks with the first attribute supported by the computing power resources idle in the current cycle of the second device is not 0, the computing power resources idle in the current cycle of the second device can support tasks with the first attribute.

[0095] In one embodiment, each second device in at least one second device can inform the first device of the task execution capability corresponding to the second device. The second device can directly inform the first device, or the second device can indirectly inform the first device, for example, the second device first informs other devices, and other devices then inform the first device, and the embodiment of the present application does not impose specific restrictions on this. The notification moment can be the moment when the second device determines that the first number is different from the second number, wherein the first number is the number of tasks with the first attribute supported by the idle computing resources of the second device in the current cycle, and the second number is the number of tasks with the first attribute supported by the idle computing resources of the second device in the cycle before the current cycle (for example, called the second cycle), so that the second device only informs the first device of its corresponding task execution capability and other information when the number of tasks corresponding to it in the current cycle is different from the number of tasks corresponding to it in the cycle before the current cycle, so as to reduce signaling overhead and reduce the transmission of redundant information.

[0096] For example, at least one second device may send a first message to the first device directly or through other devices, and accordingly, the first device receives the first message. The first message may include at least one first parameter, and the at least one first parameter may correspond one-to-one to the at least one second device, and one of the at least one first parameters may be used to indicate whether the idle computing resources of the at least one second device in the current cycle can support tasks with the first attribute. For example, the first message includes a first parameter A and a first parameter B, and the first parameter A corresponds to the second device A, and the first parameter A is used to indicate whether the idle computing resources of the second device A in the current cycle can support tasks with the first attribute, and the first parameter B corresponds to the second device B, and the first parameter B is used to indicate whether the idle computing resources of the second device B in the current cycle can support tasks with the first attribute.

[0097] In another implementation, each second device among the at least one second device may also inform the first device of the number of tasks corresponding to the second device.

[0098] For example, the first parameter can also be used to indicate the number of tasks with the first attribute supported by the idle computing resources of a second device in the current cycle. For example, the first parameter A can also be used to indicate the number of tasks with the first attribute supported by the idle computing resources of the second device A in the current cycle, and the first parameter B can be used to indicate the number of tasks with the first attribute supported by the idle computing resources of the second device B in the current cycle.

[0099] In a specific implementation, the above-mentioned first parameter can be carried in a third message, that is, the first message can include at least one third message, and one of the at least one third message comes from a second device. Among them, the format of a third message can be a type length value (TLV) format, and a third message in TLV format can include a first TLV field, a second TLV field, and a third TLV field. The first TLV field can include an identifier of a second device, the second TLV field can include an identifier of a first attribute, and the third TLV field can include a first parameter. A third message carries an identifier of a second device, an identifier of a first attribute, and a first parameter at the same time through the TLV format specified in the existing standard protocol, so that the solution of the embodiment of the present application can be better compatible with the existing standard protocol, and also makes it easier to connect devices from different manufacturers.

[0100] For example, see Figure 5 , is a schematic diagram of a first message provided by an example of this application, such as Figure 5 As shown, the type of TLV1 is a device identity document (device ID), indicating that TLV1 includes an identifier of a second device, the length of TLV1 indicates the length of the value of TLV1, and the value of TLV1 indicates an identifier of a second device; the type of TLV2 is a task type, indicating that TLV2 includes an identifier of a first attribute, the length of TLV2 indicates the length of the Value of TLV2, and the value of TLV2 indicates the identifier of the first attribute; the type of TLV3 is a task number, indicating that TLV3 includes a first parameter, the length of TLV3 indicates the length of the value of TLV3, and the value of TLV3 indicates a first parameter.

[0101] 5. Task Scheduling

[0102] In an embodiment of the present application, after each second device in the at least one second device informs the first device of its corresponding task execution capability and task quantity, the first device can perform task scheduling according to the task execution capability and task quantity corresponding to each second device. For example, the first device can determine a third device from at least one second device and send a second message to the third device. Among them, the idle computing resources of the third device in the current cycle can support tasks with first attributes, the second message can be used to instruct the third device to execute the first task with the first attribute, and the second message can carry the information required for the third device to execute the first task, and the first task can include one or more tasks.

[0103] In a specific implementation, the first device can determine N second devices from at least one second device based on at least one first parameter included in the first message, wherein the idle computing resources of the N second devices in the current cycle can support tasks with the first attribute, and N is a positive integer. The first device can determine that the second device with the largest number of corresponding tasks among the N second devices is the third device to ensure that the third device has sufficient computing resources to execute tasks with the first attribute and reduce task processing latency. Alternatively, the first device can also determine that any second device among the N second devices is the third device to simplify the task scheduling process and reduce task scheduling latency. For example, the first device can randomly generate a random number whose maximum value is N, and the first device determines that the second device corresponding to the random number is the third device.

[0104] The first device may also determine the number of tasks included in the first task according to the number of tasks corresponding to the third device. Wherein, the number of tasks included in the first task is less than or equal to the number of tasks corresponding to the third device. For example, if the number of tasks corresponding to the third device is 3, the number of tasks included in the first task may be 1, 2 or 3, so as to reduce the probability of excessive load on the third device.

[0105] Exemplarily, the number of tasks corresponding to the second device A is 4, the number of tasks corresponding to the second device B is 3, and the number of tasks corresponding to the second device C is 1. The first device may select the second device A as the third device, and determine that the number of tasks included in the first task is less than or equal to 4. Alternatively, the first device may also randomly generate a random number, the maximum value of which is 2. When the random number is 1, the second device B corresponding to 1 is selected as the third device, and the number of tasks included in the first task is less than or equal to 3.

[0106] In one embodiment, before the first device sends the second message to the third device, the first device may determine the task execution capability corresponding to the first device, that is, determine whether the idle computing resources of the first device in the current cycle can support tasks with the first attribute. For example, when the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle is 0, the idle computing resources of the first device in the current cycle cannot support tasks with the first attribute; when the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle is not 0, the idle computing resources of the first device in the current cycle can support tasks with the first attribute.

[0107] When the idle computing resources of the first device in the current cycle can support the task with the first attribute, the first device may not perform task scheduling, that is, it may prioritize executing the first task by itself, so as to simplify the task processing process and reduce the task processing delay. Figure 6 , which is a schematic diagram of a task scheduling scenario provided by the present application example, such as Figure 6 As shown, the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle is 2, the number of tasks with the first attribute supported by the idle computing resources of the second device A in the current cycle is 4, and the number of tasks with the first attribute supported by the idle computing resources of the second device B in the current cycle is 3. The first device can execute the first task on its own without performing task scheduling.

[0108] When the idle computing resources of the first device in the current cycle cannot support the task with the first attribute, the first device can perform task scheduling, that is, send a second message to the third device to instruct the third device to perform the first task. Figure 7 , which is a schematic diagram of another task scheduling scenario provided by the present application example, such as Figure 7 As shown, the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle is 0, the number of tasks with the first attribute supported by the idle computing resources of the second device A in the current cycle is 2, and the number of tasks with the first attribute supported by the idle computing resources of the second device B in the current cycle is 1. The first device can perform task scheduling and send a second message to the second device A or the second device B, instructing the second device A or the second device B to execute a task with the first attribute.

[0109] In another embodiment, before the first device sends the second message to the third device, the first device may determine whether the network quality parameters of the network between the first device and the third device meet the first condition, such as whether the reference signal reception power is greater than the first threshold, whether the packet loss rate in the network quality parameters is less than the second threshold, whether the link load is less than the third threshold, etc. When the network quality parameters of the network between the first device and the third device do not meet the first condition, the first device may not perform task scheduling, that is, it may prioritize executing the first task by itself to simplify the task processing process and reduce the task processing delay. When the network quality parameters of the network between the first device and the third device meet the first condition, the first device may perform task scheduling, that is, send the second message to the third device to instruct the third device to perform the first task.

[0110] In one embodiment, after the first device sends the second message to the third device, the first device may automatically update the number of tasks corresponding to the third device. For example, if the number of tasks with the first attribute supported by the idle computing resources of the third device in the current cycle is 4, the first device may update the number from 4 to 3 after sending the second message to the third device instructing the third device to execute a task with the first attribute. Then, when the first device schedules the task again, it may redetermine the third device from at least one second device and send a fourth message to the redetermined third device. Among them, the fourth message can be used to instruct the redetermined third device to execute the second task with the first attribute, and the fourth message may carry the information required for the redetermined third device to execute the second task, and the second task may include one or more tasks.

[0111] Exemplarily, the number of tasks corresponding to the second device A is 4 and the number of tasks corresponding to the second device B is 3. After the first device selects the second device A with the largest number of corresponding tasks as the third device and sends a second message to the second device A instructing the second device A to execute the first task, when the first task includes two tasks, the first device may update the number of tasks corresponding to the second device A to 2. When the second task includes three tasks, the first device may reselect the second device B with the largest number of corresponding tasks as the third device and send a fourth message to the second device B instructing the second device B to execute the second task, so as to avoid the first device scheduling both the first task and the second task to the second device A for execution, resulting in an excessive load on the second device A.

[0112] To facilitate understanding, the above task scheduling method is further introduced below with reference to specific examples.

[0113] See also Figure 8 , Figure 8 A schematic diagram of another task scheduling system provided in an embodiment of the present application. Figure 8 As shown, a distributed computing subsystem is provided on the first device, the second device A and the second device B, and the distributed computing subsystem includes five functional units, namely a device load status sensing unit, a task computing power overhead sensing unit, a network status sensing unit, a task quantity calculation and notification unit and a task scheduling unit.

[0114] See also Fig. 9 , Fig. 9 A flowchart of a task scheduling method provided in an embodiment of the present application is shown in FIG. Figure 8 Taking the task scheduling system shown in FIG. 1 as an example, the method includes:

[0115] ① The device load state sensing units of the first device, the second device A, and the second device B respectively obtain the computing power resources used or idle in the current cycle of the first device, the second device A, and the second device B;

[0116] ② The task computing power overhead perception units of the first device, the second device A, and the second device B respectively obtain the computing power resources used by the first device, the second device A, and the second device B when executing the task with the first attribute;

[0117] ③ The network state sensing unit of the first device obtains network quality parameters of the network between the first device and the second device A, and the network quality parameters of the network between the first device and the second device B; the network state sensing unit of the second device A obtains the network quality parameters of the network between the first device and the second device A; the network state sensing unit of the second device B obtains the network quality parameters of the network between the first device and the second device B;

[0118] ④ The task quantity calculation and notification unit of the first device determines the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle. The task quantity calculation and notification unit of the second device A determines the number of tasks with the first attribute supported by the idle computing resources of the second device A in the current cycle, and whether the idle computing resources of the second device A in the current cycle can support the tasks with the first attribute, and notifies the first device thereof. The task quantity calculation and notification unit of the second device B determines the number of tasks with the first attribute supported by the idle computing resources of the second device B in the current cycle, and whether the idle computing resources of the second device B in the current cycle can support the tasks with the first attribute, and notifies the first device thereof.

[0119] ⑤ The task scheduling unit of the first device selects a third device from the second device A and the second device B according to the information informed by the second device A and the second device B, and determines whether to schedule the first task to the third device for execution according to the number of tasks with the first attribute supported by the idle computing resources of the first device in the current cycle, or the network quality parameters of the network between the first device and the second device A, and the first device and the second device B.

[0120] Fig.10 A flowchart of another task scheduling method provided in an embodiment of the present application is shown as follows: Fig.10 As shown, the process of the method may include:

[0121] S1001. A first device receives a first message.

[0122] The first message includes at least one first parameter, the at least one first parameter corresponds to at least one second device, and one first parameter of the at least one first parameter is used to indicate whether the idle computing resources of one of the at least one second device in the first cycle can support the task with the first attribute. The specific way in which the first device receives the first message is described in "IV. Calculation and Notification of Task Quantity", which will not be repeated here.

[0123] S1002. The first device sends a second message to a third device among at least one second device.

[0124] The idle computing resources of the third device in the first cycle can support the task with the first attribute, and the second message is used to instruct the third device to execute the first task, and the first task has the first attribute. The manner in which the first device sends the second message to the third device in at least one second device is specifically described in "V. Task Scheduling", which will not be repeated here.

[0125] It should be noted that the specific implementation process provided in the above example is only an example of the method process applicable to the embodiment of the present application. The execution order of each step can be adjusted accordingly according to actual needs, and other steps can be added or some steps can be reduced.

[0126] Based on the above embodiments and the same concept, an embodiment of the present application further provides an electronic device, which is used to implement the task scheduling method provided by the embodiment of the present application.

[0127] like Fig.11 As shown, the electronic device 1100 may include: a memory 1101, one or more processors 1102, and one or more computer programs (not shown in the figure). The above-mentioned devices may be coupled via one or more communication buses 1103. Optionally, when the electronic device 1100 is used to implement the task scheduling method provided in the embodiment of the present application, the electronic device 1100 may also include a display screen 1104.

[0128] The memory 1101 stores one or more computer programs (codes), and the one or more computer programs include computer instructions; the one or more processors 1102 call the computer instructions stored in the memory 1101, so that the electronic device 1100 executes the brightness adjustment method provided in the embodiment of the present application. The display screen 1104 is used to display images, videos, application interfaces and other related user interfaces.

[0129] In a specific implementation, the memory 1101 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. The memory 1101 may store an operating system (hereinafter referred to as system), such as ANDROID, IOS, WINDOWS, or embedded operating systems such as LINUX. The memory 1101 may be used to store the implementation program of the embodiment of the present application. The memory 1101 may also store a network communication program, which may be used to communicate with one or more additional devices, one or more user devices, and one or more network devices. One or more processors 1102 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 program of the present application.

[0130] It should be noted that Fig.11 This is only one implementation of the electronic device 1100 provided in the embodiment of the present application. In actual applications, the electronic device 1100 may also include more or fewer components, which is not limited here.

[0131] Based on the above embodiments and the same concept, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the task scheduling method provided in the above embodiments.

[0132] Based on the above embodiments and the same concept, an embodiment of the present application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the task scheduling method provided in the above embodiments.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A task scheduling method, characterized in that: Applied to a first device, the method includes: receiving a first message, the first message comprising at least one first parameter, the at least one first parameter corresponding to at least one second device, a first parameter of the at least one first parameter being used to indicate whether idle computing resources of a second device of the at least one second device within a first period can support a task having a first attribute; A second message is sent to a third device among the at least one second device, wherein idle computing resources of the third device during the first cycle can support tasks having the first attributes, and the second message is used to instruct the third device to execute a first task having the first attributes.

2. The method according to claim 1, characterized in that The first parameter is also used to indicate a first quantity, where the first quantity is the number of tasks with the first attribute supported by the idle computing resources of the second device during the first period.

3. The method according to claim 2, characterized in that The first number is different from the second number, where the second number is the number of tasks with the first attribute supported by idle computing resources of the second device in a second period, and the second period is a period before the first period.

4. The method according to claim 2 or 3, characterized in that The third device is a second device having the largest number of corresponding tasks among the N second devices, and the number of tasks corresponding to any one of the N second devices is the number of tasks with the first attribute supported by the idle computing resources of any one of the second devices in the first cycle; or The third device is any second device among the N second devices; Among them, the N second devices are second devices whose computing resources that are idle in the first cycle can support tasks with the first attribute among the at least one second device.

5. The method according to any one of claims 1 to 4, characterized in that: Sending a second message to a third device among the at least one second device includes: When the idle computing resources of the first device in the first cycle cannot support the task with the first attribute, the second message is sent to the third device.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Update the number of tasks with the first attribute supported by the idle computing resources of the third device during the first period.

7. The method according to any one of claims 1 to 6, characterized in that: The first message includes at least one third message, one of the at least one third message comes from the second device, the format of the third message is type-length-value TLV format, the third message in the TLV format includes a first TLV field, a second TLV field and a third TLV field, the first TLV field includes an identifier of the second device, the second TLV field includes an identifier of the first attribute, and the third TLV field includes the first parameter.

8. A task scheduling device, characterized in that: The task scheduling device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the task scheduling device executes the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The method comprises a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task processing method and device, control equipment and LED display system

    CN114220383A

  • Task processing method and task processing platform

    CN114546648A

  • Processing method of computing power information, first network equipment and system

    CN114979130A

  • Method, device and equipment for transmitting computing power resource information

    CN115514696A

  • Network edge computing method and communication apparatus

    WO2022067816A1

Cited By

  • Simulation computing power scheduling method, system and equipment and readable storage medium

    CN121705037A