A method for offloading edge collaborative services based on classification and prediction

By classifying and predicting the business, and optimizing resource allocation with improved offloading algorithms, the problems of unbalanced unloading delay and energy consumption in edge computing are solved, and efficient resource utilization and user fairness are achieved.

CN115967990BActive Publication Date: 2025-08-26BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211664779.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2025-08-26
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

The existing edge computing task offloading method fails to effectively balance the offload delay and energy consumption, and does not consider the reasonable allocation of server resources and user fairness, resulting in waste of resources and inefficiency of service.

Method used

The K-Means algorithm is used for business classification, combined with the GRU network for business prediction, and the improved Kuhn-Munkres algorithm is used to optimize the unloading strategy, and the binary graph matching algorithm is used to minimize the unloading delay and energy consumption to ensure reasonable resource allocation and user fairness.

Benefits of technology

It improves resource utilization in edge computing scenarios, reduces unloading delay and energy consumption, and ensures user fairness and service efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115967990B_ABST
    Figure CN115967990B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for edge-end collaborative service offloading based on classification and prediction, comprising the following steps: using the K-Means algorithm to classify historical service data into different clusters based on service data packet size and the amount of computing resources required for the service; using a neural network to predict future service demand within the classified different service clusters based on historical service information; calculating the total service offloading delay and total service offloading energy consumption, where the total service offloading delay includes the service transmission delay and service processing delay, and the total service offloading energy consumption includes the service transmission energy consumption and service processing energy consumption; calculating the total cost consumed by offloading services to edge servers for processing; making offloading decisions based on service demands generated by terminal devices, with the optimization goal of minimizing the total cost consumed by offloading all services to edge servers for processing, and using the Kuhn-Munkres algorithm to solve the offloading solution. The present invention ensures reasonable resource allocation and user fairness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing technology, and in particular to a method for offloading edge collaborative services based on classification and prediction. Background Art

[0002] With the continuous development of the internet era and the information society, various terminal services are becoming more diversified, intelligent, and information-based. However, problems such as heavy workload, a wide variety of services, and low processing efficiency are becoming increasingly prominent. To address these issues, edge computing networks are being introduced to move computing and storage resources to the edge of the network, improving service processing efficiency and fully utilizing service computing resources.

[0003] In this scenario, terminal devices generate differentiated services and offload them to edge computing servers using computing resources deployed at the edge of the network. However, terminal services typically have distinct characteristics, with varying demands for computing power, storage, network resources, and other resources, and their distribution patterns vary. During task offloading, improper allocation of resources to edge servers can lead to uneven resource matching and waste. Furthermore, varying service requirements can lead to varying sensitivities to offloading latency and energy consumption. This requires rational resource allocation to address these differences, efficiently utilize edge server resources, and ensure real-time performance.

[0004] In order to solve the above problems, CN114172558A (Technical Solution 1) proposes a task offloading method based on edge computing and drone cluster collaboration in a vehicle network. It obtains vehicle information, drone cluster and edge computing device information based on software-defined networking; maximizes the utility offloaded to the drone cluster based on Q learning; maximizes the utility offloaded to the edge computing device based on steepest descent; provides the vehicle with the optimal computing strategy based on the utility that the vehicle can obtain, realizes load balancing among multiple drones in the system, and reduces the completion time of computing tasks.

[0005] CN114980206A (Technical Solution 2) proposes a low-energy task offloading method and system for edge computing based on cellular vehicle networking. This method divides vehicle tasks into subtask blocks and determines which server handles the subtask based on factors such as vehicle location, driving speed, and server computing power. Furthermore, by comprehensively considering factors such as vehicle speed, subtask location, network access and exit time, task data volume, bandwidth, and peripheral device computing power, an improved simulated annealing algorithm is used to optimize offloading power and task allocation ratio, thereby reducing offloading energy consumption.

[0006] CN114564304A (Technical Solution 3) proposes a method for offloading edge computing tasks. First, a mobile device model, an MEC server model, a latency model, and an energy consumption model are constructed. A comprehensive analysis of the offloading latency and energy consumption is performed to construct a satisfaction model. A penalty function is combined to set an objective function for the total cost of task offloading. This objective function is optimized using a particle swarm algorithm to determine the optimal location for task offloading. This optimizes offloading latency and energy consumption, as well as user satisfaction, improving offloading efficiency.

