Resource allocation method, device, equipment, storage medium and product

By building the user's local computing model and edge computing model, and using the alternating direction multiplication strategy to decompose the optimization problem, the problem of high computational complexity of traditional optimization models under large-scale users and tasks is solved, and efficient and real-time resource allocation is achieved.

CN119781981APending Publication Date: 2025-04-08中国移动通信集团云南有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411978994.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the case of large-scale users and tasks, the traditional optimization model has high computational complexity, poor solution speed and efficiency performance, and is difficult to apply in real time.

Method used

By constructing the user's local computing model and edge computing model, the basic optimization model is optimized based on binary decision variables and local variable copies, and the alternating direction multiplication strategy is used to decompose the global optimization problem into multiple parallel sub-problems, thereby realizing resource allocation.

Benefits of technology

It reduces computing complexity, improves computing efficiency, can run efficiently in large-scale user networks, and supports parallel processing, ensuring solution speed and efficient and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781981A_ABST
    Figure CN119781981A_ABST
Patent Text Reader

Abstract

The present application discloses a resource allocation method, device, equipment, storage medium and product, which relates to the field of cloud computing technology. The method includes: constructing a local computing model and an edge computing model of the user based on the user's task requirements; constructing a basic optimization model of time consumption and energy consumption based on the user's local computing model and the edge computing model; optimizing the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model of time consumption and energy consumption; decomposing the global optimization problem of the target optimization model into multiple parallel sub-problems based on an alternating direction multiplier strategy, and solving the multiple parallel sub-problems to obtain an optimization decision result; placing tasks and allocating resources for the user based on the optimization decision result. In the above manner, the complex global optimization problem is decomposed into multiple easy-to-solve sub-problems, reducing the computational complexity, and can be efficiently operated in a large-scale user network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to resource allocation methods, devices, equipment, storage media and products. Background Art

[0002] For the task placement decision and resource allocation decision in edge computing, the corresponding optimization problem can be constructed to solve. At present, the optimization problem is usually described by a mathematical model based on delay and constraints. Although the model is more accurate, the model complexity is higher and the solution complexity is higher. Especially in the case of large-scale users and tasks, the solution speed and efficiency performance are poor, and the time and resource consumption of solving the global optimization problem is large, which makes it difficult to apply in real time.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a resource allocation method, device, equipment, storage medium and product, aiming to solve the technical problems in the prior art that the traditional optimization model has high computational complexity and poor solution speed and efficiency performance in the case of large-scale users and tasks.

[0005] To achieve the above object, the present application provides a resource allocation method, the method comprising:

[0006] Based on the user's task requirements, build the user's local computing model and edge computing model;

[0007] Based on the local computing model and edge computing model of the user, a basic optimization model of time consumption and energy consumption is constructed;

[0008] Optimizing the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model for time consumption and energy consumption;

[0009] Based on the alternating direction multiplier strategy, the global optimization problem of the target optimization model is decomposed into multiple parallel sub-problems, and the multiple parallel sub-problems are solved to obtain an optimization decision result;

[0010] Based on the optimization decision result, tasks are placed and resources are allocated to the user.

[0011] In one embodiment, the task requirement includes at least the task computing amount and the task data amount, and the step of constructing the user's local computing model and edge computing model based on the user's task requirement includes:

[0012] Determine the total local computing consumption time and the total local computing consumption energy of the user based on the task computing amount and task data amount of the user;

[0013] Building a local computing model based on the total local computing consumption time and the total local computing consumption energy of the user;

[0014] Determine the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and task data amount of the user;

[0015] An edge computing model is constructed based on the user's total edge computing consumption time and total edge computing consumption energy.

[0016] In one embodiment, the step of determining the total local computing consumption time and the total local computing consumption energy of the user based on the task computing amount and task data amount of the user includes:

[0017] Determining the time consumed by the user's broadcast service program and the energy consumed by receiving the broadcast service program based on the task data volume and broadcast rate of the user;

[0018] Determining the local computing consumption time and the local computing consumption energy of the user based on the task computing amount and the local computing frequency of the user;

[0019] Determining the total local computing consumption time of the user based on the broadcast service program consumption time and the local computing consumption time of the user;

[0020] Based on the energy consumed by the user for receiving broadcast service programs and the energy consumed for local calculation, the total local calculation energy consumption of the user is determined.

[0021] In one embodiment, the step of determining the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and the task data amount of the user includes:

[0022] Determining uplink transmission consumption time and uplink transmission consumption energy of the user based on the task data volume and uplink data rate of the user;

[0023] Determine the edge computing consumption time and edge computing consumption energy of the user based on the task computing amount and edge computing frequency of the user;

[0024] Determine the total edge computing consumption time of the user based on the uplink transmission consumption time and the edge computing consumption time of the user;

[0025] Based on the uplink transmission energy consumption and edge computing energy consumption of the user, the total edge computing energy consumption of the user is determined.

[0026] In one embodiment, the step of constructing a basic optimization model of time consumption and energy consumption based on the local computing model and the edge computing model of the user includes:

[0027] Determining a total consumption calculation model of the user based on the local calculation model and the edge calculation model of the user;

[0028] Introducing a weight factor into the total consumption calculation model of the user to obtain an objective function of a basic optimization model;

[0029] Based on the objective function and constraints of the basic optimization model, a basic optimization model of time consumption and energy consumption is constructed, and the constraints of the basic optimization model at least include bandwidth allocation constraints, edge computing frequency constraints, local computing frequency constraints, and variable non-negative constraints.

[0030] In one embodiment, the step of optimizing the basic optimization model based on the binary decision variables and the local variable copies to obtain the target optimization model of time consumption and energy consumption includes:

[0031] Introducing a binary decision variable into the objective function of the basic optimization model to obtain an objective function of an updated optimization model;

[0032] Introducing binary decision variable constraints and broadcast time constraints into the constraints of the basic optimization model to obtain the constraints of the updated optimization model;

[0033] Based on the objective function and constraint conditions of the update optimization model, construct an update optimization model of time consumption and energy consumption;

