An air conditioner energy consumption calculation task scheduling method, device and server
By using a dynamic priority scheduling mechanism and analyzing user historical performance, the problems of fairness and low resource allocation efficiency in existing scheduling methods are solved. This enables efficient, flexible, and real-time task scheduling for intelligent air conditioning energy consumption management, thereby improving the overall processing efficiency and resource utilization of the system.
Patent Information
- Application Number
- CN202511695282.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-19
AI Technical Summary
Existing scheduling methods lack fairness and have low resource allocation efficiency in high-concurrency, multi-user scenarios, and cannot respond to urgent tasks in a timely manner, resulting in low system processing efficiency and serious resource waste.
A dynamic priority scheduling mechanism is adopted to adjust task priorities based on users' historical performance. By comprehensively calculating the initial scheduling priority, time priority, and success priority, the scheduling priority of the user list is dynamically adjusted. Combined with the super user's permission design, flexible scheduling and fair allocation of tasks are achieved.
It improves the processing efficiency and resource utilization of task scheduling, enhances fairness and flexibility, optimizes the real-time performance and accuracy of energy consumption management, adapts to complex multi-user environments, and is particularly suitable for smart air conditioning energy consumption management scenarios.
Smart Images

Figure CN121169028B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of task scheduling, more particularly, it relates to a method and device for scheduling air conditioner energy consumption calculation tasks and a server. BACKGROUND
[0002] With the popularity of Internet of Things technology, the number of intelligent air conditioning devices has increased rapidly. The energy consumption calculation, real-time monitoring and optimization control tasks generated by their operation exhibit massive and high-concurrent characteristics, which puts extremely high requirements on the processing capacity of the background computing system. Intelligent air conditioners managed by different users generate massive energy consumption calculation tasks, which are usually processed by a single computing center. Traditional scheduling methods only queue tasks according to their creation time, lacking consideration of multi-user fairness, resource allocation efficiency and emergency task priority response, resulting in low system processing efficiency and key task delay.
[0003] Currently, the existing scheduling method has the following problems: high priority task response lag, traditional task scheduling architecture gradually exposes systematic defects when facing such high-concurrent and multi-tenant computing demands. Intelligent air conditioning systems are undergoing a transformation from single control to cluster management. Traditional intelligent air conditioner energy consumption calculation systems have obvious limitations in task scheduling, mainly manifested in rigid scheduling mechanism, lack of resource allocation fairness and insufficient emergency handling flexibility. These defects seriously restrict the real-time response capability and overall service efficiency of the system in a multi-user and high-concurrent scenario.
[0004] Lack of fairness guarantee mechanism in multi-user environment, the existing scheduling method adopts a simple first-come-first-served mechanism, only processing requests or task priority according to the order of task creation time, and cannot identify and respond to different emergency levels of computing demand. This static scheduling method often puts urgent energy consumption warning and control instructions at the back end, seriously affecting the real-time response capability of the intelligent air conditioning system and failing to meet the timeliness requirements of modern energy consumption management. The existing scheduling method lacks a fairness guarantee mechanism in a multi-user environment. When some users submit a large number of computationally intensive tasks, system resources will be monopolized for a long time, causing other users' regular energy consumption analysis tasks to be delayed. This uneven resource allocation problem causes other users' key tasks to be in long waiting, reducing the overall service quality and user experience. At the same time, the resource management algorithm has defects and fails to establish an elastic allocation mechanism based on user credit evaluation, resulting in the inability to optimize the allocation of computing resources according to actual performance.
[0005] The scheduling mechanism lacks flexibility, and the scheduling strategy of the existing scheduling method adopts rigid design, that is, the terminal user priority adjustment authority is not opened, and there is also a lack of system-level task intervention channel, so that the sudden high-priority computing demand cannot be responded in time. In addition, the existing scheduling method adopts a decentralized task processing mode, which causes insufficient cooperation of background computing power, and in response to regional performance consumption computing peaks, local overload and overall idle coexistence resource mismatch problems are prone to occur, which eventually seriously restricts the energy consumption management efficiency and system adaptability of large-scale air conditioning clusters. SUMMARY
[0006] The purpose of the present application is to provide an air conditioning energy consumption calculation task scheduling method, device and server, which solves the problem that the existing time-sequential static scheduling method cannot meet the demand of energy consumption calculation task scheduling for fairness, efficiency and real-time.
[0007] The above technical purpose of the present application is realized by the following technical scheme:
[0008] In a first aspect of the present application, an air conditioning energy consumption calculation task scheduling method is provided, which comprises:
[0009] Obtaining a user list to be executed for air conditioning energy consumption calculation tasks, and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task;
[0010] Determining the initial scheduling priority value of each user according to the user list;
[0011] Obtaining the execution time of each user executing historical tasks in the user list and an identifier of whether the historical tasks are executed successfully;
[0012] Determining the time priority value of each user according to the execution time;
[0013] Determining the success priority value of each user task execution according to the identifier;
[0014] Determining the scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value;
[0015] Scheduling the air conditioning energy consumption calculation tasks of the users based on the scheduling priority of the user list.
[0016] In an implementation scheme, the initial scheduling priority value of each user is determined according to the user list, specifically: the initial scheduling priority value of each user is determined according to the sequence of each user in the user list.
[0017] In an implementation scheme, the time priority value of each user is determined according to the execution time, specifically:
[0018] According to the execution time of each user to perform a historical task and the number of completed historical tasks performed by each user, the average execution time of each user task is calculated;
[0019] According to the average task execution time of each user, the time priority value of each user is determined.
[0020] In an implementation scheme, the success priority value of each user task execution is determined according to the identifier, specifically:
[0021] According to the identifier of whether each user historical task is executed successfully, the number of failed tasks of each user historical task execution is determined;
[0022] Based on the number of failed tasks of historical task execution, combined with the total number of tasks completed by each user, the success priority value of each user is determined.
[0023] In an implementation scheme, according to the initial scheduling priority value, the time priority value and the success priority value, the scheduling priority of the user list is determined, specifically:
[0024] According to the sum result of the initial scheduling priority value, the time priority value and the success priority value of each user, the scheduling priority value of each user is determined;
[0025] The scheduling priority value of each user is sorted in ascending order to obtain the scheduling priority of the user list.
[0026] In an implementation scheme, based on the scheduling priority of the user list, the user air conditioner energy consumption calculation task is scheduled, including:
[0027] According to the scheduling priority from small to large, the corresponding scheduling user is selected from the user list;
[0028] If the task list of the scheduling user contains only one task, the scheduling user is deleted from the user list after the task execution is completed;
[0029] If the task list of the scheduling user contains multiple tasks, the task with the highest priority is executed according to the priority order, and after the execution is completed, the scheduling user is moved to the end of the user list to update the user list, and the execution time and the identifier of whether the execution is successful of the task with the highest priority are determined;
[0030] The updated user list is re-calculated to obtain a new scheduling priority;
[0031] Based on the new scheduling priority, the tasks of each user in the updated user list are scheduled.
[0032] In an implementation, the method further comprises: adjusting the task order of the task list of the scheduled user, and scheduling according to the adjusted task list.
[0033] In an implementation, the method further comprises:
[0034] receiving at least one scheduling designation instruction sent by a user from the user list, and parsing the at least one scheduling designation instruction to obtain at least one designated task that the user needs to schedule;
[0035] generating a designated task list according to the at least one designated task;
[0036] if there is a designated task ranked first in the designated task list, executing the first designated task, and for target designated tasks from the second to the Nth in the designated task list, performing task scheduling according to the scheduling priority once, and after each scheduling execution is completed, reducing the task position in the designated task list by 1 until all designated tasks in the designated task list are executed; wherein N is a positive integer;
[0037] if there is no designated task ranked first in the designated task list or no designated task, performing task scheduling according to the scheduling priority, and after each scheduling execution is completed, reducing the task position in the designated task list by 1 until all designated tasks in the designated task list are executed.
[0038] In a second aspect, the application provides a device for scheduling air conditioner energy consumption calculation tasks, which comprises:
[0039] a first obtaining module for obtaining a user list of users to be executed with air conditioner energy consumption calculation tasks and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task;
[0040] an initial scheduling priority value determining module for determining the initial scheduling priority value of each user according to the user list;
[0041] a second obtaining module for obtaining the execution time of the historical tasks executed by each user in the user list and an identifier of whether the historical tasks are successfully executed;
[0042] a time priority value determining module for determining the time priority value of each user according to the execution time;
[0043] a success priority value determining module for determining the success priority value of the task execution of each user according to the identifier;
[0044] a scheduling priority determining module for determining the scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value;
[0045] The scheduling module is configured to schedule the user air conditioner energy consumption calculation task based on the scheduling priority of the user list.
[0046] In a third aspect, the present application provides a server comprising a memory and a processor.
[0047] The memory is configured to store a computer program comprising program instructions.
[0048] The processor is configured to execute the program instructions to cause the electronic device to perform the steps of the air conditioner energy consumption calculation task scheduling method according to the first aspect of the present application.
[0049] Compared with the prior art, the present application has the following beneficial effects:
[0050] 1. The present application improves the processing efficiency and resource utilization of task scheduling. The present application identifies and prioritizes the tasks of efficient users through a dynamic priority scheduling mechanism, while reducing the priority of inefficient users. The dynamic algorithm based on user historical performance effectively avoids the problem of long-term occupation of computing resources by inefficient tasks, significantly improves the overall processing efficiency of the server, enables a large number of energy consumption calculation tasks to be completed in a timely manner, and optimizes the allocation and utilization of system resources.
[0051] 2. The present application enhances the fairness and flexibility of task scheduling. The use of equal opportunity rules and hierarchical authority design ensures that all users' tasks can obtain fair scheduling opportunities, while allowing ordinary users to adjust task priorities independently and super users to intervene in emergency tasks globally. Therefore, the present application ensures the basic fairness of task scheduling while meeting the flexible scheduling needs in different scenarios, adapts to complex environments with multiple users, and is particularly suitable for intelligent air conditioner energy consumption management scenarios that need to balance fairness and emergency task processing.
[0052] 3. The present application optimizes the real-time and accuracy of energy consumption management. Through a centralized task processing framework combined with a dynamic priority algorithm, the server computing power can be more reasonably allocated to avoid resource waste. The intelligent scheduling mechanism reduces the resource occupation of inefficient tasks, concentrates computing power on key tasks, and thus improves the real-time and accuracy of intelligent air conditioner energy consumption monitoring, early warning and control, providing reliable technical support for energy efficiency management of large-scale intelligent air conditioner systems. BRIEF DESCRIPTION OF DRAWINGS
[0053] The accompanying drawings, which are included to provide a further understanding of the embodiments of the present application and constitute a part of this application, do not constitute a limitation to the embodiments of the present application. In the drawings:
[0054] Figure 1 A flowchart of an air conditioner energy consumption calculation task scheduling method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application with reference to the embodiments and drawings, the illustrative embodiments of the present application and the description thereof are only used to explain the present application, and do not limit the present application.
[0056] It should be noted that the term "include" or "may include" used in various embodiments of the present application indicates the existence of the applied function, operation or element, and does not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their synonyms only mean to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing, and should not be understood as first excluding the existence or addition of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing, or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing.
[0057] It should be understood that terms such as "first", "second" are only used for description purposes, and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0058] First, the general user and the super user of the present application, and the air conditioner energy consumption calculation task are defined, different users have different energy consumption calculation requests, the general user can submit the intelligent air conditioner energy consumption calculation task managed by himself, and the super user can uniformly adjust the priority of different tasks. The super user can specify the priority of executing all tasks in the background, and uniformly manage and schedule the energy consumption calculation task.
[0059] Figure 1 The flowchart of the scheduling method of the air conditioner energy consumption calculation task provided by the embodiment of the present application is shown as Figure 1 The method comprises the following steps:
[0060] S101, a user list to be executed air conditioner energy consumption calculation task is obtained, and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task.
[0061] Specifically, the embodiment first defines the ordinary user and the super user, the ordinary user is in the energy consumption calculation management system of the Internet of Things device, there are m users, each user can submit an energy consumption calculation request and adjust the priority of the task calculation for the intelligent air conditioner managed by the user, the embodiment defines the user list as: .
[0062] The super user can specify the priority of all tasks executed in the background, and uniformly manage and schedule the energy consumption calculation tasks, that is, the super user can uniformly adjust the priority of different tasks.
[0063] The embodiment first clearly defines the air conditioner energy consumption calculation task. Assuming that the user submits a task list , then for the jth task: wherein, represents the ith user, represents the creation time of the jth task created by the ith user, represents the execution time of the jth task created by the ith user, represents whether the jth task created by the ith user is executed successfully, 1 represents execution failure, and 0 represents execution success.
[0064] When the user creates a task, the priority is scheduled according to the order of the creation time.
[0065] The user list that needs to execute the air conditioner energy consumption calculation task is initialized as: , represents null. If is null, the user creates a task at time , then the user list currently executing the task is: , The user execution task list corresponding to the user is: , and the task information corresponding to the user is: .
[0066] The same user creates a task, for example, the user creates a task at time , then the user list currently executing the task is still: , The user execution task list corresponding to the user is: , and the task information corresponding to the user is: .
[0067] Different users create tasks, assuming that the user creates a task ) create task , the current user list of executing tasks is: , corresponding to the user executing task list is: , the corresponding task information is: .
[0068] Repeat the process of creating a task by the user described above, that is, the user list of executing tasks and all tasks can be obtained, and the current user list of executing tasks is: , the executing task list of the user is: The number of tasks to be executed by different users can be different.
[0069] S102, determine the initial scheduling priority value of each user according to the user list.
[0070] In this embodiment, according to the user list described in step S101 above, the initial priority of each user is determined first, that is, the initial scheduling priority value of each user is determined according to the order of each user in the user list. Specifically, assuming that the user list of tasks to be executed is , the initial priority of the corresponding user is: , wherein , The smaller the value is, the higher the priority is.
[0071] S103, obtain the execution time of the historical task executed by each user in the user list and the identifier of whether the historical task is executed successfully.
[0072] In this embodiment, due to the traditional static queuing method according to the task creation time, different urgent computing requirements cannot be recognized and responded, resulting in that the urgent energy consumption warning and control instruction is often placed at the back end, which seriously affects the real-time response ability of the intelligent air conditioning system and cannot meet the timeliness requirement of modern energy consumption management.
[0073] The present application provides an algorithm for automatically adjusting the user scheduling priority according to the average execution of the user and the execution success rate, so as to avoid that some users with long average execution time or high execution failure rate occupy system resources for a long time. Therefore, the historical performance of the user task is obtained in this embodiment, that is, the execution time of the historical task and the identifier of whether the historical task is executed successfully, wherein the identifier of whether the historical task is executed successfully is taken as an example, 1 represents execution failure, and 0 represents execution success.
[0074] S104, determine the time priority value of each user according to the execution time.
[0075] In this embodiment, in determining the time priority value for each user, firstly, the average execution time of each user's tasks is calculated based on the execution time of each user's historical tasks and the number of historical tasks that have been completed; finally, the time priority value for each user is determined based on the average task execution time of each user.
[0076] It can be calculated according to the following formula Calculate the average task execution time, and then use the following formula Calculate the time priority value for each user.
[0077] Understandably, the longer the average execution time, the more users... The lower the priority, The larger the value. This is a constant coefficient used to adjust the weight of the average execution time priority. m is the user... The number of tasks that have been completed. This can be seen from the formula. The range of values is .
[0078] S105, determine the success priority value for each user task execution based on the identifier.
[0079] In this embodiment, in determining the success priority value of each user's task execution, firstly, the number of tasks that failed to execute in each user's historical tasks is determined based on the identifier of whether each user's historical tasks were successfully executed; finally, based on the number of tasks that failed to execute in historical tasks, combined with the total number of tasks that each user has completed, the success priority value of each user is determined.
[0080] Specifically, it involves counting the number of completed tasks that were either successfully executed or failed. Indicates user middle The number of records. Indicates user The total number of times all tasks are executed is then: , It is a constant coefficient used to adjust the weight of task execution failure. This represents the priority of a user's task execution success.
[0081] S106. Determine the scheduling priority of the user list based on the initial scheduling priority value, time priority value, and success priority value.
[0082] In the embodiment, the algorithm for adjusting the user scheduling priority according to the average task execution time length and the task execution failure rate of the user avoids that some users with long average execution task time or high execution failure rate occupy system resources for a long time. Therefore, the embodiment introduces a dynamic priority algorithm based on user historical performance. The algorithm first determines the scheduling priority of each user according to the sum of the initial scheduling priority value, the time priority value and the success priority value of each user; finally, the scheduling priority of each user is sorted in ascending order to obtain the scheduling priority of the user list. The mechanism automatically calculates the scheduling priority of each user through the formula The smaller the value of the scheduling priority is, the higher the task scheduling priority of the user is. The time priority value of the average task execution time length of the user and the success priority value of the task execution of the user are two core dynamic variables, which automatically reduce the priority of the user with low execution efficiency or high failure rate, thereby intelligently and efficiently allocating system computing resources, preventing resources from being occupied by inefficient users for a long time, and significantly improving the overall processing efficiency.
[0083] It can be seen that the application improves the processing efficiency and resource utilization rate of task scheduling. The application identifies and processes the tasks of efficient users in priority through a dynamic priority scheduling mechanism, reduces the priority of inefficient users, and effectively avoids the problem that computing resources are occupied by inefficient tasks for a long time based on the dynamic algorithm of user historical performance, thereby significantly improving the overall processing efficiency of the server, enabling a large number of energy consumption calculation tasks to be completed in time, and optimizing the allocation and utilization of system resources.
[0084] S107, scheduling the user air conditioner energy consumption calculation task based on the scheduling priority of the user list.
[0085] In the embodiment, the task scheduling sequentially calls the first task of each user according to the user priority order, thereby ensuring that the scheduling opportunities of all users are equal. In addition, the scheduling priority of the user with long average execution task time and low task execution success rate needs to be reduced. The ordinary user can adjust the priority of the submitted task, and the super user can adjust the priority of all tasks.
[0086] In some embodiments, scheduling user air conditioning energy consumption calculation tasks based on the scheduling priority of the user list includes: selecting the corresponding scheduling user from the user list in ascending order of scheduling priority; if the scheduling user's task list contains only one task, deleting the scheduling user from the user list after the task is completed; if the scheduling user's task list contains multiple tasks, executing the task with the highest priority in order of task priority, moving the scheduling user to the end of the user list after execution, updating the user list, and determining the execution time and success identifier of the highest priority task; recalculating the new scheduling priority for the updated user list; and scheduling the tasks of each user in the updated user list based on the new scheduling priority.
[0087] Specifically, regarding the user scheduling priority defined in step S106 above... ,according to Tasks are scheduled in ascending order of their values, with the highest priority task being scheduled first. The user with the smallest value List of tasks to be executed The first task .
[0088] If user The list of tasks to be executed contains only one task. Then the task After execution, From the list of users who have tasks to perform Delete, get ,That List of tasks to be executed for .
[0089] If user If the number of tasks in the pending task list is greater than 1, then the task... After execution, the user Move to the list of users with tasks to perform. The last one, got ,That List of tasks to be executed for .
[0090] Then calculate the task execution time. If the task fails, then If the task is executed successfully, then At the same time, for the new user list Recalculate the scheduling priority of each user in the new user list according to steps S102-S106 above. .
[0091] Therefore, the application enhances the fairness and flexibility of task scheduling by using the equal opportunity rule and hierarchical permission design, that is, the task list of each user only schedules one to-be-computed task for computation, and after the scheduling is completed, the user who has executed the scheduled task is no longer a scheduling object of the user priority list, so that all users' tasks can obtain fair scheduling opportunities, and ordinary users can also adjust the task priority. This design not only guarantees basic fairness, but also meets the flexible scheduling requirements in different scenarios, adapts to complex multi-user environments, and is particularly suitable for intelligent air conditioner energy management scenarios that need to consider fairness and emergency task processing.
[0092] In some embodiments, the method further comprises adjusting the task order of the task list of the scheduled user, and scheduling according to the adjusted task list.
[0093] Specifically, the ordinary user can also adjust the priority of task execution, that is, manually adjust a certain task of the task list of the user to the front row, for example, to adjust the task to the second position of the task list, and the adjusted task list is: , and the task scheduling is performed according to the list order of the adjusted .
[0094] In some embodiments, the method further comprises receiving at least one scheduling specification instruction sent by a user from the user list, parsing the at least one scheduling specification instruction to obtain at least one specified task that the user needs to schedule, generating a specified task list according to the at least one specified task, if there is a specified task that is executed in the first position in the specified task list, executing the first specified task, and for target specified tasks from the second position to the Nth position of the specified task list, performing task scheduling according to the scheduling priority, reducing the task position of the remaining tasks in the specified task list by 1 after each scheduling execution is completed, and until all specified tasks in the specified task list are executed; wherein N is a positive integer; if there is no specified task that is executed in the first position in the specified task list or no specified task, performing task scheduling according to the scheduling priority, reducing the task position of the remaining tasks in the specified task list by 1 after each scheduling execution is completed, and until all specified tasks in the specified task list are executed.
[0095] Specifically, the embodiment relates to the adjustment of the priority of a super user. For example, a scheduling specification instruction sent by a user is received, at least one scheduling specification instruction is parsed to obtain at least one specified task that the user needs to schedule, and the task is specified to be executed in the first position among all tasks. is recorded. , add the execution task list of super user , let: , and remove from the task list ; if the task of the specified user is executed in the first position of all tasks , it is recorded as . Finally, the .
[0096] First, ensure that the task adjusted by the super user is executed within the specified time, and then schedule according to the calculated task order.
[0097] Case 1: if there is a task in the list executed in the first position , execute the task first, then schedule the tasks according to the order of the scheduling priority defined in the implementation process of steps S102-S106 above, and after execution, reduce the position of the remaining tasks in by 1 to obtain .
[0098] Case 2: if there is no task or no task in the list , directly schedule the tasks according to the order defined in S301 and S302 rules, and after execution, reduce the position of the tasks in by 1 to obtain .
[0099] According to case 1 and case 2, execute task scheduling until all tasks are executed.
[0100] As can be seen, on the basis of allowing ordinary users to adjust the priority of tasks independently, the application introduces a super user to globally intervene in the emergency tasks of ordinary users. This design ensures basic fairness while meeting the flexible scheduling needs of different scenarios, adapts to complex environments for multiple users, and is particularly suitable for intelligent air conditioning energy management scenarios that need to balance fairness and emergency task processing, enhancing the fairness and flexibility of task scheduling.
[0101] The application proposes a multi-rule strategy that balances fairness and privileged intervention, and designs multi-level rules to balance fairness and management needs. The user opportunity equality rule ensures that all users' tasks have the opportunity to be scheduled, rather than simply following the time sequence. At the same time, hierarchical adjustment permissions are introduced, i.e. ordinary users can adjust the order of their own tasks, while super users have global permissions to specify the absolute execution order of any user's task list Thus, the actual needs of emergency task priority processing and flexible intervention of system administrator are met under the premise of ensuring basic fairness.
[0102] The embodiment of the present application also provides a scheduling device for air conditioner energy consumption calculation tasks, which comprises:
[0103] The first obtaining module is used for obtaining a user list to be executed with air conditioner energy consumption calculation tasks and a task list of each user in the user list, wherein the priority order of each task in the task list is determined according to the time when the user creates the task;
[0104] The initial scheduling priority value determining module is used for determining the initial scheduling priority value of each user according to the user list;
[0105] The second obtaining module is used for obtaining the execution time of each user to execute historical tasks and an identifier of whether the historical tasks are executed successfully;
[0106] The time priority value determining module is used for determining the time priority value of each user according to the execution time;
[0107] The success priority value determining module is used for determining the success priority value of each user to execute tasks according to the identifier;
[0108] The scheduling priority determining module is used for determining the scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value;
[0109] The scheduling module is used for scheduling the air conditioner energy consumption calculation tasks of the user based on the scheduling priority of the user list.
[0110] Correspondingly, the scheduling device provided by the embodiment has the following beneficial effects:
[0111] 1. The present application improves the processing efficiency and resource utilization rate of task scheduling. The present application identifies and prioritizes the tasks of efficient users through a dynamic priority scheduling mechanism, while reducing the priority of inefficient users. The dynamic algorithm based on the historical performance of the user effectively avoids the problem that the computing resources are long-term occupied by inefficient tasks, significantly improves the overall processing efficiency of the server, makes a large number of energy consumption calculation tasks be completed in time, and optimizes the allocation and utilization of system resources.
[0112] 2、The application enhances the fairness and flexibility of task scheduling, adopts user opportunity equality rules and hierarchical permission design, ensures that all users' tasks can obtain fair scheduling opportunities, allows ordinary users to independently adjust task priorities, and super users to globally intervene in emergency tasks, meets flexible scheduling requirements in different scenarios, adapts to multi-user complex environments, and is especially suitable for intelligent air conditioner energy consumption management scenarios that need to consider fairness and emergency task processing.
[0113] 3、The application optimizes the real-time and accuracy of energy consumption management, can more reasonably allocate server computing power through a centralized task processing framework combined with a dynamic priority algorithm, avoids resource waste, and reduces resource occupation of inefficient tasks through an intelligent scheduling mechanism, so that computing power is concentrated on key tasks, thereby improving the real-time and accuracy of intelligent air conditioner energy consumption monitoring, early warning and control, and providing reliable technical support for energy efficiency management of large-scale intelligent air conditioner systems.
[0114] Embodiments of the application also provide a server. The server includes a processor, a memory, a communication interface and at least one communication bus for connecting the processor, the memory and the communication interface. The memory includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM) or a portable read-only memory (CD-ROM), and is used for related instructions and data.
[0115] The communication interface is used to receive and send data. The processor can be one or more CPUs, and in the case of one CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor in the server is used to read one or more programs stored in the memory, and perform the following operations: obtaining a user list to be executed for air conditioner energy consumption calculation tasks and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task; determining an initial scheduling priority value of each user according to the user list; obtaining the execution time of each user's historical task and an identifier of whether the historical task is successfully executed; determining a time priority value of each user according to the execution time; determining a success priority value of each user's task execution according to the identifier; determining a scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value; and scheduling the user air conditioner energy consumption calculation task based on the scheduling priority of the user list.
[0116] It should be noted that the specific implementation of each operation can be described above Figure 1 The server can be used to execute the above-mentioned method embodiment of the application, and the specific description of the method embodiment is not repeated here.
[0117] The computer readable storage medium can be a built-in storage medium of the computer device, and of course can be an extended storage medium supported by the computer device. The computer readable storage medium provides a storage space, and the storage space stores an operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium can be a high-speed RAM memory or a non-volatile memory such as at least one disk memory. The one or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the above-mentioned scheduling method for an air conditioner energy consumption calculation task. It should be understood by those skilled in the art that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0118] The computer program product can be software or a program product containing program instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one server, the at least one server is caused to perform the above-mentioned scheduling method for an air conditioner energy consumption calculation task.
[0119] The above detailed description is further used to explain the purpose, technical solutions and advantages of the present application. It should be understood that the above detailed description is only a specific embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for scheduling an air conditioner energy consumption calculation task, characterized in that, The method comprises: obtaining a user list to be executed by an air conditioner energy consumption calculation task, and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task; determining an initial scheduling priority value of each user according to the user list; obtaining the execution time of each user to execute a historical task and an identifier of whether the historical task is successfully executed; determining a time priority value of each user according to the execution time; determining a success priority value of each user to execute a task according to the identifier; determining a scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value; scheduling the air conditioner energy consumption calculation task of the user based on the scheduling priority of the user list; wherein scheduling the air conditioner energy consumption calculation task of the user based on the scheduling priority of the user list comprises: selecting a corresponding scheduling user from the user list in the order of the scheduling priority from small to large; if the task list of the scheduling user contains only one task, deleting the scheduling user from the user list after the task is executed; if the task list of the scheduling user contains multiple tasks, executing the task with the highest priority according to the priority order of the tasks, moving the scheduling user to the end of the user list after the execution is completed to update the user list, and determining the execution time of the task with the highest execution priority and the identifier of whether the execution is successful; recalculating a new scheduling priority for the updated user list; and scheduling the task of each user in the updated user list based on the new scheduling priority.
2. The method of claim 1, wherein, The initial scheduling priority value of each user is determined according to the order of each user in the user list.
3. The method of claim 1, wherein the task is a task of calculating energy consumption of an air conditioner. The time priority value of each user is determined according to the execution time, specifically: The average execution time of each user task is calculated according to the execution time of each user to execute a historical task and the number of completed historical tasks; The time priority value of each user is determined according to the average task execution time of each user.
4. The method of claim 1, wherein, The success priority value of each user task execution is determined according to the identifier, specifically: The number of failed tasks of each user historical task is determined according to the identifier of whether the historical task is successfully executed; The success priority value of each user is determined based on the number of historical task execution failures and the total number of completed tasks of each user.
5. The method of claim 1, wherein, The scheduling priority of the user list is determined according to the initial scheduling priority value, the time priority value and the success priority value of each user, specifically: The scheduling priority value of each user is determined according to the sum of the initial scheduling priority value, the time priority value and the success priority value of each user; The scheduling priority of the user list is obtained by sorting the scheduling priority value of each user in the order from small to large.
6. The method of claim 1, wherein, The method further comprises adjusting the task order of the task list of the scheduling user and scheduling according to the adjusted task list.
7. The method of claim 1, wherein the tasks are scheduled in a manner that the tasks are executed in a sequence of: a first task of the tasks, a second task of the tasks, a third task of the tasks, and a fourth task of the tasks. The method further comprises: Receiving at least one scheduling designation instruction sent by a user in a user list, parsing the at least one scheduling designation instruction to obtain at least one designated task that the user needs to schedule; Generating a designated task list according to the at least one designated task; If there is a designated task ranked first in the designated task list, executing the first designated task, and for target designated tasks ranked second to Nth in the designated task list, performing task scheduling according to the scheduling priority, and after each scheduling execution is completed, reducing the task position in the designated task list by 1 until all designated tasks in the designated task list are executed; wherein N is a positive integer; If there is no designated task ranked first in the designated task list or no designated task, performing task scheduling according to the scheduling priority, and after each scheduling execution is completed, reducing the task position in the designated task list by 1 until all designated tasks in the designated task list are executed.
8. A scheduling device for air conditioning energy consumption calculation tasks, characterized in that, The device comprises: A first obtaining module configured to obtain a user list of users to be executed with air conditioner energy consumption calculation tasks and a task list of each user in the user list; wherein the priority order of each task in the task list is determined according to the time when the user creates the task; An initial scheduling priority value determining module configured to determine an initial scheduling priority value of each user according to the user list; A second obtaining module configured to obtain the execution time of a historical task executed by each user in the user list and an identifier of whether the historical task is successfully executed; A time priority value determining module configured to determine a time priority value of each user according to the execution time; A success priority value determining module configured to determine a success priority value of the task execution of each user according to the identifier; A scheduling priority determining module configured to determine a scheduling priority of the user list according to the initial scheduling priority value, the time priority value and the success priority value; A scheduling module configured to schedule the air conditioner energy consumption calculation tasks of the users based on the scheduling priority of the user list; wherein scheduling the air conditioner energy consumption calculation tasks of the users based on the scheduling priority of the user list comprises: selecting a corresponding scheduling user from the user list in the order of the scheduling priority from small to large; if the task list of the scheduling user contains only one task, deleting the scheduling user from the user list after the task is executed; if the task list of the scheduling user contains multiple tasks, executing the task with the highest priority according to the priority order of the tasks, moving the scheduling user to the last position of the user list to update the user list after the execution is completed, and determining the execution time of the task with the highest priority and the identifier of whether the execution is successful; recalculating a new scheduling priority for the updated user list; and scheduling the tasks of each user in the updated user list based on the new scheduling priority.
9. A server, characterized by comprise a memory and a processor; The memory is configured to store a computer program, and the computer program comprises program instructions; The processor is configured to execute the program instructions to enable the server to perform the steps of the air conditioner energy consumption calculation task scheduling method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cloud platform task scheduling method, computer equipment and storage medium
CN118869817A
Heterogeneous computing power scheduling method and device, equipment, storage medium and product
CN119781990A