[0007] Among existing offloading methods, Technical Solution 1 obtains modeling parameters by collecting relevant information from drones and edge computing devices, and formulates an offloading plan by maximizing offloading utility. However, it only considers latency and does not use offloading energy consumption as an evaluation metric for the plan. Technical Solution 2 optimizes offloading power and matching plans by dividing tasks and improving the simulated annealing algorithm, ultimately achieving the goal of minimizing offloading energy consumption. However, it only considers energy consumption and does not consider the impact of latency on the offloading plan. Technical Solution 3 first constructs a mobile device model and a network model for the MEC server, and optimizes the offloading plan by comprehensively considering latency and energy consumption. However, it does not consider service fairness or the reasonable allocation of server resources. In addition, Technical Solutions 1, 2, and 3 do not consider the impact of early adjustment of server resources on overall service overhead. Summary of the Invention

[0008] In response to the shortcomings of the existing technology, the present invention proposes an edge-side collaborative business offloading method based on classification and prediction. In a dynamically changing edge computing scenario, the business is classified and predicted by modeling analysis, so that server resources can be allocated in advance according to the characteristics of the business, reducing unnecessary service overhead, and formulating unloading strategies through an improved matching algorithm to ensure user fairness while reducing unloading delay and unloading energy consumption.

[0009] In order to achieve the above object, the present invention provides the following technical solutions:

[0010] A method for offloading edge collaborative services based on classification and prediction includes the following steps:

[0011] S1. Use the K-Means algorithm to classify historical business data into different clusters based on the size of the business data packet and the amount of computing resources required for the business;

[0012] S2. Based on the results of business classification, within the different business clusters after classification, use neural networks to predict future business demand based on historical business information;

[0013] S3. Calculate the total service offloading delay and total service offloading energy consumption. The total service offloading delay includes the service transmission delay and the service processing delay. The total service offloading energy consumption includes the energy consumption of the service transmission process and the energy consumption of the service processing process.

[0014] S4. Calculate the total cost of offloading services to the edge server for processing;

[0015] S5. Make offloading decisions based on the service demands generated by the terminal devices. The optimization goal is to minimize the total cost of offloading all services to the edge server for processing. The Kuhn-Munkres algorithm is used to solve the offloading solution.

[0016] Furthermore, the specific process of step S1 is as follows:

[0017] S11. Input sample data set X = {x1, x2, ..., x n}, set the number of clusters that the samples will be clustered into to K;

[0018] S12. Randomly select K data points from the sample set as the initial centroids;