[0034] Introducing a local variable copy into the objective function of the update optimization model to obtain the objective function of the target optimization model;

[0035] Introducing local variable copy constraints into the constraints of the target optimization model to obtain the constraints of the target optimization model;

[0036] Based on the objective function and constraint conditions of the target optimization model, a target optimization model for time consumption and energy consumption is constructed.

[0037] In addition, to achieve the above purpose, the present application also proposes a resource allocation device, the resource allocation device comprising:

[0038] A consumption computing module, used to build a local computing model and an edge computing model of the user based on the user's task requirements;

[0039] An optimization solution module, used to construct a basic optimization model of time consumption and energy consumption based on the local computing model and edge computing model of the user;

[0040] The optimization solution module is further used to optimize the basic optimization model based on the binary decision variables and the local variable copies to obtain a target optimization model for time consumption and energy consumption;

[0041] The optimization solution module is further used to decompose the global optimization problem of the target optimization model into multiple parallel sub-problems based on the alternating direction multiplier strategy, and solve the multiple parallel sub-problems to obtain an optimization decision result;

[0042] A resource allocation module is used to place tasks and allocate resources to the user based on the optimization decision result.

[0043] In addition, to achieve the above objectives, the present application also proposes a resource allocation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the resource allocation method described above.

[0044] In addition, to achieve the above objectives, the present invention also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the resource allocation method described above are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the resource allocation method described above are implemented.

[0046] The present application provides a resource allocation method, which constructs a local computing model and an edge computing model of a user based on the user's task requirements; constructs a basic optimization model of time consumption and energy consumption based on the user's local computing model and the edge computing model; optimizes the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model of time consumption and energy consumption; based on an alternating direction multiplier strategy, decomposes the global optimization problem of the target optimization model into multiple parallel sub-problems, and solves the multiple parallel sub-problems to obtain an optimization decision result; based on the optimization decision result, performs task placement and resource allocation for the user. This application decomposes the complex global optimization problem into multiple easy-to-solve sub-problems, reduces the computational complexity, can run efficiently in a large-scale user network, and supports parallel processing, which greatly improves the computing efficiency, can ensure the solution speed, maintain efficient and real-time performance, and can intelligently determine the optimal placement of the task based on factors such as the real-time changing network status, user device computing power, task computing requirements and data size. This dynamic adjustment mechanism improves the flexibility and adaptability of the system, can better cope with complex and changeable actual application scenarios, and solves the technical problems of high computational complexity, poor solution speed and efficiency performance of traditional optimization models in the case of large-scale users and tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0049] Figure 1 This is a flow chart of the first embodiment of the resource allocation method of the present application;

[0050] Figure 2 This is a flow chart of Embodiment 2 of the resource allocation method of the present application;

[0051] Figure 3 A schematic diagram of total consumption data of the resource allocation method provided in Example 2 of the present application;

[0052] Figure 4 A schematic diagram of the number of iterations of the resource allocation method provided in Embodiment 2 of the present application;

[0053] Figure 5 A schematic diagram of a simplified process of resource allocation method provided in Example 2 of the present application;

[0054] Figure 6 This is a schematic diagram of the module structure of the resource allocation device according to an embodiment of the present application;

[0055] Figure 7 A schematic diagram of the device structure of the hardware operating environment involved in the resource allocation method in the embodiment of the present application.

[0056] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solutions of the embodiments of the present application are: based on the user's task requirements, construct the user's local computing model and edge computing model; based on the user's local computing model and edge computing model, construct a basic optimization model of time consumption and energy consumption; optimize the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model of time consumption and energy consumption; based on the alternating direction multiplier strategy, decompose the global optimization problem of the target optimization model into multiple parallel sub-problems, and solve multiple parallel sub-problems to obtain an optimization decision result; based on the optimization decision result, perform task placement and resource allocation for the user.

[0060] At present, for the task placement decision and resource allocation decision in edge computing, corresponding optimization problems can be constructed to solve. At present, mathematical models based on delay and constraints are usually used to describe optimization problems. Although the model is more accurate, the model complexity is high and the solution complexity is high. Especially in the case of large-scale users and tasks, the solution speed and efficiency performance are poor, and the time and resource consumption of solving global optimization problems is large, making it difficult to apply in real time.

[0061] The present application provides a solution that decomposes a complex global optimization problem into multiple easy-to-solve sub-problems, reduces computational complexity, can run efficiently in a large-scale user network, and supports parallel processing, greatly improving computational efficiency, ensuring solution speed, maintaining efficient and real-time performance, and intelligently determining the optimal placement of tasks based on factors such as real-time changing network status, user device computing power, task computing requirements, and data size. This dynamic adjustment mechanism improves the flexibility and adaptability of the system, can better cope with complex and changeable actual application scenarios, and solves the technical problems of high computational complexity, poor solution speed and efficiency performance of traditional optimization models in the case of large-scale users and tasks.

[0062] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a resource allocation device, etc. that can realize the above functions, and this embodiment does not specifically limit this. The following takes the resource allocation device as an example to illustrate this embodiment and the following embodiments.

[0063] The present application embodiment provides a resource allocation method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the resource allocation method of the present application.

[0064] In this embodiment, the resource allocation method includes steps S10 to S50:

[0065] Step S10, constructing a local computing model and an edge computing model of the user based on the user's task requirements;

[0066] It should be noted that the user in this embodiment is the user device. Each user device sends a task request to the edge server (MEC server). The task request carries detailed information of the task, that is, the task requirement. Generally speaking, the task requirement includes at least the task computation amount L k The task data volume S, the task computing volume is the computing volume of the task submitted by the user device, and the task data volume is the data volume of the task submitted by the user device. For example, user 1 submits a task with a computing volume of 500MB and a data volume of 10MB. At this time, the task computing volume is 500MB and the task computing volume is 10MB. The edge server will receive the task request from the user device and record the corresponding task requirements to prepare for subsequent calculations and optimizations.

