Resource allocation method and device in internet of things scenario, equipment and storage medium

By using a federated learning-trained offloading decision network and global optimization function, resource allocation for IoT devices is optimized, solving the problems of high computational complexity and privacy leakage in IoT networks, and achieving efficient and rational use of resources.

CN116528296BActive Publication Date: 2025-12-09BEIJING UNIV OF POSTS & TELECOMM +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310511963.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2025-12-09
Estimated Expiration
2043-05-08

AI Technical Summary

Technical Problem

The Internet of Things (IoT) network involves a large number of computational tasks, which are highly complex, involve large amounts of data, and are highly sensitive to latency. Existing resource allocation methods cannot handle these tasks efficiently and pose a risk of privacy leaks.

Method used

A federated learning mechanism is used to train the offloading decision network. The offloading decision elements are obtained by processing the channel gain set. After binarization, the target decision set and resource allocation strategy are determined by the global optimization function to optimize the resource consumption of IoT devices.

Benefits of technology

While efficiently processing large-scale data, it addresses privacy leaks, makes rational use of transmission and computing resources, and improves the rationality of resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116528296B_ABST
    Figure CN116528296B_ABST
Patent Text Reader

Abstract

The application relates to a resource allocation method and device in an Internet of Things (IoT) scenario, and a storage medium, and relates to the technical field of the IoT. The method comprises the following steps: acquiring a channel gain set, wherein the channel gain set comprises channel gains of respective sub-channels; inputting the channel gain set into a trained offloading decision network to obtain an offloading decision element set output by the offloading decision network, wherein the offloading decision element set comprises offloading decision elements corresponding to the respective sub-channels; the offloading decision network is obtained through a federated learning mechanism; performing at least two times of binaryzation processing on the offloading decision element set to obtain at least two candidate decision sets; substituting the at least two candidate decision sets into a global optimization function respectively, and determining a target decision set and a corresponding resource allocation strategy set based on at least two function values obtained; through the above method, large-scale data can be efficiently processed, and the problem of privacy leakage can also be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of Internet of Things, and particularly relate to a resource allocation method and device in an Internet of Things scenario, a device, and a storage medium. BACKGROUND

[0002] The vigorous development of mobile communication technology makes the Internet of Things network more and more complex, and more and more physical devices can access the network to collect and share data, which will generate large-scale data in the process. However, a huge Internet of Things network will generate a large number of computing tasks, which are often high in computational complexity, large in task data volume, and sensitive in time delay. They not only intensify the burden of the core network, but also cannot be ignored in terms of the power consumption for local processing of these tasks and the self-consumption of terminal devices. Mobile edge computing technology (MEC, Mobile Edge Computing) can deploy computing and storage to a location closer to users, and migrate the cloud computing platform with strong data processing capability from the mobile core network inside to the mobile access network edge close to the Internet of Things devices. For the Internet of Things devices, instead of processing tasks locally that require a large amount of computing resources, they can choose to transmit them from wireless devices to access points or base stations closer to them, and flexibly use computing and storage resources.

[0003] In related technologies, when making resource allocation and task offloading decisions, traditional optimization algorithms such as genetic algorithms, simulated annealing, and particle swarm algorithms can be used for task allocation and resource allocation planning, or deep learning related technologies can be used for model training to make task allocation and resource allocation planning through the trained model. However, the above traditional optimization algorithms cannot handle the massive data generated by the explosive growth of Internet of Things devices. Existing deep learning related technologies require massive training sample data for model training. If there is insufficient training sample data in actual application, it is often necessary to aggregate data from multiple devices. However, the data aggregation process may involve privacy issues and easily cause privacy leakage. SUMMARY

[0004] Embodiments of the present application provide a resource allocation method, device, and storage medium in an Internet of Things scenario, which can efficiently process large-scale data while solving the problem of privacy leakage. At the same time, the resource consumption of Internet of Things devices in the task processing process is taken as an optimization target, so that the obtained target decision set and resource allocation strategy can more reasonably utilize transmission resources and computing resources, improving the rationality of resource utilization. The technical solution is as follows:

[0005] On the one hand, a resource allocation method in an Internet of Things scenario is provided, and the method comprises:

[0006] obtain a channel gain set, the channel gain set comprising channel gains of respective sub-channels;

[0007] obtain a set of offloading decision elements output by the trained offloading decision network by inputting the channel gain set into the trained offloading decision network, the set of offloading decision elements comprising offloading decision elements corresponding to respective sub-channels, the offloading decision network being trained by a federated learning mechanism;

[0008] obtain at least two candidate decision sets by performing at least two times of binarization processing on the set of offloading decision elements, the candidate decision sets comprising values indicating offloading decisions corresponding to respective sub-channels, the offloading decisions indicating offloading tasks on the sub-channels to edge servers for processing or indicating processing the tasks on the sub-channels locally;

[0009] determine a target decision set and a set of resource allocation strategies corresponding to the target decision set based on at least two function values of a global optimization function obtained by substituting the at least two candidate decision sets into the global optimization function respectively, the target decision set being a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, the set of resource allocation strategies comprising uplink transmission power required for processing tasks of respective sub-channels and computing resources of the edge servers required for processing tasks of respective sub-channels, the global optimization function being used to determine resource consumption of the Internet of Things devices required for processing based on the corresponding candidate decision set under the premise of the channel gain set.

[0010] In another aspect, a resource allocation apparatus in an Internet of Things scenario is provided, and the apparatus comprises:

[0011] a set obtaining module configured to obtain a channel gain set, the channel gain set comprising channel gains of respective sub-channels;

[0012] a set processing module configured to obtain a set of offloading decision elements output by the trained offloading decision network by inputting the channel gain set into the trained offloading decision network, the set of offloading decision elements comprising offloading decision elements corresponding to respective sub-channels, the offloading decision network being trained by a federated learning mechanism;

[0013] a binarization processing module configured to obtain at least two candidate decision sets by performing at least two times of binarization processing on the set of offloading decision elements, the candidate decision sets comprising values indicating offloading decisions corresponding to respective sub-channels, the offloading decisions indicating offloading tasks on the sub-channels to edge servers for processing or indicating processing the tasks on the sub-channels locally;

[0014] The determining module is configured to substitute the at least two candidate decision sets into a global optimization function respectively, determine a target decision set and a resource allocation strategy set corresponding to the target decision set based on at least two function values of the global optimization function obtained, the target decision set being a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, and the resource allocation strategy set including uplink transmission power required for processing a task of each subchannel and computing resources of the edge server required for processing a task of each subchannel; and the global optimization function is used to determine resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set.

[0015] In a possible implementation, the binarization processing module is configured to perform binarization processing on the offloading decision elements in the offloading element set based on at least two preset element thresholds respectively, to obtain the at least two candidate decision sets; and one element threshold corresponds to one candidate decision set.

[0016] In a possible implementation, the apparatus further includes:

[0017] The set storage module is configured to store the target decision set and the channel gain set corresponding to the target decision set into a training sample set.