[0019] S13. Calculate the sample point x in the data set i (i=1, 2, ...n) to each initial center of mass q j (j=1, 2, ...k distance, find the centroid with the smallest distance to the data point, and convert x i Add the cluster P of the centroid j middle;

[0020] S14, for each cluster P = {P1, P2, ..., P K} is updated and the average value of samples in each cluster is used as the new cluster center of the category.

[0021] S15, repeat steps S13 and S14 until the data points in each cluster no longer change, and output the result of clustering algorithm division P = {P1, P2, ..., P K}.

[0022] Furthermore, step S2 uses the GRU network to predict data with time-related features, taking historical business data as input, business demand location and business demand generation time as features of the input data, and business data volume as the prediction label.

[0023] Furthermore, the calculation formula for the total delay of the service offloading in step S3 is:

[0024]

[0025] Among them, datan is the amount of business data, B q is the bandwidth of the communication channel q, P k,q is the transmission power of terminal device k on communication channel q, H k,q is the channel gain, is the Gaussian white noise power, res n The amount of computing resources required for the business, cal m Provides service capabilities for edge servers.

[0026] Furthermore, the total energy consumption of the service offloading in step S3 is calculated as follows:

[0027]

[0028] in, Energy consumption during business transmission, Energy consumption during business processing, data n is the amount of business data, B q is the bandwidth of the communication channel q, P k,q is the transmission power of terminal device k on communication channel q, H k,q is the channel gain, is the Gaussian white noise power, res n The amount of computing resources required for the business, cal m For edge server service capabilities, P m For edge server power.

[0029] Furthermore, the calculation formula for the total cost consumed in step S4 is:

[0030]

[0031] in, is the total delay of service offloading, is the total energy consumption of service offloading, ω T Denotes the weight factor of delay, ω E Represents the weight factor of energy consumption.

[0032] Furthermore, the optimization objective in step S5 is expressed as:

[0033]

[0034] Among them, Q n It is the total cost of offloading services to edge servers for processing;

[0035] The constraints are:

[0036]

[0037] C2:Ak,q ∈{0, 1}

[0038] Among them, C1 means that the business demand must be executed within the maximum tolerance time. If the waiting time is too long, the business will be processed on the local device; C2 means that a communication channel can only receive business from one terminal device at the same time. k,q When it is 1, it means that the terminal device k is unloading through the communication channel q. k,q When it is 0, it indicates that the service on the terminal device k is not offloaded through the communication channel q.

[0039] Furthermore, the process of solving step S5 using the Kuhn-Munkres algorithm is as follows: the business requirements on the terminal device are regarded as a vertex set, and the communication channel is regarded as another vertex set; the offloading scheme of each business requirement being offloaded to the edge server through the communication channel is regarded as the matching of the two vertices, and the offloading cost is regarded as the weight on the matching scheme; the offloading cost is negated to find the offloading scheme with the minimum overall offloading cost.

[0040] Furthermore, in step S5, when the number of service demands is greater than the number of communication channels, the service waiting time is For services whose waiting time is longer than the maximum tolerance time ΔT, they will not be uninstalled. When the waiting time of a service is less than the maximum tolerance time ΔT, the service will be directly uninstalled on the local terminal device. The delay sensitivity factor Q of the service is set, and the service priority is sorted according to its delay sensitivity, with delay-sensitive services having a higher priority.

[0041] Furthermore, in step S5, when the number of service demands is less than the number of communication channels, the edge service resources are evaluated, the number of all pending services on the edge server is calculated, and the service demands are offloaded to the idle edge server.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The edge-end collaborative service offloading method based on classification and prediction proposed in the present invention solves the problem of service offloading in edge-end collaborative scenarios. The key point is to pre-process service needs and design service offloading strategies through an improved bipartite graph matching algorithm to minimize offloading delay and energy consumption, avoid resource waste, and improve service utilization. First, before offloading the service, it is necessary to analyze and process the complex and changeable terminal service needs. The service preprocessing process includes two steps: service classification and service volume prediction. Service classification uses the K-Means clustering algorithm in unsupervised learning to divide service needs into different categories. The classification is based on the amount of service data and the number of computing resources required to complete the service calculation. Classifying services can divide service needs with similar characteristics into the same category, thereby matching them with appropriate computing resources and reducing the prediction error caused by data imbalance when predicting future service volume. Next, based on the results of service classification, a neural network model is used in each cluster to predict future service volume. Since the service distribution on the terminal device is related to time and space, the GRU model with better prediction effect on time series data is used for prediction. The GRU network is trained using historical service data to predict the amount of data that may arrive at the next moment. Based on the prediction results, the unloading resources can be adjusted in advance to improve resource utilization. Finally, the unloading algorithm is used to make unloading decisions based on the results of service preprocessing. The influencing factors of the unloading decision consider the unloading delay and unloading energy consumption respectively, and the solution that minimizes the total cost of unloading matching is solved through the bipartite graph matching algorithm. The present invention also improves on the shortcomings and defects of traditional algorithms, avoids the situation of uneven node matching, and at the same time ensures that resources are reasonably allocated and user fairness is guaranteed.

[0044] This paper studies a service offloading method suitable for edge collaboration scenarios. It conducts simulation analysis on the proposed service prediction model. The simulation results demonstrate that the prediction scheme based on service classification can effectively reduce service prediction errors and achieve high accuracy in predicting future service volume. Furthermore, the paper also conducts simulation analysis on the proposed improved offloading algorithm, demonstrating that the improved matching algorithm can effectively reduce the overall offloading service overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0046] Figure 1 A flowchart of a classification and prediction-based edge collaborative service offloading method provided in an embodiment of the present invention.