[0067] In addition, it should be noted that tasks can be calculated / executed locally or offloaded to edge servers for remote calculation / execution. According to the location where user tasks are unloaded / placed during calculation, users can be divided into local computing users and edge computing users. Local computing users are users who place service programs locally to calculate tasks, and edge computing users are users who offload tasks to edge servers for execution.

[0068] Specifically, the set of users is represented by K, and the access point is represented by AP. The set of users is calculated locally The set of edge computing users K0 = K\K1, and the downlink program broadcast uses W D Indicates that the upstream computation offloading uses W U express.

[0069] It is understandable that for local computing users, it is necessary to calculate the time and energy consumed by each user to perform tasks locally, and for edge computing users, it is necessary to calculate the time and energy consumed by each user to perform tasks on the edge server. The local computing model is a model that calculates the time and energy consumed by users to perform tasks locally, that is, the time and energy consumption model of local computing corresponding to local computing users. The edge computing model is a model that calculates the time and energy consumed by users to perform tasks on edge servers, that is, the time and energy consumption model of edge computing corresponding to edge computing users. In this embodiment, the task computing amount and the task data amount are used to construct the local computing model and the edge computing model.

[0070] In a feasible implementation, step S10 may include steps S101 to S104:

[0071] Step S101, determining the total local computing consumption time and the total local computing consumption energy of the user based on the task computing amount and task data amount of the user;

[0072] It should be noted that the total local computing time refers to the total time consumed by local computing, and the total local computing energy consumption refers to the total energy consumed by local computing.

[0073] In a feasible implementation, step S101 may include: determining the time consumed by the user's broadcast service program and the energy consumed by receiving the broadcast service program based on the user's task data volume and broadcast rate; determining the user's local computing consumption time and local computing energy consumption based on the user's task computing volume and local computing frequency; determining the user's total local computing consumption time based on the user's broadcast service program consumption time and local computing consumption time; determining the user's total local computing energy consumption based on the user's energy consumed by receiving the broadcast service program and the local computing energy consumption.

[0074] It should be noted that the broadcast service program consumption time is the time consumed by the broadcast service program, the energy consumed by receiving the broadcast service program is the time consumed by receiving the broadcast service program, and the broadcast rate is the rate of broadcasting the service program. Assume that the AP broadcasts a service program of size S to users in the K1 set with power p0 through the downlink channel. The AP adjusts its broadcast rate r0 according to the situation of the worst user in K1. The calculation relationship of the broadcast rate is as follows:

[0075]

[0076] Where r0 represents the broadcast rate, h min =min{h k |k∈K1} represents the local calculation of the minimum downlink channel gain in the user set K1, N0 represents the noise power spectrum density, W D Indicates downlink program broadcast. The time consumed by the broadcast service program is related to the task data volume and the broadcast rate. The calculation relationship is as follows:

[0077]

[0078] In the formula, τ0 represents the time consumed by the broadcast service program, r0 represents the broadcast rate, and S represents the amount of task data. The energy consumed by receiving the broadcast service program is related to the time consumed by the broadcast service program and the circuit power consumption of the receiving user k. The calculation relationship is as follows:

[0079]

[0080] In the formula, represents the circuit power consumption of the receiving user k, τ0 represents the time consumed by the broadcast service program, Indicates that receiving broadcast service programs consumes energy.

[0081] In addition, it should be noted that the local computing frequency refers to the CPU (Central Processing Unit) frequency of the local computing, the local computing consumption time refers to the time consumed by the local computing, and the local computing consumption energy refers to the energy consumed by the local computing. Determined by the computing power of the user's device and subject to the maximum value F k Restriction, i.e. In this case, the local computing time can be calculated using the following equation:

[0082]

[0083] In the formula, Indicates the local calculation time consumed. Indicates the local calculation frequency, L k Represents the task computation amount. The corresponding local computation energy consumption can be calculated by the following formula:

[0084]

[0085] In the formula, Indicates the energy consumed by local computing, Indicates the local calculation time consumed. Indicates the local calculation frequency, L k represents the task computation amount, k k It is a constant related to the user device and reflects the energy efficiency of the device.

[0086] It can be understood that if the user is a local computing user K1, the total local computing consumption time includes the broadcast service program consumption time and the local computing consumption time, and the calculation relationship is as follows:

[0087]

[0088] In the formula, Indicates the total time consumed by local calculation, Represents the local computing time, τ0 represents the broadcast service time. Correspondingly, the total local computing energy consumption includes the energy consumed by receiving the broadcast service and the energy consumed by the local computing. The calculation relationship is as follows:

[0089]

[0090] In the formula, represents the total energy consumed by local computing, Indicates that receiving broadcast service programs consumes energy. Indicates the energy consumed by local computing.

[0091] Step S102, constructing a local computing model based on the total local computing consumption time and the total local computing consumption energy of the user;

[0092] It can be understood that according to the total local computing time and the total local computing energy consumption, the local computing model is obtained

[0093] Step S103, determining the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and task data amount of the user;

[0094] It should be noted that the total edge computing time refers to the total time consumed by edge computing, and the total edge computing energy consumption refers to the total energy consumed by edge computing.

[0095] In a feasible implementation, step S103 may include: determining the uplink transmission consumption time and uplink transmission energy consumption of the user based on the user's task data volume and uplink data rate; determining the edge computing consumption time and edge computing energy consumption of the user based on the user's task calculation volume and edge computing frequency; determining the total edge computing consumption time of the user based on the user's uplink transmission consumption time and edge computing consumption time; determining the total edge computing energy consumption of the user based on the user's uplink transmission consumption energy and edge computing consumption energy.

[0096] It should be noted that for edge computing users, it is necessary to consider the uplink transmission time and energy consumption from the user device to the edge server, as well as the computing time and energy consumption of executing tasks on the edge server. When the user decides to offload the task to the edge server, the task data must first be uploaded to the edge server. The uplink data rate refers to the rate of uplink data transmission, the uplink transmission consumption time refers to the time consumed by the uplink transmission, and the uplink transmission consumption energy refers to the energy consumed by the uplink transmission. The uplink data rate can be calculated using the following formula:

[0097]

[0098] In the formula, Indicates the uplink data rate, a k represents the user bandwidth allocation coefficient, p k represents the user's transmission power, g k represents the user's channel gain, and N0 represents the noise power spectrum density. Therefore, the user's uplink transmission consumption time can be calculated based on the uplink transmission rate and the task data volume. The calculation relationship is as follows:

[0099]

[0100] In the formula, Indicates the uplink transmission time, S indicates the task data volume, Indicates the uplink data rate. The uplink transmission energy consumption is determined by the transmission power and the uplink transmission time consumption. The calculation relationship is as follows:

[0101]

[0102] In the formula, Indicates the energy consumed by uplink transmission. Indicates the uplink transmission time, p k Indicates the transmission power.

[0103] In addition, it should be noted that the edge computing frequency refers to the CPU frequency of the edge server, the edge computing consumption time refers to the time consumed by edge computing, and the edge computing consumption energy refers to the energy consumed by edge computing. The edge computing consumption time is determined by the task computing amount and the edge computing frequency, and the calculation relationship is as follows:

[0104]

[0105] In the formula, Indicates the time consumed by edge computing, L k represents the task computation amount, Indicates the edge computing frequency. The corresponding edge computing energy consumption is calculated using the following calculation formula:

[0106]

[0107] In the formula, Indicates the energy consumed by edge computing, Indicates the time consumed by edge computing, L k represents the task computation amount, represents the edge computing frequency, k e It is a constant related to the user device and reflects the energy efficiency of the device.

[0108] It can be understood that if the user is edge computing user K0, the total edge computing consumption time includes the uplink transmission consumption time and the edge computing consumption time, and the calculation relationship is as follows:

[0109]

[0110] In the formula, Indicates the total time consumed by edge computing, Indicates the time consumed by uplink transmission. Indicates the time consumed by edge computing. Correspondingly, the total energy consumed by edge computing includes the energy consumed by uplink transmission and the energy consumed by edge computing. The calculation relationship is as follows:

[0111]

[0112] In the formula, represents the total energy consumed by edge computing, Indicates the energy consumed by uplink transmission. Indicates the energy consumed by edge computing.

[0113] Step S104: construct an edge computing model based on the user's total edge computing consumption time and total edge computing consumption energy.

[0114] It is understandable that according to the total time consumed by edge computing and the total energy consumed by edge computing, the edge computing model is obtained

[0115] Furthermore, before step S10, corresponding parameters usually need to be initialized.

[0116] Initialize the user set K = {1,2,...,n} and the edge cloud set E = {1,2,...,m}. The user set represents the set of all user devices, while the edge cloud set consists of each base station and edge server. Initialize the computing power of each user device and edge server. Assume that the local CPU frequency of each user device is 2GHz, the CPU frequency of each edge server is 10GHz, the uplink bandwidth is 10MHz, and the downlink bandwidth is 20MHz to ensure network transmission capacity.

[0117] After completing the initialization, the edge server starts to receive task requests from user devices.

[0118] Step S20, constructing a basic optimization model of time consumption and energy consumption based on the local computing model and edge computing model of the user;

[0119] In a feasible implementation, step S20 may include: determining the total consumption calculation model of the user based on the local computing model and edge computing model of the user; introducing a weight factor into the total consumption calculation model of the user to obtain the objective function of the basic optimization model; based on the objective function and constraints of the basic optimization model, constructing a basic optimization model of time consumption and energy consumption, wherein the constraints of the basic optimization model include at least bandwidth allocation constraints, edge computing frequency constraints, local computing frequency constraints, and variable non-negative constraints.

[0120] It should be noted that in order to minimize the total time consumption and total energy consumption of the user, the basic optimization model P1 is established by introducing the weight factor. At this time, the objective function is:

[0121]

[0122] In the formula, and Represent the weight factors of time consumption and energy consumption, T k is the total time consumption, E k is the total energy consumption. This embodiment needs to minimize the sum of all users, that is:

[0123]

[0124] Specifically, for each user k, the set constraints include at least bandwidth allocation constraints, edge computing frequency constraints, local computing frequency constraints, and variable non-negative constraints. The bandwidth allocation constraint is the constraint on bandwidth allocation, and the sum of the uplink bandwidth cannot exceed the available bandwidth, as shown below:

[0125]

[0126] In the formula, a k represents the bandwidth allocation coefficient, and K0 represents the edge computing user set. The edge computing frequency constraint condition is the constraint on the edge computing frequency. The total edge computing frequency allocated to all users cannot exceed the maximum CPU frequency of the edge server, as shown below:

[0127]

[0128] In the formula, Indicates the edge computing frequency, F c Indicates the maximum CPU frequency of the edge server, and K0 represents the edge computing user set. The local computing frequency constraint is the constraint on the local computing frequency. The local computing frequency of each user device cannot exceed its maximum available frequency, as shown below:

[0129]

[0130] In the formula, Indicates the local calculation frequency, F k represents the local maximum available frequency, and K1 represents the local computing user set. The non-negative constraint condition of the variable is the constraint condition for the variable value, which cannot be negative, as shown below:

[0131]

[0132] In the formula, represents the edge computing frequency, a k represents the bandwidth allocation coefficient, and K0 represents the edge computing user set.

[0133] Thus, the basic optimization model can be expressed as:

[0134]

[0135] Step S30, optimizing the basic optimization model based on the binary decision variables and the local variable copies to obtain a target optimization model of time consumption and energy consumption;

[0136] It should be noted that the target optimization model is the optimization model of the time consumption and energy consumption finally obtained. kis a binary variable used to indicate whether the task is offloaded to the edge server. k = 0, the task is offloaded to the local calculation of the user device. If b k =1, the task is offloaded to the edge server for computation. Before step S10, the binary decision variable needs to be initialized to 0.

