Resource scheduling strategy determination method and device, equipment, storage medium and program product
By using the vehicle Markov decision model in the Internet of Vehicles, the target vehicle that performs the computing task and its resource allocation strategy are determined, which solves the problems of inflexible computing resource utilization and increased task delay in the existing technology, and achieves efficient and real-time Computational resource scheduling.
Patent Information
- Application Number
- CN202411495326.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-18
AI Technical Summary
The existing resource scheduling strategies in the Internet of Vehicles are difficult to flexibly utilize computing resources, resulting in wasted computing resources and the computing tasks cannot be processed in a timely manner when the task delay increases.
By obtaining the vehicle's calculation task feature information and idle resources, the vehicle Markov decision model uses the vehicle to determine the target vehicle and its resource allocation strategy for performing the calculation task under the optimization goal of minimizing the execution time function and maximizing the utility function.
It realizes flexible computing resource scheduling, reduces task delay, improves the utilization rate of computing resources, meets the real-time requirements of computing tasks, and reduces the waste of computing resources.
Smart Images

Figure CN119473536A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of network resource allocation, and in particular, relates to a resource scheduling strategy determination method, device, equipment, storage medium and program product. Background Art
[0002] The Internet of Vehicles refers to a huge network consisting of information such as vehicle location, speed, and route. The Internet of Vehicles mainly includes two communication modes: communication between vehicles and communication between vehicles and base stations. With the emergence of applications such as smart cities, smart transportation, and autonomous driving in the Internet of Vehicles, more stringent requirements have been put forward in terms of increasing computing power, reducing task delays, and enhancing service quality.
[0003] At present, with the development of technology, drone-assisted and digital twin technologies have been introduced into the Internet of Vehicles scenario to solve the resource scheduling problem. However, when using drone-assisted and digital twin technologies for resource allocation, usually only a single offloading solution of local task execution, offloading to drones, or offloading to base stations is considered. The computing resources cannot be flexibly utilized, resulting in a waste of computing resources. At the same time, when offloading to drones or base stations, task delays are increased and computing tasks cannot be processed in a timely manner. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for determining a resource scheduling strategy, which can flexibly schedule computing resources and reduce task delays.
[0005] On the one hand, an embodiment of the present application provides a method for determining a resource scheduling strategy, the method comprising:
[0006] Acquire task characteristic information of a computing task of a first vehicle, a first idle resource of the first vehicle, and a second idle resource of at least one second vehicle, wherein the task characteristic information includes required resources of the computing task;
[0007] In a case where the first idle resources are less than the required resources of the computing task, determining a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task characteristic information and the second idle resources;
[0008] When the resources required by the computing task are less than the second idle resources, the computing task is input into the vehicle Markov decision model, and the first execution time function is minimized and the first utility function is maximized as the optimization objectives. The computing task is processed using the vehicle Markov decision model to obtain a first resource scheduling strategy for the computing task, wherein the first resource scheduling strategy includes a target second vehicle for executing the computing task and its corresponding resource allocation strategy.
[0009] Optionally, before determining the first execution duration function and the first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource, the method further includes:
[0010] Respectively obtaining first digital twin information of the base station, second digital twin information of the second vehicle, and third digital twin information of the first vehicle;
[0011] Constructing a base station twin according to the first digital twin information of the base station;
[0012] Constructing a second vehicle twin according to the second digital twin information of the second vehicle;
[0013] Constructing a first vehicle twin according to the third digital twin information of the first vehicle;
[0014] Building a resource scheduling twin system according to the base station twin, the second vehicle twin and the first vehicle twin;
[0015] The determining, based on the task feature information and the second idle resource, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task includes:
[0016] In the resource scheduling twin system, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task are determined based on the task feature information and the second idle resource.
[0017] Optionally, in the resource scheduling twin system, determining a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes:
[0018] Obtaining a first transmission duration of the computing task between the first vehicle and the second vehicle, a first waiting duration of the computing task in the second vehicle, and a first processing duration of the computing task executed by the second vehicle;
[0019] Calculating the sum of the first transmission duration, the first waiting duration and the first processing duration to obtain a first execution duration function of the second vehicle executing the computing task;
[0020] Acquire a first energy loss when the computing task is transmitted between the first vehicle and the second vehicle, a second energy loss when the second vehicle executes the computing task, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0021] calculating a sum of the first energy loss, the second energy loss and the energy loss deviation to obtain a first total energy loss of the second vehicle;
[0022] A first utility function for the second vehicle to execute the computing task is determined according to the first execution time, the first total energy loss, the preset execution cost and the preset utility coefficient.
[0023] Optionally, the task characteristic information also includes computing task attributes;
[0024] In the case where the computing task attribute is determined to be a separable attribute, determining a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes:
[0025] Splitting the computing task to obtain multiple computing subtasks;
[0026] Obtaining a second transmission duration for each of the computing subtasks to be transmitted between the first vehicle and each of the second vehicles, a second waiting duration for each of the computing subtasks in the second vehicle, and a second processing duration for executing the computing subtasks;
[0027] Calculating the sum of the second transmission time, the second waiting time, and the second processing time to obtain a second execution time function of the second vehicle executing the computing task;
[0028] Determine the second execution duration function as a new first execution duration function;
[0029] Obtaining a third energy loss of each computing subtask transmitted between the first vehicle and the second vehicle, a fourth energy loss of each second vehicle executing the computing subtask, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0030] calculating a sum of the third energy loss, the fourth energy loss and the energy loss deviation to obtain a second total energy loss of the second vehicle;
[0031] determining a second utility function of the second vehicle according to the second execution time, the second total energy loss, a preset execution cost, and a preset utility coefficient;
[0032] The second utility function is determined as a new first utility function.
[0033] Optionally, the task characteristic information also includes calculating the actual size of the task;
[0034] Before inputting the computing task into the vehicle Markov decision model, the method further includes:
[0035] Acquire first status information of the first vehicle and second status information of the second vehicle, wherein the first status information includes the number of first vehicles and the corresponding computing resource size, and the first vehicle position, and the second status information includes the number of second vehicles and the corresponding computing resource size, and the second vehicle position;
[0036] constructing a vehicle state space based on the actual size of the computing task, the first state information, and the second state information;
[0037] determining a set of available second vehicles based on the first vehicle position, the second vehicle position, and a preset transmission distance;
[0038] constructing a vehicle action space based on the available second vehicle set;
[0039] Determine the vehicle incentive function based on the execution time corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0040] A vehicle Markov decision model is constructed according to the vehicle state space, the vehicle action space and the vehicle incentive function.
[0041] Optionally, the computing task is input into a vehicle Markov decision model, with minimization of execution time function and maximization of utility function as optimization objectives, and the computing task is processed using the vehicle Markov decision model to obtain a first resource scheduling strategy for the computing task, including:
[0042] Initializing network parameters and target weights of the vehicle Markov decision model;
[0043] Selecting a preset number of prediction samples in the state space of the vehicle Markov decision model;
[0044] Calculating the function values of the double Q functions of the predicted samples respectively;
[0045] When the function value of the double Q function does not meet the preset convergence condition, the network parameters and the target weight are updated to adjust the adjustment parameters of the vehicle Markov decision model until the double Q function meets the preset convergence condition, and the first resource scheduling strategy corresponding to the minimum double Q function is output.
[0046] Optionally, when the computing task required resources are greater than or equal to the second idle resources, the method further includes:
[0047] Acquire a third idle resource of the base station;
[0048] Determine, based on the task feature information and the third idle resource, a third execution duration function and a third utility function corresponding to the base station executing the computing task;
[0049] The computing task is input into the base station Markov decision model, with minimization of the third execution time function and maximization of the third utility function as optimization goals, and the computing task is processed using the base station Markov decision model to obtain a second resource scheduling strategy, wherein the second resource scheduling strategy includes a target base station that executes the computing task and its corresponding resource allocation strategy.
[0050] Optionally, in the resource scheduling twin system, determining a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource includes:
[0051] Obtaining a third transmission duration of the computing task between the first vehicle and the base station, a third waiting duration of the computing task at the base station, and a third processing duration of the base station executing the computing task;
[0052] Calculating the sum of the third transmission duration, the third waiting duration and the third processing duration to obtain a third execution duration function of the base station executing the computing task;
[0053] Obtaining a fifth energy loss of transmitting the computing task between the first vehicle and the base station, a sixth energy loss of the base station executing the computing task, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0054] Calculating a sum of the fifth energy loss, the sixth energy loss and the energy loss deviation to obtain a third total energy loss of the base station;
[0055] A third utility function of the base station executing the computing task is determined according to the third execution duration, the third total energy loss, the preset execution cost and the preset utility coefficient.
[0056] Optionally, the resource scheduling twin system further includes a plurality of drones, which are respectively communicatively connected with the base station twin, the first vehicle twin and at least one second vehicle twin;
[0057] In the resource scheduling twin system, determining a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource, further comprising:
[0058] Obtaining a fourth transmission duration of the computing task from the first vehicle to the drone, a fifth transmission duration of the computing task from the drone to the neighboring base station, and a fourth processing duration of the computing task by the neighboring base station;
[0059] Calculating the sum of the fourth transmission duration, the fifth transmission duration and the fourth processing duration to obtain a fourth execution duration function of the neighboring base station performing the calculation task;
[0060] Determining the fourth execution duration function as a new third execution duration function;
[0061] Obtaining a seventh energy loss of transmitting the computing task from the first vehicle to the drone, an eighth energy loss of transmitting the computing task between the drone and a neighboring base station, and a ninth energy loss of processing the computing task by the neighboring base station;
[0062] Calculating the sum of the seventh energy loss, the eighth energy loss, the ninth energy loss and the energy loss deviation to obtain a fourth total energy loss;
[0063] Determining a fourth utility function of the base station executing the computing task according to the fourth execution duration, the fourth total energy loss, the preset execution cost and the preset utility coefficient;
[0064] The fourth utility function is determined as a new third utility function.
[0065] Optionally, before inputting the computing task into the base station Markov decision model, the method further includes:
[0066] Acquire third state information of the base station, the third state information including the number of base stations, the size of computing resources corresponding to each base station, and the base station location;
[0067] Constructing a base station state space based on the actual size of the computing task and the third state information;
[0068] Determining a set of available base stations based on the first vehicle position, the base station position, and a preset transmission distance;
[0069] Based on the set of available base stations, construct a base station action space;
[0070] Determine the base station incentive function based on the utility function corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0071] A base station Markov decision model is constructed according to the base station state space, the base station action space and the base station excitation function.
[0072] On the other hand, an embodiment of the present application provides a resource scheduling strategy determination device, the device comprising:
[0073] an acquisition module, configured to acquire task characteristic information of a computing task of a first vehicle, a first idle resource of the first vehicle, and a second idle resource of at least one second vehicle, wherein the task characteristic information includes required resources of the computing task;
[0074] a determination module, configured to determine, when the first idle resources are less than the required resources of the computing task, a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task characteristic information and the second idle resources;
[0075] An optimization module is used to input the computing task into a vehicle Markov decision model when the resources required by the computing task are less than the second idle resources, and use the vehicle Markov decision model to process the computing task with minimization of the execution time function and maximization of the utility function as optimization goals to obtain a first resource scheduling strategy for the computing task, wherein the first resource scheduling strategy includes a target second vehicle that executes the computing task and its corresponding resource allocation strategy.
[0076] In another aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0077] When the processor executes the computer program instructions, the resource scheduling strategy determination method as described in the first aspect is implemented.
[0078] On the other hand, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the resource scheduling strategy determination method described in the first aspect is implemented.
[0079] On the other hand, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the resource scheduling strategy determination method as described in the first aspect.
[0080] The resource scheduling strategy determination method, device, equipment and computer storage medium of the embodiment of the present application, in the embodiment of the present application, when the first idle resource of the first vehicle does not meet the resources required for executing the computing task, the first execution time function and the first utility function of the second vehicle are determined according to the task feature information and the second idle resource of the second vehicle, and then the target second vehicle for executing the computing task and the resources that need to be occupied by the target second vehicle are determined within the vehicle Markov decision model with the minimization of the first execution time function and the maximization of the first utility function as the optimization goals, and for the vehicle set, the determined target second vehicle is used to execute the computing task, and compared with other second vehicles, the first execution time function value is the smallest and the first utility function value is the largest, that is, the computing task can be executed fastest and the utilization rate of the second idle resources can be maximized, which can not only meet the real-time requirements of the computing task, but also reduce the waste of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0082] Figure 1 It is a structural diagram of a resource scheduling system provided by an embodiment of the present application;
[0083] Figure 2 It is a flowchart of a method for determining a resource scheduling strategy provided by an embodiment of the present application;
[0084] Figure 3 is a flowchart of a method for determining a resource scheduling strategy provided by another embodiment of the present application;
[0085] Figure 4 is a structural diagram of a resource scheduling strategy determination device provided by another embodiment of the present application;
[0086] Figure 5 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0087] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0088] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0089] In order to solve the problems of the prior art, embodiments of the present application provide a method, apparatus, device, storage medium and program product for determining a resource scheduling strategy.
[0090] In an embodiment of the present application, when the first idle resources of the first vehicle do not meet the resources required for executing the computing task, the first execution time function and the first utility function of the second vehicle are determined according to the task feature information and the second idle resources of the second vehicle. Then, within the vehicle Markov decision model, the first execution time function minimization and the first utility function maximization are used as optimization goals to determine the target second vehicle for executing the computing task and the resources that need to be occupied by the target second vehicle. For the vehicle set, the determined target second vehicle is used to execute the computing task. Compared with other second vehicles, the first execution time function value is the smallest and the first utility function value is the largest, that is, the computing task can be executed fastest and the utilization rate of the second idle resources can be maximized, which can not only meet the real-time requirements of the computing task, but also reduce the waste of computing resources.
[0091] The following first introduces the resource scheduling system provided in the embodiment of the present application.
[0092] Reference Figure 1 , Figure 1 The system architecture of a resource scheduling system is shown. The resource scheduling system includes a vehicle set and multiple base stations, wherein the vehicle set includes multiple vehicles, and each vehicle in the vehicle set is wirelessly connected to the multiple base stations.
[0093] Computing tasks are distributed on each vehicle. The computing tasks can be executed on the first vehicle, or can be transmitted wirelessly to a base station and executed by the base station. The computing tasks can also be transmitted via the base station to the second vehicle, and the computing resources of the second vehicle are used to execute the computing tasks.
[0094] In some embodiments, the resource scheduling system also includes a scheduling server, which can control the transmission of computing tasks between vehicles and base stations, and determine the execution entity that executes the computing tasks to achieve flexible scheduling of computing resources for each execution entity in the resource scheduling system, wherein the execution entity can be a base station or a vehicle.
[0095] In some other embodiments, the resource scheduling system also includes multiple drones, each of which can wirelessly connect to each vehicle in the vehicle collection and each base station. The drones can act as repeaters in the resource scheduling system to transmit computing tasks.
[0096] In other networks, staff can pre-build digital twins of a vehicle collection, multiple drones, and multiple base stations on a scheduling server, and then build a digital twin system based on the digital twins of the vehicle collection, multiple drones, and multiple base stations, so that before allocating computing tasks, resources can be allocated in advance in the digital twin system, and the processing after resource allocation can be simulated to obtain the best resource scheduling strategy.
[0097] In some embodiments, the present application also provides a method for determining a resource scheduling strategy. The scheduling server executes the following method for determining a resource scheduling strategy.
[0098] Figure 2 FIG. 1 is a flow chart showing a method for determining a resource scheduling strategy provided by an embodiment of the present application. Figure 1 As shown, the resource scheduling strategy determination method may include S101-S103:
[0099] S101, obtaining task feature information of a computing task of a first vehicle, first idle resources of the first vehicle, and second idle resources of at least one second vehicle.
[0100] In this embodiment, when determining the resource scheduling strategy, for the first vehicle, the task characteristic information of the computing task of the first vehicle, the first idle resources of the first vehicle and the second idle resources of at least one second vehicle are obtained, wherein the task characteristic information includes the computing task required resources; for the computing task of the first vehicle, by judging whether the first idle resources of the first vehicle are less than the computing task required resources, it is determined whether the computing task needs to be distributed to other execution entities for processing.
[0101] In some embodiments, when the computing task requires resources less than the first idle resources, the computing task can be directly executed on the first vehicle without sending the computing task from the first vehicle to the second vehicle.
[0102] It is worth noting that the first vehicle and the second vehicle are only for computing tasks. The initial execution vehicle of the computing task is the first vehicle, and in the vehicle set, other vehicles except the first vehicle are the second vehicles, that is, the first vehicle is a vehicle with unloading requirements, and the second vehicle is a vehicle that can execute computing tasks.
[0103] S102, when the first idle resources are less than the required resources of the computing task, determine the first execution time function and the first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resources.
[0104] In some embodiments, in order to cope with the requirement of relatively fast environmental changes in the vehicle network scenario, before S102, the method may further include:
[0105] Respectively obtain first digital twin information of the base station, second digital twin information of the second vehicle, and third digital twin information of the first vehicle;
[0106] Constructing a base station twin according to the first digital twin information of the base station;
[0107] constructing a second vehicle twin according to the second digital twin information of the second vehicle;
[0108] Constructing a first vehicle twin according to the third digital twin information of the first vehicle;
[0109] Constructing a resource scheduling twin system according to the base station twin, the second vehicle twin and the first vehicle twin;
[0110] Determining a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes:
[0111] In the resource scheduling twin system, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task are determined based on the task feature information and the second idle resource.
[0112] In this embodiment, by constructing vehicle twins and base station twins on the scheduling server to build a resource scheduling twin system, the simulation of resource scheduling strategies is realized to obtain a resource scheduling strategy that is more in line with reality.
[0113] In this embodiment, the first digital twin information of the base station may include the CPU frequency of the base station, the deviation of the digital twin layer of the base station, the network topology location and the expected delay.
[0114] Specifically, the base station twin can be constructed by the following formula (1):
[0115] <![CDATA[D INF (n)={F INF (n)±f ~INF (n),G INF (n),L INF (n)}]]> (1)
[0116] Among them, D INF (n) is the base station twin, F INF (n) is the CPU frequency of the base station, f ~INF (n) is the deviation of the base station digital twin layer, G INF (n) is the network topology location of the base station, L INF (n) is the expected delay of the base station.
[0117] The second vehicle twin can be constructed by the following formula (2):
[0118] <![CDATA[D S (n)={F S (n)±f ~S (n),G S (n),L S (n)}]]> (2)
[0119] Among them, D S (n) is the second vehicle twin, F S(n) is the CPU frequency of the second vehicle, f ~S (n) is the deviation of the second vehicle digital twin layer, G S (n) is the network topology position of the second vehicle, L S (n) is the expected delay of the second vehicle.
[0120] The first vehicle twin can be constructed by the following formula (3):
[0121] <![CDATA[D P (n)={f P (n)±f ~P (n),G P (n), L P (n),C(n),D(n),χ}]]> (3)
[0122] Among them, D P (n) is the first vehicle twin, f P (n) is the CPU frequency of the first vehicle, f ~P (n) is the deviation of the first vehicle digital twin layer, G P (n) is the network topological position of the first vehicle, L P (n) is the expected delay of the first vehicle, C(n) is the required resources for the computing task, D(n) is the maximum tolerable delay for executing the computing task, and χ indicates whether the computing task can be split.
[0123] A resource scheduling twin system is built based on the base station twin, the first vehicle twin and the second vehicle twin.
[0124] It is worth noting that in order to determine the resource scheduling strategy more quickly and accurately, all resource scheduling strategies can be determined in advance in the resource scheduling twin system.
[0125] In some other embodiments, when the first idle resources are smaller than the required resources of the computing task, it indicates that the computing resources of the first vehicle cannot execute the computing task at this time, and the computing task needs to be offloaded to the second vehicle to execute the computing task.
[0126] In order to process the computing task as quickly as possible while maximizing the use of the computing resources of the resource scheduling system, it is necessary to determine the first execution time function and the first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resources.
[0127] As an example, in the resource scheduling twin system, the following formula (4) can be used to determine the execution time of the computing task on the first vehicle:
[0128]
[0129] in, For execution time, To calculate the resources required for the task, is the first idle resource, is the CPU frequency of the first vehicle, The execution time error.
[0130] The energy consumption of the computing task performed on the first vehicle can be determined using the following formula (5):
[0131]
[0132] in, is the energy loss, K P is the loss constant, is the CPU frequency of the first vehicle, is the deviation of the first vehicle digital twin layer, c p [n] is the required resource for the computing task, D p [n] is the maximum tolerable delay in executing the computing task.
[0133] In the process of calculating the first vehicle performing the computing task, the utility function of the computing task performed in the first vehicle can be calculated by the following formula (6):
[0134]
[0135] where θ represents the cost of a single energy unit when executed locally, is a constant, γ p is the maximum tolerable task delay.
[0136] In some other embodiments, when determining the first execution time function, it can be determined by the following formula (7):
[0137]
[0138] in, is the first processing duration for executing the computing task, is the first waiting time, is the first transmission duration.
[0139] When determining the first total energy loss, it can be determined by the following formula (8):
[0140]
[0141] in, is the first total energy loss, K P is the energy loss constant, d p,i [n] First energy loss, is the second energy loss.
[0142] When determining the first utility function, it can be determined by the following formula (9):
[0143]
[0144] Where t is a constant, θ represents the cost of a single energy unit when executed locally, is a constant, γ p is the maximum tolerable task delay, is the first execution duration function, is the first total energy loss.
[0145] In some other embodiments, for some computing tasks, whether the computing task can be split can be determined by the computing task attribute of the computing task. If the computing task attribute of the computing task is determined to be a splittable attribute, S102 may further include:
[0146] Split the computing task into multiple computing subtasks;
[0147] Obtain a second transmission duration for each computing subtask to be transmitted between the first vehicle and each second vehicle, a second waiting duration for each computing subtask in the second vehicle, and a second processing duration function for executing the computing task;
[0148] Determining the second processing duration function as a new first processing duration function;
[0149] Calculate the sum of the second transmission time, the second waiting time, and the second processing time to obtain a first execution time function of the second vehicle executing the computing task;
[0150] Obtaining a third energy loss of each computing subtask transmitted between the first vehicle and the second vehicle, a fourth energy loss of each second vehicle executing the computing subtask, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0151] calculating a sum of the third energy loss, the fourth energy loss and the energy loss deviation to obtain a second total energy loss of the second vehicle;
[0152] determining a second utility function of the second vehicle according to the second execution time, the second total energy loss, the preset execution cost, and the preset utility coefficient;
[0153] The second utility function is determined as the new first utility function.
[0154] In this embodiment, when the computing task can be split, the second execution time function can count the second transmission time of each computing subtask between the first vehicle and the second vehicle, the second waiting time in the second vehicle, and the second processing time of executing the computing subtask, and calculate the above sum to obtain the second execution time function. The remaining calculation factors are consistent with the above formula (7), which will not be elaborated here.
[0155] Correspondingly, the formulas for determining the second total energy loss and the second utility function are similar to those described above and will not be elaborated on herein.
[0156] Reference Figure 3 In some other embodiments, when the computing task required resources are greater than or equal to the second idle resources, the method may further include S301-S303:
[0157] S301, acquiring a third idle resource of a base station;
[0158] S302, determining a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource;
[0159] S303, inputting the computing task into the base station Markov decision model, taking minimization of the third execution time function and maximization of the third utility function as optimization goals, processing the computing task using the base station Markov decision model, and obtaining a second resource scheduling strategy.
[0160] As an example, the second resource scheduling strategy may include a target base station for executing a computing task and its corresponding resource allocation strategy.
[0161] In this embodiment, since there is no second vehicle capable of performing the computing task within the preset range of the first vehicle, or the computing task attribute is an inseparable attribute, the base station is required to perform the computing task. Therefore, the third idle resource of the base station is obtained, and then the third execution duration function and the third utility function are determined by the task feature information and the third idle resource. Then, the base station Markov decision is used to determine the target base station for performing the computing task, so as to execute the computing task as quickly as possible and maximize the use of the third idle resources of the base station.
[0162] Specifically, S302 may include:
[0163] Obtaining a third transmission duration of the computing task between the first vehicle and the base station, a third waiting duration of the computing task at the base station, and a third processing duration of the computing task executed by the base station;
[0164] Calculate the sum of the third transmission duration, the third waiting duration and the third processing duration to obtain a third execution duration function of the base station executing the computing task;
[0165] Acquire a fifth energy loss of transmitting the computing task between the first vehicle and the base station, a sixth energy loss of executing the computing task by the base station, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0166] Calculating a sum of the fifth energy loss, the sixth energy loss, and the energy loss deviation to obtain a third total energy loss of the base station;
[0167] A third utility function of the base station executing the computing task is determined according to the third execution time, the third total energy loss, the preset execution cost and the preset utility coefficient.
[0168] In this embodiment, when determining the third execution time function, it can be determined by the following formula (10):
[0169]
[0170] in, is the third processing time for executing the computing task, For the third waiting time, is the third transmission duration.
[0171] When determining the third total energy loss, it can be determined by the following formula (11):
[0172]
[0173] in, is the third total energy loss, K P is the energy loss constant, d p , i [n] Fifth energy loss, It is the sixth energy loss.
[0174] When determining the first utility function, it can be determined by the following formula (12):
[0175]
[0176] Where t is a constant, θ represents the cost of a single energy unit when executed locally, is a constant, γ p is the maximum tolerable task delay, Γ inf [n] is the third execution time function, ε inf [n] is the third total energy loss.
[0177] In some other embodiments, if it is necessary to transmit the computing task to a neighboring base station through a drone, and the neighboring base station performs the computing task, the method may further include:
[0178] Obtain a fourth transmission duration of the computing task from the first vehicle to the drone, a fifth transmission duration of the computing task between the drone and the neighboring base station, and a fourth processing duration of the computing task processed by the neighboring base station;
[0179] Calculate the sum of the fourth transmission duration, the fifth transmission duration and the fourth processing duration to obtain a fourth execution duration function of the neighboring base station executing the computing task;
[0180] Determine the fourth execution duration function as a new third execution duration function;
[0181] Obtain a seventh energy loss of the computing task transmitted from the first vehicle to the drone, an eighth energy loss of the computing task transmitted between the drone and the neighboring base station, and a ninth energy loss of the neighboring base station processing the computing task;
[0182] Calculating the sum of the seventh energy loss, the eighth energy loss, the ninth energy loss and the energy loss deviation to obtain a fourth total energy loss;
[0183] Determine a fourth utility function of the base station executing the computing task according to the fourth execution time, the fourth total energy loss, the preset execution cost and the preset utility coefficient;
[0184] The fourth utility function is determined as a new third utility function.
[0185] In this embodiment, the computing task is transmitted to the neighboring base station by the drone, and the neighboring base station executes the computing task. It is necessary to determine the fourth execution duration function through the fourth transmission duration, the fifth transmission duration and the fourth processing duration to determine the new third execution duration function. The remaining calculation methods are consistent with the above formulas (10) to (12), and will not be elaborated here.
[0186] S103, when the required resources of the computing task are less than the second idle resources, the computing task is input into the vehicle Markov decision model, and the computing task is processed by the vehicle Markov decision model with minimization of the first execution time function and maximization of the first utility function as the optimization goals to obtain the first resource scheduling strategy for the computing task.
[0187] As an example, the first resource scheduling strategy includes a target second vehicle for executing a computing task and its corresponding resource allocation strategy.
[0188] In this embodiment, since the utility function determined by the above method is a non-convex function, when determining the resource scheduling strategy, the execution subject of the computing task and the corresponding resource allocation strategy can be determined by modeling into a discrete Markov model.
[0189] In this embodiment, since the calculation task can be executed by the second vehicle or by the base station, these two Markov models are introduced respectively below.
[0190] Specifically, the task characteristic information also includes the actual size of the calculation task;
[0191] Before inputting the computing task into the vehicle Markov decision model, the method may further include:
[0192] Acquire first state information of the first vehicle and second state information of the second vehicle;
[0193] constructing a vehicle state space based on the actual size of the computing task, the first state information, and the second state information;
[0194] determining a set of available second vehicles based on the first vehicle position, the second vehicle position, and a preset transmission distance;
[0195] constructing a vehicle action space based on the set of available second vehicles;
[0196] Determine the vehicle incentive function based on the execution time corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0197] A vehicle Markov decision model is constructed based on the vehicle state space, vehicle action space and vehicle incentive function.
[0198] As an example, the first status information includes the number of first vehicles and the corresponding computing resource size, and the first vehicle position, and the second status information includes the number of second vehicles and the corresponding computing resource size, and the second vehicle position.
[0199] In this embodiment, when constructing a vehicle Markov decision model, it is necessary to construct the vehicle state space, vehicle action space and vehicle incentive function of the vehicle Markov decision model. Accordingly, conventional techniques can be used to determine the vehicle state space based on the actual size of the computing task, the first state information and the second state information. The vehicle action space is determined as the available second vehicle set, and the vehicle incentive function is the incentive for transferring to the next state s(n+1) after taking action a(n) in the current state s(n) of the vehicle.
[0200] As an example, the vehicle excitation function may be determined by the following formula (13):
[0201]
[0202] in, To calculate the resources required for the task, is the first idle resource, It is the execution time function.
[0203] In some embodiments, S103 may include:
[0204] Initialize the network parameters and target weights of the vehicle Markov decision model;
[0205] Selecting a preset number of prediction samples in the state space of the vehicle Markov decision model;
[0206] Calculate the function values of the double Q function of the predicted samples respectively;
[0207] When the function value of the double Q function does not meet the preset convergence conditions, the network parameters and target weights are updated to adjust the adjustment parameters of the vehicle Markov decision model until the double Q function meets the preset convergence conditions, and the first resource scheduling strategy corresponding to the minimum double Q function is output.
[0208] In this embodiment, since the state space of the vehicle Markov decision model is relatively large, a double Q function is used in the vehicle Markov decision model to determine the resource scheduling strategy.
[0209] Specifically, the network parameters and target network weights of the vehicle Markov decision model are initialized, and then Gaussian white noise is added to the output layer to generate prediction samples, and the instantaneous excitation is calculated by the vehicle excitation function. Then, the function value of the double Q function of the prediction sample is calculated using the Bellman equation, and the information of the next state is obtained from the next environment. After that, the loss function value is calculated, and the network parameters and target weights are updated using the composite function derivation law to adjust the adjustment parameters of the vehicle Markov decision model. The above steps are repeated until the preset convergence conditions are met, and the first resource scheduling strategy corresponding to the minimum double Q function is output. The first resource scheduling strategy includes the target second vehicle that performs the computing task and its corresponding resource allocation strategy.
[0210] In some other embodiments, before using the base station to perform the computing task, it is necessary to construct a base station Markov decision model, and the method may include:
[0211] Acquire third state information of the base station, the third state information including the number of base stations, the size of computing resources corresponding to each base station, and the base station location;
[0212] Constructing a base station state space based on the actual size of the computing task and the third state information;
[0213] Determining a set of available base stations based on the first vehicle position, the base station position, and a preset transmission distance;
[0214] Based on the set of available base stations, a base station action space is constructed;
[0215] Determine the base station incentive function based on the utility function corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0216] According to the base station state space, base station action space and base station incentive function, a base station Markov decision model is constructed.
[0217] In this embodiment, the method for constructing the base station Markov decision model is the same as the method for constructing the vehicle Markov decision model described above, and will not be described in detail here.
[0218] It is worth noting that the base station excitation function is determined by the following formula (14) to maximize the utility function.
[0219]
[0220] in, is the second utility function of the base station.
[0221] In this embodiment, in the process of determining the second resource scheduling strategy using the base station Markov decision model, the Q function is used for learning and optimization, and the remaining learning and optimization methods are consistent with the vehicle Markov decision model, which will not be elaborated here.
[0222] In an embodiment of the present application, when the first idle resources of the first vehicle do not meet the resources required for executing the computing task, the first execution time function and the first utility function of the second vehicle are determined according to the task feature information and the second idle resources of the second vehicle. Then, within the vehicle Markov decision model, the first execution time function minimization and the first utility function maximization are used as optimization goals to determine the target second vehicle for executing the computing task and the resources that need to be occupied by the target second vehicle. For the vehicle set, the determined target second vehicle is used to execute the computing task. Compared with other second vehicles, the first execution time function value is the smallest and the first utility function value is the largest, that is, the computing task can be executed fastest and the utilization rate of the second idle resources can be maximized, which can not only meet the real-time requirements of the computing task, but also reduce the waste of computing resources.
[0223] Reference Figure 4 The embodiment of the present application further provides a resource scheduling strategy determination device 400, which may include:
[0224] An acquisition module 401 is used to acquire task characteristic information of a computing task of a first vehicle, a first idle resource of the first vehicle, and a second idle resource of at least one second vehicle, wherein the task characteristic information includes required resources of the computing task;
[0225] A determination module 402 is used to determine a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource when the first idle resource is less than the required resource of the computing task;
[0226] The optimization module 403 is used to input the computing task into the vehicle Markov decision model when the resources required by the computing task are less than the second idle resources, and use the vehicle Markov decision model to process the computing task with minimization of the execution time function and maximization of the utility function as the optimization goals to obtain the first resource scheduling strategy for the computing task, wherein the first resource scheduling strategy includes the target second vehicle for executing the computing task and its corresponding resource allocation strategy.
[0227] As an optional implementation, the determination module 402 may also be used to:
[0228] Respectively obtain first digital twin information of the base station, second digital twin information of the second vehicle, and third digital twin information of the first vehicle;
[0229] Constructing a base station twin according to the first digital twin information of the base station;
[0230] constructing a second vehicle twin according to the second digital twin information of the second vehicle;
[0231] Constructing a first vehicle twin according to the third digital twin information of the first vehicle;
[0232] Constructing a resource scheduling twin system according to the base station twin, the second vehicle twin and the first vehicle twin;
[0233] Determining a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes:
[0234] In the resource scheduling twin system, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task are determined based on the task feature information and the second idle resource.
[0235] As an optional implementation, the determination module 402 may also be used to:
[0236] Obtaining a first transmission duration for transmitting the computing task between the first vehicle and the second vehicle, a first waiting duration for the computing task in the second vehicle, and a first processing duration for the second vehicle to execute the computing task;
[0237] Calculate the sum of the first transmission time, the first waiting time and the first processing time to obtain a first execution time function of the second vehicle executing the computing task;
[0238] Acquire a first energy loss when a computing task is transmitted between the first vehicle and the second vehicle, a second energy loss when the second vehicle executes the computing task, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0239] Calculating a sum of the first energy loss, the second energy loss, and the energy loss deviation to obtain a first total energy loss of the second vehicle;
[0240] A first utility function for the second vehicle to perform the computing task is determined according to the first execution time, the first total energy loss, the preset execution cost, and the preset utility coefficient.
[0241] As an optional implementation, the task characteristic information further includes a computing task attribute; when the computing task attribute is determined to be a separable attribute, the determination module 402 may also be used to:
[0242] Split the computing task into multiple computing subtasks;
[0243] Obtain a second transmission time length for each computing subtask to be transmitted between the first vehicle and each second vehicle, a second waiting time length for each computing subtask in the second vehicle, and a second processing time length for executing the computing subtask;
[0244] Calculate the sum of the second transmission time, the second waiting time, and the second processing time to obtain a second execution time function of the second vehicle executing the computing task;
[0245] Determine the second execution duration function as a new first execution duration function;
[0246] Obtaining a third energy loss of each computing subtask transmitted between the first vehicle and the second vehicle, a fourth energy loss of each second vehicle executing the computing subtask, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0247] calculating a sum of the third energy loss, the fourth energy loss and the energy loss deviation to obtain a second total energy loss of the second vehicle;
[0248] determining a second utility function of the second vehicle according to the second execution time, the second total energy loss, the preset execution cost, and the preset utility coefficient;
[0249] The second utility function is determined as the new first utility function.
[0250] As an optional implementation, the task characteristic information also includes calculating the actual size of the task; the optimization module 403 can also be used to:
[0251] Acquire first state information of the first vehicle and second state information of the second vehicle, the first state information including the number of first vehicles and the corresponding computing resource size, and the position of the first vehicle, and the second state information including the number of second vehicles and the corresponding computing resource size, and the position of the second vehicle;
[0252] constructing a vehicle state space based on the actual size of the computing task, the first state information, and the second state information;
[0253] determining a set of available second vehicles based on the first vehicle position, the second vehicle position, and a preset transmission distance;
[0254] constructing a vehicle action space based on the set of available second vehicles;
[0255] Determine the vehicle incentive function based on the execution time corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0256] A vehicle Markov decision model is constructed based on the vehicle state space, vehicle action space and vehicle incentive function.
[0257] As an optional implementation, the optimization module 403 may also be used to:
[0258] Initialize the network parameters and target weights of the vehicle Markov decision model;
[0259] Selecting a preset number of prediction samples in the state space of the vehicle Markov decision model;
[0260] Calculate the function values of the double Q function of the predicted samples respectively;
[0261] When the function value of the double Q function does not meet the preset convergence conditions, the network parameters and target weights are updated to adjust the adjustment parameters of the vehicle Markov decision model until the double Q function meets the preset convergence conditions, and the first resource scheduling strategy corresponding to the minimum double Q function is output.
[0262] As an optional implementation, when the computing task required resources are greater than or equal to the second idle resources;
[0263] The acquisition module 401 may also be used to acquire a third idle resource of the base station;
[0264] The determination module 402 may also be used to determine a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource;
[0265] The optimization module 403 can also be used to input the computing task into the base station Markov decision model, with minimization of the third execution time function and maximization of the third utility function as the optimization goals, and use the base station Markov decision model to process the computing task to obtain a second resource scheduling strategy, wherein the second resource scheduling strategy includes the target base station that executes the computing task and its corresponding resource allocation strategy.
[0266] As an optional implementation, the determination module 402 may also be used to:
[0267] Obtaining a third transmission duration of the computing task between the first vehicle and the base station, a third waiting duration of the computing task at the base station, and a third processing duration of the computing task executed by the base station;
[0268] Calculate the sum of the third transmission duration, the third waiting duration and the third processing duration to obtain a third execution duration function of the base station executing the computing task;
[0269] Acquire a fifth energy loss of transmitting the computing task between the first vehicle and the base station, a sixth energy loss of executing the computing task by the base station, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system;
[0270] Calculating a sum of the fifth energy loss, the sixth energy loss, and the energy loss deviation to obtain a third total energy loss of the base station;
[0271] A third utility function of the base station executing the computing task is determined according to the third execution time, the third total energy loss, the preset execution cost and the preset utility coefficient.
[0272] As an optional implementation, the resource scheduling twin system further includes a plurality of drones, which are respectively connected to the base station twin, the first vehicle twin, and at least one second vehicle twin in communication; the determination module 402 may also be used to:
[0273] Obtain a fourth transmission duration of the computing task from the first vehicle to the drone, a fifth transmission duration of the computing task between the drone and the neighboring base station, and a fourth processing duration of the computing task processed by the neighboring base station;
[0274] Calculate the sum of the fourth transmission duration, the fifth transmission duration and the fourth processing duration to obtain a fourth execution duration function of the neighboring base station executing the computing task;
[0275] Determine the fourth execution duration function as a new third execution duration function;
[0276] Obtain a seventh energy loss of the computing task transmitted from the first vehicle to the drone, an eighth energy loss of the computing task transmitted between the drone and the neighboring base station, and a ninth energy loss of the neighboring base station processing the computing task;
[0277] Calculating the sum of the seventh energy loss, the eighth energy loss, the ninth energy loss and the energy loss deviation to obtain a fourth total energy loss;
[0278] Determine a fourth utility function of the base station executing the computing task according to the fourth execution time, the fourth total energy loss, the preset execution cost and the preset utility coefficient;
[0279] The fourth utility function is determined as a new third utility function.
[0280] As an optional implementation, the optimization module 403 may also be used to:
[0281] Acquire third state information of the base station, the third state information including the number of base stations, the size of computing resources corresponding to each base station, and the base station location;
[0282] Constructing a base station state space based on the actual size of the computing task and the third state information;
[0283] Determining a set of available base stations based on the first vehicle position, the base station position, and a preset transmission distance;
[0284] Based on the set of available base stations, a base station action space is constructed;
[0285] Determine the base station incentive function based on the utility function corresponding to the computing task, the required resources of the computing task and the actual size of the computing task;
[0286] According to the base station state space, base station action space and base station incentive function, a base station Markov decision model is constructed.
[0287] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0288] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0289] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0290] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 502 may include a removable or non-removable (or fixed) medium, or the memory 502 is a non-volatile solid-state memory. The memory 502 may be inside or outside the integrated gateway disaster recovery device.
[0291] In one example, the memory 502 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0292] The memory 502 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the video query method according to the first aspect of the present disclosure.
[0293] The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement Figure 2 A method for determining a resource scheduling strategy in the illustrated embodiment.
[0294] In one example, the electronic device may further include a communication interface 503 and a bus 504. Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 504 and communicate with each other.
[0295] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0296] Bus 504 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hypertransmission (Hyper Transport, HT) interconnection, industry standard architecture (IndustryStandard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 504 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0297] The electronic device can execute the resource scheduling strategy determination method in the embodiment of the present application, thereby realizing the combination Figure 2-Figure 4 The invention describes a method and device for determining a resource scheduling strategy.
[0298] In addition, in combination with the resource scheduling strategy determination method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the resource scheduling strategy determination methods in the above embodiment is implemented.
[0299] In an optional embodiment, in combination with the resource scheduling strategy determination method in the above embodiment, the embodiment of the present application can provide a computer program product for implementation, and the instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device can implement any one of the resource scheduling strategy determination methods in the above embodiment.
[0300] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0301] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0302] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0303] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0304] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for determining a resource scheduling strategy, characterized in that: A scheduling server applied to a resource scheduling system, the resource scheduling system further comprising a vehicle set and a plurality of base stations, each vehicle in the vehicle set being wirelessly connected to the plurality of base stations, the vehicle set comprising a plurality of vehicles; The method comprises: Acquire task characteristic information of a computing task of a first vehicle, a first idle resource of the first vehicle, and a second idle resource of at least one second vehicle, wherein the task characteristic information includes required resources of the computing task; In a case where the first idle resources are less than the required resources of the computing task, determining a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task characteristic information and the second idle resources; When the resources required by the computing task are less than the second idle resources, the computing task is input into the vehicle Markov decision model, and the first execution time function is minimized and the first utility function is maximized as the optimization objectives. The computing task is processed using the vehicle Markov decision model to obtain a first resource scheduling strategy for the computing task, wherein the first resource scheduling strategy includes a target second vehicle for executing the computing task and its corresponding resource allocation strategy.
2. The method according to claim 1, characterized in that Before determining the first execution time function and the first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource, the method further includes: Respectively obtaining first digital twin information of the base station, second digital twin information of the second vehicle, and third digital twin information of the first vehicle; Constructing a base station twin according to the first digital twin information of the base station; Constructing a second vehicle twin according to the second digital twin information of the second vehicle; Constructing a first vehicle twin according to the third digital twin information of the first vehicle; Building a resource scheduling twin system according to the base station twin, the second vehicle twin and the first vehicle twin; The determining, based on the task feature information and the second idle resource, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task includes: In the resource scheduling twin system, a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task are determined based on the task feature information and the second idle resource.
3. The method according to claim 2, characterized in that In the resource scheduling twin system, determining a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes: Obtaining a first transmission duration of the computing task between the first vehicle and the second vehicle, a first waiting duration of the computing task in the second vehicle, and a first processing duration of the computing task executed by the second vehicle; Calculating the sum of the first transmission duration, the first waiting duration and the first processing duration to obtain a first execution duration function of the second vehicle executing the computing task; Acquire a first energy loss when the computing task is transmitted between the first vehicle and the second vehicle, a second energy loss when the second vehicle executes the computing task, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system; Calculating a sum of the first energy loss, the second energy loss and the energy loss deviation to obtain a first total energy loss of the second vehicle; A first utility function for the second vehicle to execute the computing task is determined according to the first execution time, the first total energy loss, the preset execution cost and the preset utility coefficient.
4. The method according to claim 3, characterized in that The task feature information also includes computing task attributes; In the case where the computing task attribute is determined to be a separable attribute, determining a first execution duration function and a first utility function corresponding to the second vehicle executing the computing task based on the task feature information and the second idle resource includes: Splitting the computing task to obtain multiple computing subtasks; Obtaining a second transmission duration for each of the computing subtasks to be transmitted between the first vehicle and each of the second vehicles, a second waiting duration for each of the computing subtasks in the second vehicle, and a second processing duration for executing the computing subtasks; Calculating the sum of the second transmission time, the second waiting time, and the second processing time to obtain a second execution time function of the second vehicle executing the computing task; Determine the second execution duration function as a new first execution duration function; Obtaining a third energy loss of each computing subtask transmitted between the first vehicle and the second vehicle, a fourth energy loss of each second vehicle executing the computing subtask, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system; calculating a sum of the third energy loss, the fourth energy loss and the energy loss deviation to obtain a second total energy loss of the second vehicle; determining a second utility function of the second vehicle according to the second execution time, the second total energy loss, a preset execution cost, and a preset utility coefficient; The second utility function is determined as a new first utility function.
5. The method according to claim 1, characterized in that: The task characteristic information also includes calculating the actual size of the task; Before inputting the computing task into the vehicle Markov decision model, the method further includes: Acquire first status information of the first vehicle and second status information of the second vehicle, wherein the first status information includes the number of first vehicles and the corresponding computing resource size, and the first vehicle position, and the second status information includes the number of second vehicles and the corresponding computing resource size, and the second vehicle position; constructing a vehicle state space based on the actual size of the computing task, the first state information, and the second state information; determining a set of available second vehicles based on the first vehicle position, the second vehicle position, and a preset transmission distance; constructing a vehicle action space based on the available second vehicle set; Determine the vehicle incentive function based on the execution time corresponding to the computing task, the required resources of the computing task and the actual size of the computing task; A vehicle Markov decision model is constructed according to the vehicle state space, the vehicle action space and the vehicle incentive function.
6. The method according to claim 1, characterized in that The step of inputting the computing task into the vehicle Markov decision model, taking minimization of the execution time function and maximization of the utility function as optimization goals, and processing the computing task using the vehicle Markov decision model to obtain a first resource scheduling strategy for the computing task includes: Initializing network parameters and target weights of the vehicle Markov decision model; Selecting a preset number of prediction samples in the state space of the vehicle Markov decision model; Calculating the function values of the double Q functions of the predicted samples respectively; When the function value of the double Q function does not meet the preset convergence condition, the network parameters and the target weight are updated to adjust the adjustment parameters of the vehicle Markov decision model until the double Q function meets the preset convergence condition, and the first resource scheduling strategy corresponding to the minimum double Q function is output.
7. The method according to claim 2, characterized in that: In a case where the computing task required resources are greater than or equal to the second idle resources, the method further includes: Acquire a third idle resource of the base station; Determine, based on the task feature information and the third idle resource, a third execution duration function and a third utility function corresponding to the base station executing the computing task; The computing task is input into the base station Markov decision model, with minimization of the third execution time function and maximization of the third utility function as optimization goals, and the computing task is processed using the base station Markov decision model to obtain a second resource scheduling strategy, wherein the second resource scheduling strategy includes a target base station that executes the computing task and its corresponding resource allocation strategy.
8. The method according to claim 7, characterized in that In the resource scheduling twin system, determining a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource includes: Obtaining a third transmission duration of the computing task between the first vehicle and the base station, a third waiting duration of the computing task at the base station, and a third processing duration of the base station executing the computing task; Calculating the sum of the third transmission duration, the third waiting duration and the third processing duration to obtain a third execution duration function of the base station executing the computing task; Obtaining a fifth energy loss of transmitting the computing task between the first vehicle and the base station, a sixth energy loss of the base station executing the computing task, and an energy loss deviation between the resource scheduling twin system and the resource scheduling system; Calculating a sum of the fifth energy loss, the sixth energy loss and the energy loss deviation to obtain a third total energy loss of the base station; A third utility function of the base station executing the computing task is determined according to the third execution duration, the third total energy loss, the preset execution cost and the preset utility coefficient.
9. The method according to claim 8, characterized in that The resource scheduling twin system further includes a plurality of drones, each of which is communicatively connected to the base station twin, the first vehicle twin, and at least one second vehicle twin; In the resource scheduling twin system, determining a third execution duration function and a third utility function corresponding to the base station executing the computing task based on the task feature information and the third idle resource, further comprising: Obtaining a fourth transmission duration of the computing task from the first vehicle to the drone, a fifth transmission duration of the computing task from the drone to the neighboring base station, and a fourth processing duration of the computing task by the neighboring base station; Calculating the sum of the fourth transmission duration, the fifth transmission duration and the fourth processing duration to obtain a fourth execution duration function of the neighboring base station performing the calculation task; Determining the fourth execution duration function as a new third execution duration function; Obtaining a seventh energy loss of transmitting the computing task from the first vehicle to the drone, an eighth energy loss of transmitting the computing task between the drone and a neighboring base station, and a ninth energy loss of processing the computing task by the neighboring base station; Calculating the sum of the seventh energy loss, the eighth energy loss, the ninth energy loss and the energy loss deviation to obtain a fourth total energy loss; Determining a fourth utility function of the base station executing the computing task according to the fourth execution duration, the fourth total energy loss, the preset execution cost and the preset utility coefficient; The fourth utility function is determined as a new third utility function.
10. The method according to claim 7, characterized in that The task characteristic information also includes the actual size of the calculation task. Before inputting the calculation task into the base station Markov decision model, the method also includes: Acquire third state information of the base station, the third state information including the number of base stations, the size of computing resources corresponding to each base station, and the base station location; Constructing a base station state space based on the actual size of the computing task and the third state information; Determining a set of available base stations based on the first vehicle position, the base station position, and a preset transmission distance; Based on the set of available base stations, construct a base station action space; Determine the base station incentive function based on the utility function corresponding to the computing task, the required resources of the computing task and the actual size of the computing task; A base station Markov decision model is constructed according to the base station state space, the base station action space and the base station excitation function.
11. A resource scheduling strategy determination device, characterized in that: The device comprises: an acquisition module, configured to acquire task characteristic information of a computing task of a first vehicle, a first idle resource of the first vehicle, and a second idle resource of at least one second vehicle, wherein the task characteristic information includes required resources of the computing task; a determination module, configured to determine, when the first idle resources are less than the required resources of the computing task, a first execution time function and a first utility function corresponding to the second vehicle executing the computing task based on the task characteristic information and the second idle resources; An optimization module is used to input the computing task into a vehicle Markov decision model when the resources required by the computing task are less than the second idle resources, and use the vehicle Markov decision model to process the computing task with minimization of the execution time function and maximization of the utility function as optimization goals to obtain a first resource scheduling strategy for the computing task, wherein the first resource scheduling strategy includes a target second vehicle that executes the computing task and its corresponding resource allocation strategy.
12. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for determining a resource scheduling strategy as described in any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for determining a resource scheduling strategy according to any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the resource scheduling strategy determination method as described in any one of claims 1 to 10.