[0047] Figure 2 This is a flow chart of the K-Means algorithm provided by an embodiment of the present invention.

[0048] Figure 3 A diagram of the GRU structure provided in an embodiment of the present invention.

[0049] Figure 4 A detailed diagram of the GRU structure provided by an embodiment of the present invention.

[0050] Figure 5 This is a system model diagram provided for an embodiment of the present invention.

[0051] Figure 6 This is a flow chart of the Kuhn-Munkres algorithm provided by an embodiment of the present invention.

[0052] Figure 7 This is a business classification diagram provided by an embodiment of the present invention.

[0053] Figure 8 This is the unclassified prediction result provided by the embodiment of the present invention.

[0054] Figure 9 This is a prediction result based on business classification provided by an embodiment of the present invention.

[0055] Figure 10 This figure shows a comparison of server overheads provided by embodiments of the present invention. DETAILED DESCRIPTION

[0056] In order to better understand the present technical solution, the method of the present invention is described in detail below with reference to the accompanying drawings.

[0057] In the dynamic changing edge computing scenario, the main problem to be solved by this patent is to formulate a service offloading strategy based on the classification and prediction results of service needs, and to minimize the offloading delay and offloading energy consumption. In response to the above problems, the present invention proposes an edge-end collaborative service offloading method based on classification and prediction, such as Figure 1 As shown, the following steps are included:

[0058] S1. Use the K-Means algorithm to classify historical business data into different clusters based on the size of the business data packet and the amount of computing resources required for the business;

[0059] In order to better handle business needs and prevent resource waste caused by mismatch between business needs and edge computing server functions, business needs need to be classified in advance. Use the K-Means algorithm to classify business. Classify historical business data into different clusters based on the size of business data packets and the amount of computing resources required for the business. Figure 2 As shown, the specific process is as follows:

[0060] S11. Input sample data set X = {x1, x2, ..., x n}, set the number of clusters that the samples will be clustered into to K;

[0061] S12. Randomly select K data points from the sample set as the initial centroids;