[0137] This embodiment introduces binary decision variables and local variable copies on the basis of the basic optimization model. The introduction of binary variables enables the model to more flexibly represent the placement decisions of tasks, thereby optimizing the performance of the entire system. By introducing local variable copies, the optimization problem can be decomposed into more tractable sub-problems, so that the alternating direction multiplier strategy (ADMM) can be solved efficiently.

[0138] Step S40, based on the alternating direction multiplier strategy, decomposing the global optimization problem of the target optimization model into multiple parallel sub-problems, and solving the multiple parallel sub-problems to obtain an optimization decision result;

[0139] It can be understood that in order to efficiently solve the global optimization problem, this embodiment uses the alternating direction multiplier strategy to decompose the problem into sub-problems that can be processed in parallel. By introducing local variable copies and adding corresponding Lagrange multipliers to the objective function, the global optimization problem can be decomposed into multiple parallel sub-problems that are easy to solve, thereby achieving parallel processing and efficient calculation.

[0140] When solving, first define the augmented Lagrangian objective function:

[0141]

[0142] Where u={b,f l ,x,y,z},v={a,f c ,τ0}, θ={ρ,φ,ψ}, and c>0 is a fixed step size, the dual function is: The dual problem is: ADMM solves the dual problem by iteratively updating the local variable copy u, the global variable v, and the Lagrange multiplier θ to obtain the final optimization decision result. In addition, the Lagrange multiplier θ also needs to be initialized to 0 before step S10.

[0143] Step S50: placing tasks and allocating resources to the user based on the optimization decision result.

[0144] It should be noted that after the ADMM iteration converges, the optimal decision variables and resource allocation scheme can be obtained. The optimization decision result is the final result of the optimization problem, including each user's task placement decision (i.e., whether the task is calculated locally or offloaded to the edge server for calculation), the resource allocation of local and edge computing, and the allocation of network bandwidth. The final decision is executed based on these optimization decision results to achieve the optimal computing time and energy consumption.

[0145] First, according to the optimized binary decision variable b k , determine the placement of each user task, which can ensure that the execution location of each task can be based on the optimal computing time and energy consumption strategy, thereby improving the overall efficiency. Then, according to the optimized local computing frequency and edge computing frequency Allocate computing resources. For local computing tasks, Assigned to user devices to ensure that the task is completed within the specified time; for tasks offloaded to edge servers for computing, Assigned to the corresponding edge server. Thus, computing resources can be fully utilized to ensure efficient execution of tasks. Then, according to the optimized bandwidth allocation coefficient a k Allocate network resources. For tasks that require uploading data to edge servers, k W U Allocate to user devices to ensure that the bandwidth for data transmission meets the requirements. By properly allocating network resources, data transmission delays can be effectively reduced and overall computing efficiency can be improved.

[0146] This embodiment provides a resource allocation method, which builds a local computing model and an edge computing model of the user based on the task requirements of the user; builds a basic optimization model of time consumption and energy consumption based on the local computing model and the edge computing model of the user; optimizes the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model of time consumption and energy consumption; decomposes the global optimization problem of the target optimization model into multiple parallel sub-problems based on the alternating direction multiplier strategy, and solves the multiple parallel sub-problems to obtain an optimization decision result; and performs task placement and resource allocation for the user based on the optimization decision result. This embodiment decomposes the complex global optimization problem into multiple easy-to-solve sub-problems, reduces the computational complexity, can run efficiently in a large-scale user network, and supports parallel processing, greatly improves the computational efficiency, can ensure the solution speed, maintain efficient and real-time performance, and can intelligently determine the optimal placement position of the task based on factors such as the real-time changing network status, the computing power of the user device, the computing requirements of the task, and the data size. This dynamic adjustment mechanism improves the flexibility and adaptability of the system and can better cope with complex and changeable practical application scenarios.

[0147] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 , the step S30 may include steps S301 to S306:

[0148] Step S301, introducing a binary decision variable into the objective function of the basic optimization model to obtain an updated objective function of the optimization model;

[0149] It should be noted that the updated optimization model P2 refers to the optimization model obtained by introducing binary decision variables into the basic optimization model. k It can indicate whether the task is offloaded to the edge server. For user k, if b k = 0, the task is calculated locally on the user device; if b k =1, the task is offloaded to the edge server for computation. The introduction of binary variables enables the model to more flexibly represent the task placement decision, thereby optimizing the performance of the entire system. At this time, the objective function is:

[0150]

[0151] In the formula, and Represent the weight factors of time consumption and energy consumption, I k Indicates the amount of task data, Indicates the uplink data rate, p k represents the user's transmission power, L k represents the task computation amount, represents the edge computing frequency, represents the local calculation frequency, b k represents a binary decision variable, τ0 represents the time consumed by the broadcast service program, represents the circuit power consumption of user k at the receiving end.

[0152] Step S302, introducing binary decision variable constraints and broadcast time constraints into the constraints of the basic optimization model to obtain constraints of the updated optimization model;

[0153] It should be noted that the binary decision variable constraint and broadcast time constraint are added to the constraint of the basic optimization model. The binary decision variable constraint is the constraint on the binary decision variable, as shown below:

[0154]

[0155] Where bk represents a binary decision variable, and K represents the set of user devices. The broadcast time constraint is the constraint on the time consumed by the broadcast service program, as shown below:

[0156]

[0157] Where τ0 represents the time consumed by the broadcast service program, N0 represents the noise power spectrum density, and W D represents the downlink program broadcast, p0 represents the downlink channel power, h k Indicates the downlink channel gain.

[0158] Step S303, constructing an update optimization model of time consumption and energy consumption based on the objective function and constraint conditions of the update optimization model;

[0159] It can be understood that according to the objective function and constraints of the update optimization model, the following update optimization model P2 can be obtained:

[0160]

[0161] In this embodiment, by introducing binary decision variables, the update optimization model P2 can dynamically decide whether each task is to be calculated locally or offloaded to the edge server for execution according to the task requirements and network conditions of different users.