[0018] In a possible implementation, the apparatus further includes:

[0019] The sample obtaining module is configured to obtain a training sample subset from the training sample set in a network updating stage; the training sample subset includes at least one training sample pair, and the training sample pair includes a historical decision set and a channel gain set corresponding to the historical decision set.

[0020] The parameter updating module is configured to perform parameter updating on the offloading decision network based on the training sample subset, to obtain first network parameters.

[0021] The parameter uploading module is configured to upload the first network parameters to the edge server.

[0022] The parameter receiving module is configured to receive second network parameters issued by the edge server; the second network parameters are generated by the edge server after aggregating first network parameters from at least two sources.

[0023] The network updating module is configured to update the offloading decision network based on the second network parameters.

[0024] In a possible implementation, the global optimization function is a function constructed based on a maximum latency constraint, a computing resource constraint of the edge server, and an uplink transmission power constraint, and the global optimization function is:

[0025]

[0026]

[0027]

[0028]

[0029]

[0030] wherein, ω i denotes a weight of a subchannel, denotes resource consumption of the Internet of Things device required for processing a task of the subchannel on the edge server, denotes resource consumption of the Internet of Things device required for processing a task on the subchannel locally, denotes a migration cost;

[0031] h = {h i | i ∈ M} denotes the channel gain set, a = {a i | i ∈ M} denotes the candidate decision set, p = {p i | i ∈ M} denotes an uplink transmission power set required for task transmission, denotes a computing resource set of the edge server required for a task, and M denotes a number of subchannels; denotes the maximum latency constraint, F max denotes the computing resource constraint of the edge server, P max denotes the uplink transmission power constraint, denotes time required for processing a task of a subchannel on the edge server, denotes time required for processing a task on a subchannel locally.

[0032] In a possible implementation, the apparatus further includes:

[0033] The information obtaining module is configured to obtain the first uplink transmission power and first computing resource information from a resource allocation strategy corresponding to the first subchannel, the first computing resource information being used to indicate a first computing resource required by the edge server to process information on the first subchannel; the first subchannel is any one of subchannels in the target decision set indicating that a corresponding task is to be offloaded to the edge server for processing.

[0034] The task transmission module is configured to, when offloading the task on the first subchannel to the edge server based on the first uplink transmission power, send the first computing resource information corresponding to the first subchannel to the edge server, so that the edge server processes the task on the first subchannel based on the first computing resource.

[0035] In another aspect, a computer device is provided, which includes a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the above-mentioned resource allocation method in the Internet of Things scenario.

[0036] In another aspect, a computer readable storage medium is provided, which stores at least one computer program, the computer program being loaded and executed by a processor to implement the above-mentioned resource allocation method in the Internet of Things scenario.

[0037] In another aspect, a computer program product is provided, which includes at least one computer program, the computer program being loaded and executed by a processor to implement the above-mentioned resource allocation method in the Internet of Things scenario provided in various optional implementation manners.

[0038] The technical solutions provided in the present application can include the following beneficial effects:

[0039] The resource allocation method in the Internet of Things scenario provided by the embodiment of the application uses the offloading decision network obtained by training the federated learning mechanism to process the channel gain set, obtains an offloading element set containing offloading decision elements corresponding to each subchannel, then performs different binarization processing on the offloading decision element set to determine at least two candidate decision sets, and then brings the at least two candidate decision sets into a global optimization function for determining the resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set, to select the optimal target decision set from the at least two candidate decision sets based on the function value of the global optimization function corresponding to each candidate decision set, and obtain the resource allocation strategy set corresponding to the target decision set, to perform task allocation and resource allocation under the current channel gain set according to the target decision set and the resource allocation strategy set; by the above method, large-scale data can be efficiently processed, and the problem of privacy leakage can also be solved, and the resource consumption of the Internet of Things device required in the task processing process is taken as an optimization target, so that the target decision set and the resource allocation strategy obtained can more reasonably utilize transmission resources and computing resources, and the rationality of resource utilization is improved.

[0040] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the application. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings incorporated in and forming a part of the specification illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0042] Figure 1 A schematic diagram of a MEC system model in an Internet of Things scenario provided by an exemplary embodiment of the application is shown;

[0043] Figure 2 A flowchart of a resource allocation method in an Internet of Things scenario provided by an exemplary embodiment of the application is shown;

[0044] Figure 3 A flowchart of a resource allocation method in an Internet of Things scenario provided by an exemplary embodiment of the application is shown;

[0045] Figure 4 A schematic diagram of a parameter updating process provided by an exemplary embodiment of the application is shown;

[0046] Figure 5 A block diagram of a resource allocation apparatus in an Internet of Things scenario provided by an exemplary embodiment of the application is shown;

[0047] Figure 6A diagram showing a comparison between FLM and CLM training processes according to an example embodiment of the present application is shown.

[0048] Figure 7 A diagram showing a comparison between FLM and CLM resource consumption according to an example embodiment of the present application is shown.

[0049] Figure 8 A structural block diagram of a computer device according to an example embodiment is shown. DETAILED DESCRIPTION

[0050] The example embodiments will be described in detail herein with reference to the attached drawings. The following description is with reference to the drawings, in which like numerals represent like elements, unless otherwise described. The following description of example embodiments is not representative of all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the appended claims.

[0051] With the development of Internet of Things (IoT) technology, sensors are embedded or equipped in various objects, which can connect these objects to the existing Internet, and realize the interconnection and intercommunication of objects. Through the Internet of Things, a central computer can centrally manage and control machines, devices, and personnel. Therefore, the Internet of Things technology can be applied to remote control of home devices and cars, search for locations, prevent theft of goods, collect data for disaster prediction and popular disease control, etc., and has a wide range of applications, realizing information interaction and seamless connection between people and objects, and objects and objects.

[0052] Generally, the Internet of Things devices are usually limited in computing resources and memory capacity, and as the Internet of Things technology matures, a large number of devices can be connected to the network and applied in different fields and scenarios such as intelligent transportation, smart home, smart city, etc. In this case, the huge Internet of Things network will generate a large number of computing tasks, which are often high in computational complexity, large in task data volume, and sensitive to time delay. They not only increase the burden of the core network, but also consume a lot of power and terminal device itself loss for local processing of these tasks. To solve these problems, the mobile edge computing technology (MEC, Mobile Edge Computing) deploys computing and storage to a location closer to the user, and migrates the cloud computing platform with strong data processing capability from the mobile core network inside to the mobile access network edge close to the Internet of Things device. For the Internet of Things device, it does not need to process tasks locally that require a large amount of computing resources, but can choose to transmit them from the wireless device to the access point or base station closer to itself, and flexibly use computing and storage resources. Therefore, the MEC technology not only reduces the delay of executing computing tasks, but also saves energy consumption for cloud computing applications that are sensitive to delay, and improves user experience.

