Computing device scheduling method, computer readable storage medium and electronic device
By obtaining the actual device parameters of the computing device in a heterogeneous hardware resource environment and assigning subtasks, the problems of strong dependence on task information accuracy, insufficient consideration of heterogeneity, and poor dynamic adaptability in the prior art are solved, and efficient resource utilization and task execution speed are achieved.
Patent Information
- Application Number
- CN202411593498.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-25
AI Technical Summary
In the heterogeneous hardware resource environment, existing computing device scheduling methods have strong dependence on task information accuracy, insufficient consideration of computing device heterogeneity, and poor dynamic adaptability, resulting in limited improvement in task execution efficiency and performance.
By obtaining the actual device parameters of the computing device, considering the performance and characteristics of each computing device, split the tasks to be executed into multiple subtasks, and assign the subtasks to a more suitable computing device according to the actual device parameters, and execute them according to the task logical relationship between subtasks.
It achieves the improvement of resource utilization, avoid overload or resource waste, and at the same time improves task execution speed, reduces the dependence on task information accuracy, and improves dynamic adaptability.
Smart Images

Figure CN119512712A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home / intelligent family technology, for example, to a computing device scheduling method, a computer-readable storage medium and an electronic device. Background Art
[0002] Heterogeneous hardware resources refer to computer systems composed of different types of processors (such as CPU, GPU, NPU, FPGA, ASIC), memory (such as DRAM, SRAM, Flash) and IO devices (such as network card, hard disk, SSD), etc. Heterogeneous hardware resources have advantages such as high performance, low power consumption and scalability, and reasonable task allocation can give full play to the advantages of heterogeneous hardware resources and improve data processing speed and system performance.
[0003] In the related art, a computing device scheduling method is provided, including: determining the computing device information required to execute the task to be executed based on the task information of the task to be executed, wherein the computing device information includes the number of computing devices required to execute the task to be executed, the task information includes task type information and computing resource information required to execute the task, and the task to be executed is a task that requires multiple computing devices to cooperate to execute; determining multiple computing device allocation schemes based on the computing device information, wherein each of the multiple computing device allocation schemes includes identification information of the computing device used to execute the task to be executed; determining the fitness index of each computing device allocation scheme in the multiple computing device allocation schemes, and taking the computing device allocation scheme with the largest fitness index as the target computing device allocation scheme, wherein the fitness index is used to indicate the comprehensive performance of the device corresponding to the computing device allocation scheme; determining the corresponding computing device to execute the task to be executed based on the target computing device allocation scheme.
[0004] In the process of implementing the above embodiments, it was found that although the computing device scheduling method in the related technology has achieved a reasonable allocation of computing devices to a certain extent and improved the task execution efficiency, it is highly dependent on the accuracy of task information, lacks consideration of the heterogeneity of computing devices, and has poor dynamic adaptability, resulting in limited efficiency and performance improvement of task execution in actual applications.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0007] The embodiments of the present disclosure provide a computing device scheduling method, a computer-readable storage medium, and an electronic device, which improve resource utilization, avoid overload or resource waste, and increase task execution speed.
[0008] In some embodiments, a computing device scheduling method is provided, including: obtaining actual device parameters of a computing device in a task execution system; the actual device parameters represent parameters of the computing device in an actual operating environment that reflect the actual operating status of the computing device; decomposing the task to be executed to obtain multiple subtasks and task logical relationships between the subtasks; sending the subtasks to a target computing device respectively according to the actual device parameters; and controlling the target computing device to execute the corresponding subtask according to the task logical relationships between the subtasks.
[0009] Optionally, the actual device parameters of the computing device in the task execution system are obtained in the following manner: obtaining basic device parameters of the computing device in the task execution system; constructing a task execution system model based on the basic device parameters; controlling the task execution system model to execute a test task to obtain the actual device parameters of the computing device.
[0010] Optionally, controlling the task execution system model to execute the test task to obtain actual device parameters of the computing device includes: controlling the task execution system model to execute the test task to obtain device correction parameters of the computing device; and using the device correction parameters to correct basic device parameters to obtain actual device parameters of the computing device.
[0011] Optionally, sending the subtasks to the target computing device respectively according to the actual device parameters includes: determining a target subtask allocation scheme according to the actual device parameters; and sending the subtasks to the target computing device respectively according to the target subtask allocation scheme.
[0012] Optionally, determining a target subtask allocation scheme based on actual device parameters includes: randomly generating multiple first subtask allocation schemes; performing fitness evaluation on the multiple first subtask allocation schemes based on the actual device parameters; and determining a target subtask allocation scheme from the multiple first subtask allocation schemes based on the fitness evaluation results.
[0013] Optionally, based on the fitness evaluation result, a target subtask allocation scheme is determined from multiple first subtask allocation schemes, including: based on the fitness evaluation result, a second subtask allocation scheme is determined from multiple first subtask allocation schemes; performing genetic operations and simulated annealing operations on the second subtask allocation schemes in sequence, and determining the target subtask allocation scheme from the second subtask allocation schemes.
[0014] Optionally, the subtasks are sent to the target computing device separately according to the target subtask allocation plan, including: obtaining the operating parameters of the computing device; when the operating parameters do not meet the preset conditions, revising the target subtask allocation plan; and sending multiple subtasks to the target computing device separately according to the revised target subtask allocation plan.
[0015] Optionally, the target subtask allocation scheme is modified, including: regenerating the target subtask allocation scheme according to operating parameters of the computing device and actual device parameters.
[0016] In some embodiments, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the computing device scheduling method described in the above embodiment is executed.
[0017] In some embodiments, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computing device scheduling method described in the above embodiment through the computer program.
[0018] The disclosed embodiments provide a computing device scheduling method, a computer-readable storage medium, and an electronic device. By obtaining the actual device parameters of the computing device, the performance and characteristics of each computing device are taken into consideration to ensure that subsequent task scheduling can be based on accurate hardware information. By splitting the task to be executed into multiple smaller and easier to manage subtasks, it is convenient to flexibly utilize each computing device. Then, according to the actual device parameters of the computing device, the subtasks are assigned to a more suitable computing device, that is, in the target computing device, the task is executed according to the task logical relationship between the subtasks to realize the execution of the task to be executed, and at the same time, the load balancing of the computing device is realized to ensure that each computing device can efficiently execute the corresponding subtask according to its capabilities. In this process, by splitting the subtasks and accurately matching the subtasks and computing devices, it is possible to improve resource utilization, avoid overload or waste of resources, and improve the task execution speed.
[0019] Compared with the related art, the method provided by the embodiment of the present disclosure starts from the computing device, and schedules tasks and hardware resources according to the actual device parameters of the computing device, thereby reducing the dependence on the accuracy of task information; by obtaining the basic device parameters of the computing device in the task execution system, the performance characteristics of each computing device are taken into account; by splitting the tasks to be executed, the dynamic adaptability of the method is improved, thereby further improving the efficiency and performance of task execution.
[0020] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0023] Figure 1 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of a computing device scheduling method provided by an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of a computing device scheduling method provided by another embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of a computing device scheduling method provided by another embodiment of the present disclosure;
[0027] Figure 5 It is a schematic diagram of a computing device scheduling apparatus provided by an embodiment of the present disclosure.
[0028] Reference numerals:
[0029] 1. Electronic equipment; 10. Equipment body;
[0030] 50. Computing device scheduling apparatus; 500. Processor; 501. Memory; 502. Communication interface; 503. Bus. DETAILED DESCRIPTION
[0031] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0032] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0033] Unless otherwise stated, the term "plurality" means two or more.
[0034] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0035] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A, B, A and B.
[0036] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0037] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0038] In the related art, a computing device scheduling method is provided, including: determining the computing device information required to execute the task to be executed based on the task information of the task to be executed, wherein the computing device information includes the number of computing devices required to execute the task to be executed, the task information includes task type information and computing resource information required to execute the task, and the task to be executed is a task that requires multiple computing devices to cooperate to execute; determining multiple computing device allocation schemes based on the computing device information, wherein each of the multiple computing device allocation schemes includes identification information of the computing device used to execute the task to be executed; determining the fitness index of each computing device allocation scheme in the multiple computing device allocation schemes, and taking the computing device allocation scheme with the largest fitness index as the target computing device allocation scheme, wherein the fitness index is used to indicate the comprehensive performance of the device corresponding to the computing device allocation scheme; determining the corresponding computing device to execute the task to be executed based on the target computing device allocation scheme.
[0039] Although the computing device scheduling method in the related technology has achieved the reasonable allocation of computing devices to a certain extent and improved the task execution efficiency, it is highly dependent on the accuracy of task information, lacks consideration of the heterogeneity of computing devices, and has poor dynamic adaptability, resulting in limited efficiency and performance improvement of task execution in actual applications.
[0040] Specifically, the computing device scheduling method in the related art starts from the task information of the task to be executed, and determines the required computing device information based on the task information of the task to be executed. If the task information is inaccurate or there are errors, the computing device information will also be affected, which will lead to an unreasonable computing device allocation plan and low efficiency and performance of task execution. In a heterogeneous hardware resource environment, different types of computing devices have different performance characteristics and advantages. The computing device scheduling method in the related art does not fully consider the heterogeneity of the computing devices in the computing device allocation process, which is easy to lead to unreasonable computing resource allocation and cannot give full play to the advantages of heterogeneous hardware resources, thereby affecting the efficiency and performance of task execution. In the computing device scheduling method in the related art, once the computing device or the task to be executed changes, the computing device scheduling needs to be re-performed, which is easy to lead to low efficiency and performance of task execution.
[0041] According to one aspect of the embodiment of the present application, a computing device scheduling method is provided. The computing device scheduling method can be widely used in computer systems that are integrated with different types of processors, memories, and IO devices, that is, control systems under heterogeneous hardware resource environments, such as smart homes (Smart Home), smart homes, smart home equipment ecosystems, smart residential (Intelligence House) ecosystems, and other whole-house intelligent digital control systems. Among them, the processor may not be limited to CPU (Central Processing Unit, Central Processing Unit), GPU (Graphics Processing Unit, Graphics Processing Unit), NPU (Neural Processing Unit, Neural Network Processor), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array), ASIC (Application Specific Integrated Circuit, Application Specific Integrated Circuit), etc.; the memory may not be limited to DRAM (Dynamic Random Access Memory, Dynamic Random Access Memory), SRAM (Static Random Access Memory, Static Random Access Memory), Flash (Flash Memory), etc.; IO devices (Input / Output devices, Input / Output devices) may not be limited to network cards, hard disks, SSD (Solid State Drive, Solid State Drive), etc.
[0042] Combination Figure 1As shown, an embodiment of the present disclosure provides an electronic device 1, including a device body 10 and a computing device scheduling device 50. The computing device scheduling device 50 is installed on the device body 10. The installation relationship described here is not limited to placement inside the device body 10, but also includes installation connections with other components of the electronic device 1, including but not limited to physical connections, electrical connections, or signal transmission connections. It can be understood by those skilled in the art that the computing device scheduling device 50 can be adapted to a feasible electronic device 1, thereby realizing other feasible embodiments.
[0043] In the embodiment of the present disclosure, when the electronic device 1 includes multiple computing devices (such as CPU, GPU, NPU and other processors), it can be independently used as a task execution system. The electronic device 1 in the embodiment of the present disclosure can also be connected to the Internet to communicate with other terminal devices, or communicate with other terminal devices through Bluetooth, Wi-Fi, etc. to form a task execution system.
[0044] In some embodiments, the electronic device 1 or the terminal device may not be limited to a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing equipment, a smart dishwasher, a smart projection equipment, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart speaker, a smart fresh air equipment, a smart kitchen and bathroom equipment, a smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification equipment, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0045] Optionally, the computing device scheduling apparatus 50 includes a processor 500. The processor 500 can obtain actual device parameters of the computing device in the task execution system; can decompose the task to be executed to obtain multiple subtasks and the task logical relationships between the subtasks; can send the subtasks to the target computing device respectively according to the actual device parameters; can control the target computing device to execute the corresponding subtask according to the task logical relationships between the subtasks.
[0046] Combination Figure 1 and Figure 5 The electronic device shown in the present disclosure provides a computing device scheduling method, such as Figure 2 As shown, the method includes:
[0047] S201: The processor obtains actual device parameters of a computing device in a task execution system.
[0048] In this step, the task execution system can be an independent electronic device or a control system composed of electronic devices and terminal devices connected in communication. Computing devices include but are not limited to various processors such as CPU, GPU, NPU, etc.
[0049] In this step, the actual device parameters refer to the parameters of the computing device in the actual operating environment, which reflect the actual operating status of the computing device, and can be obtained through testing or monitoring. The actual device parameters will change due to various factors such as the environment, load, and usage time. The actual device parameters of the computing device include information parameters such as the computing device model, number of cores, memory size, storage capacity, network bandwidth, computing speed, memory access speed, number of floating-point operations per second, number of integer operations per second, and whether it has parallel processing capabilities.
[0050] S202: The processor decomposes the task to be executed to obtain a plurality of subtasks and task logical relationships between the subtasks.
[0051] In this step, the tasks to be executed can come from user submission, application request or other sources. The task logic relationship between subtasks refers to the execution relationship between multiple subtasks, such as serial execution, parallel execution or conditional execution. The tasks to be executed can be decomposed into multiple subtasks according to the needs and characteristics of the tasks to be executed. For example, task decomposition can be based on functional modules, data partitions, computing stages, etc., to ensure that each subtask is relatively independent and can be executed on different heterogeneous hardware.
[0052] S203: The processor sends the subtasks to the target computing device respectively according to the actual device parameters.
[0053] In this step, the actual device parameters refer to the actual device parameters of the computing device obtained in step S201. The subtasks refer to the multiple subtasks obtained in step S202.
[0054] S204: The processor controls the target computing device to execute corresponding subtasks according to the task logic relationship between the subtasks.
[0055] In this step, the task logic relationship between the subtasks refers to the task logic relationship between the subtasks obtained in step S202.
[0056] Different types of computing devices have different architectural features and performance advantages. The computing device scheduling method provided by the embodiment of the present disclosure obtains the actual device parameters of the computing device, considers the performance and characteristics of each computing device, and ensures that subsequent task scheduling can be based on accurate hardware information. By splitting the task to be executed into multiple smaller and easier to manage subtasks, it is convenient to flexibly utilize each computing device. Then, according to the actual device parameters of the computing device, the subtasks are assigned to the more suitable computing device, that is, in the target computing device, according to the task logical relationship between the subtasks, to execute the task to be executed, and at the same time, the load balancing of the computing device is achieved, ensuring that each computing device can efficiently execute the corresponding subtask according to its capabilities. In this process, by splitting subtasks and accurately matching subtasks and computing devices, it is possible to improve resource utilization, avoid overload or waste of resources, and improve the speed of task execution.
[0057] The method provided by the embodiment of the present disclosure can adapt to computer systems and tasks to be executed of different sizes, types or dynamic changes. When the task to be executed changes dynamically, the changed subtasks can be re-issued to the target computing device to avoid re-running the entire execution program, improve the dynamic adaptability of the method, and thus improve the task execution efficiency. In addition, when the computing device increases or decreases, the method provided by the embodiment of the present disclosure can easily adapt to the new computing environment by re-obtaining the actual device parameters of the computing device in the task execution system.
[0058] Compared with the related art, the method provided by the embodiment of the present disclosure starts from the computing device, and schedules tasks and hardware resources according to the actual device parameters of the computing device, thereby reducing the dependence on the accuracy of task information; by obtaining the basic device parameters of the computing device in the task execution system, the performance characteristics of each computing device are taken into account; by splitting the tasks to be executed, the dynamic adaptability of the method is improved, thereby further improving the efficiency and performance of task execution.
[0059] Combination Figure 3 As shown, the embodiment of the present disclosure provides another computing device scheduling method, including:
[0060] S301: The processor obtains basic device parameters of a computing device in a task execution system.
[0061] In this step, the basic device parameters of the computing device refer to the parameters that are clearly given when the device leaves the factory or in the design specifications, and describe the basic performance and / or specifications of the device. The basic device parameters of the computing device can be obtained through the hardware specification manual of the computing device and the system management tool. The basic device parameters of the computing device are fixed and are used to describe the physical properties, electrical characteristics, basic performance, etc. of the device. The basic device parameters of the computing device include information parameters such as the computing device model, number of cores, memory size, storage capacity, network bandwidth, computing speed, memory access speed, number of floating-point operations per second, number of integer operations per second, and whether it has parallel processing capabilities.
[0062] S302: The processor constructs a task execution system model according to the basic device parameters.
[0063] In this step, the basic device parameters refer to the basic device parameters of the computing device obtained in step S301. The task execution system model can simulate the actual operating environment of the computing device, including the performance characteristics and resource limitations of the computing device. By constructing the task execution system model, the performance of the computing device when executing a specific task can be more accurately evaluated, and more accurate actual device parameters can be obtained.
[0064] S303, the processor controls the task execution system model to execute the test task and obtain actual device parameters of the computing device.
[0065] In this step, the test task is a pre-written test computer program. By controlling the task execution system model to execute the test task, the execution of the test task in the task execution system model is observed and analyzed to obtain the actual device parameters of the computing device, such as the actual computing speed, memory access speed, number of floating-point operations per second, number of integer operations per second, etc. The actual device parameters refer to the parameters of the computing device in the actual operating environment, reflecting the actual operating status of the computing device.
[0066] In some embodiments, the test tasks include computationally intensive tasks and / or complex logic tasks. Computationally intensive tasks focus on testing the computing capabilities of the computing device, including computing speed and efficiency, floating point operations per second, integer operations per second, etc. Complex logic tasks focus on testing the data processing capabilities of the computing device, including the response speed of the computing device in processing complex control flows, branch predictions, data dependencies, etc., memory access speed, etc.
[0067] S304: The processor decomposes the task to be executed to obtain a plurality of subtasks and task logical relationships between the subtasks.
[0068] S305: The processor sends the subtasks to the target computing device respectively according to the actual device parameters.
[0069] In this step, the actual device parameters refer to the actual device parameters of the computing device obtained in step S303. The subtasks refer to the multiple subtasks obtained in step S304.
[0070] S306: The processor controls the target computing device to execute corresponding subtasks according to the task logic relationship between the subtasks.
[0071] In this step, the task logic relationship between the subtasks refers to the task logic relationship between the subtasks obtained in step S304.
[0072] The computing device scheduling method provided by the embodiment of the present disclosure builds a task execution system model based on the basic device parameters of the computing device to obtain more accurate actual device parameters of the computing device. By improving the accuracy of the actual device parameters, tasks and hardware resources can be allocated more reasonably, the utilization rate of hardware resources and the efficiency of task execution can be improved, and idleness and waste can be reduced.
[0073] Optionally, controlling the task execution system model to execute the test task to obtain actual device parameters of the computing device includes: controlling the task execution system model to execute the test task to obtain device correction parameters of the computing device; and using the device correction parameters to correct basic device parameters to obtain actual device parameters of the computing device.
[0074] In this embodiment, the task execution system model can be controlled to execute the test task, simulating the load and scenario in the actual work, so as to evaluate the actual response capability and performance of the computing device. The device correction parameters of the computing device are obtained by observing and analyzing the execution of the test task in the task execution system model. The device correction parameters may include adjustment values in terms of response time, calculation speed, memory access speed, number of floating-point operations per second, number of integer operations per second, etc. The device correction parameters reflect the difference between the actual performance of the computing device and the basic device parameters. After obtaining the device correction parameters, the basic device parameters are corrected using the device correction parameters to adjust the basic device parameters to values that are closer to the actual performance, i.e., the actual device parameters, so as to make more accurate decisions in subsequent task allocation and hardware resource scheduling, thereby further improving computing efficiency and task execution speed.
[0075] After obtaining the actual device parameters of the computing device, the actual device parameters of the computing device can be saved in the form of a chart or matrix. Using a chart can more intuitively display the performance parameters of the computing device. For example, for the CPU, a bar chart can be used to represent the size of parameters such as the number of cores and computing speed; for the GPU, a line chart can be used to represent the changing trend of storage capacity and network bandwidth. Constructing a matrix can record the performance characteristics of the computing device in detail. For example, the rows of the matrix can represent different processors, and the columns can represent various performance parameters. For example, a row of the matrix can represent the value of a CPU parameter such as computing speed, number of cores, memory size, etc.
[0076] Combination Figure 4 As shown, the embodiment of the present disclosure provides another computing device scheduling method, including:
[0077] S401: The processor obtains actual device parameters of a computing device in a task execution system.
[0078] In this step, the actual device parameters refer to the parameters of the computing device in the actual operating environment, reflecting the actual operating state of the computing device.
[0079] S402: The processor decomposes the task to be executed to obtain a plurality of subtasks and task logical relationships between the subtasks.
[0080] S403: The processor determines a target subtask allocation scheme according to actual device parameters.
[0081] In this step, the target subtask allocation scheme includes the corresponding relationship between each subtask and the computing device.
[0082] S404: The processor sends the subtasks to the target computing device respectively according to the target subtask allocation plan.
[0083] S405: The processor controls the target computing device to execute corresponding subtasks according to the task logic relationship between the subtasks.
[0084] In this step, the task logic relationship between the subtasks refers to the task logic relationship between the subtasks obtained in step S402.
[0085] By adopting the computing device scheduling method provided by the embodiment of the present disclosure, the actual device parameters of the computing device can be comprehensively considered first, and a better target subtask allocation scheme can be determined to maximize the use of the computing device's resources as much as possible, while ensuring that the subtasks can be completed on time and efficiently. After determining the target subtask allocation scheme, multiple subtasks are respectively issued to the corresponding target computing device according to the target subtask allocation scheme to ensure that each subtask is correctly allocated to a suitable computing device, and the task allocation between each device is balanced to avoid idle or overloaded resources. The method provided by the embodiment of the present disclosure allocates tasks based on the actual device parameters of the computing device to ensure that each subtask is allocated to a suitable computing device, avoid waste and idleness of resources, make full use of the computing device's resources, ensure that each computing device can play its role to the maximum extent within its capabilities, improve the overall resource utilization, and improve the speed and efficiency of task execution.
[0086] Optionally, determining a target subtask allocation scheme based on actual device parameters of the computing device includes: randomly generating multiple first subtask allocation schemes; performing fitness evaluation on the multiple first subtask allocation schemes based on the actual device parameters; and determining a target subtask allocation scheme from the multiple first subtask allocation schemes based on the fitness evaluation results.
[0087] In this embodiment, a plurality of possible subtask allocation schemes, namely, the first subtask allocation schemes, are first randomly generated. The first subtask allocation schemes cover different task allocation combinations to ensure the comprehensiveness and diversity of subsequent evaluations. Then, the fitness of each first subtask allocation scheme is evaluated based on the actual device parameters of the computing device. The purpose of the fitness evaluation is to measure the pros and cons of each scheme in terms of meeting task requirements, resource utilization, load balancing, etc. By comparing the fitness evaluation results of different schemes, a better scheme, namely, the target subtask allocation scheme, is selected to guide the subsequent subtask distribution and the use of computing devices.
[0088] In this embodiment, by randomly generating multiple first subtask allocation schemes and performing fitness evaluation, a better task allocation strategy can be found in a shorter time, avoiding the tedious process of trying all possible schemes one by one in the traditional method, thereby improving the efficiency of task allocation. In addition, the fitness evaluation process takes into account the actual device parameters and task requirements of the computing device, so it can ensure that the task is allocated to a suitable computing device, thereby making full use of computing resources and improving resource utilization and task execution efficiency.
[0089] Optionally, the fitness of multiple first subtask allocation schemes is evaluated in the following manner: fitness value Fitness(i) = w1×Efficiency(i)+w2×[1 / CompletionTime(i)]+w3×ResourceUtilization(i); wherein Efficiency(i), CompletionTime(i) and ResourceUtilization(i) respectively represent the execution efficiency, task completion time and resource utilization of the i-th first subtask allocation scheme, w1, w2 and w3 are weight parameters, and the value of i is 1, 2, 3, 4... In this embodiment, the execution efficiency, task completion time and resource utilization of the i-th first subtask allocation scheme can be obtained by controlling the task execution system model to execute the task to be executed according to the i-th first subtask allocation scheme. The specific values of the weight parameters w1, w2 and w3 need to be set according to actual needs and system characteristics, and this application does not limit them. In this embodiment, multiple dimensions such as execution efficiency, task completion time and resource utilization are comprehensively considered, and the advantages and disadvantages of the first subtask allocation scheme can be comprehensively evaluated so as to find a task allocation strategy that performs well in multiple aspects, that is, the target subtask allocation scheme.
[0090] Optionally, a fitness evaluation is performed on multiple first subtask allocation schemes, including: evaluating the computational complexity, memory requirements, and time limits of each subtask; and determining whether each computing device in each first subtask allocation scheme can meet the computational complexity, memory requirements, and time limit requirements of the corresponding subtask.
[0091] In this embodiment, the computational complexity of each subtask can be evaluated by combining the size of the computational amount, the complexity of the algorithm, the type of operation (such as floating-point operations, integer operations, logical operations, etc.), etc., and using pre-built function formulas, indicators or models to quantify the computational complexity, such as using the number of computational instructions, the number of floating-point operations, etc. to characterize the computational complexity of each subtask. The memory requirements for each subtask include the memory size required for input data, intermediate results and output data, as well as the memory size required for the memory access mode (such as sequential access, random access, etc.), and also include the additional memory size required by factors such as memory bandwidth and cache hit rate. The time limit of each subtask includes the deadline of the task, real-time requirements and expectations for response time, etc. By comprehensively judging whether each computing device in the first subtask allocation scheme can meet the computational complexity, memory requirements, and time limit requirements of the corresponding subtask, it is judged whether the first subtask allocation scheme can be stably executed, so as to determine the target subtask allocation scheme from the first subtask allocation scheme in which each computing device can meet the computational complexity, memory requirements, and time limit requirements of the corresponding subtask.
[0092] Optionally, based on the fitness evaluation result, a target subtask allocation scheme is determined from multiple first subtask allocation schemes, including: based on the fitness evaluation result, a second subtask allocation scheme is determined from multiple first subtask allocation schemes; performing genetic operations and simulated annealing operations on the second subtask allocation schemes in sequence, and determining the target subtask allocation scheme from the second subtask allocation schemes.
[0093] In this embodiment, first, according to the fitness evaluation result, a second subtask allocation scheme with higher fitness is determined from multiple first subtask allocation schemes, and a preliminary screening is performed to narrow the selection range and reduce the calculation amount and time cost of subsequent operations. Genetic operations are performed on the determined second subtask allocation scheme, including steps such as selection, crossover and mutation, and some new individual schemes are generated through genetic operations to improve the diversity of the second subtask allocation scheme. A simulated annealing operation is performed on the new individual schemes after the genetic operation. The simulated annealing operation is a random search optimization algorithm that simulates the molecular motion state during the annealing process of a solid material, gradually reduces the temperature in a probabilistic manner, and finally reaches the optimal solution. In this embodiment, the search space is further refined by the simulated annealing operation to find a target subtask allocation scheme that is closer to the global optimal solution, so as to achieve the target subtask allocation scheme.
[0094] The simulated annealing operation is performed on the new individual scheme after the genetic operation, including: calculating the change ΔFitness of the fitness function value of the new individual scheme after the genetic operation; accepting the new individual scheme when ΔFitness>0; accepting the task allocation scheme with probability P when ΔFitness≤0; the calculation formula of probability P is: P=exp(ΔFitness / T); wherein T refers to the current temperature of the computing device. In this embodiment, after the i-th first subtask allocation scheme is genetically operated, a new individual scheme i′ is obtained, and the change ΔFitness of the fitness function value refers to the change between the fitness value Fitness(i) of the i-th first subtask allocation scheme and the fitness value Fitness(i)′ of the new individual scheme i′. The calculation method of the fitness value Fitness(i)′ of the new individual scheme i′ refers to the calculation method of the fitness value Fitness(i) of the i-th first subtask allocation scheme mentioned above.
[0095] It should be noted that performing genetic operations and simulated annealing operations on the second subtask allocation scheme in sequence is a repeated iterative process until the termination condition is met (such as reaching the maximum number of iterations or the fitness function value converges), and the target subtask allocation scheme can be obtained, thereby determining the target subtask allocation scheme from the second subtask allocation scheme.
[0096] Optionally, according to the fitness evaluation result, determining the second subtask allocation scheme from the plurality of first subtask allocation schemes includes: taking the first subtask allocation scheme whose fitness evaluation result is greater than a preset threshold as the second subtask allocation scheme. In this embodiment, a preset threshold is pre-set to quickly screen out the first subtask allocation scheme with a higher fitness as the second subtask allocation scheme, reduce the amount of calculation and time cost of the system when selecting the target scheme, improve decision-making efficiency, and find a more optimal task allocation strategy more quickly.
[0097] In a specific application, take the execution of multiple subtasks (task A, task B, and task C) on two heterogeneous hardware resources (processor X and processor Y) as an example. The relevant information of the tasks is as follows: Task A: computational complexity is 10, memory requirement is 5, and estimated execution time is 8; Task B: computational complexity is 8, memory requirement is 4, and estimated execution time is 6; Task C: computational complexity is 12, memory requirement is 6, and estimated execution time is 10. The relevant information of the processor is as follows: Processor X: computing power is 20, memory capacity is 10, and parallelization capability is 15; Processor Y: computing power is 15, memory capacity is 8, and parallelization capability is 12. Then, according to the actual device parameters of the computing device, the target subtask allocation scheme is determined. The specific process may be: first, a plurality of first subtask allocation schemes are randomly generated, such as task A is allocated to processor X, task B is allocated to processor Y, and task C is allocated to processor X; then, the fitness function value Fitness(i) of each first subtask allocation scheme is calculated, and the first subtask allocation scheme whose fitness function value Fitness(i) is greater than a preset threshold is used as the second subtask allocation scheme.
[0098] After the second subtask allocation scheme is determined, genetic operations are performed first. Specifically, the fitness function values Fitness(i) of the second subtask allocation schemes are sorted in descending order, and the two second subtask allocation schemes with the highest fitness function values are selected as parents; crossover operations are performed on the selected parents to generate new individual schemes, such as exchanging part of the task allocations of the two parents to generate new individual schemes; mutation operations are performed on the new individual schemes to increase the diversity of the allocation schemes, such as randomly changing the allocation processor of a task.
[0099] For each task allocation scheme after genetic operation, simulated annealing operation is performed. Specifically, the change in the fitness function value of each task allocation scheme, ΔFitness, is calculated. If ΔFitness>0, the task allocation scheme is accepted as the new current solution. If ΔFitness≤0, the task allocation scheme is accepted with probability P. For example, for a new individual scheme, its fitness function value is 15, and the change in the fitness function value is -2. Since -2≤0, assuming that the current temperature of the computing device is 10, the probability of accepting the task allocation scheme is P=exp(-2 / 10)=0.8187. Repeat the genetic operation and simulated annealing operation until the maximum number of iterations is reached. Through multiple iterations and optimization, the target subtask allocation scheme can be finally obtained to maximize the fitness function value.
[0100] Optionally, the subtasks are sent to the target computing device respectively according to the target subtask allocation plan, including: obtaining the operating parameters of the computing device; when the operating parameters do not meet the preset conditions, revising the target subtask allocation plan; and sending the subtasks to the target computing device respectively according to the revised target subtask allocation plan.
[0101] In this embodiment, the operating parameters of the computing device refer to parameters that can reflect the real-time performance and status of the computing device, such as current temperature, power consumption, memory occupancy, load, etc. The preset conditions are pre-set based on factors such as system requirements, task characteristics, and the capabilities of the computing device, and are used to ensure that the task can be run in a suitable computing environment and to ensure efficient task execution efficiency, such as a temperature of less than 60 degrees Celsius and a memory occupancy of less than 70%. By comparing the acquired operating parameters with the preset conditions, if the operating parameters do not meet the preset conditions, it means that the current state of the computing device is not suitable for executing the tasks in the target subtask allocation scheme, or the rate of executing the tasks in the target subtask allocation scheme is low. At this time, the target subtask allocation scheme is revised to reallocate tasks or adjust the priority of task execution to ensure that the tasks can be efficiently run on a suitable computing device.
[0102] In this embodiment, by acquiring the operating parameters of the computing device in real time and revising the target subtask allocation scheme according to the actual situation, it is achieved to ensure that the task runs efficiently in a suitable computing environment, thereby improving the execution efficiency of the task and reducing the waiting time and execution time of the task. And when the operating parameters do not meet the preset conditions, the target subtask allocation scheme is revised to avoid task failure or system crash caused by the poor operating state of the computing device, and more reasonably allocate and utilize computing resources, ensuring that the task can be successfully completed while avoiding the waste and idleness of computing resources, improving the utilization rate of computing resources and the overall efficiency of the system. In addition, in this embodiment, the target subtask allocation scheme can be dynamically adjusted according to the real-time operating parameters of the computing device to better adapt to different operating environments and changes in task requirements, and to achieve more flexible and efficient task allocation and execution.
[0103] Optionally, the target subtask allocation scheme is modified, including: regenerating the target subtask allocation scheme according to operating parameters of the computing device and actual device parameters.
[0104] In this embodiment, the target subtask allocation scheme is regenerated in combination with the operating parameters and actual device parameters of the computing device to ensure efficient and stable execution of the tasks to be executed. Specifically, the target subtask allocation scheme is regenerated based on the operating parameters and actual device parameters of the computing device, including: randomly generating multiple first subtask allocation schemes; controlling the task execution system model to execute in accordance with the multiple first subtask allocation schemes in sequence, and obtaining the test operation parameters corresponding to each first subtask allocation scheme; using the first subtask allocation scheme whose test operation parameters meet the preset conditions as the third subtask allocation scheme; performing fitness evaluation on the third subtask allocation scheme based on the actual device parameters of the computing device; and determining the target subtask allocation scheme from the third subtask allocation scheme based on the fitness evaluation result.
[0105] Combination Figure 5 As shown, the embodiment of the present disclosure provides a computing device scheduling device 50, including a processor (processor) 500 and a memory (memory) 501. Optionally, the device 50 may also include a communication interface (Communication Interface) 502 and a bus 503. Among them, the processor 500, the communication interface 502, and the memory 501 can communicate with each other through the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call the logic instructions in the memory 501 to execute the computing device scheduling method of the above embodiment.
[0106] In addition, the logic instructions in the memory 501 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0107] The memory 501 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 500 executes the functional application and data processing by running the program instructions / modules stored in the memory 501, that is, implementing the computing device scheduling method in the above embodiment.
[0108] The memory 501 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 501 may include a high-speed random access memory and may also include a non-volatile memory.
[0109] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein the above-mentioned computing device scheduling method is executed when the program is run.
[0110] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0111] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0112] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0113] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0114] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A computing device scheduling method, characterized in that: include: Obtaining actual device parameters of computing devices in the task execution system; The actual device parameters refer to the parameters of the computing device in the actual operating environment, reflecting the actual operating status of the computing device; Decomposing the task to be executed to obtain multiple subtasks and task logical relationships between the subtasks; Sending the subtasks to the target computing devices respectively according to the actual device parameters; According to the task logic relationship between the subtasks, the target computing device is controlled to execute the corresponding subtasks.
2. The computing device scheduling method according to claim 1, characterized in that: The actual device parameters of the computing device in the task execution system are obtained as follows: Obtain basic device parameters of computing devices in the task execution system; Constructing a task execution system model according to the basic equipment parameters; The control task execution system model executes the test task and obtains the actual device parameters of the computing device.
3. The computing device scheduling method according to claim 2, characterized in that: The control task execution system model executes the test task and obtains the actual device parameters of the computing device, including: Controlling the task execution system model to execute the test task and obtain the device correction parameters of the computing device; The basic device parameters are corrected using the device correction parameters to obtain the actual device parameters of the computing device.
4. The computing device scheduling method according to any one of claims 1 to 3, characterized in that: The subtasks are respectively sent to the target computing device according to the actual device parameters, including: Determine the target subtask allocation plan based on actual equipment parameters; Subtasks are sent to target computing devices according to the target subtask allocation plan.
5. The computing device scheduling method according to claim 4, characterized in that: Determine the target subtask allocation plan based on actual equipment parameters, including: Randomly generate multiple first subtask allocation schemes; According to actual equipment parameters, a plurality of first subtask allocation schemes are evaluated for fitness; According to the fitness evaluation result, a target subtask allocation scheme is determined from a plurality of first subtask allocation schemes.
6. The computing device scheduling method according to claim 5, characterized in that: According to the fitness evaluation result, a target subtask allocation scheme is determined from multiple first subtask allocation schemes, including: Determine a second subtask allocation scheme from a plurality of first subtask allocation schemes according to the fitness evaluation result; The genetic operation and the simulated annealing operation are sequentially performed on the second subtask allocation scheme, and a target subtask allocation scheme is determined from the second subtask allocation scheme.
7. The computing device scheduling method according to claim 4, characterized in that: Subtasks are sent to target computing devices according to the target subtask allocation plan, including: obtaining operating parameters of a computing device; When the operating parameters do not meet the preset conditions, the target subtask allocation plan is revised; According to the revised target subtask allocation plan, the subtasks are respectively sent to the target computing devices.
8. The computing device scheduling method according to claim 7, characterized in that: Modify the target subtask allocation plan, including: Regenerate the target subtask allocation plan based on the operating parameters of the computing device and the actual device parameters.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the computing device scheduling method according to any one of claims 1 to 8 is executed when the program is executed.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the computing device scheduling method according to any one of claims 1 to 8 through the computer program.
Citation Information
Cited By
Production scheduling control method and system based on equipment state sensing and storage medium
CN119886762A