[0162] Step S304, introducing a local variable copy into the objective function of the updated optimization model to obtain the objective function of the target optimization model;

[0163] It can be understood that in order to further optimize the calculation process and achieve efficient parallel processing, the local variable copy x is introduced on the basis of updating the optimization model P2. k ,y k 、z k , and update the model to the target optimization model P3. By introducing local variable copies, the global optimization problem can be decomposed into more manageable sub-problems, allowing ADMM to solve efficiently. At this time, the objective function of P3 can be specifically expressed as:

[0164]

[0165] In the formula, x k ,y k 、z k They are all local variable copies, representing the bandwidth allocation coefficient, edge computing frequency, and local copies of the broadcast service program consumption time, respectively. and Represent the weight factors of time consumption and energy consumption, I k Indicates the amount of task data, Indicates the uplink data rate, p k represents the user's transmission power, L k represents the task computation amount, represents the edge computing frequency, represents the local calculation frequency, b k represents a binary decision variable, τ0 represents the time consumed by the broadcast service program, Represents the circuit power consumption of user j at the receiving end.

[0166] and, in addition,

[0167] Step S305, introducing the local variable copy constraint condition into the constraint condition of the target optimization model to obtain the constraint condition of the target optimization model;

[0168] It should be noted that the local variable copy constraint is added to the objective function of the target optimization model as follows:

[0169]

[0170] Step S306: construct a target optimization model for time consumption and energy consumption based on the objective function and constraint conditions of the target optimization model.

[0171] It can be understood that according to the objective function and constraints of the target optimization model, the target optimization model shown below can be finally obtained:

[0172]

[0173] In this embodiment, after introducing the local variable replicas, ADMM is used to decompose the global problem into multiple sub-problems, and these sub-problems are processed in parallel.

[0174] In the specific implementation, ADMM solves the dual problem by iteratively updating u, v, θ, and denoting the value in the i-th iteration as {u i ,v i ,θ i}, then, in the i+1th iteration, the variables are updated in the following steps:

[0175] Fix the global variable v and the Lagrange multiplier θ, and update the local variable u to Each subproblem can be decomposed into K parallel subproblems. Each subproblem solves two optimization problems, one for b k = 0, and the other for b k =1.

[0176] When b k = 0, the optimization problem is:

[0177]

[0178] When b k =1, the optimization problem is:

[0179]

[0180] x k ≥0,y k ≥0

[0181] The above two optimization problems are strictly convex problems and can be solved using general convex optimization algorithms. The total computational complexity in the process of updating the local variable copies is O(K), and the K subproblems can be solved in parallel, so the parallel computing time is constant.

[0182] Getting a copy of the local variable u i+1 After that, fix the local variable copy and Lagrange multiplier, and update the global variable v:

[0183]

[0184] Convex optimization problem of a surface:

[0185]

[0186] τ0≥0

[0187] Use a low-complexity algorithm to solve, let ψ and γ represent the constraints and Then the optimal at this time:

[0188]

[0189] The computational complexity of updating global variables is also O(K). Parallel computation of K users and Given the dual variables ψ and γ, the computation time is also constant.

[0190] After updating the local variable copies and global variables, update the Lagrange multiplier θ:

[0191]

[0192] The computational complexity of updating the Lagrange multiplier is also O(K), and it can be updated in parallel for K users, so the computational time of parallel computing is also constant.

[0193] Repeat the update of the above three variables until the stopping criterion is met. The stopping criterion is specified by two thresholds, the absolute tolerance and relative tolerance

[0194] Since the dual problem is convex, the convergence of the proposed algorithm is guaranteed. Since the complexity of each process of updating variables is O(K), it can be seen that the complexity of the entire ADMM iteration is O(K). In addition, when parallel computing is performed, the calculation time is constant. Therefore, the calculation time of an ADMM iteration is constant, which has excellent scalability in large networks.

[0195] For example, assume that the system uplink and downlink bandwidths are W U =W D =2MHz, the noise power spectral density is N O =-174dBm / Hz, average channel gain Where G = 4.11 represents the antenna gain, f0 = 915 MHz represents the carrier frequency, d k represents the distance between user k and AP, d e =3.4 represents the path loss index, the uplink channel g k Following the Rayleigh fading channel model, that is, Where α represents an independent exponential random variable with a mean of 1. In addition, assume that the downlink channel h k Same as the uplink channel k Off, and the correlation coefficient is set to 0.75. Assume that K users are located at a distance of 150 meters from the AP, and all users have the same weight factor. and β, In addition, the same calculation energy efficiency coefficient k is set k =10 -28 , At the same time, set K = 10, S = 32Mbits, C = 1000, F c =20GHz, p0=1W, p k = 0.1W, we can get Figure 3 and Figure 4 The simulation results are shown in Figure 2. The ADMM-based strategy has the best performance, lower total TEC, advantages in service placement (task placement), computation offloading, and resource allocation, and exhibits excellent scalability and low computation time in large-scale networks.

[0196] This embodiment provides a resource allocation method. This embodiment decomposes a complex global optimization problem into multiple easy-to-solve sub-problems, reduces computational complexity, can run efficiently in a large-scale user network, and supports parallel processing, which greatly improves computational efficiency, can ensure solution speed, maintain efficient and real-time performance, and can intelligently determine the optimal placement of tasks based on factors such as real-time changing network status, user device computing power, task computing requirements, and data size. This dynamic adjustment mechanism improves the flexibility and adaptability of the system and can better cope with complex and changeable actual application scenarios.

[0197] For example, to help understand the implementation process of the resource allocation method obtained by combining this embodiment with the above-mentioned embodiment 2, please refer to Figure 5 , Figure 5 A brief flowchart of a resource allocation method is provided, specifically:

[0198] Suppose there are 5 edge clouds in a city, each consisting of a base station and an MEC server, and 10 user devices distributed in different locations. Each user device can submit different computing tasks, and the edge cloud needs to decide whether these tasks should be executed on the local device or offloaded to the edge server.