[0053] The introduction of MEC services in the Internet of Things system enables the MEC server (edge server) to connect to the edge network close to the device to collect information of various Internet of Things devices, provide analysis processing capability and reduce delay response time. The Internet of Things device with limited resources fully or partially offloads the computing-intensive task to the edge server with sufficient resources, and the edge server allocates computing resources for the task to be offloaded, thereby providing strong data processing capability for emerging services that are sensitive to time delay and high in computational complexity.

[0054] Figure 1 An exemplary embodiment of the present application provides a schematic diagram of an MEC system model in an Internet of Things scenario, as shown in Figure 1 As shown in the figure, in a system deployed with an edge server, the Internet of Things device 110 accesses the network through the base station, and the base station side is equipped with a high-power edge server 120, which sinks the computing capability of the cloud to the edge server side. The Internet of Things devices are randomly distributed in the entire area, and when the Internet of Things device generates a task, it can choose to process the task locally or offload the task to the edge server for operation. Offloading the task to the edge server not only speeds up the processing process of the task, but also reduces the running time of the Internet of Things device itself and reduces resource consumption. The Internet of Things device can be a vehicle-mounted Internet of Things device, a camera device, an infrared detector device, a wearable watch, and any form of electronic device that can access the Internet of Things, which is not limited in the present application.

[0055] As a core technology of MEC, computational offloading technology is used to solve problems such as whether tasks can be offloaded to edge processing and how much resources the edge cloud needs to allocate to tasks. In order to adapt to the needs of efficient processing of large-scale data and avoid privacy data leakage caused by deep learning technology, this application provides a resource allocation method in the Internet of Things scenario, which can efficiently process large-scale data while solving the problem of privacy data leakage.

[0056] Figure 2 This application illustrates a flowchart of a resource allocation method in an Internet of Things (IoT) scenario provided by an exemplary embodiment. This method can be executed by a computer device, which can be implemented as follows: Figure 1 The IoT devices shown, such as Figure 2 As shown, the resource allocation method in this IoT scenario may include the following steps:

[0057] Step 210: Obtain the channel gain set, which contains the channel gain of each sub-channel.

[0058] Channel gain is the transmission characteristic of the channel itself, which is independent of input and output and changes with time and frequency. Therefore, in order to adapt to the changes in channel gain, the computer device can obtain the channel gain set for each time frame to determine the task offloading decision and resource allocation strategy for each time frame.

[0059] In the field of communications, considering the offloading process of multiple tasks in a single IoT device, the cellular network uses orthogonal frequency division technology to divide the channel into M sub-channels. One sub-channel can correspond to one task, allowing multiple tasks arriving within the same time period to perform computational offloading simultaneously. This time period can be a time slot or a time frame.

[0060] Step 220: By inputting the channel gain set into the trained offloading decision network, the offloading decision element set output by the offloading decision network is obtained; the offloading decision element set contains offloading decision elements corresponding to each sub-channel; the offloading decision network is trained through a federated learning mechanism.

[0061] In this embodiment of the application, the offloading decision element is an element output by the offloading decision network after processing the channel gain of each sub-channel in the received channel gain set, which corresponds to each sub-channel. The offloading decision element can be a numerical index used to indicate the offloading decision. It is illustrative, and each offloading decision element is a value between 0 and 1.

[0062] In the machine learning network training process, a large amount of training data is usually required, so it is often necessary to aggregate the data of multiple devices. For example, in the smart city scenario, each camera will collect a large amount of image data, but from the perspective of the global monitoring system, the data collected by each camera is limited, so it is necessary to aggregate the data of multiple cameras to analyze the data. Since multiple Internet of Things devices in actual applications may come from different users, the data aggregation process may involve privacy issues, so in the embodiments of the present application, the offloading decision network is trained through a federated learning mechanism to improve the training effect of the offloading decision network while avoiding privacy data leakage and improving data security.

[0063] Among them, federated learning (Federated Learning) is a distributed machine learning technology, its core idea is to train the model in multiple data sources with local data in a distributed manner, without exchanging local data, only by exchanging model parameters or intermediate results to build a global model based on virtual fused data, so as to realize the balance between data privacy protection and data sharing calculation; in the embodiments of the present application, the offloading decision network can be a DNN (Deep Neural Networks, deep neural network), or it can also be other neural networks, the present application does not limit this, taking the DNN as an example, a training process is as follows: each Internet of Things device can download the parameters of the global network from the cloud server, that is, the parameters of the current general DNN network; each Internet of Things device trains the downloaded global network (i.e. local network) based on the local training sample, and updates the parameters of the local network from θ c to θ c+1 , wherein θ c represents the network parameters of the local network before training, and θ c+1 represents the network parameters of the local network after training; each Internet of Things device uploads the network parameters of the local network after training to the edge server, and the edge server aggregates the network parameters of each local network to obtain the network parameters of the updated global network, and then distributes the network parameters of the global network to each Internet of Things device to complete a training of the offloading decision network. Since the above process does not involve the interaction of local data between each Internet of Things device, but only involves the interaction of network parameters, the data privacy of each network device can be effectively protected, and the data security is improved.

[0064] Step 230, at least two candidate decision sets are obtained by performing at least two binaryzation processes on the offloading decision element set; the numerical value in the candidate decision set indicates the offloading decision corresponding to each subchannel, and the offloading decision indicates that the task on the subchannel is offloaded to the edge server for processing, or indicates that the task on the subchannel is processed locally.

[0065] The at least two binarization processes on the set of offloading decision elements are independent of each other, and the at least two binarization processes are based on different criteria, so that the at least two candidate decision sets obtained are also different. The binarization process on the set of offloading decision elements can also be referred to as a process of quantizing the set of offloading decision elements into binary offloading actions, that is, quantizing the offloading decision elements in the set of offloading decision elements into 0 or 1 to obtain a candidate decision set. Illustratively, when the offloading decision element is quantized as 0, it means that the task on the subchannel corresponding to the offloading decision element is processed locally; when the offloading decision element is quantized as 1, it means that the task on the subchannel corresponding to the offloading decision element is offloaded to the edge server for processing; or, the task on the subchannel corresponding to the offloading decision element can also be offloaded to the edge server for processing when the offloading decision element is quantized as 0; and the task on the subchannel corresponding to the offloading decision element is offloaded to the edge server for processing when the offloading decision element is quantized as 1. The correspondence between the quantized value of the offloading decision element and the task processing mode can be set based on actual needs, which is not limited in the present application.

[0066] In step 240, the at least two candidate decision sets are respectively substituted into a global optimization function, and a target decision set and a resource allocation strategy set corresponding to the target decision set are determined based on at least two function values of the global optimization function obtained; the target decision set is a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, and the resource allocation strategy set includes uplink transmission power required for processing tasks of each subchannel and computing resources of an edge server required for processing tasks of each subchannel; the global optimization function is used to determine resource consumption of the Internet of Things device required for processing based on each candidate decision set under the premise of the set of channel gains.

