A method for task offloading of selection of a trusted edge server and energy consumption optimization
By combining FCM clustering and set pair analysis theory with the WOA algorithm, the problem of trusted server selection and energy consumption optimization in edge computing is solved. This achieves the optimization of energy consumption and latency while protecting privacy, thereby improving the performance and user experience of edge computing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2022-11-15
- Publication Date
- 2026-07-03
AI Technical Summary
In edge computing, existing technologies have failed to effectively address the issues of selecting trusted edge servers and optimizing energy consumption, resulting in increased task unloading latency and energy consumption. Furthermore, they have failed to fully utilize edge network resources and cannot optimize user experience while protecting privacy.
Task information is processed using FCM clustering and set pair analysis theory, and the offloading strategy is optimized by combining the WOA algorithm. By measuring and analyzing the trust relationship between user tasks and edge computing servers, the optimal edge server is selected for task offloading, and energy consumption is optimized within the tolerable latency range.
It improves edge computing performance, reduces device power consumption, enhances user experience, protects the privacy of multiple users, and improves the efficiency of task offloading in the selection of trusted servers.
Smart Images

Figure CN116126130B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile computing, and in particular relates to a task offloading strategy for the selection of trusted edge servers and energy consumption optimization. Background Technology
[0002] Task offloading in edge computing refers to whether computational tasks are executed on the device itself or offloaded to the edge or the cloud. When a user device starts running a computationally intensive task in a mobile edge network, the device can choose to send the computational task to a nearby public server, offloading the task to the edge computing server for processing. This process is called task offloading. However, the computing and network resources of edge nodes are limited. Therefore, mobile devices must carefully plan whether to execute computational tasks locally or offload them to edge nodes or the cloud to minimize task completion latency. This is known as the computational task offloading problem in edge computing systems. Designing efficient and energy-saving computational task offloading schemes is an important research direction in the field of edge computing, requiring consideration of factors such as the rationality of edge node resource allocation, the latency differences caused by different task execution schemes, and the differences in mobile device power consumption.
[0003] During the task offloading process, we also face several limitations. First, the spatial distribution of mobile service traffic in actual mobile edge networks is uneven, and the trustworthiness of edge servers is unknown. Blindly offloading tasks may result in some tasks being offloaded to untrusted MEC servers, leading to the leakage of task information and causing incalculable losses. Due to the relative openness of the MEC system application layer, attackers can use side-channel attacks to infer and monitor the information of the computing tasks offloaded on the MEC server, such as data size, required computing resources, and tolerable latency. Since some edge computing nodes are untrusted, user tasks offloaded to these edge nodes are vulnerable to attacks. If attackers obtain some prior information about the target user through other means (such as the computing tasks that the user frequently offloads and their approximate task information), they can infer the MEC node where the target user is located by monitoring the task offloading situation on MEC nodes. Second, most task offloading strategies in edge computing often treat tasks as a whole for offloading. This approach affects task execution efficiency and fails to fully utilize edge network resources. Furthermore, with the development of multi-access networks, users not only need to decide whether to offload tasks based on competition for limited computing and communication resources, but also need to choose the most advantageous access point from among multiple access points for data transmission based on their own interests. Without a proper strategy, directly offloading a large number of tasks to edge servers through a single access point, or with unreasonable resource allocation, will lead to a significant increase in latency and energy consumption, preventing most devices from submitting tasks and receiving computation results at normal speeds. How to achieve task awareness of trusted servers and comprehensively evaluate latency, energy consumption, and other indicators for task offloading, and formulate a reasonable task offloading strategy to improve user service quality and experience, is a pressing issue in mobile edge network technology.
[0004] In most existing research on trusted edge computing, the methods used in task offloading decisions primarily include blockchain technology, smart contracts, reinforcement learning, encryption, and digital certificates. However, these methods mainly focus on protecting offloaded data content from the perspectives of data security (encryption, authentication, etc.) and building a trusted edge computing platform using blockchain, without fully considering the potential for distrust among edge computing owners, making it difficult to establish a unified security standard. Regarding latency and energy consumption optimization, existing methods mainly include linear relaxation-based methods, exhaustive search-based methods, Lyapunov-based algorithms, and game theory. Optimizing task offloading energy consumption based on trusted servers is also rarely studied. A comprehensive approach could be taken, considering both the selection of trusted servers and energy consumption optimization, to balance privacy protection with user experience, enabling task offloading to save energy as much as possible within tolerable latency limits.
[0005] A search revealed application CN114637552A, entitled "A Fog Computing Task Offloading Method Based on Fuzzy Logic Strategy," with the following implementation steps: Step 1. System Model Construction. Step 1.1. Vehicle Fog Computing Task Offloading Model. Step 1.2. Task Offloading Communication Model. Step 1.3. Task Offloading Computation Model. Step 1.4. Problem Formulation. Step 2. Fuzzy Logic-Based Q-Learning Task Offloading Algorithm. Step 2.1. Fuzzy Logic-Based Vehicle Weight Calculation. Step 2.2. Fuzzy Logic-Based Vehicle Weight Calculation.
[0006] The purpose of the aforementioned invention is to reduce the energy consumption of roadside units and the system response time, thereby improving user service quality. It proposes a fog computing task offloading method based on a fuzzy logic strategy. This invention quantifies three indicators: vehicle computing power, dwell time, and distance to the roadside unit. Then, it uses a centering method for defuzzification to calculate the vehicle's weight, and finally uses a Q-reinforcement learning algorithm for task offloading. The aforementioned invention addresses computation offloading in multi-user, single-MEC scenarios in vehicle-to-everything (V2X) networks, but does not consider the trustworthiness of edge servers during offloading. This invention considers computation offloading in multi-user, multi-MEC scenarios and addresses potential privacy leaks during offloading. First, task information and MEC cache task classes are standardized and subjected to FCM clustering, making it impossible for attackers to distinguish target users from multiple users with similar offloading behaviors, thus protecting the privacy of multiple users as a whole. Then, encoding matching is performed to obtain the MEC server that each task class preferentially selects for offloading. Next, set pair analysis theory is used to measure and analyze the trustworthiness relationship between user tasks and edge computing servers. Finally, an improved WOA algorithm is used to make decisions on task offloading and save energy.
[0007] Application publication number CN114356545A discloses a task offloading method oriented towards privacy protection and energy consumption optimization, comprising: S1, constructing a system model based on server and device-related information data; S2, standardizing the task information data according to the system model and assigning different weights to attributes to obtain task information data to be grouped; S3, using a clustering algorithm to group the obtained task information data according to attribute weights, with the number of groups equal to the number of servers in the system model; S4, calculating energy consumption based on the established system model and grouping results; and optimizing energy consumption within the tolerable latency range by using an improved MFO (Moth to Flame) algorithm to obtain offloading decisions for each device task; S5, offloading tasks to corresponding edge nodes or performing local processing according to the offloading decisions. This invention aims to solve the privacy and energy consumption optimization problems existing in existing edge computing task offloading, proposing a task offloading method oriented towards privacy protection and energy consumption optimization that protects user privacy during task offloading, keeps task processing latency within the tolerable latency range, and saves energy as much as possible.
[0008] The aforementioned invention first uses clustering to group multiple users offloading their tasks to the same MEC node to make their task offloading information similar, and then uses an optimization algorithm to make task offloading decisions. However, it does not consider the selection of trusted edge servers and treats tasks as a whole for offloading, which affects task execution efficiency and fails to fully utilize edge network resources. Furthermore, with the development of multi-access networks, users not only need to compete for limited computing and communication resources to decide whether to offload, but also need to choose an access point that is advantageous to them for data transmission based on their own interests. This invention addresses this issue by first standardizing task information and MEC cache task classes and performing FCM clustering, thus preventing attackers from distinguishing target users from multiple users with similar offloading behaviors, protecting the privacy of multiple users as a whole. Then, encoding matching is performed to obtain the MEC server that each task class preferentially chooses for offloading. Next, set pair analysis theory is used to measure and analyze the trust relationship between user tasks and edge computing servers. Finally, an improved WOA algorithm is used to make task offloading decisions and save energy. Summary of the Invention
[0009] This invention aims to solve the problems of the prior art. It proposes a task offloading method for selecting a trusted edge server and optimizing energy consumption. The technical solution of this invention is as follows:
[0010] A method for selecting and energy-optimizing trusted edge servers for task offloading includes the following steps:
[0011] S1, construct a system model based on relevant information data from edge servers and user local devices;
[0012] S2, standardize the task information and MEC cache task classes respectively and perform FCM (fuzzy c-means) clustering, and then perform encoding matching to obtain the MEC server that each task class should preferentially select for unloading;
[0013] S3 uses set pair analysis theory to measure and analyze the trust relationship between user tasks and edge computing servers;
[0014] S4. Based on the results of step S2, the task is divided into sub-tasks and the task is offloaded in the multi-access point network and the energy consumption is calculated. The energy consumption is optimized within the tolerance latency range through the WOA whale optimization algorithm to obtain the offloading decision of each device task.
[0015] S5, based on the offloading decision, offloads the subtask to the corresponding edge node or local processing through a certain wireless access point.
[0016] Furthermore, the method for constructing a system model based on server and device related information data in step S1 specifically includes:
[0017] Based on the relevant information about the server and device in the data, (x, y, b, f, t) is used, where x and y represent the horizontal and vertical coordinates of the task's geographical location, b represents the size of the task's input data, which mainly consists of program code and input files, f represents the computing resources required by the task, and t represents the maximum tolerable latency to complete this task.
[0018] Furthermore, step S2 standardizes the task information and MEC cache task classes and performs FCM (fuzzy c-means) clustering, specifically including:
[0019] Before clustering, the task data of user tasks and MEC cache are first standardized. The data standardization formula is shown below:
[0020]
[0021] Where x is the data to be standardized, x σ This represents the value of each column of data in the data matrix. It is the number of rows in the matrix. and y' represents the maximum and minimum values in the column containing x, and y' represents the standardized data.
[0022] Then, the FCM clustering method is used to perform fuzzy clustering on the standardized data. The FCM algorithm process is as follows: First, determine the number of clusters, the value of the fuzzy index, set the number of iterations and the termination threshold, initialize the membership matrix of the sample objects, and ensure that the sum of the membership degrees is 1, that is:
[0023]
[0024] Where c is the number of clusters, u ij This represents the membership degree of each sample j to a certain class i.
[0025] Next, cluster centers are calculated based on membership degrees, and the objective function value is calculated using the following formula:
[0026]
[0027] Among them, c i Represents the cluster center, u ij The degree of membership of a sample is represented by m, and the fuzziness index is represented by x. j Let J represent each sample data point, and J represent the objective function.
[0028] The formulas for updating cluster centers and membership degrees are:
[0029]
[0030] Among them, c j Let u represent the j-th cluster center, n represent the number of data objects in the dataset, and u ij Represents object x i With cluster center c j The degree of membership between them, where m represents the number of clusters.
[0031]
[0032] Among them, u ij This represents the updated object x. i With cluster center c i The membership degree between objects is given by m, where m represents the number of clusters. From the lower part of the fraction, we know that the numerator represents the membership degree between objects and x. i Cluster center c i The distance is calculated as the distance from the current object to all cluster centers, and the denominator represents the sum of the distances from the current object to all cluster centers. The membership degree of the sample object is recalculated based on the cluster center values, and then the cluster center values are updated again. This process is repeated until the algorithm's termination conditions are met: 1. The number of iterations reaches the manually set number; 2. The difference between the last two objective functions is less than the manually set threshold.
[0033] Furthermore, the encoding step S2 specifically includes:
[0034] Definition 1: The coding rule determines the magnitude of the five-dimensional attribute values of the cluster center. If the value of a dimension is greater than 50% of the range of values for that dimension, it is considered that the demand for that dimension is strong or that the attribute is a strong attribute, and it is encoded as '1'; otherwise, it is encoded as '0'.
[0035] The dissimilarity between two classes is defined as the dissimilarity between the task class (represented by 0 and 1 encoding) and the MEC cache task class, and the Hamming distance is used as the measure of dissimilarity between the task class and the MEC cache task class.
[0036] Furthermore, after coding is complete, a similarity match is performed between the task class and the MEC cache task class. This ensures that the final matching between the task and the MEC cache task is completed within similar classes. The class matching method for multi-user, multi-MEC server scenarios is as follows:
[0037] The task aggregator first collects task cache class information sent by each MEC server. Then, each user task class is sent to the task aggregator for task merging and clustering. The task aggregator first processes the matching of the task class with each MEC cache class, and then obtains the best unloading MEC server for each task class through integration. Finally, the Kuhn-Munkras algorithm for finding the minimum weighted matching in a weighted bipartite graph is used to select the matching with the smallest weight, which is the MEC server that the current user task class needs to unload.
[0038] Furthermore, step S3 employs set pair analysis theory to measure and analyze the trust relationship between user tasks and edge computing servers, specifically including:
[0039] Set pair analysis is an analytical method that combines qualitative and quantitative approaches to solve problems involving both certainty and uncertainty. The basic idea is as follows: Assuming two datasets, we analyze their characteristics and obtain the total number of characteristics for both sets as N, the number of identical characteristics as M, the number of opposing characteristics as Q, and the number of other non-opposing and non-identical characteristics as L. The ratios M / N, L / N, and Q / N are respectively called the degree of identity, difference, and opposition between the two sets in a specific problem context. Then, the degree of connection between set pairs is used to quantitatively characterize the characteristics between the datasets; the expression is as follows:
[0040] in,
[0041] Where μ is the degree of connection between the two datasets, i is the difference label, and j is the opposition label. When i and j are used as coefficients in the calculation, j = -1 is defined, and i takes values in the interval [-1, 1] according to the conditions. For the sake of simplicity, let a = M / N, b = L / N, and c = Q / N. Then the formula can be written as μ = a + bi + cj. The degree of connection μ can reflect the deterministic and uncertain relationship between data and its scope, and between datasets. Therefore, it can be used to describe the uncertainty of the associated privacy information between two datasets.
[0042] First, the similarity, difference, and opposition characteristics of adjacent data subsets of the dataset are analyzed and quantified to obtain the association expression. Based on the information after S2 has been grouped, the same potential is defined as M, where all tasks in the group have the same code as the MEC server cache task class; the same potential is defined as Q, where all tasks in the group have the same code as the MEC server cache task class; and the equal potential is other values.
[0043] The potential values among similarity, difference, and opposition in the expression are calculated to reflect the trustworthiness of the server; the potential value Shi(μ) = a / c for connectivity is defined as a metric; based on the calculated potential values, trustworthiness information is categorized into similar potential, equal potential, and opposite potential. Similar potential indicates higher trustworthiness of the edge server, opposite potential indicates lower trustworthiness, and equal potential lies between similar and opposite potential. The larger the potential value of connectivity, the greater the trustworthiness of this type of task for that MEC server.
[0044] Furthermore, the method for calculating the unloading decision in step S4 includes the following steps:
[0045] (1) Based on the results of step S3, the task is divided into several sub-tasks; the computation offloading strategy for mobile users is defined as follows: Where Φ = {0, 1, 2, ..., I} is the unloading decision set, x m (x m ∈Φ) is the uninstallation decision for user m, x m =ap (ap∈I) represents user m migrating the computing task to a MEC server through the wireless access point ap, and a m =0 indicates that the user is processing the computing task locally;
[0046] (2) Calculate the subtask transmission rate based on bandwidth, user equipment power, channel gain, and noise power.
[0047] (3) Calculate the local processing latency based on the user equipment CPU frequency and the computing power required by the subtask;
[0048] (4) Calculate the transmission delay based on the subtask transmission rate and subtask size;
[0049] (5) Calculate the edge server processing latency based on the edge server CPU frequency and the computing power required by the subtask;
[0050] (6) Calculate the local processing energy consumption based on the user equipment CPU frequency, the computing power required by the subtask, and the local equipment hardware-related energy consumption coefficient;
[0051] (7) Calculate transmission energy consumption based on the power of the user equipment and the transmission delay;
[0052] (8) Calculate the processing energy consumption of the edge server based on the CPU frequency of the edge server, the computing power required by the subtask, and the energy consumption coefficient related to the edge server hardware;
[0053] (9) Calculate the final energy consumption based on (6), (7), and (8);
[0054] (10) The WOA algorithm is used to make offloading decisions so that the task processing latency is within the tolerable latency range and the energy consumption is optimized.
[0055] Furthermore, in step (10), the step of making an unloading decision using the WOA algorithm includes:
[0056] 1) Initialize D whales, whose positions are randomly distributed in the solution space. Each whale is an N*k dimensional vector, where N is the number of subtasks and k is the number of multiple access points. Use a D×N×k matrix M to store the whale positions.
[0057] 2) Then use a D-dimensional vector to store the fitness value of each whale position. The fitness value corresponds to the energy consumption E generated by each subtask i through access point j. i,j ;
[0058] 3) Sort the positions of the first generation whales in ascending order of fitness value, and then select the individual best value and the overall best value of the whale population.
[0059] 4) Choose between the shrinking encirclement mechanism and the spiral model to determine which mode to use for updating the whale's position; after selecting the mode, calculate the fitness value of the whale's position after the update, reorder the updated whale position fitness values, and select the spatial position with the better fitness value to update the position of the next generation of whales.
[0060] 5) Increment the iteration count by iter, execute step 4), enter the next generation, until the iteration count iter reaches the maximum iteration count max_iter, end the iteration, and output the optimal unloading decision.
[0061] Furthermore, the WOA algorithm uses a binary mapping: the dimension of the whale position vector corresponds to the number of tasks, and the fitness value of the objective function corresponds to the energy consumption value. During the iteration process, when calculating the fitness value, the values of each component in the whale position are considered as priorities, with larger values having higher priorities. This maps the value of the whale position vector to... Where Φ = {0, 1, 2, ..., I} is the unloading decision set, x m (x m ∈Φ) is the uninstallation decision for user m; x m =ap (ap∈I) represents user m migrating the computing task to a MEC server through the wireless access point ap, and a m =0 indicates that the user is processing the computation task locally; the whale's position corresponds to a solution vector of the optimization problem, i.e., the unloading decision, and the components of this vector after mapping are x. m =ap (ap∈I) or 0, which is x m=ap (ap∈I) represents offloading to a certain wireless access point ap of the edge server for processing. When terminal device i decides to offload some of its subtasks to a certain wireless access point ap of the edge server, then other subtasks in device i can only choose this server as the edge offloading server; if it is 0, it is processed locally; finally, the algorithm outputs the optimal offloading decision.
[0062] Furthermore, step 4) specifically includes:
[0063] The behavior of whales in bubble-web formation is modeled. The whale swims around its prey in a shrinking circle while simultaneously moving along a spiral path. It is assumed that there is a 50% probability of choosing between the shrinking encirclement mechanism and the spiral model; as shown in the following formula:
[0064]
[0065] in, This represents the position vector of the current optimal solution. Let represent the position vector of the current solution vector, b represent the logarithmic spiral constant, l represent a random number in [-1, 1], and p be a random number in [0, 1]. and For the coefficient vector, and The calculation is as follows:
[0066]
[0067]
[0068] in, During the algorithm iteration process, the value linearly decreases from 2 to 0. A random vector between [0,1]; variables The process of change is shown in the following formula:
[0069]
[0070] Where iter represents the current iteration number, and iter_max represents the maximum iteration number;
[0071] Besides using bubble nets, whales also randomly search for prey, also based on variable... The vector, whales will search randomly based on each other's positions, therefore a random value greater than 1 or less than -1 is used. This forces the search agent away from the optimal search agent, instead updating the whale's current position based on a randomly selected search agent; the mathematical model is as follows:
[0072]
[0073]
[0074] in A random position vector selected from the current population represents a random whale.
[0075] The advantages and beneficial effects of this invention are as follows:
[0076] 1. Existing research on trusted edge computing mainly utilizes blockchain technology, smart contract technology, reinforcement learning methods, encryption, and digital certificates. However, these methods primarily focus on protecting offloaded data content from the perspectives of data security (encryption, authentication, etc.) and building a trusted edge computing platform using blockchain. They do not adequately consider the potential for distrust among edge computing owners, making it difficult to establish a unified security standard. This invention addresses this issue in task offloading by employing the FCM clustering method. Task information and MEC cached task classes are standardized and then subjected to FCM clustering. Users with similar task information are grouped together for offloading, increasing the similarity of user task information offloaded to the same edge server. Encoding matching is then performed to determine the preferred MEC server for each task class. Finally, set pair analysis theory is used to measure and analyze the trustworthiness relationship between user tasks and edge computing servers.
[0077] 2. When using the WOA algorithm to optimize the task offloading strategy, the standard WOA algorithm was developed to solve continuous optimization problems. To address discrete problems, this invention improves upon it. Since offloading decisions in multi-access-point networks are typically related to the number of access points, for any terminal user m in the edge network, there are at most two offloading strategies to choose from: local execution or offloading to one of the servers in the edge network. The computational offloading strategy for mobile users is defined as follows: Where Φ = {0, 1, 2, ..., I} is the unloading decision set, x m (x m ∈Φ) is the uninstallation decision for user m. m =ap (ap∈I) represents user m migrating the computing task to a MEC server through the wireless access point ap, and a m =0 indicates that the user is processing computing tasks locally. Then, taking into full account latency and server resource conditions, with the goal of optimizing energy consumption within a tolerable latency range, the optimal offloading strategy is found to save device energy consumption, improve user experience, and significantly improve the performance of edge computing. Attached Figure Description
[0078] Figure 1 This invention provides a flowchart of a task offloading method for selecting a trusted server and optimizing energy consumption, based on a preferred embodiment.
[0079] Figure 2 This invention provides a preferred example of a multi-access point network multi-user-multi-server system model diagram;
[0080] Figure 3 This is a diagram illustrating the principle of task unloading. Detailed Implementation
[0081] The technical solutions of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.
[0082] The technical solution of the present invention to solve the above-mentioned technical problems is:
[0083] like Figure 1 As shown, a method for selecting a trusted server and optimizing energy consumption for task offloading includes the following steps:
[0084] S1, obtains relevant information and data about edge servers and devices, such as... Figure 2 As shown, a system model is constructed. A matrix is used to store task information for N devices and information for M servers.
[0085] S2, based on the model of S1, standardize the task information and MEC cache task classes respectively and perform FCM clustering, and then perform encoding matching to obtain the MEC server that each task class should preferentially select for unloading.
[0086] S3 uses set pair analysis theory to measure and analyze the trust relationship between user tasks and edge computing servers.
[0087] S4, based on the model established in S1 and the results of S2, divides the task into subtasks and performs task offloading in the multi-access point network, calculating transmission latency, transmission energy consumption, local computing latency, local computing energy consumption, edge computing latency, and edge computing energy consumption. Using the WOA (Whale Optimization) algorithm, energy consumption is optimized within the tolerable latency range to obtain the task offloading decision for each device.
[0088] S5, based on the offloading decision, offloads the subtask to the corresponding edge node or local processing through a certain wireless access point.
[0089] Furthermore, the method for constructing the system model in step S1 includes:
[0090] (1) Based on the relevant information of the server and equipment in the data, (x, y, b, f, t) is used, where x and y represent the horizontal and vertical coordinates of the task's geographical location, b represents the amount of data input to the task, which mainly consists of program code and input files, f represents the computing resources required by the task, and t represents the maximum tolerable latency to complete the task.
[0091] Furthermore, step S2 standardizes the task information and MEC cache task classes, performs FCM clustering, and then performs encoding matching to obtain the MEC server that is preferentially selected for unloading for each task class. Specifically, this includes:
[0092] Based on the main requirements of the tasks and the tasks cached by MEC, FCM clustering was performed separately. Before the clustering operation, the task data of user tasks and MEC cache were first standardized to eliminate the influence of different dimensions. The data standardization formula is shown below:
[0093]
[0094] Where x is the data to be standardized, x σ This represents the value of each column of data in the data matrix. It is the number of rows in the matrix. and y' represents the maximum and minimum values in the column containing x, and y' represents the standardized data.
[0095] Then, the FCM clustering method is used to perform fuzzy clustering on the standardized data. The FCM algorithm process is as follows: First, determine the number of clusters, the value of the fuzzy index, set the number of iterations and the termination threshold, initialize the membership matrix of the sample objects, and ensure that the sum of the membership degrees is 1, that is:
[0096]
[0097] Where c is the number of clusters, u ij This represents the membership degree of each sample j to a certain class i.
[0098] Next, cluster centers are calculated based on membership degrees, and the objective function value is calculated using the following formula:
[0099]
[0100] Among them, c i Represents the cluster center, u ij The degree of membership of a sample is represented by m, and the fuzziness index is represented by x. j Let J represent each sample data point, and J represent the objective function.
[0101] The formulas for updating cluster centers and membership degrees are:
[0102]
[0103] Among them, c j Let u represent the j-th cluster center, n represent the number of data objects in the dataset, and u ij Represents object xi With cluster center c j The degree of membership between them, where m represents the number of clusters.
[0104]
[0105] Among them, u ij This represents the updated object x. i With cluster center c i The membership degree between objects is given by m, where m represents the number of clusters. From the lower part of the fraction, we know that the numerator represents the membership degree between objects and x. i Cluster center c i The distance is calculated as the distance from the current object to all cluster centers, and the denominator represents the sum of the distances from the current object to all cluster centers. The membership degree of the sample object is recalculated based on the cluster center values, and then the cluster center values are updated again. This process is repeated until the algorithm's termination conditions are met: 1. The number of iterations reaches the manually set number; 2. The difference between the last two objective functions is less than the manually set threshold.
[0106] After clustering, since other samples in the same class have similar features to the class center, the class center features are used to approximate the data features of that class. Assuming that there are m categories for both task classes and MEC cache task classes after FCM clustering, the m task classes and MEC cache task classes are encoded according to the values of each dimension of the cluster center.
[0107] Definition 1: The encoding rule determines the magnitude of the five-dimensional attribute values of the cluster center. If the value of a dimension is greater than 50% of the range of values for that dimension, then the dimension is considered to have a strong demand or the attribute is a strong attribute, and it is encoded as '1'. Otherwise, it is encoded as '0'.
[0108] For example, assuming t1 and t2 are the cluster centers of two classes (the data in each dimension has been standardized before clustering), then the class code of t1 is '00111', and the class code of t2 is '11111', as shown in Table 1:
[0109] Table 1 Encoding Examples
[0110]
[0111] The dissimilarity between two classes is defined as the dissimilarity between a task class represented by 0s and 1s and a MEC cache task class, with Hamming distance used as the measure of dissimilarity. For example, if the class code of t1 is '00111' and the class code of r1 is '11110', then the dissimilarity between class '00111' and class '11110' is 3.
[0112] After coding is complete, similarity matching is performed between task classes and MEC cache task classes. This ensures that the final matching between tasks and MEC cache tasks is completed within similar classes, reducing the matching search range and improving the accuracy of task-MEC cache task matching. End-user devices transfer computationally intensive tasks that cannot be executed locally to the task aggregator in the user device's region or unit. Each user device's optimization algorithm determines the offloading. Then, the task aggregator merges all computational tasks submitted by user devices in that region. The computational tasks are organized to reduce redundancy and overload. Furthermore, it processes multi-user, multi-MEC server matching results and selects the optimal MEC offloading server. The task aggregator then assigns the selected user task classes to the corresponding MEC servers for processing. The specific inter-class matching method for multi-user, multi-MEC server tasks is as follows:
[0113] Inter-class matching method: The task aggregator first collects task cache class information sent by each MEC server. Then, each user task class is sent to the task aggregator for task merging and clustering. The task aggregator first processes the matching between the task class and each MEC cache class, and then obtains the optimal unloading MEC server for each task class through integration. Finally, the Kuhn-Munkras algorithm selects the match with the smallest weight, which is the MEC server that the current user task class needs to unload.
[0114] Furthermore, in step S3, set pair analysis theory is used to measure and analyze the trust relationship between user tasks and edge computing servers:
[0115] Analysis theory is an analytical method that combines qualitative and quantitative approaches to solve problems involving both certainty and uncertainty. The basic idea of this theory is as follows: Assuming there are two datasets, we analyze their characteristics and obtain a total of N characteristics for both sets, M of the number of identical characteristics, Q of the number of opposing characteristics, and L of the number of other characteristics that are neither opposing nor identical. The ratios M / N, L / N, and Q / N are respectively called the degree of identity, difference, and opposition between the two sets under a specific problem context. Then, the degree of connection between the sets is used to quantitatively characterize the characteristics between the datasets. The expression is as follows:
[0116] in,
[0117] Where μ represents the correlation between the two datasets, i is the difference label, and j is the opposition label. When i and j are used as coefficients in the calculation, j is defined as -1, and i takes values in the interval [-1, 1] according to the conditions. For simplified calculation, let a = M / N, b = L / N, and c = Q / N, then the formula can be written as μ = a + bi + cj. The correlation μ can reflect the deterministic and uncertain interrelationships between data and its surrounding scope, and between datasets, and therefore can be used to describe the uncertainty of associated privacy information between two datasets.
[0118] This invention proposes a set pair analysis credibility measurement method based on set pair analysis theory. This method measures and analyzes the credibility relationship between user tasks and edge computing servers. First, it analyzes and quantifies the similarity, dissimilarity, and opposition characteristics of adjacent data subsets of the dataset, obtaining a correlation expression. Based on the information after grouping S2, this paper defines homopotentiality as M, where all tasks in the group have the same encoding as the cached task class of the MEC server; homopotentiality as Q, where all tasks in the group have completely different encodings from the cached task class of the MEC server; and equilibrium potential as other values. For example, if a task in class t2 has the encoding '10010', and this class chooses to send tasks to MEC1 server, which caches tasks in three classes: '01010', '10010', and '11101', then M is 1, L is 2, and Q is 0.
[0119] The potential values between similarity, difference, and opposition in the expression are calculated to reflect the trustworthiness of the server. The potential value of the connection degree, Shi(μ) = a / c, is defined as a metric. Based on the calculated potential values, trustworthiness information is categorized into similar, equal, and opposite potential. Analysis of the privacy information leakage risk during data publishing or sharing reveals that: similar potential indicates a high level of trustworthiness for the edge server; opposite potential indicates a low level of trustworthiness; and equal potential lies between similar and opposite potential. The higher the potential value of the connection degree, the greater the trustworthiness of this type of task for the MEC server.
[0120] Furthermore, step S4, based on the results of S2, divides the task into sub-tasks, performs task offloading in the multi-access point network, and calculates the energy consumption. Using the Whale Optimization (WOA) algorithm, energy consumption is optimized within the tolerable latency range to obtain the task offloading decision for each device. This includes the following steps:
[0121] (1) Based on the results of S3, the task is divided into several subtasks. Considering that a low-power device can only communicate with one edge server at a time, even if there are multiple available edge servers around the terminal device (in a super-dense network scenario), it can only choose one server to offload the subtask during application execution. Therefore, for any terminal user m in the edge network, it has at most two offloading strategies to choose from: local execution or offloading to one of the servers in the edge network. The computational offloading strategy for mobile users is defined as follows: Where Φ = {0, 1, 2, ..., I} is the unloading decision set, x m (x m ∈Φ) is the uninstallation decision for user m. m =ap (ap∈I) represents user m migrating the computing task to a MEC server through the wireless access point ap, and a m =0 indicates that the user is processing computing tasks locally.
[0122] In an edge network, terminal devices offload their subtasks to the edge network for computation. Subtask j of terminal device i can be represented as T. i,j It is mainly related to the following four parameters: b i,j Indicates the size of the subtask; f i,j This indicates the completion of subtask T. i,j The computational resources required for processing; t i,j This indicates that the subtask T has been completed. i,j Maximum tolerable latency; x i,j Subtask T i,j The uninstallation strategy, when x i,j = 0 indicates that terminal device i chooses to execute subtask T on the local processor. i,j , Subtask T i,j The tasks are offloaded to a specific wireless access point (AP) on the edge server for processing. It's important to note that when terminal device i decides to offload a portion of its subtasks to an edge server AP, then other subtasks within device i can only choose that server as the edge offload server. This is achieved using the indicator variable x. i,j Indicates the unloading strategy for subtask j of device i:
[0123]
[0124] (2) Calculate the subtask transmission rate based on bandwidth, user equipment power, channel gain, and noise power.
[0125]
[0126] in, This represents the system bandwidth of subtask j of device i at wireless access point k. This indicates the transmit power of subtask j of user equipment i in transmitting task data at wireless access point k. Ni represents the channel gain during the transmission of task data by subtask j of user equipment i in wireless access point k, and N0 represents the Gaussian noise power inside the wireless channel at this time.
[0127] (3) Calculate the local processing latency based on the user equipment CPU frequency and the computing power required by the subtask.
[0128]
[0129] Among them, b i,j c represents the amount of data in subtask j of device i. i,j This indicates the number of CPU cycles required to execute each bit of data in this subtask j. This indicates the CPU cycle frequency of subtask j of local user device i.
[0130] (4) Calculate the transmission delay based on the subtask transmission rate and subtask size.
[0131]
[0132] (5) Calculate the edge server processing latency based on the edge server CPU frequency and the computing power required by the subtask.
[0133]
[0134] in, When subtask j of device i unloads its computing task through access point k, the MEC server assigns the task to subtask T. i,j Computing resources.
[0135] (6) Calculate the local processing energy consumption based on the user equipment CPU frequency, the computing power required by the subtask, and the local equipment hardware-related energy consumption coefficient.
[0136]
[0137] Where, k l This represents the hardware parameters of the user equipment chip.
[0138] (7) Calculate transmission energy consumption based on the power of user equipment and transmission delay.
[0139]
[0140] (8) Calculate the processing energy consumption of the edge server based on the edge server CPU frequency, the computing power required by the subtask, and the energy consumption coefficient related to the edge server hardware.
[0141]
[0142] (9) Calculate the final energy consumption E based on (6), (7), and (8). all :
[0143]
[0144] (10) The WOA algorithm is used to make offloading decisions so that the task processing latency is within the tolerable latency range and the energy consumption is optimized.
[0145] Furthermore, in step (10), the step of making an unloading decision using the WOA algorithm includes:
[0146] 1) Initialize D whales, whose positions are randomly distributed in the solution space. Each whale is an N*k dimensional vector, where N is the number of subtasks and k is the number of multiple access points. Use a D×N×k matrix M to store the whale positions.
[0147] 2) Then use a D-dimensional vector to store the fitness value of each whale position. The fitness value corresponds to the energy consumption E generated by each subtask i through access point j. i,j ;
[0148] 3) Sort the positions of the first generation whales in ascending order of fitness value, and then select the individual best value and the overall best value of the whale population.
[0149] 4) Choose between the shrinking encirclement mechanism and the spiral model to determine which mode to use for updating the whale's position. After selecting the mode, calculate the fitness value of the whale's position after the update, reorder the updated whale position fitness values, and select the spatial position with the better fitness value to update the position of the next generation of whales;
[0150] 5) Increment the iteration count by iter, execute step 4), enter the next generation, until the iteration count iter reaches the maximum iteration count max_iter, end the iteration, and output the optimal unloading decision.
[0151] Because the WOA algorithm uses a binary mapping, the dimension of the whale position vector corresponds to the number of tasks, and the fitness value of the objective function corresponds to the energy consumption value. During the iteration process, when calculating the fitness value, the values of each component in the whale position are treated as priorities, with larger values having higher priorities. This maps the values of the whale position vector to... Where Φ = {0, 1, 2, ..., I} is the unloading decision set, xm (x m ∈Φ) is the uninstallation decision for user m. m =ap (ap∈I) represents user m migrating the computing task to a MEC server through the wireless access point ap, and a m =0 indicates that the user is processing the computation task locally. The whale's position corresponds to a solution vector of the optimization problem, i.e., the unloading decision. After mapping, the components of this vector are x. m =ap (ap∈I) or 0, which is x m =ap (ap∈I) represents offloading to a specific wireless access point ap on the edge server for processing. It is worth noting that when terminal device i decides to offload some of its subtasks to a specific wireless access point ap on the edge server, then other subtasks in device i can only choose this server as the edge offload server. If it is 0, it is processed locally; finally, the algorithm outputs the optimal offload decision.
[0152] Furthermore, the method for task unloading in step S5 includes:
[0153] Execute the decision output by S4. If the decision value corresponding to the current device is 0, the task is processed locally. If the decision value corresponding to the current device is not 0, it is offloaded to an edge server through an access point for processing. After the edge server processes the task, it returns the processing result to the user device. Figure 3 As shown.
[0154] The selection of trusted edge servers and the energy-optimized task offloading strategy not only effectively protect user privacy as a whole, but also WOA's heuristic algorithm can optimize energy consumption while ensuring tolerable latency, taking into account both user service quality and the interests of service providers.
[0155] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0156] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0157] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. A method for selecting a trusted edge server and optimizing energy consumption for task offloading, characterized in that, Includes the following steps: S1, construct a system model based on relevant information data from edge servers and user local devices; S2, standardize the task information and MEC cache task classes respectively and perform fuzzy c-means FCM clustering, and then perform encoding matching to obtain the MEC server that each task class should preferentially select for unloading. S3 uses set pair analysis theory to measure and analyze the trust relationship between user tasks and edge computing servers; S4. Based on the results of step S2, the task is divided into sub-tasks and the task is offloaded in the multi-access point network and the energy consumption is calculated. The energy consumption is optimized within the tolerance latency range through the WOA whale optimization algorithm to obtain the offloading decision of each device task. S5, based on the offloading decision, offloads the subtask to the corresponding edge node or local processing via the wireless access point; Step S3 employs set pair analysis theory to measure and analyze the trustworthiness relationship between user tasks and edge computing servers, specifically including: Suppose we have two datasets. Analyzing their characteristics, we obtain the total number of characteristics for both sets as N, the number of identical characteristics as M, the number of opposing characteristics as Q, and the number of other non-opposing and non-identical characteristics as L. The ratios M / N, L / N, and Q / N are respectively called the degree of identity, difference, and opposition between the two sets in a specific problem context. Then, we use the degree of connection between set pairs to quantitatively characterize the characteristics between the datasets; the expression is as follows: in, Let i represent the degree of connection between the two datasets, and j represent the degree of dissimilarity. When i and j are used as coefficients in the calculation, we define j = -1, and i takes values in the interval [-1, 1] according to the conditions. For simplified calculation, let a = M / N, b = L / N, and c = Q / N, then the formula can be written as follows: =a+bi+cj, connectivity It can reflect the deterministic and uncertain interrelationships between data and its scope, and between datasets, and therefore can be used to describe the uncertainty of privacy information associated between two datasets; First, the similarity, difference, and opposition characteristics of adjacent data subsets of the dataset are analyzed and quantified to obtain the association expression. Based on the information after S2 has been grouped, the same potential is defined as M, where all tasks in the group have the same code as the MEC server cache task class; the same potential is defined as Q, where all tasks in the group have the same code as the MEC server cache task class; and the equal potential is other values. The potential values among similarity, difference, and opposition in the expression are calculated to reflect the trustworthiness of the server; the potential value Shi of the degree of connection is defined. = a / c metric; based on the calculated potential value, the trust information is divided into same potential, equal potential and opposite potential. Same potential indicates that the edge server has high trust, opposite potential indicates that the edge server has low trust, and equal potential is between same potential and opposite potential; the larger the potential value of the connection, the greater the trust value of this type of task for the MEC server.
2. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 1, characterized in that, The method for constructing a system model based on server and device related information data in step S1 specifically includes: Based on the relevant information about servers and devices in the data, the following approach is adopted: ,in The horizontal and vertical coordinates represent the geographical location of the task. This indicates the size of the task input data, which mainly consists of program code and input files. Indicates the computing resources required for the task. This indicates the maximum tolerable delay for completing this task.
3. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 1, characterized in that, Step S2 standardizes the task information and MEC cache task classes and performs FCM (fuzzy c-means) clustering, specifically including: Before clustering, the task data of user tasks and MEC cache are first standardized. The data standardization formula is shown below: Where x is the data to be standardized. This represents the value of each column of data in the data matrix. It is the number of rows in the matrix. and These are the maximum and minimum values in the column containing x, respectively. It is data after standardization processing; Then, the FCM clustering method is used to perform fuzzy clustering on the standardized data. The FCM algorithm process is as follows: First, determine the number of clusters, the value of the fuzzy index, set the number of iterations and the termination threshold, initialize the membership matrix of the sample objects, and ensure that the sum of the membership degrees is 1, that is: in, The number of clusters. This represents the membership degree of each sample j to a certain class i; Next, cluster centers are calculated based on membership degrees, and the objective function value is calculated using the following formula: in, Indicates the cluster center. Indicates the membership degree of a sample. Represents the fuzzy index. Let J represent each sample data point, and J represent the objective function. The formulas for updating cluster centers and membership degrees are: in, This represents the j-th cluster center, and n represents the number of data objects in the dataset. Representation Object With cluster center Membership degree between them Indicates the number of clusters; in, Represents the updated object With cluster center Membership degree between them This represents the number of clusters; as can be seen from the lower part of the fraction, the numerator represents the number of objects. Cluster Center The distance is calculated as the distance from the current object to all cluster centers, and the denominator represents the sum of the distances from the current object to all cluster centers. The membership degree of the sample object is recalculated based on the value of the cluster center, and then the value of the cluster center is updated again. This step is repeated until the termination conditions of the algorithm are met:
1. The number of iterations reaches the number set by the user; 2. The difference between the last two objective functions is less than the threshold set by the user.
4. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 3, characterized in that, The encoding step in step S2 specifically includes: Definition 1: The coding rule determines the magnitude of the five-dimensional attribute values of the cluster center. If the value of a dimension is greater than 50% of the range of values for that dimension, it is considered that the demand for that dimension is strong or that the attribute is a strong attribute, and it is encoded as '1'; otherwise, it is encoded as '0'. Definition 2: The dissimilarity between task classes represented by 0 and 1 encoding and MEC cache task classes is calculated, and Hamming distance is used as the measure of dissimilarity between task classes and MEC cache task classes.
5. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 4, characterized in that, After coding is complete, a similarity matching process is performed between the task class and the MEC cache task class. This ensures that the final matching between the task and the MEC cache task is completed within similar classes. The class matching method for multi-user, multi-MEC server scenarios is as follows: The task aggregator first collects task cache class information sent by each MEC server. Then, each user task class is sent to the task aggregator for task merging and clustering. The task aggregator first processes the matching of the task class with each MEC cache class, and then obtains the best unloading MEC server for each task class through integration. Finally, the Kuhn-Munkras algorithm for finding the minimum weighted matching in a weighted bipartite graph is used to select the matching with the smallest weight, which is the MEC server that the current user task class needs to unload.
6. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 1, characterized in that, The method for calculating the unloading decision in step S4 includes the following steps: (1) Based on the results of step S3, the task is divided into several sub-tasks; the computation offloading strategy for mobile users is defined as follows: ,in It is the set of uninstallation decisions. The decision to uninstall for user m. User m migrates the computing task to a specific MEC server via wireless access point AP, and... This indicates that the user is processing computing tasks locally; (2) Calculate the subtask transmission rate based on bandwidth, user equipment power, channel gain, and noise power. (3) Calculate the local processing latency based on the user equipment CPU frequency and the computing power required by the subtask; (4) Calculate the transmission delay based on the subtask transmission rate and subtask size; (5) Calculate the edge server processing latency based on the edge server CPU frequency and the computing power required by the subtask; (6) Calculate the local processing energy consumption based on the user device CPU frequency, the computing power required by the subtask, and the local device hardware-related energy consumption coefficient; (7) Calculate transmission energy consumption based on the power of the user equipment and the transmission delay; (8) Calculate the processing energy consumption of the edge server based on the edge server CPU frequency, the computing power required by the subtask, and the energy consumption coefficient related to the edge server hardware; (9) Calculate the final energy consumption based on (6), (7), and (8); (10) The WOA algorithm is used to make offloading decisions so that the task processing latency is within the tolerable latency range and the energy consumption is optimized.
7. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 6, characterized in that, In step (10), the steps of making an unloading decision using the WOA algorithm include: 1) Initialization There are *n* whales, whose positions are randomly distributed in the solution space, where each whale is a *n* whale. dimensional vector, Number of subtasks To increase the number of access points, use matrix Store whale location; 2) Use another one A dimensional vector stores the fitness value of each whale's location, and the fitness value corresponds to the energy consumption generated by each subtask i through access point j. ; 3) Sort the positions of the first generation whales in ascending order of fitness value, and then select the individual best value and the overall best value of the whale population. 4) Choose between the shrinking encirclement mechanism and the spiral model to determine which mode to use for updating the whale's position; after selecting the mode, calculate the fitness value of the whale's position after the update, reorder the updated whale position fitness values, and select the spatial position with the better fitness value to update the position of the next generation of whales. 5) Number of iterations Perform step 4) to move on to the next generation, until the number of iterations is reached. Reaching the maximum number of iterations End the iteration and output the optimal unloading decision.
8. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 7, characterized in that, The WOA algorithm uses a binary mapping: the dimension of the whale position vector corresponds to the number of tasks, and the fitness value of the objective function corresponds to the energy consumption value. During the iteration process, when calculating the fitness value, the values of each component in the whale position are treated as priorities, with larger values having higher priorities. This maps the whale position vector values to... ,in It is the set of uninstallation decisions. The decision to uninstall for user m; User m migrates the computing task to a specific MEC server via wireless access point AP, and... This indicates that the user is processing computational tasks locally; the whale's position corresponds to a solution vector of the optimization problem, i.e., the unloading decision, and the components of this vector after mapping are... Or 0, for The process is handled at the wireless access point (ap) of the edge server. When terminal device i decides to offload some of its subtasks to the wireless access point (ap) of the edge server, then other subtasks in device i can only choose this server as the edge offload server. If the value is 0, it is processed locally. Finally, the algorithm outputs the optimal offload decision.
9. The task offloading method for selecting and optimizing energy consumption of a trusted edge server according to claim 7, characterized in that, Step 4) specifically includes: The behavior of whales in bubble-web formation is modeled. A whale swims around its prey within a shrinking circle while simultaneously moving along a spiral path. It is assumed that there is a 50% probability of choosing between a shrinking encirclement mechanism and a spiral model; as shown in the following formula: in, This represents the position vector of the current optimal solution. This represents the position vector of the current solution vector. Represents the logarithmic spiral constant. Represents a random number in the range [-1, 1]. A random number between [0,1], where, and For the coefficient vector, and The calculation is as follows: in, During the algorithm iteration process, the value linearly decreases from 2 to 0. A random vector between [0,1]; variables The process of change is shown in the following formula: in, Indicates the current iteration number. Indicates the maximum number of iterations; Besides using bubble nets, whales also randomly search for prey, also based on variable... The vector, whales will search randomly based on each other's positions, therefore a random value greater than 1 or less than -1 is used. This forces the search agent away from the optimal search agent, instead updating the whale's current position based on a randomly selected search agent; the mathematical model is as follows: in A random position vector selected from the current population represents a random whale.