[0062] S13. Calculate the sample point x in the data set i (i=1, 2, ...n) to each initial center of mass q j (j=1, 2, ...K distance, find the centroid with the smallest distance to the data point, and convert x i Add the cluster P of the centroid j middle;

[0063] S14. For each cluster P={P1, P2, ..., P K} is updated and the average value of samples in each cluster is used as the new cluster center of the category.

[0064] S15, repeat steps S13 and S14 until the data points in each cluster no longer change, and output the result of clustering algorithm division P = {P1, P2, ..., P K}.

[0065] S2. Based on the results of business classification, within the different classified business clusters, use neural networks to predict future business needs based on historical business information.

[0066] In response to the business classification algorithm designed above, the present invention proposes a business prediction strategy. Based on the results of business classification, future business demand is predicted based on historical business information within different classified business clusters. A neural network prediction model is used to predict the amount of future business data. Since the distribution of business demand usually has time characteristics, a GRU network that can predict time series data is used to analyze the data. The GRU network can remember the content of the previous moment, and the output prediction content comprehensively considers the input of the previous moment and the current moment, so it can better analyze data with time-related characteristics.

[0067] The structure of the GRU unit is as follows Figure 3 and Figure 4 As shown, x t Indicates the input value at the current moment, h t Indicates the output value of GRU at the current moment, Represents the intermediate information of the hidden layer, h t-1 Indicates the output value at the previous moment. t represents the update gate in GRU, r t Represents the reset gate in GRU.

[0068] z t =σ(W z *[h t-1 , x t ])

[0069] r t =σ(W r *[h t-1 , x t ])

[0070]

[0071]

[0072] In this solution, the GRU model uses historical business data as input. The location and time of business demand generation are used as input data features to train the neural network, and the business data volume is used as the prediction label. The dataset is divided into training, test, and validation sets for model training and validation.

[0073] Business classification and business prediction, as two preprocessing steps, can improve server resource utilization and offload efficiency. Business classification can group data with similar characteristics into the same cluster, reducing prediction errors. Business prediction can reasonably predict future business needs of different types and pre-schedule service resources.

[0074] S3. Calculate the total service offloading delay and the total service offloading energy consumption. The total service offloading delay includes the service transmission delay and the service processing delay. The total service offloading energy consumption includes the energy consumption of the service transmission process and the energy consumption of the service processing process.

[0075] The system model is shown in the figure Figure 5 As shown in the figure, building on the traditional cloud computing network, edge computing networks are introduced to move computing resources to the edge of the network. Edge servers are deployed close to end devices, creating an edge-end collaborative network environment. Computing tasks generated by end devices can be processed locally. When local device resources are insufficient, to improve service quality, the business needs to be offloaded to edge servers for processing, thereby responding to business needs more quickly.

[0076] Each edge server corresponds to multiple communication channels, through which service requests are transmitted and offloaded to the edge server. Each terminal device can generate multiple service requests, and in each time slice, each service request selects a communication channel for offload transmission.

[0077] Definition 1: is the service offloading latency. Service n on the terminal device offloads computing tasks to edge service node m via channel q for processing. The offloading process is mainly divided into uplink transmission of the service, processing of the service, and return transmission of the processing results. Because the result return transmission speed is fast and has little impact on the offloading effect, the return transmission latency is ignored, and only the service transmission latency and processing latency are considered. The total offloading latency can be calculated using the following formula:

[0078]

[0079] The speed at which services are uploaded to a terminal device through a communication channel is based on Shannon's theorem. The transmission speed of service n on a terminal device that is unloaded on a communication channel q is:

[0080]

[0081] Among them, B q is the bandwidth of the communication channel q, P k,q is the transmission power of terminal device k on communication channel q, H k,q is the channel gain, is the Gaussian white noise power.

[0082] Business transmission time By R k,q and the amount of business data n To express.

[0083]

[0084] Business processing delay The amount of computing resources required by the business res n and edge server service capabilities cal m Decide.

[0085]

[0086] From the above expression, the total delay of service offloading is:

[0087]

[0088] Definition 2: The energy consumption of service offloading. Similar to the above delay model, the energy consumption of offloading takes into account the energy consumption of service transmission and the energy consumption of service processing on the edge server:

[0089]

[0090] Energy consumption during business transmission Expressed by transmission power and transmission delay:

[0091]

[0092] Energy consumption during business processing Expressed by edge server power and processing latency:

[0093]

[0094] From the above formula, the total energy consumption of service offloading is:

[0095]

[0096] S4. Calculate the total cost of offloading services to the edge server for processing;

[0097] Definition 3: Q n It is the total cost of offloading services to edge servers for processing. Due to the comprehensive consideration of both latency and energy consumption, it is necessary to weight them. T Denotes the weight factor of delay, ω E Represents the weight factor of energy consumption. The weight factor needs to be dynamically adjusted according to the service type. When the service is delay-sensitive, increase ω T The ratio of time delay to cost is more concerned.

[0098]

[0099] S5. Make offloading decisions based on the service demands generated by the terminal devices. The optimization goal is to minimize the total cost of offloading all services to the edge server for processing. The Kuhn-Munkres algorithm is used to solve the offloading solution.

[0100] The optimization goal is:

[0101]

[0102] The constraints are:

[0103] (1) Business needs must be executed within the maximum tolerance time. If the waiting time in the queue is too long, the business will be processed on the local device.

[0104] C1:

[0105] (2) A communication channel can only receive services from one terminal device at a time. k,q When it is 1, it means that the terminal device k is unloading through the communication channel q. k,q When it is 0, it indicates that the service on the terminal device k is not offloaded through the communication channel q.

[0106] C2:A k,q∈{0,1} (13)

[0107] The Kuhn-Munkres algorithm is referred to as the KM algorithm and is a classic bipartite graph matching algorithm. The bipartite graph is divided into two vertex sets, and the point x in the vertex X set is i and point y in the vertex U set j There is a connection between them, and the weight of the match is W ij The KM algorithm calculates the matching weight for each set of vertices and finds a solution that makes all the matching W ij The solution with the largest sum of weights.

[0108] In this invention, the service requirements on the terminal device are regarded as a vertex set, and the communication channel is regarded as another vertex set. The offloading scheme of each service requirement to the edge server through the communication channel is regarded as the matching of the two vertices, and the offloading cost is regarded as the weight on the matching scheme. Since the KM algorithm obtains the maximum matching of the weight and the maximum matching, it is necessary to take the opposite of the offloading cost. The KM algorithm finds the matching scheme that makes the service requirements The maximum matching solution is the uninstallation solution with the lowest overall uninstallation cost.

[0109] The specific process of the Kuhn-Munkres algorithm is as follows Figure 6 shown.

[0110] Since the traditional KM algorithm is applicable to bipartite graph matching scenarios, it requires that the number of the two node sets to be matched is equal. However, in the scenario of the present invention, the number of services to be offloaded and communication channels cannot be guaranteed to be equal, so the traditional KM algorithm needs to be improved.

[0111] When the number of service requests exceeds the number of communication channels, these services may be queued. To ensure user fairness, adjustments must be made to the services to be processed. Services with excessively long queues should be abandoned for offloading. When the service wait time exceeds the maximum tolerated duration ΔT, the service should be offloaded directly to the local terminal device. The service's delay sensitivity factor, Q, is set to prioritize services based on their delay sensitivity. Delay-sensitive services should be prioritized so that they are processed first among the services to be offloaded.

[0112] When the number of business demands is less than the number of communication channels, the resources of the edge service node are relatively sufficient. At this time, in order to ensure service efficiency, it is necessary to evaluate the edge service resources, calculate the number of all pending businesses on the edge server, and offload business demands to the relatively idle edge servers.

[0113] In order to evaluate the service offloading method proposed in this invention for edge collaboration scenarios, we conducted the following simulation experiments.

[0114] The present invention first classifies the business and divides all business data into 3 categories. The clustering results are as follows: Figure 7 Category 1 is text-based services, category 2 is audio-based services, and category 3 is image and video-based services.

[0115] Next, we perform traffic volume prediction. Using the PyTorch framework and a traffic flow dataset for simulation, we use 70% of the dataset as training data, 20% as testing data, and 10% as validation data. Table 1 shows the parameters of the traffic prediction model.

[0116] Table 1 Business prediction model parameters

[0117] Parameter name Reference value Number of GRU layers 2 Learning rate 0.01 epoch 100 Number of hidden layers 128 batch size 64 time step 24

[0118] The prediction results are as follows Figure 8 and Figure 9 shown. Figure 8 It is the result of predicting the business volume without classifying the business. It can be seen that for complex and changing data Figure 8 The prediction effect of Figure 9 It is the result of classifying the business and then predicting it. Figure 9 The deviation between the predicted value and the true value is small, and the prediction accuracy is high.

[0119] In the simulation of the offloading strategy to minimize delay and energy consumption, the values ​​of the simulation parameters are shown in Table 2.

[0120] Table 2 Unloading simulation parameters

[0121] parameter Value Number of edge servers 8 The number of communication channels connected to each edge server 5 Transmission bandwidth between terminal devices and edge servers [5,20]MHz Channel transmission power [1,5]W Edge server computing power [4,8]GHz Edge server power [5,10]W Business data volume [1000,10000]KB Business resource requirements [1000,20000]Megacycles Thermal noise power -100dBm

[0122] In the simulation of the offloading strategy to minimize delay and energy consumption, such as Figure 10 As shown in FIG, by comparing the random algorithm, the traditional KM algorithm and the improved algorithm proposed in the present invention, it can be seen that the algorithm proposed in the present invention can effectively reduce the overall overhead of the server, thereby improving resource utilization.

[0123] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A classification and prediction-based edge collaborative service offloading method, characterized in that: The following steps are involved: S1. Use the K-Means algorithm to classify historical business data into different clusters based on the size of the business data packet and the amount of computing resources required for the business; S2. Based on the results of business classification, within the different business clusters after classification, a neural network is used to predict future business demand based on historical business information. Step S2 uses a GRU network to predict data with time-related features, taking historical business data as input, the business demand location and business demand generation time as input data features, and the business data volume as the prediction label; S3. Calculate the total service offloading delay and total service offloading energy consumption. The total service offloading delay includes the service transmission delay and the service processing delay. The total service offloading energy consumption includes the energy consumption of the service transmission process and the energy consumption of the service processing process. S4. Calculate the total cost of offloading services to the edge server for processing. The total delay of the service offloading in step S3 is calculated as follows: Among them, data n is the amount of business data, B q is the bandwidth of the communication channel q, P k,q is the transmission power of terminal device k on communication channel q, H k,q is the channel gain, is the Gaussian white noise power, res n The amount of computing resources required for the business, cal m Capabilities to serve edge servers; S5. Make offloading decisions based on the service demands generated by the terminal devices. The optimization goal is to minimize the total cost of offloading all services to the edge server for processing. The Kuhn-Munkres algorithm is used to solve the offloading solution.

2. The edge collaborative service offloading method based on classification and prediction according to claim 1 is characterized in that: The specific process of step S1 is as follows: S11. Input sample data set X = {x1, x2, ..., x n }, set the number of clusters that the samples will be clustered into to K; S12. Randomly select K data points from the sample set as the initial centroids; S13. Calculate the sample point x in the data set i To each initial center of mass q j The distance between the data point and the centroid is as follows: i = 1, 2, ... n, j = 1, 2, ... K, find the centroid with the smallest distance to the data point, and set x i Add the cluster P of the centroid j middle; S14, for each cluster P={P1,P2,…,P K } is updated and the average value of samples in each cluster is used as the new cluster center of the category. S15, repeat steps S13 and S14 until the data points in each cluster no longer change, and output the result of clustering algorithm division P = {P1, P2, ..., P K }.

3. The edge collaborative service offloading method based on classification and prediction according to claim 1 is characterized in that: The calculation formula for the total energy consumption of the service offloading in step S3 is: in, Energy consumption during business transmission, Energy consumption during business processing, data n is the amount of business data, B q is the bandwidth of the communication channel q, P k,q is the transmission power of terminal device k on communication channel q, H k,q is the channel gain, is the Gaussian white noise power, res n The amount of computing resources required for the business, cal m For edge server service capabilities, P m For edge server power.

4. The edge collaborative service offloading method based on classification and prediction according to claim 1 is characterized in that: The calculation formula for the total cost consumed in step S4 is: in, is the total delay of service offloading, is the total energy consumption of service offloading, ω T Denotes the weight factor of delay, ω E Represents the weight factor of energy consumption.

5. The edge collaborative service offloading method based on classification and prediction according to claim 1 is characterized in that: The optimization objective in step S5 is expressed as: Among them, Q n It is the total cost of offloading services to edge servers for processing; The constraints are: C2:A k,q ∈{0,1} Among them, C1 means that the business demand must be executed within the maximum tolerance time. If the waiting time is too long, the business will be processed on the local device; C2 means that a communication channel can only receive business from one terminal device at the same time. k,q When it is 1, it means that the terminal device k is unloading through the communication channel q. k,q When it is 0, it indicates that the service on the terminal device k is not offloaded through the communication channel q.

6. The edge collaborative service offloading method based on classification and prediction according to claim 1 is characterized in that: The solution process of step S5 using the Kuhn-Munkres algorithm is as follows: the business requirements on the terminal device are regarded as a vertex set, and the communication channel is regarded as another vertex set; the offloading scheme of each business requirement to the edge server through the communication channel is regarded as the match between the two vertices, and the offloading cost is regarded as the weight on the matching scheme; the offloading cost is negated to find the offloading scheme with the minimum overall offloading cost.

7. The edge collaborative service offloading method based on classification and prediction according to claim 6 is characterized in that: In step S5, when the number of service demands is greater than the number of communication channels, the service waiting time is The service whose waiting time is longer than the maximum tolerance time ΔT is abandoned and unloaded. When the delay time is less than the maximum tolerance time ΔT, the service is directly unloaded on the local terminal device. The service delay sensitivity factor Q is set, and the service priority is sorted according to the delay sensitivity of the service, and the priority of delay-sensitive services is increased.

8. The edge collaborative service offloading method based on classification and prediction according to claim 7 is characterized in that: In step S5, when the number of service demands is less than the number of communication channels, the edge service resources are evaluated, the number of all pending services on the edge server is calculated, and the service demands are offloaded to the idle edge server.