[0067] In the embodiments of the present application, based on the limitation of the computing resources of the Internet of Things device, the resource consumption of the Internet of Things device in the task processing process is taken as an index for evaluating the overall effectiveness of the MEC system, the resource consumption includes computing resources and transmission resources, and in combination with the limitation of other conditions in the task processing process, such as the limitation of uplink transmission power, the limitation of delay, the limitation of computing resources of the edge server, etc., a global optimization problem is proposed, and a global optimization function is constructed correspondingly.

[0068] The at least two candidate decision sets are respectively brought into a global optimization function to obtain function values of the global optimization function respectively corresponding to the candidate decision sets, and the function values of the global optimization function are used to indicate the computing resources of the Internet of Things devices required for processing the tasks based on the corresponding candidate decision sets in the case of the current channel gain set. Therefore, after obtaining the function values of the global optimization function respectively corresponding to the candidate decision sets, the candidate decision set that minimizes the function value of the global optimization function can be determined as the optimal decision set (i.e., a target decision set) in the at least two candidate decision sets, and a corresponding resource allocation strategy set is obtained to perform task allocation based on the target decision set and resource allocation based on the uplink transmission power and the computing resources of the edge server indicated by the resource allocation strategy set.

[0069] That is, when performing task allocation based on the target decision set, the resource consumption of the Internet of Things devices can be minimized, where the resource consumption of the Internet of Things devices includes the computing resources required for processing the tasks locally and the transmission resources required for offloading the tasks to the edge server. The resource allocation strategy corresponding to the target decision set can indicate the uplink transmission power required by the Internet of Things devices for uploading each task and the computing resources called by the edge server when processing the tasks, so as to ensure the rationality of resource scheduling.

[0070] In summary, the resource allocation method in the Internet of Things scenario provided by the embodiments of the present application uses the offloading decision network trained by the federated learning mechanism to process the channel gain set to obtain an offloading element set containing offloading decision elements corresponding to each subchannel, and then performs different binary processing on the offloading decision element set to determine at least two candidate decision sets. The at least two candidate decision sets are brought into a global optimization function used to determine the resource consumption of the Internet of Things devices required for processing based on the corresponding candidate decision set under the premise of the channel gain set, so as to select the optimal target decision set from the at least two candidate decision sets based on the function values of the global optimization function corresponding to the candidate decision sets, and obtain a resource allocation strategy set corresponding to the target decision set to perform task allocation and resource allocation under the condition of the current channel gain set according to the target decision set and the resource allocation strategy set. Through the above method, large-scale data can be efficiently processed while solving the problem of privacy leakage. In addition, the resource consumption of the Internet of Things devices required in the task processing process is taken as an optimization target, so that the target decision set and the resource allocation strategy obtained can more reasonably utilize the transmission resources and the computing resources, thereby improving the rationality of resource utilization.

[0071] In the embodiments of the present application, the optimization allocation problem of the resource consumption of the Internet of Things device required for task processing can be divided into two sub-problems, i.e., a task offloading decision problem and a resource allocation problem. After the task offloading decision is determined, the resource allocation strategy can be determined based on the offloading decision. Therefore, in the resource allocation method provided by the embodiments of the present application in the Internet of Things scenario, after the channel gain set is processed by the offloading decision network to obtain the offloading decision element set, a plurality of candidate decision sets are obtained through different binarization processing modes, and then the optimal target decision set is determined from the candidate decision sets. Figure 3 A flowchart of a resource allocation method in an Internet of Things scenario provided by an example embodiment of the present application is shown. The method can be executed by a computer device, which can be implemented as an Internet of Things device as shown in Figure 1 Figure 3 The resource allocation method in the Internet of Things scenario can include the following steps:

[0072] In step 310, a channel gain set is obtained, which includes the channel gains of each sub-channel.

[0073] For each sub-channel, the sub-channel gain is represented by h i , where i represents the i th channel. h = {h i | i ∈ M} is used to represent the channel gain set, and M is the number of sub-channels.

[0074] In step 320, the channel gain set is input into the trained offloading decision network to obtain an offloading decision element set output by the offloading decision network. The offloading decision element set includes offloading decision elements corresponding to each sub-channel. The offloading decision network is obtained by training through a federated learning mechanism.

[0075] In the embodiments of the present application, in order to improve the real-time performance and accuracy of the offloading decision network, an update cycle of the offloading decision network can be set. Illustratively, the update cycle can be set based on a time frame, for example, set to update the offloading decision network every n time frames, where n is a positive integer. The update cycle can be set based on actual requirements, which is not limited in the present application.

[0076] In the network updating phase, the computer device updates the offloading decision network through a federated learning mechanism. The process can be implemented as follows:

[0077] In the network updating phase, a training sample subset is obtained from the training sample set. The training sample subset includes at least one training sample pair, and the training sample pair includes a decision set and a channel gain set corresponding to the decision set.

[0078] ​updating the offloading decision network based on the training sample subset to obtain first network parameters;

[0079] uploading the first network parameters to the edge server;

[0080] receiving second network parameters issued by the edge server; the second network parameters are generated by the edge server after aggregating the first network parameters from at least two sources;

[0081] updating the offloading decision network based on the second network parameters.

[0082] The training sample set includes a plurality of training sample pairs, each training sample pair including a historical decision set of the current IoT device and a channel gain set corresponding to the historical decision set. To improve the real-time performance of the offloading decision network update, training sample pairs within a target time length from the current time can be selected to form the training sample subset, and the target time length can be set based on actual requirements.

[0083] It should be noted that when updating the parameters of the offloading decision network, all or part of the IoT devices connected to the edge server can train the local offloading decision network based on the local training sample subset to obtain corresponding first network parameters. When part of the IoT devices connected to the edge server participate in the parameter update, the part of the IoT devices can be randomly selected or specified by relevant personnel, and the present application does not limit this. The above steps are the training interaction process of one IoT device.

[0084] After the current IoT device completes the parameter update of the offloading decision network using the local training sample subset, the obtained first network parameters are uploaded to the edge server. Correspondingly, the edge server receives the first network parameters uploaded by the current IoT device. After the edge server receives the first network parameters uploaded by the target proportion of IoT devices, the received first network parameters are aggregated, and the aggregation process can be represented as:

[0085]

[0086] wherein n i represents the data volume of the ith IoT device, and n represents the sum of the data volumes of the IoT devices participating in the local model training, i.e. N represents the number of IoT devices.

[0087] Optionally, the edge server can perform the parameter aggregation operation after receiving the first network parameters of the N Internet of Things devices, at this time, the target proportion is 100%; or the edge server can also perform the parameter aggregation operation after receiving the first network parameters of the Internet of Things devices of the target proportion, for example, the edge server performs the parameter aggregation operation after receiving the first network parameters of 70% of the Internet of Things devices, to improve the network update rate; it should be noted that the target proportion can be set by relevant personnel based on actual needs, and the present application does not limit this.

[0088] Figure 4 A schematic diagram of the parameter update process provided by an example embodiment of the present application is shown, as shown in Figure 4 The process can include:

[0089] S401, N Internet of Things devices download global parameters from the edge server, N is a positive integer.