[0199] Step 1, initialize the user set and edge cloud set, set the CPU frequency of each edge server, set the CPU frequency of each edge server, set the uplink bandwidth and downlink bandwidth, and initialize the decision variable (equal to 0), indicating that all tasks are executed locally in the initial state. Step 2, receive task requests. For example, user 1 submits a task with a computing amount of 500MB and a data amount of 10MB, and user 2 submits a task with a computing amount of 300MB and a data amount of 5MB. Step 3, model construction, build a local computing model, calculate the time and energy consumption of each user to execute tasks locally, and build an edge computing model: calculate the time and energy consumption of each user to offload tasks to the edge server. Step 4, optimize the model, establish the basic model P1: construct a weighted computing time and energy consumption model, update the model to P2: introduce binary decision variables, update the model to P3: introduce local replica variables. Step 5, ADMM optimization, decompose the global problem into 10 sub-problems, one sub-problem for each user, calculate the cost of each user task executed locally and at the edge, and perform iterative optimization (update decision variables and Lagrange multipliers) Step 6, iterative calculation, convergence judgment criteria: judge whether the stop criteria are met, if not converged, continue iteration. Step 7, decision execution, based on the optimization results, determine the execution location of each task (local or edge server), and perform specific computing resources and network resource allocation.

[0200] This application also provides a resource allocation device, please refer to Figure 6 , the resource allocation device comprises:

[0201] The consumption calculation module 10 is used to construct a local calculation model and an edge calculation model of the user based on the task requirements of the user;

[0202] An optimization solution module 20, configured to construct a basic optimization model of time consumption and energy consumption based on the local computing model and the edge computing model of the user;

[0203] The optimization solution module 20 is further used to optimize the basic optimization model based on the binary decision variables and the local variable copies to obtain a target optimization model for time consumption and energy consumption;

[0204] The optimization solution module 20 is further used to decompose the global optimization problem of the target optimization model into multiple parallel sub-problems based on the alternating direction multiplier strategy, and solve the multiple parallel sub-problems to obtain an optimization decision result;

[0205] The resource allocation module 30 is used to place tasks and allocate resources to the user based on the optimization decision result.

[0206] In a feasible implementation manner, the task requirement includes at least a task calculation amount and a task data amount, and the consumption calculation module 10 is further used to determine the total local calculation consumption time and the total local calculation consumption energy of the user based on the task calculation amount and the task data amount of the user;

[0207] Building a local computing model based on the total local computing consumption time and the total local computing consumption energy of the user;

[0208] Determine the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and task data amount of the user;

[0209] An edge computing model is constructed based on the user's total edge computing consumption time and total edge computing consumption energy.

[0210] In a feasible implementation manner, the consumption calculation module 10 is further used to determine the time consumed by the user's broadcast service program and the energy consumed by receiving the broadcast service program based on the task data volume and broadcast rate of the user;

[0211] Determining the local computing consumption time and the local computing consumption energy of the user based on the task computing amount and the local computing frequency of the user;

[0212] Determining the total local computing consumption time of the user based on the broadcast service program consumption time and the local computing consumption time of the user;

[0213] Based on the energy consumed by the user for receiving broadcast service programs and the energy consumed for local calculation, the total local calculation energy consumption of the user is determined.

[0214] In a feasible implementation manner, the consumption calculation module 10 is further used to determine the uplink transmission consumption time and uplink transmission consumption energy of the user based on the task data volume and uplink data rate of the user;

[0215] Determine the edge computing consumption time and edge computing consumption energy of the user based on the task computing amount and edge computing frequency of the user;

[0216] Determine the total edge computing consumption time of the user based on the uplink transmission consumption time and the edge computing consumption time of the user;

[0217] Based on the uplink transmission energy consumption and edge computing energy consumption of the user, the total edge computing energy consumption of the user is determined.

[0218] In a feasible implementation manner, the optimization solution module 20 is further used to determine the total consumption calculation model of the user based on the local calculation model and the edge calculation model of the user;

[0219] Introducing a weight factor into the total consumption calculation model of the user to obtain an objective function of a basic optimization model;

[0220] Based on the objective function and constraints of the basic optimization model, a basic optimization model of time consumption and energy consumption is constructed, and the constraints of the basic optimization model at least include bandwidth allocation constraints, edge computing frequency constraints, local computing frequency constraints, and variable non-negative constraints.

[0221] In a feasible implementation manner, the optimization solution module 20 is further used to introduce a binary decision variable into the objective function of the basic optimization model to obtain an updated objective function of the optimization model;

[0222] Introducing binary decision variable constraints and broadcast time constraints into the constraints of the basic optimization model to obtain the constraints of the updated optimization model;

[0223] Based on the objective function and constraint conditions of the update optimization model, construct an update optimization model of time consumption and energy consumption;

[0224] Introducing a local variable copy into the objective function of the update optimization model to obtain the objective function of the target optimization model;

[0225] Introducing local variable copy constraints into the constraints of the target optimization model to obtain the constraints of the target optimization model;

[0226] Based on the objective function and constraint conditions of the target optimization model, a target optimization model for time consumption and energy consumption is constructed.

[0227] The resource allocation device provided by the present application adopts the resource allocation method in the above embodiment, which can solve the technical problems that the traditional optimization model has high computational complexity and poor solution speed and efficiency performance in the case of large-scale users and tasks. Compared with the prior art, the beneficial effects of the resource allocation device provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, and the other technical features in the resource allocation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0228] The present application provides a resource allocation device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource allocation method in the above-mentioned embodiment 1.

[0229] Reference below Figure 7 , which shows a schematic diagram of the structure of a resource allocation device suitable for implementing the embodiment of the present application. The resource allocation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The resource allocation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0230] like Figure 7As shown, the resource allocation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the resource allocation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the resource allocation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a resource allocation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0231] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0232] The resource allocation device provided by the present application adopts the resource allocation method in the above embodiment, which can solve the technical problems that the traditional optimization model has high computational complexity and poor solution speed and efficiency performance in the case of large-scale users and tasks. Compared with the prior art, the beneficial effects of the resource allocation device provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, and the other technical features in the resource allocation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0233] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0234] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0235] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the resource allocation method in the above-mentioned embodiment.