[0090] The global parameters are network parameters of the offloading decision network commonly used by the current Internet of Things devices accessing the edge Internet of Things server.

[0091] S402, the N Internet of Things devices update the offloading decision network parameters based on their respective training sample subsets, and obtain their respective local parameters.

[0092] The local parameters are network parameters obtained by the Internet of Things devices after training the offloading decision network based on the local training sample subset.

[0093] S403, the N Internet of Things devices upload their respective local parameters to the edge server, and correspondingly, the edge server receives the local parameters uploaded by the N Internet of Things devices.

[0094] S404, the edge server performs parameter aggregation on the N sets of local parameters to obtain updated global parameters.

[0095] S405, determine whether the number of updates reaches the number threshold, if yes, determine that the network training is completed, if not, repeat S401 to S404.

[0096] In another possible implementation, the network training can also be determined to be completed after determining that the network converges.

[0097] After the network training is completed, the edge server distributes the updated global parameters to each Internet of Things device accessing the edge server, and correspondingly, each Internet of Things device downloads the updated global parameters and updates the offloading decision network based on the updated global parameters. It should be noted that the Internet of Things devices participating in the network parameter update can be all or part of the Internet of Things devices accessing the edge server.

[0098] At step 330, the offloading decision elements in the offloading element set are binarized based on preset at least two element thresholds respectively to obtain at least two candidate decision sets; one element threshold corresponds to one candidate decision set.

[0099] The numerical value of the element threshold and the number of element thresholds can be set by relevant personnel based on actual needs, and the present application does not limit this; illustratively, in the case that the offloading decision elements in the offloading decision set are between 0 and 1, the element threshold is a specified numerical value or a random numerical value between 0 and 1; illustratively, if the element threshold is 0.5, when the offloading decision element set is binarized, the offloading decision elements less than 0.5 are set to 0, and the offloading decision elements greater than 0.5 are set to 1; if the element threshold is 0.75, when the offloading decision element set is binarized, the offloading decision elements less than 0.75 are set to 0, and the offloading decision elements greater than 0.75 are set to 1, and so on.

[0100] At step 340, the at least two candidate decision sets are substituted into the global optimization function respectively, and the target decision set and the resource allocation strategy set corresponding to the target decision set are determined based on at least two function values of the obtained global optimization function; the target decision set is the candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, and the resource allocation strategy set includes the uplink transmission power required for processing the tasks of each subchannel and the computing resources of the edge server required for processing the tasks of each subchannel; the global optimization function is used to determine the resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set.

[0101] Optionally, after obtaining the target decision set and the resource allocation strategy set corresponding to the target decision set, the computer device stores the target decision set and the channel gain set corresponding to the target decision set in the training sample set for network parameter updating in the next network updating stage.

[0102] Optionally, after obtaining the target decision set and the resource allocation strategy set corresponding to the target decision set, the Internet of Things device can perform task allocation and resource allocation based on the target decision set and the resource allocation strategy corresponding to the target decision set, wherein for the task indicated in the target decision set to be processed on the edge server, the process can be implemented as:

[0103] The first uplink transmission power and the first computing resource information are obtained from the resource allocation strategy corresponding to the first subchannel, the first computing resource information being used to indicate the first computing resource required by the edge server to process the information on the first subchannel; the first subchannel is any one of the subchannels in the target decision set indicating that the corresponding task is to be unloaded to the edge server for processing.

[0104] When the task on the first subchannel is offloaded to the edge server based on the first uplink transmission power, the first computing resource information corresponding to the first subchannel is sent to the edge server, so that the edge server processes the task on the first subchannel based on the first computing resource.

[0105] That is, the Internet of Things device uploads the task to the edge server based on the uplink transmission power in the resource allocation strategy, and also uploads the computing resource information indicating the computing resource required by the edge server to process the task to the edge server, so that the edge server invokes the corresponding computing resource to process the task.

[0106] Since the battery capacity of the Internet of Things device is not enough to support long-time high-energy-consumption work, otherwise it will aggravate the resource loss of itself, therefore, based on the edge Internet of Things system, a global optimization problem P1 is proposed, which aims to minimize the resource loss of the Internet of Things device while guaranteeing the delay requirement of task processing, and since the mobility of the Internet of Things device, when describing the global optimization problem, the migration cost needs to be considered. Based on this, in the embodiments of the present application, the global optimization function is a function constructed based on the maximum delay constraint, the computing resource constraint of the edge server and the uplink transmission power constraint, with the resource loss of the Internet of Things device as the optimization target. Optionally, the global optimization function is a function constructed based on the Lagrange multiplier method, and the global optimization function is:

[0107]

[0108]

[0109]

[0110]

[0111]

[0112] wherein, ω i denotes the weight of the subchannel, denotes the resource loss of the Internet of Things device required for offloading the task on the subchannel to the edge server for processing, denotes the resource loss of the Internet of Things device required for processing the task on the subchannel locally, denotes the migration cost;

[0113] h={h i |i∈M} denotes the channel gain set, a={a i |i∈M} denotes the candidate decision set, and p={p i{P}, represents a set of uplink transmission power required for task transmission, represents a set of computing resources of edge servers required for tasks, M represents the number of sub-channels; represents a maximum delay constraint, F max represents a computing resource constraint of an edge server, P max represents an uplink transmission power constraint, represents a time required for offloading tasks of a sub-channel to an edge server for processing, represents a time required for locally processing tasks on a sub-channel.

[0114] The following embodiments explain the construction process of the global optimization function applied in the present application:

[0115] 1) For each task, set the task characteristics of each task as: wherein H i represents the size of the data amount required for computation of a task, in bits (bit), D i represents the size of the computing resource requested by a task, that is, the total number of CPU cycles required, is the maximum delay allowed for task completion, in seconds (s).

[0116] 2) In the Internet of Things scenario, due to the mobility of Internet of Things devices and the limitation of base station server coverage, a task migration process will occur during task offloading, that is, through the transfer between base stations to ensure that Internet of Things devices can also receive information sent by edge servers during movement; the task migration process will generate an additional migration cost, which is the processing resource required during the task migration process; the migration cost is related to the data amount of the task, and in the embodiments of the present application, the migration cost of each task is set as The calculation formula is:

[0117]

[0118] wherein γ is the proportionality coefficient of the migration cost and the data amount required for computation of a task.

[0119] 3) For each sub-channel, the sub-channel gain is represented by h i , the uplink power required for each sub-channel to send corresponding task data is represented by p i , the task S i is the signal-to-noise ratio (SINR) of the corresponding sub-channel and the base station, i which can be represented as:

[0120]

[0121] wherein d represents the distance between the IOT device and the base station, δ represents the standard propagation path loss exponent, σ 2 is the power of the additive white Gaussian noise. Thus, denoting B the bandwidth of the uplink communication link, the transmission rate R i at which the IOT device uploads a task S i to the edge server can be calculated as:

[0122] R i (p i )=Blog2(1+SINR i ).

[0123] 4) When processing each task, each task can choose a local computation mode or an edge cloud computation mode, denoting the task offloading decision variable as a , and illustratively, a i =1 indicates that the subchannel is occupied and the corresponding task is offloaded to the edge server; a i =0 indicates that the task chooses local processing.

[0124] 5) In the corresponding local computation mode (Local Computation) of local processing, the local computing capability of the IOT device is denoted as f L , and the time required for local processing of the task can be calculated as:

[0125]

[0126] The resource cost consumption of the local resource is a positive proportional function related to the computing capability of the IOT device, the size of the computing task, and the performance parameter of the IOT device, and it is related to the computing capability of the IOT device, the size of the computing task, and the performance parameter of the IOT device. Therefore, the local resource consumption is denoted as:

[0127]

[0128] wherein κ is a constant coefficient, representing the performance parameter of the IOT device, and being related to the hardware structure of the IOT device.

[0129] 6) In the corresponding edge cloud computation mode (Edge Computation) of the edge server, since the backhaul data is much smaller than the data to be uploaded, in order to facilitate the research, the backhaul delay is ignored in the embodiments of the present application.

[0130] In terms of computing time, the offloading process is divided into data transmission and computing processing two parts. First, the transmission time required for uploading the task to the edge server is:

[0131]

[0132] Secondly, the processing time of the computing task on the edge server is:

[0133]

[0134] wherein, represents the computing resource of the edge server required by the task processing.

[0135] Finally, the total delay of selecting edge cloud computing is:

[0136]

[0137] In terms of resource consumption of the Internet of Things device, the resource consumed by the task offloading is the resource consumed by the task in the transmission process. In order to facilitate calculation, the resource consumption generated by the edge server computing on the base station side is not considered. Therefore, the resource consumption when selecting edge cloud computing is:

[0138]

[0139] 7) Set the weight ω of each subchannel i All are non-negative. Sum the energy consumption and migration cost of all tasks of a single Internet of Things device in a time period. The calculation formula of the energy consumption and migration cost of the time period is:

[0140]

[0141] 8) Considering the maximum delay constraint allowed by the task completion, the maximum computing power constraint that can be allocated by the edge server, and the uplink transmission power constraint required by the task upload, the global optimization problem P1 is proposed:

[0142]

[0143]

[0144]

[0145]

[0146]

[0147] Further, the optimization problem P1 can be simplified:

[0148] 9) When the task offloading decision a in the optimization problem P1 is determined, P1 can be simplified to the optimization problem P2:

[0149]

[0150]

[0151]

[0152]

[0153] The optimization problem P2 only involves the uplink transmission power allocation p and the edge server computing resource allocation f.

[0154] 10) the uplink transmission rate R i (p i ) is a monotonically increasing function of the uplink transmission power p i , when the transmission power p i decreases, the transmission rate R i also decreases, then the task processing delay of the edge cloud computing mode increases, but is still limited by the maximum delay allowed for the completion of the task . Therefore, the transmission power can be reduced as much as possible under the condition of meeting the maximum delay for the completion of the task, so that p i satisfies

[0155]

[0156] According to the relationship between p and f, the optimization problem P2 can be further simplified to the optimization problem P3:

[0157]

[0158]

[0159]

[0160]

[0161] P3 is only related to the uplink transmission power allocation p and is a multivariate function extremum problem.

[0162] Based on the above 1) to 8), the construction of the global optimization problem can be completed, and based on 9) to 10), the global optimization problem can be further simplified. In practical applications, a candidate decision set can be brought into any global optimization function to calculate the function value corresponding to the candidate decision set and obtain the resource allocation strategy set corresponding to the candidate decision set.

[0163] In summary, the method for resource allocation in the Internet of Things scenario provided by the embodiments of the present application uses the offloading decision network obtained by training through the federated learning mechanism to process the channel gain set, obtains an offloading element set containing offloading decision elements corresponding to each subchannel, then performs different binarization processing on the offloading decision element set to determine at least two candidate decision sets, and then inputs the at least two candidate decision sets into a global optimization function for determining the resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set, to select the optimal target decision set from the at least two candidate decision sets based on the function value of the global optimization function corresponding to each candidate decision set, and obtain the resource allocation strategy set corresponding to the target decision set, so as to perform task allocation and resource allocation under the current channel gain set according to the target decision set and the resource allocation strategy set. Through the above method, large-scale data can be efficiently processed, and the problem of privacy leakage can also be solved. At the same time, the resource consumption of the Internet of Things device required in the task processing process is taken as an optimization target, so that the target decision set and the resource allocation strategy obtained can more reasonably utilize transmission resources and computing resources, and the rationality of resource utilization is improved.

[0164] Figure 5 A block diagram of a device for resource allocation in the Internet of Things scenario provided by an example embodiment of the present application is shown. The device can be used to implement the method for resource allocation in the Internet of Things scenario as shown in Figure 2 or Figure 3 All or part of the steps in the embodiments can be implemented as shown in Figure 5 The device for resource allocation in the Internet of Things scenario includes:

[0165] A set obtaining module 510 is configured to obtain a channel gain set containing channel gains of each subchannel.

[0166] A set processing module 520 is configured to input the channel gain set into a trained offloading decision network to obtain an offloading decision element set output by the offloading decision network. The offloading decision element set contains offloading decision elements corresponding to each subchannel. The offloading decision network is obtained by training through a federated learning mechanism.

[0167] A binarization processing module 530 is configured to perform at least two times of binarization processing on the offloading decision element set to obtain at least two candidate decision sets. The values in the candidate decision set indicate offloading decisions corresponding to each subchannel. The offloading decisions indicate offloading tasks on the subchannels to an edge server for processing, or indicate local processing of tasks on the subchannels.

[0168] The determining module 540 is configured to substitute the at least two candidate decision sets into a global optimization function respectively, determine a target decision set and a resource allocation strategy set corresponding to the target decision set based on at least two function values of the global optimization function obtained, the target decision set being a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, and the resource allocation strategy set including uplink transmission power required for processing a task of each subchannel and computing resources of the edge server required for processing a task of each subchannel; and the global optimization function is used to determine resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set.

[0169] In a possible implementation, the binarization processing module 530 is configured to perform binarization processing on the offloading decision elements in the offloading element set based on at least two preset element thresholds respectively, to obtain the at least two candidate decision sets; and one element threshold corresponds to one candidate decision set.

[0170] In a possible implementation, the apparatus further includes:

[0171] The set storage module is configured to store the target decision set and the channel gain set corresponding to the target decision set into a training sample set.

[0172] In a possible implementation, the apparatus further includes:

[0173] The sample obtaining module is configured to obtain a training sample subset from the training sample set in a network updating stage; the training sample subset includes at least one training sample pair, and the training sample pair includes a historical decision set and a channel gain set corresponding to the historical decision set.

[0174] The parameter updating module is configured to perform parameter updating on the offloading decision network based on the training sample subset, to obtain first network parameters.