[0236] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0237] The computer-readable storage medium may be included in the resource allocation device; or may exist independently without being assembled into the resource allocation device.

[0238] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the resource allocation device, the resource allocation device: constructs the user's local computing model and edge computing model based on the user's task requirements; constructs a basic optimization model of time consumption and energy consumption based on the user's local computing model and edge computing model; optimizes the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model of time consumption and energy consumption; based on the alternating direction multiplier strategy, decomposes the global optimization problem of the target optimization model into multiple parallel sub-problems, and solves multiple parallel sub-problems to obtain an optimization decision result; based on the optimization decision result, performs task placement and resource allocation for the user.

[0239] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0240] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0241] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0242] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned resource allocation method, and can solve the technical problems that the traditional optimization model has high computational complexity and poor solution speed and efficiency performance in the case of large-scale users and tasks. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above-mentioned embodiment, and will not be repeated here.

[0243] The present application also provides a computer program product, including a computer program, which implements the steps of the resource allocation method as described above when executed by a processor.

[0244] The computer program product provided by the present application can solve the technical problem that the traditional optimization model has high computational complexity and poor solution speed and efficiency performance in the case of large-scale users and tasks. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, which will not be repeated here.

[0245] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A resource allocation method, characterized in that: The method comprises: Based on the user's task requirements, build the user's local computing model and edge computing model; Based on the local computing model and edge computing model of the user, a basic optimization model of time consumption and energy consumption is constructed; Optimizing the basic optimization model based on binary decision variables and local variable copies to obtain a target optimization model for time consumption and energy consumption; Based on the alternating direction multiplier strategy, the global optimization problem of the target optimization model is decomposed into multiple parallel sub-problems, and the multiple parallel sub-problems are solved to obtain an optimization decision result; Based on the optimization decision result, tasks are placed and resources are allocated to the user.

2. The method according to claim 1, characterized in that The task requirement includes at least the task computing amount and the task data amount. The step of constructing the user's local computing model and edge computing model based on the user's task requirement includes: Determine the total local computing consumption time and the total local computing consumption energy of the user based on the task computing amount and task data amount of the user; Building a local computing model based on the total local computing consumption time and the total local computing consumption energy of the user; Determine the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and task data amount of the user; An edge computing model is constructed based on the user's total edge computing consumption time and total edge computing consumption energy.

3. The method according to claim 2, characterized in that The step of determining the total local computing consumption time and the total local computing consumption energy of the user based on the task computing amount and task data amount of the user comprises: Determining the time consumed by the user's broadcast service program and the energy consumed by receiving the broadcast service program based on the task data volume and broadcast rate of the user; Determining the local computing consumption time and the local computing consumption energy of the user based on the task computing amount and the local computing frequency of the user; Determining the total local computing consumption time of the user based on the broadcast service program consumption time and the local computing consumption time of the user; Based on the energy consumed by the user for receiving broadcast service programs and the energy consumed for local calculation, the total local calculation energy consumption of the user is determined.

4. The method according to claim 2, characterized in that The step of determining the total edge computing consumption time and the total edge computing consumption energy of the user based on the task computing amount and the task data amount of the user includes: Determining uplink transmission consumption time and uplink transmission consumption energy of the user based on the task data volume and uplink data rate of the user; Determine the edge computing consumption time and edge computing consumption energy of the user based on the task computing amount and edge computing frequency of the user; Determine the total edge computing consumption time of the user based on the uplink transmission consumption time and the edge computing consumption time of the user; Based on the uplink transmission energy consumption and edge computing energy consumption of the user, the total edge computing energy consumption of the user is determined.

5. The method according to claim 1, characterized in that The step of constructing a basic optimization model of time consumption and energy consumption based on the local computing model and the edge computing model of the user includes: Determining a total consumption calculation model of the user based on the local calculation model and the edge calculation model of the user; Introducing a weight factor into the total consumption calculation model of the user to obtain an objective function of a basic optimization model; Based on the objective function and constraints of the basic optimization model, a basic optimization model of time consumption and energy consumption is constructed. The constraints of the basic optimization model include at least bandwidth allocation constraints, edge computing frequency constraints, local computing frequency constraints, and variable non-negative constraints.

6. The method according to claim 5, characterized in that The step of optimizing the basic optimization model based on the binary decision variables and the local variable copies to obtain the target optimization model of time consumption and energy consumption includes: Introducing a binary decision variable into the objective function of the basic optimization model to obtain an objective function of an updated optimization model; Introducing binary decision variable constraints and broadcast time constraints into the constraints of the basic optimization model to obtain the constraints of the updated optimization model; Based on the objective function and constraint conditions of the update optimization model, construct an update optimization model of time consumption and energy consumption; Introducing a local variable copy into the objective function of the update optimization model to obtain the objective function of the target optimization model; Introducing local variable copy constraints into the constraints of the target optimization model to obtain the constraints of the target optimization model; Based on the objective function and constraint conditions of the target optimization model, a target optimization model for time consumption and energy consumption is constructed.

7. A resource allocation device, characterized in that: The device comprises: A consumption computing module, used to build a local computing model and an edge computing model of the user based on the user's task requirements; An optimization solution module, used to construct a basic optimization model of time consumption and energy consumption based on the local computing model and edge computing model of the user; The optimization solution module is further used to optimize the basic optimization model based on the binary decision variables and the local variable copies to obtain a target optimization model for time consumption and energy consumption; The optimization solution module is further used to decompose the global optimization problem of the target optimization model into multiple parallel sub-problems based on the alternating direction multiplier strategy, and solve the multiple parallel sub-problems to obtain an optimization decision result; A resource allocation module is used to place tasks and allocate resources to the user based on the optimization decision result.

8. A resource allocation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the resource allocation method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the resource allocation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the resource allocation method according to any one of claims 1 to 6 are implemented.