[0175] The parameter uploading module is configured to upload the first network parameters to the edge server.

[0176] The parameter receiving module is configured to receive second network parameters issued by the edge server; the second network parameters are generated by the edge server after aggregating first network parameters from at least two sources.

[0177] The network updating module is configured to update the offloading decision network based on the second network parameters.

[0178] In a possible implementation, the global optimization function is a function constructed based on a maximum latency constraint, a computing resource constraint of an edge server, and an uplink transmission power constraint, and the global optimization function is:

[0179]

[0180]

[0181]

[0182]

[0183]

[0184] wherein, ω i denotes a weight of a subchannel, denotes resource consumption required for processing a task of the subchannel on the edge server, denotes resource consumption required for processing the task on the subchannel locally, denotes a migration cost;

[0185] h={h i |i∈M} denotes the channel gain set, a={a i |i∈M} denotes the candidate decision set, p={p i |i∈M} denotes an uplink transmission power set required for task transmission, denotes a computing resource set of the edge server required for the task, and M denotes a number of subchannels; denotes the maximum latency constraint, F max denotes the computing resource constraint of the edge server, P max denotes the uplink transmission power constraint, denotes time required for processing a task of a subchannel on the edge server, denotes time required for processing the task on the subchannel locally.

[0186] In a possible implementation, the apparatus further includes:

[0187] an information acquisition module, configured to acquire first uplink transmission power and first computing resource information from a resource allocation strategy corresponding to a first subchannel, the first computing resource information being used to indicate first computing resource required by the edge server for processing information on the first subchannel; the first subchannel being any one of subchannels in the target decision set indicating that a corresponding task is to be processed on the edge server.

[0188] a task transmission module, configured to, when offloading tasks on the first sub-channel to the edge server based on the first uplink transmission power, send first computing resource information corresponding to the first sub-channel to the edge server, so that the edge server processes the tasks on the first sub-channel based on the first computing resource.

[0189] In summary, the resource allocation device in the Internet of Things scenario provided by the embodiments of the present application uses the offloading decision network obtained by training the federated learning mechanism to process the channel gain set, and obtains an offloading element set containing offloading decision elements corresponding to each sub-channel. Then, different binary processing is performed on the offloading decision element set to determine at least two candidate decision sets, and the at least two candidate decision sets are brought into a global optimization function for determining the resource consumption of the Internet of Things device required for processing based on the corresponding candidate decision set under the premise of the channel gain set, so as to select the optimal target decision set from the at least two candidate decision sets based on the function value of the global optimization function corresponding to each candidate decision set, and obtain a resource allocation strategy set corresponding to the target decision set, so as to perform task allocation and resource allocation under the current channel gain set according to the target decision set and the resource allocation strategy set. Through the above method, large-scale data can be efficiently processed, and the problem of privacy leakage can also be solved. At the same time, the resource consumption of the Internet of Things device required in the task processing process is taken as an optimization target, so that the obtained target decision set and resource allocation strategy can more reasonably utilize transmission resources and computing resources, and the rationality of resource utilization is improved.

[0190] In order to further embody the advantages of the resource allocation method in the Internet of Things scenario provided by the present application, the federated learning-based resource allocation and task offloading method (FLM, Federated Learning Method) proposed in the present application is compared with the traditional centralized training (CLM, Centralized Learning Method) method, and the following comparison results are obtained:

[0191] 1) In terms of network training, Figure 6 Fig. 1 shows a schematic diagram of the comparison between the FLM and the CLM training process provided by an exemplary embodiment of the present application, as shown in Figure 6 The loss function during training is used to reflect the convergence of each algorithm. Figure 6 The (a) (b) (c) parts of Fig. 1 show the change of the loss function of the three Internet of Things devices participating in the federated learning architecture training in the last communication with the training time frame; Figure 6The part (d) in FIG. 6 shows the loss function of the Internet of Things devices in the CLM changes with the training time frame. The vertical coordinate is the change of the loss function during the training process, and the horizontal coordinate is the training time frame. As can be seen from the figure, the loss function values of the two compared algorithms gradually decrease with the increase of the training times, until they approach 0 to complete convergence.

[0192] At the last communication, the three Internet of Things devices participating in federated learning basically converged to the most stable state when training to 210 time frames; while the convergence speed of the model in centralized training is slower than that of FLM, and it needs to be trained to 300 time frames to reach a stable state. It can be analyzed that this is because the global model in the proposed federated learning-based algorithm can aggregate the parameters of all Internet of Things devices participating in training, thereby avoiding the direct transmission of a large amount of data of Internet of Things devices to the data center, causing the global model training data to be too much, and thus the convergence speed of training can be improved.

[0193] 2) In terms of minimizing resource loss, Figure 7 The figure shows the comparison of resource loss between FLM and CLM provided by an example embodiment of the present application, as shown in FIG. 7. Figure 7 As shown in FIG. 7, Figure 7 The figure shows the performance of FLM and CLM in minimizing the computing resources and migration costs of Internet of Things devices, which is reflected by the change of the optimization target Q(h, a, p, f). Figure 7 The parts (a) (b) (c) in FIG. 8 show the resource loss of the three Internet of Things devices participating in federated learning architecture training changes with the training time frame, Figure 7 The part (d) in FIG. 8 shows the resource loss of the resource loss in the CLM changes with the training time frame. The vertical coordinate is the change of the resource loss, and the horizontal coordinate is the training time frame.

[0194] As shown in the figure, the average value of the resource consumption of the Internet of Things devices after the system stabilizes is marked by the dashed line in the figure. As the training loss decreases, the resource consumption of the three Internet of Things devices randomly selected by the FLM remains at the same level as that of the Internet of Things devices in the centralized training. The resource consumption in the FLM stabilizes at about 4.4, with a minimum of 4.2; the resource consumption of the Internet of Things devices in the CLM changes more stably, with a standard deviation smaller than that of the FLM, and the average value of the resource consumption is slightly higher than 4.4, with a minimum of 4.2, but the time to reach 4.2 is significantly less than that of the Internet of Things devices using the federated learning algorithm. It can be analyzed that the development of the resource allocation strategy and the task offloading strategy based on the federated learning framework can reduce the resource consumption of the Internet of Things devices. The CLM needs to train all the data, so the transmission of a large amount of data will increase the transmission resource consumption of the Internet of Things devices, while the communication frequency in the FLM decreases with the increase of the local model calculation frequency, which can reduce the resource consumption of the Internet of Things devices by increasing the calculation amount. From the perspective of saving the resource consumption of the Internet of Things devices, when the local model of the federated learning is fully trained, the resource consumption of the Internet of Things devices can be better saved.

[0195] Figure 8 A structural block diagram of a computer device 800 is shown according to an example embodiment of the present application. The computer device 800 can be implemented as a terminal as described above, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a television, and the like. The computer device 800 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0196] Generally, the computer device 800 includes a processor 801 and a memory 802.

[0197] In some embodiments, the computer device 800 can also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.

[0198] In some embodiments, the computer device 800 further includes one or more sensors 809. The one or more sensors 809 include, but are not limited to, an acceleration sensor 810, a gyroscope sensor 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.

[0199] Those skilled in the art can understand that, Figure 8The structure shown in the figure does not constitute a limitation on the computer device 800, and can include more or fewer components than shown, or combine certain components, or have different arrangements of components.

[0200] In an example embodiment, a computer readable storage medium is also provided, in which at least one computer program is stored, the computer program is loaded and executed by the processor to implement all or part of the steps of the resource allocation method in the Internet of Things scenario described above. For example, the computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0201] In an example embodiment, a computer readable storage medium is also provided, in which at least one computer program is stored, the computer program is loaded and executed by the processor to implement all or part of the steps of the resource allocation method in the Internet of Things scenario described above. For example, the computer readable storage medium can be a read-only memory, a random access memory, a compact disc read-only memory, a magnetic tape, a floppy disk and an optical data storage device, etc.

[0202] In an example embodiment, a computer program product is also provided, which includes at least one computer program, the computer program is loaded and executed by the processor to implement all or part of the steps of the resource allocation method in the Internet of Things scenario described above. Figure 2 or Figure 3 Any embodiment of the resource allocation method in the Internet of Things scenario.

[0203] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0204] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.

Claims

1. A resource allocation method in an Internet of Things (IoT) scenario, characterized in that, The method comprises: obtaining a channel gain set containing channel gains of respective sub-channels; obtaining a set of offloading decision elements output by the trained offloading decision network by inputting the channel gain set into the trained offloading decision network; the set of offloading decision elements contains offloading decision elements corresponding to respective sub-channels; the offloading decision network is obtained by training through a federated learning mechanism; obtaining at least two candidate decision sets by performing at least two times of binarization processing on the set of offloading decision elements; the values in the candidate decision set indicate offloading decisions corresponding to respective sub-channels, and the offloading decisions indicate that tasks on the sub-channels are offloaded to an edge server for processing or indicate that the tasks on the sub-channels are processed locally; determining a target decision set and a set of resource allocation strategies corresponding to the target decision set based on at least two function values of a global optimization function obtained by substituting at least two candidate decision sets into the global optimization function respectively; the target decision set is a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, and the set of resource allocation strategies includes uplink transmission power required for processing tasks of respective sub-channels and computing resources of the edge server required for processing tasks of respective sub-channels; the global optimization function is used to determine resource consumption of an Internet of Things device required for processing based on a corresponding candidate decision set under the premise of the channel gain set.

2. The method of claim 1, wherein, The at least two candidate decision sets are obtained by performing at least two times of binarization processing on the set of offloading decision elements, comprising: obtaining at least two candidate decision sets by performing binarization processing on offloading decision elements in the set of offloading decision elements based on at least two preset element thresholds respectively; one element threshold corresponds to one candidate decision set.

3. The method of claim 1, wherein, The method further comprises: storing the target decision set and the channel gain set corresponding to the target decision set in a training sample set.

4. The method of claim 3, wherein, The method further comprises: in a network updating stage, obtaining a training sample subset from the training sample set; the training sample subset contains at least one training sample pair, and the training sample pair includes a historical decision set and a channel gain set corresponding to the historical decision set; updating parameters of the offloading decision network based on the training sample subset to obtain first network parameters; uploading the first network parameters to the edge server; receiving second network parameters issued by the edge server; the second network parameters are generated by the edge server after aggregating first network parameters from at least two sources; updating the offloading decision network based on the second network parameters.

5. The method of claim 1, wherein, The global optimization function is a function constructed based on a maximum time delay constraint, a computing resource constraint of the edge server, and an uplink transmission power constraint, and the global optimization function is: wherein, , denotes a weight of a sub-channel, denotes a resource consumption of the IoT device required for offloading a task of the sub-channel to the edge server for processing, denotes a resource consumption of the IoT device required for processing a task on the sub-channel locally, denotes a migration cost; denotes the set of channel gains, denotes the set of candidate decisions, denotes the set of uplink transmission powers required for task transmission, denotes the set of computing resources of the edge server required for task, denotes the number of sub-channels; denotes the maximum latency constraint, denotes the computing resource constraint of the edge server, denotes the uplink transmission power constraint, denotes the time required for offloading a task on a sub-channel to the edge server for processing, denotes the time required for processing a task on a sub-channel locally.

6. The method of claim 1, wherein, The method further comprises: obtain a first uplink transmission power and first computing resource information from a resource allocation strategy corresponding to the first subchannel, the first computing resource information being used to indicate a first computing resource required by the edge server to process information on the first subchannel; the first subchannel being any one of the subchannels in the target decision set indicating that a corresponding task is to be offloaded to the edge server for processing; when offloading the task on the first subchannel to the edge server based on the first uplink transmission power, send the first computing resource information corresponding to the first subchannel to the edge server, so that the edge server processes the task on the first subchannel based on the first computing resource.

7. A resource allocation apparatus in an Internet of Things scenario, characterized in that, The apparatus comprises: a set obtaining module configured to obtain a channel gain set, the channel gain set containing channel gains of respective subchannels; a set processing module configured to obtain a set of offloading decision elements output by the trained offloading decision network by inputting the channel gain set into the trained offloading decision network; the set of offloading decision elements containing offloading decision elements corresponding to respective subchannels; the offloading decision network being obtained by training through a federated learning mechanism; a binarization processing module configured to obtain at least two candidate decision sets by performing at least two binarization processes on the set of offloading decision elements; a value in the candidate decision set indicating an offloading decision corresponding to a respective subchannel, the offloading decision indicating that a task on the subchannel is to be offloaded to the edge server for processing or indicating that the task on the subchannel is to be processed locally; a determination module configured to substitute at least two of the candidate decision sets into a global optimization function respectively, determine a target decision set and a set of resource allocation strategies corresponding to the target decision set based on at least two function values of the global optimization function obtained; the target decision set being a candidate decision set in the at least two candidate decision sets that makes the function value of the global optimization function minimum, the set of resource allocation strategies including uplink transmission powers required to process tasks of respective subchannels and computing resources of the edge server required to process tasks of respective subchannels; the global optimization function being used to determine resource consumption of the Internet of Things device required to process based on a corresponding candidate decision set under the premise of the channel gain set.

8. The apparatus of claim 7, wherein, The binarization processing module is configured to perform binarization processing on offloading decision elements in the set of offloading decision elements based on at least two preset element thresholds respectively, to obtain at least two of the candidate decision sets; One of the element thresholds corresponds to one of the candidate decision sets.

9. A computer device, comprising: The computer device comprises a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the resource allocation method in the Internet of Things scenario as claimed in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one computer program, and the computer program is loaded and executed by the processor to implement the resource allocation method in the Internet of Things scenario as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Internet of Vehicles resource allocation method based on multiple MEC servers

    CN111836283A

  • Federal element learning-based mobile edge computing intelligent unloading method and device

    CN114265631A