A method, system, and apparatus for offloading network data
By optimizing the offloading workload of edge servers through deep reinforcement learning algorithms and combining user offloading frequency and privacy thresholds, the problem of privacy leakage in mobile edge computing is solved, and network data offloading with both security and privacy is achieved.
Patent Information
- Application Number
- CN202310636425.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-06-01
AI Technical Summary
Existing computing task offloading strategies have privacy leakage issues in mobile edge computing. The terminal node capabilities are insufficient to support complex encryption and authentication algorithms, and cannot guarantee the security and privacy of network services.
The offloading workload of edge servers is optimized by using deep reinforcement learning algorithms. By combining user offloading frequency, total task volume and privacy threshold, local computing and edge server collaborative offloading of data are adopted. Deep reinforcement learning algorithms such as Deep Q-Network (DQN) are used for resource allocation and offloading strategy decision-making.
It achieves the optimization of latency and energy consumption for offloading computing tasks while ensuring the security and privacy of network services, and provides personalized privacy protection.
Smart Images

Figure CN116647876B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network security, and particularly relates to a network data offloading method, system and device. BACKGROUND
[0002] With the continuous development of mobile Internet technology and the continuous popularity of Internet of Things devices, a large number of new network applications have been generated. The emergence of new edge technology enables offloading services to be based on a large number of distributed edge nodes, which can sink the computing power of cloud computing centers and improve service flexibility and service efficiency. However, there are still many challenges in providing faster and more stable services for users by using mobile edge computing (MEC).
[0003] Existing computing task offloading strategies aim to improve service efficiency, minimize the overall processing delay of computing task offloading, or minimize the processing energy consumption of task offloading, or achieve a compromise between processing delay and energy consumption. However, in the process of continuously offloading terminal tasks to edge nodes, privacy leakage problems are inevitable. Existing solutions mostly use traditional encryption and authentication algorithms to ensure the security of data transmission. However, the capabilities of terminal nodes are mostly insufficient to support complex encryption and authentication algorithms, and thus the security and privacy of the entire network service cannot be guaranteed. SUMMARY
[0004] The present application provides a network data offloading method, system and device.
[0005] The technical scheme of the present application is as follows:
[0006] A network data offloading method comprises the following operations:
[0007] S1 obtains a user offloading frequency, a total amount of tasks generated by the user, and an average offloading amount of an edge server;
[0008] If the user offloading frequency is not greater than the maximum threshold value of the safe offloading frequency range, S2 is performed;
[0009] If the user offloading frequency is greater than the maximum threshold value of the safe offloading frequency range, the total amount of tasks generated by the user is calculated locally;
[0010] S2, if the total amount of tasks generated by the user is less than the average offloading amount of the edge server, S3 is performed;
[0011] If the total amount of tasks generated by the user is not less than the average offloading amount of the edge server, the user privacy amount is controlled to be less than a privacy amount threshold value, a first optimal offloading task amount of the edge server is obtained, and a part of the total amount of tasks generated by the user is offloaded by the edge server, wherein the part of the total amount of tasks generated by the user is equal to the first optimal offloading task amount of the edge server.
[0012] S3 adding redundant data to the total amount of user-generated tasks, making the total amount of user-generated tasks equal to the average offloading amount of the edge server, obtaining the optimized total amount of user offloading tasks, and controlling the user privacy amount to be less than the privacy amount threshold, to obtain the second optimal offloading task amount of the edge server;
[0013] If the second optimal offloading task amount of the edge server is greater than the optimized total amount of user offloading tasks, redundant data is added to the optimized total amount of user offloading tasks, making the optimized total amount of user offloading tasks equal to the second optimal offloading task amount of the edge server, obtaining the optimal total amount of user offloading tasks, and using the edge server to offload the optimal total amount of user offloading tasks;
[0014] If the second optimal offloading task amount of the edge server is not greater than the optimized total amount of user offloading tasks, the edge server is used to offload the optimized total amount of user offloading tasks.
[0015] The offloading method as described above, wherein the safe offloading frequency range in S1 is (aP j , bP j ), P j is the average offloading frequency of all users, aP j is the minimum threshold of the safe offloading frequency range, bP j is the maximum threshold of the safe offloading frequency range, a is the minimum threshold coefficient, and b is the maximum threshold coefficient.
[0016] The offloading method as described above, wherein the operations of obtaining the first optimal offloading task amount of the edge server and the second optimal offloading task amount of the edge server in S2 and S3, respectively, are based on an optimization target and are achieved through a deep reinforcement learning algorithm; if the user offloading frequency is within the safe offloading frequency range, the optimization target includes: making the first optimal offloading task amount of the edge server and the second optimal offloading task amount of the edge server both not less than a first threshold; if the user offloading frequency is less than the minimum threshold of the safe offloading frequency range, the optimization target includes: making the first optimal offloading task amount of the edge server and the second optimal offloading task amount of the edge server both greater than the first threshold.
[0017] The offloading method as described above, wherein the user privacy amount in S2 is obtained based on the significance of the user offloading frequency and the offloading task amount relative to the average offloading frequency and the average offloading task amount of all users.
[0018] The offloading method as described above, wherein after the offloading tasks in S2 and S3 are executed, the average offloading amount of the edge server is further updated.
[0019] The operation of updating the average offloading amount of the edge server specifically comprises: performing weighted averaging on the average offloading amount of the edge server at the current moment and the average task amount of the edge server at the previous moment to obtain the updated average offloading amount of the edge server.
[0020] The operation of updating the average offloading amount of the edge server can be implemented by the following formula:
[0021]
[0022] M j is the updated average offloading amount of the edge server, a is a filtering coefficient, M j is a historical average offloading amount of the edge server, is the average offloading amount of the edge server at the current moment, and ω n is the optimal offloading task amount of the nth edge server, and n is the total number of edge servers.
[0023] A network data offloading system comprises:
[0024] A user offloading frequency, a user generated task total amount and an edge server average offloading amount generation module is configured to obtain a user offloading frequency, a user generated task total amount and an edge server average offloading amount.
[0025] An edge server first optimal offloading task amount generation module is configured to obtain an edge server first optimal offloading task amount if the user generated task total amount is not less than the edge server average offloading amount and a user privacy amount is less than a privacy amount threshold.
[0026] A user offloading task optimal total amount generation module is configured to add redundant data to the user generated task total amount to make the user generated task total amount equal to the edge server average offloading amount to obtain a user offloading task optimal total amount if the user generated task total amount is less than the edge server average offloading amount.
[0027] An edge server second optimal offloading task amount generation module is configured to obtain an edge server second optimal offloading task amount if the user generated task total amount is less than the edge server average offloading amount and a user privacy amount is less than a privacy amount threshold.
[0028] A user offloading task optimal total amount generation module is configured to add redundant data to the user offloading task optimal total amount to make the user offloading task optimal total amount equal to the edge server second optimal offloading task amount to obtain a user offloading task optimal total amount if the edge server second optimal offloading task amount is greater than the user offloading task optimal total amount.
[0029] An offloading module comprises a local computing and an edge server, and the local computing and the edge server are both configured to offload network data.
[0030] An offloading device of network data, comprising a processor and a memory, wherein the processor implements the offloading method of network data as described above when executing the computer program stored in the memory.
[0031] A computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the offloading method of network data as described above.
[0032] The present application has the following beneficial effects:
[0033] The present application provides an offloading method of network data, which compares the user offloading frequency with the safe offloading frequency range, compares the total amount of tasks generated by the user with the average offloading amount of the edge server, and combines the privacy amount to obtain the data amount size suitable for local calculation and edge server offloading, thereby providing the user offloading service with privacy protection characteristics and protecting the security and privacy of the entire network service. BRIEF DESCRIPTION OF DRAWINGS
[0034] The scheme and advantages of the present application will become clear to those skilled in the art from the following detailed description of the preferred embodiments. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not considered as limiting the present application.
[0035] In the drawings:
[0036] Figure 1 A flowchart of the offloading method in the embodiment;
[0037] Figure 2 A schematic diagram of the change of the user privacy amount with the optimal offloading task amount of the edge server in the embodiment;
[0038] Figure 3 A structure schematic diagram of the network data offloading service system architecture schematic diagram in the embodiment;
[0039] Figure 4 A structure schematic diagram of the offloading system in the embodiment;
[0040] Figure 5 A structure schematic diagram of the offloading device in the embodiment. DETAILED DESCRIPTION
[0041] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.
[0042] The present embodiment provides an offloading method of network data, referring to Figure 1 , comprising the following operations:
[0043] S1 obtains the user offloading frequency, the total amount of tasks generated by the user, and the average offloading amount of the edge server;
[0044] If the user offloading frequency is not greater than the maximum threshold of the safe offloading frequency range, S2 is performed;
[0045] If the user offloading frequency is greater than the maximum threshold of the safe offloading frequency range, the total amount of tasks generated by the user is calculated locally.
[0046] S2 If the total amount of tasks generated by the user is less than the average offloading amount of the edge server, S3 is performed.
[0047] If the total amount of tasks generated by the user is not less than the average offloading amount of the edge server, the user privacy amount is controlled to be less than the privacy amount threshold, the first optimal offloading task amount of the edge server is obtained, and a part of the total amount of tasks generated by the user is offloaded by the edge server, wherein the part of the total amount of tasks generated by the user is equal to the first optimal offloading task amount of the edge server.
[0048] S3 Redundant data is added to the total amount of tasks generated by the user, so that the total amount of tasks generated by the user is equal to the average offloading amount of the edge server, the optimized total amount of user offloading tasks is obtained, and the user privacy amount is controlled to be less than the privacy amount threshold, the second optimal offloading task amount of the edge server is obtained.
[0049] If the second optimal offloading task amount of the edge server is greater than the optimized total amount of user offloading tasks, redundant data is added to the optimized total amount of user offloading tasks, so that the optimized total amount of user offloading tasks is equal to the second optimal offloading task amount of the edge server, the optimal total amount of user offloading tasks is obtained, and the optimal total amount of user offloading tasks is offloaded by the edge server.
[0050] If the second optimal offloading task amount of the edge server is not greater than the optimized total amount of user offloading tasks, the optimized total amount of user offloading tasks is offloaded by the edge server.
[0051] Specifically:
[0052] S1 obtains the user offloading frequency, the total amount of tasks generated by the user, and the average offloading amount of the edge server; if the user offloading frequency is not greater than the maximum threshold of the safe offloading frequency range, S2 is performed; and if the user offloading frequency is greater than the maximum threshold of the safe offloading frequency range, the total amount of tasks generated by the user is calculated locally.
[0053] User offloading frequency. The user offloading frequency p i The inverse of the number of offloading times in T time is taken, m i is the number of offloading times of the user i in T time.
[0054] The total amount of tasks generated by the user is the tasks generated by the user that need to be processed, the task features in the total amount of tasks generated by the user are uploaded to the scheduler, the offloading strategy of the user is given by the scheduler, and is transmitted to the edge server.
[0055] The safe offloading frequency range is (aP j , bP j ), P j is the average offloading frequency of all users, aP j is the minimum threshold of the safe offloading frequency range, bP j is the maximum threshold of the safe offloading frequency range, a is the minimum threshold coefficient, and b is the maximum threshold coefficient. By setting the safe offloading frequency range, the personalized privacy protection effect can be achieved according to the privacy protection strength that the user wants to achieve.
[0056] S2If the total amount of user-generated tasks is less than the average offloading amount of the edge server, S3 is executed; if the total amount of user-generated tasks is not less than the average offloading amount of the edge server, the user privacy amount is controlled to be less than the privacy amount threshold, the first optimal offloading task amount of the edge server is obtained, and part of the total amount of user-generated tasks is offloaded by the edge server, and the part of the total amount of user-generated tasks is equal to the first optimal offloading task amount of the edge server.
[0057] If the total amount of user-generated tasks is not less than the average offloading amount of the edge server, part of the total amount of user-generated tasks is offloaded by the edge server, and the remaining total amount of user-generated tasks is not offloaded, and local calculation is performed.
[0058] The user privacy amount is obtained based on the significance of the offloading frequency and the offloading task amount of the user relative to the average offloading frequency and the average offloading task amount of all users. The user privacy amount can be obtained by the following formula:
[0059]
[0060] q i is the user privacy amount of the user i, ω′ i is the optimal offloading task amount of the edge server of the user i, w j is the average offloading amount of the edge server. See Figure 2 , Figure 2 The vertical coordinate is q i , and the horizontal coordinate is ω′ i ; when q i = 0, ω′ i = w j is equal, at this time, the optimal offloading task amount of the edge server selected by the user when offloading is equal to the average offloading amount of the edge server, the user task significance is the lowest, and the privacy protection effect is the best. When q i = 1, ω′ i = 2w j ; when q i > 1, ω′ i > 2w j . ω′ iBoth overlarge and undersize deviate from the average offloading amount of the edge server, the user task characteristics are more obvious, and the user privacy amount increases.
[0061] The operation of obtaining the first optimal offloading task amount of the edge server in S2 is similar to the specific process of obtaining the first optimal offloading task amount of the edge server in S3. To save space, the specific operation of obtaining the optimal offloading task amount of the edge server will be described in detail in S3, while controlling the user privacy amount to be less than the privacy amount threshold. S3 adds redundant data to the total amount of user generated tasks, so that the total amount of user generated tasks is equal to the average offloading amount of the edge server, obtains the optimized total amount of user offloading tasks, and controls the user privacy amount to be less than the privacy amount threshold, obtains the second optimal offloading task amount of the edge server; if the second optimal offloading task amount of the edge server is greater than the optimized total amount of user offloading tasks, redundant data is added to the optimized total amount of user offloading tasks, so that the optimized total amount of user offloading tasks is equal to the second optimal offloading task amount of the edge server, the optimal total amount of user offloading tasks is obtained, and the edge server is used to offload the optimal total amount of user offloading tasks; if the second optimal offloading task amount of the edge server is not greater than the optimized total amount of user offloading tasks, the edge server is used to offload the optimized total amount of user offloading tasks.
[0062] If the second optimal offloading task amount of the edge server is greater than the optimized total amount of user offloading tasks, the edge server is used to offload part of the total amount of user generated tasks, the total amount of part of the user generated tasks is equal to the optimized total amount of user offloading tasks, and the remaining total amount of user generated tasks is not offloaded, and local calculation is performed.
[0063] The operations of obtaining the first optimal offloading task amount of the edge server and the second optimal offloading task amount of the edge server in S2 and S3, respectively, are based on the optimization target and are realized through a deep reinforcement learning algorithm.
[0064] Deep Reinforcement Learning Algorithm. In a typical reinforcement learning model, the scheduler continuously interacts with the state, action, and reward information of the environment to complete the production of the offloading strategy. The deep reinforcement learning algorithm selected in this embodiment is Deep Q-Network (DQN), which combines the ideas of Q-learning and deep neural networks and can train a scheduler that can learn autonomously in a complex environment. In DQN, the Q value (or action value function) represents the cumulative return expectation obtained by taking a certain action in a given state. Specifically, for each state and action pair, the Q value represents the expected cumulative return obtained by taking the action in the current state. It reflects the pros and cons of different actions taken by the user in the current state and is used to guide the user to choose the best action in the decision-making process. The basic idea of DQN is to approximate the Q function in Q-learning as a deep neural network called Q network (Q-Network), which takes the state as input and outputs the Q value of each action. During the training process, the scheduler collects information about the state, action, reward, and next state by continuously interacting with the environment, and uses this data to update the parameters of the Q network to gradually optimize its strategy.
[0065] During the training process of DQN, the following steps need to be followed:
[0066] (1) Initialize the Q network and target Q network of DQN, which have the same structure but different parameters.
[0067] (2) For each time step, the scheduler selects an action from the Q network based on the current state and executes it in the environment.
[0068] (3) The information observed by the scheduler about the state, action, reward, and next state is saved in a replay buffer.
[0069] (4) The scheduler randomly samples a batch of data from the replay buffer and uses it to train the Q network.
[0070] (5) To solve the problem of correlation between the target value and the actual predicted value in Q-learning, a target Q network is introduced in DQN to generate target Q values, and the parameters of the target Q network are updated regularly.
[0071] Repeat steps (2)-(5) and perform multiple iterations of learning until the scheduler finally reaches the optimal strategy.
[0072] The DQN algorithm is described in Table 1.
[0073] Table 1 Dynamic task offloading algorithm based on DQN
[0074]
[0075]
[0076] Wherein, s: represents the current state, i.e. the environment state where the user is in. a: represents the current action, i.e. the behavior selected by the user in the current state. r: represents the immediate reward, i.e. the reward signal obtained by the user after performing the action according to the feedback of the environment. s': represents the next state, i.e. the new environment state to which the agent is transferred after performing the action. Q(s, a): represents the Q value, i.e. the estimated value of the cumulative return of taking action a in a given state s. It represents the degree of good or bad of the user selecting action a in the current state s.
[0077] DQN uses two neural networks for training, one is the main network that needs to be trained, and the other is the target network used to generate Q values. DQN trains model parameters through a loss function. The loss function is the square difference between the estimated value Q r (s, a) of the target network and the output Q(s, a) of the main network, as shown in the following formula:
[0078] LOSS = (Q r (s, a) - Q(s, a)) 2
[0079] Wherein, the estimated value Q r (s, a) of the target network is as follows:
[0080] Q r (s, a) = reward + γQ'(s', argmax a′ Q'(s', a'))
[0081] γ is the decay coefficient applied to the reward of the next step, Q'(s, a) is the reward estimation value of the target network for performing action a in state s, and argmax a′ Q'(s', a') is the action a' corresponding to the highest Q value in the next state s'.
[0082] In this embodiment, the state, action and reward are the user task features, the scheduler execution action and the reward feedback of the execution strategy, which are defined as follows:
[0083] State space: represented by s t , s t = {ω1, p1,..., ω n , p n}; (where n represents the number of users)
[0084] Action space: The action is the solution of the above optimization objective generated according to the state information in reinforcement learning, that is, the user decision offloading task size and the resource allocation of the edge server. The computing resource of the edge server allocated by the user i is theoretically a continuous variable, but in the actual computing environment, the resource is often allocated in the form of the smallest unit. Therefore, this embodiment does not use the modeling method commonly used in continuous action space (such as policy gradient model DPG, DDPG algorithm, etc.), but considers the discretization of resource allocation. The action space is designed as A = {A1,..., A n}, A i = (f’ i , ω’ i ), where f’ i represents the computing resource of the edge server allocated by the i th user, and ω’ i represents the task size of the user decision offloading to the edge server, that is, the optimal offloading task amount of the edge server. Assuming that the minimum allocatable unit of the edge resource is Δc, and the maximum available resource of the edge server is c mec , then
[0085] Reward value: In this problem, the optimization objective is to minimize the system cost, and the learning goal of reinforcement learning is to obtain the maximum benefit. If you want to use reinforcement learning to solve it, you must combine the reward function and the optimization objective function. Therefore, the reward value is defined as the inverse of the optimization objective function.
[0086] Optimization objective. While providing good service in terms of privacy when offloading user tasks, efficient computing services are also provided to users. For the optimization of delay and energy consumption when offloading tasks, two optimization objectives are divided. Specifically, if the user offloading frequency is within the safe offloading frequency range, the optimization objectives include: making the edge server first optimal offloading task amount and the edge server second optimal offloading task amount both not less than the first threshold value; if the user offloading frequency is less than the minimum threshold value of the safe offloading frequency range, the optimization objectives include: making the edge server first optimal offloading task amount and the edge server second optimal offloading task amount both greater than the first threshold value. The first threshold value is 0.
[0087] Specifically:
[0088] If the offloading frequency is within the safe offloading frequency range, that is, aP j ≤ p i ≤ bP j , the offloading proportion and the edge resource allocation will be determined according to the channel state and the edge server resource allocation, and at this time the optimization objective function is:
[0089]
[0090] S.t.q i <θ
[0091]
[0092]
[0093] 0≤ω′ i ≤ω i
[0094] If the offloading frequency is less than the minimum threshold of the safe offloading frequency range, i.e. p i <aP j , the optimization objective function is:
[0095]
[0096] S.t.q i <θ
[0097]
[0098]
[0099] 0<ω′ i ≤ω i
[0100] where T i represents the total computation latency of user i, E i represents the total computation energy consumption of user i, and represent the weight coefficients of latency and energy consumption respectively. f′ i represents the computation resource size allocated to user i by the MEC server, f′ i is the maximum computation resource of the MEC server.
[0101] The difference between the above two optimization objective functions is whether 0<ω′ i takes the equal sign. For the tasks with offloading frequency less than aP j , the tasks are forced to offload to the edge server, so ω′ i cannot be 0, and the equal sign cannot be taken.
[0102] For the tasks with offloading frequency greater than the highest threshold, i.e. p i ≥bP j , the tasks are forced to offload locally, and the cost of the user is only determined by the local computation capability, and there is no need to optimize.
[0103] Since different users have different sensitivities to latency and energy consumption, for example, users whose terminal devices are about to run out of power prefer to minimize energy consumption, while applications such as virtual reality, vehicle networking, and high-speed video streaming are more sensitive to latency. Therefore, users can set the weight of latency and energy consumption according to their own needs.
[0104] After the uninstallation tasks are completed in S2 and S3, the average uninstallation volume of the edge servers is also updated.
[0105] The operation of updating the average offload volume of edge servers is as follows: the average offload volume of edge servers at the current time is weighted and averaged with the average task volume of edge servers at the previous time to obtain the updated average offload volume of edge servers.
[0106] The above update process can be achieved using the following formula:
[0107]
[0108] w j The updated average offload volume for edge servers, α is the filter coefficient, and M... j 'This represents the historical average offload volume of edge servers,' and 'This represents the historical average energy consumption.' ω' represents the average offload volume of edge servers at the current moment. n Let α be the optimal unloading task quantity for the nth edge server, where n is the total number of edge servers. Here, α ranges from 0 to 1. When α is close to 0, the impact of new observations on the estimated value is small, and the average unloading task quantity changes relatively smoothly. When α is close to 1, the impact of new observations on the estimated value is large, and the average unloading task quantity follows the changes in observations more quickly. By adjusting the value of the filtering coefficient α, the responsiveness of the average unloading task quantity to the task quantity at the current moment can be controlled. Therefore, the value of α can adjust the smoothness and sensitivity of the filtering effect.
[0109] After completing the uninstallation tasks in S2 and S3, updating the average uninstallation frequency for all users can be achieved using the following formula: p n The uninstallation frequency for user n is the same as p above. i , where n is the total number of users.
[0110] To facilitate a better understanding of the uninstallation method proposed in this application by those skilled in the art, this embodiment provides a specific uninstallation method as follows:
[0111] The network contains an edge server that provides data services to end users, and a scheduler that makes offloading policy decisions. Based on the service policy set by the scheduler, the terminal offloads data services to the designated edge server through the service layer. (See [link to relevant documentation]). Figure 3 .
[0112] The specific values of a and b in the safe offloading frequency range can be set according to the desired privacy protection effect. The greater a is and the smaller b is, the closer the user offloading frequency is controlled to P j , the better the privacy protection effect is, but the user offloading flexibility is also more limited. Similarly, the selected privacy amount threshold is too high, which also limits the user offloading flexibility. Therefore, a = 0.9, b = 1.1, and the privacy amount threshold θ = 0.25 are selected.
[0113] At the current time, p i > 1.1P j , no offloading is performed, and the user generates the total amount of tasks locally.
[0114] At the current time, 0.9P j < p i < 1.1P j , and w i = 110MB, w j = 80MB; at this time, w i > w j , q i < 0.25 is controlled, the first optimal offloading task amount ω' i of the edge server is obtained according to the optimization algorithm and the optimization target, ω' i = 70MB, the edge server offloads 70MB to the MEC server, and the remaining 40MB of the total amount of tasks generated by the user is calculated locally by the terminal user.
[0115] At the current time, 0.9P j < p i < 1.1P j , and w i = 70MB, w j = 80MB; at this time, w i < w j , redundant data is added to w i , so that w i = w j , the updated w i is denoted as A (the total amount of user offloading tasks optimized), q i < 0.25 is controlled, the second optimal offloading task amount ω' i of the edge server is obtained according to the optimization algorithm and the optimization target (at this time, ω' i can be taken to 0), ω' i = 65MB; at this time, ω' i < A, A is offloaded to the MEC server using the edge server, the offloading amount is 65MB, and the remaining 5MB of the total amount of tasks generated by the user is calculated locally by the terminal user.
[0116] At the current time, 0.9P j < p i<1.1P j , and w i = 50MB, w j = 80MB; at this time w i < w j , redundant data is added to w i , so that w i = w j , and the updated w i is denoted as A (the optimized total amount of user offloading tasks), q i < 0.25, according to the optimization algorithm and the optimization target (at this time the range of ω' i may not be 0), the second optimal offloading task amount ω' i = 89MB is obtained; at this time ω' i > A, redundant data is added to A, so that A = ω' i , the optimized total amount of user offloading tasks is equal to A' (the second optimal offloading task amount of the edge server), and the updated A is denoted as A' (the optimal total amount of user offloading tasks), A' is offloaded to the MEC server by using the edge server, and the offloading amount is 89MB.
[0117] At the current time, p i < 0.9P j , and w i = 50MB, w j = 80MB; at this time w i < w j , redundant data is added to w i , so that w i = w j , and the updated w i is denoted as A (the optimized total amount of user offloading tasks), q i < 0.25, according to the optimization algorithm and the optimization target (at this time the range of ω' i may not be 0), the second optimal offloading task amount ω' i = 65MB is obtained; at this time ω' i < A, A is offloaded to the MEC server by using the edge server, the offloading amount is 65MB, and the remaining 5MB of the total amount of tasks generated by the user will be calculated locally by the terminal user.
[0118] At the current time, p i < 0.9P j , and w i = 50MB, w j = 80MB; at this time w i < w j , redundant data is added to w i , so that w i = w j , and the updated wi A (the total amount of user offloading task optimization), control q i <0.25, according to the optimization algorithm and the optimization target (at this time ω i The range cannot be 0), and the second optimal offloading task amount ω i ′ of the edge server is obtained. When ω i ′ > A, redundant data is added to A, so that A = ω i ′, the total amount of user offloading task optimization is equal to A' (the second optimal offloading task amount of the edge server), and the updated A is denoted as A' (the optimal total amount of user offloading task). A' is offloaded to the MEC server by using the edge server, and the offloading amount is 89 MB.
[0119] The embodiment provides a network data offloading system, which comprises Figure 4 , and includes:
[0120] A user offloading frequency, a total amount of user generated task, and an edge server average offloading amount generation module is configured to acquire the user offloading frequency, the total amount of user generated task, and the edge server average offloading amount.
[0121] An edge server first optimal offloading task amount generation module is configured to acquire the edge server first optimal offloading task amount if the total amount of user generated task is not less than the edge server average offloading amount and the user privacy amount is less than the privacy amount threshold.
[0122] A user offloading task optimization total amount generation module is configured to acquire the user offloading task optimization total amount if the total amount of user generated task is less than the edge server average offloading amount, redundant data is added to the total amount of user generated task, so that the total amount of user generated task is equal to the edge server average offloading amount.
[0123] An edge server second optimal offloading task amount generation module is configured to acquire the edge server second optimal offloading task amount if the total amount of user generated task is less than the edge server average offloading amount and the user privacy amount is less than the privacy amount threshold.
[0124] An optimal total amount of user offloading task generation module is configured to acquire the optimal total amount of user offloading task if the edge server second optimal offloading task amount is greater than the user offloading task optimization total amount, redundant data is added to the user offloading task optimization total amount, so that the user offloading task optimization total amount is equal to the edge server second optimal offloading task amount.
[0125] An offloading module comprises a local calculation and an edge server, and the local calculation and the edge server are both configured to offload network data.
[0126] The embodiment provides a network data offloading device, which comprises Figure 5, comprising a processor and a memory, wherein the processor implements the above-mentioned network data offloading method when executing the computer program stored in the memory.
[0127] The embodiment provides a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the above-mentioned network data offloading method.
[0128] The embodiment provides a network data offloading method. The method compares a user offloading frequency with a safe offloading frequency range, compares a total amount of tasks generated by the user with an average offloading amount of an edge server, and combines a privacy amount to obtain a data amount size suitable for local calculation and edge server offloading, so that a privacy protection feature is provided for a user offloading service, and the safety and privacy of the entire network service are protected.
Claims
1. A method for offloading network data, characterized by, The method comprises the following operations: S1: obtaining a user offloading frequency, a total amount of user generated tasks, and an average offloading amount of an edge server; if the user offloading frequency is not greater than a maximum threshold of a safe offloading frequency range, performing S2; if the user offloading frequency is greater than the maximum threshold of the safe offloading frequency range, locally calculating the total amount of user generated tasks; S2: if the total amount of user generated tasks is less than the average offloading amount of the edge server, performing S3; if the total amount of user generated tasks is not less than the average offloading amount of the edge server, a user privacy amount is controlled to be less than a privacy amount threshold, an edge server first optimal offloading task amount is obtained, and a part of the total amount of user generated tasks is offloaded by the edge server, wherein the part of the total amount of user generated tasks is equal to the edge server first optimal offloading task amount; S3: redundant data is added to the total amount of user generated tasks, so that the total amount of user generated tasks is equal to the average offloading amount of the edge server, a user offloading task optimization total amount is obtained, a user privacy amount is controlled to be less than a privacy amount threshold, and an edge server second optimal offloading task amount is obtained; if the edge server second optimal offloading task amount is greater than the user offloading task optimization total amount, redundant data is added to the user offloading task optimization total amount, so that the user offloading task optimization total amount is equal to the edge server second optimal offloading task amount, a user offloading task optimal total amount is obtained, and the user offloading task optimal total amount is offloaded by the edge server; if the edge server second optimal offloading task amount is not greater than the user offloading task optimization total amount, the user offloading task optimization total amount is offloaded by the edge server.
2. The offloading method of claim 1, wherein, the safe offloading frequency range in S1 is (fmin, fmax) a , fmin is the minimum threshold of the safe offloading frequency range, a fmax is the maximum threshold of the safe offloading frequency range, fmin is the minimum threshold of the safe offloading frequency range, a fmin is the minimum threshold of the safe offloading frequency range, b fmax is the maximum threshold of the safe offloading frequency range.
3. The offloading method of claim 1, wherein, The operations of obtaining the edge server first optimal offloading task amount and the edge server second optimal offloading task amount in S2 and S3 are both based on an optimization target and are realized through a deep reinforcement learning algorithm; if the user offloading frequency is within a safe offloading frequency range, the optimization target comprises: making the edge server first optimal offloading task amount and the edge server second optimal offloading task amount both not less than a first threshold, and the first threshold is 0; if the user offloading frequency is less than a minimum threshold of the safe offloading frequency range, the optimization target comprises: making the edge server first optimal offloading task amount and the edge server second optimal offloading task amount both greater than the first threshold.
4. The offloading method of claim 1, wherein, The user privacy amount in S2 is obtained based on the significance of the user offloading frequency and the offloading task amount relative to the average offloading frequency and the average offloading task amount of all users; a calculation formula of the user privacy amount is as follows: , user privacy quantity, i user privacy quantity, edge server optimal offloading task quantity for the user, i edge server optimal offloading task quantity for the user, edge server average offloading quantity.
5. The offloading method of claim 1, wherein, after the offloading tasks in S2 and S3 are respectively performed, the average offloading amount of the edge server is also updated.
6. The offloading method of claim 5, wherein, The operation of updating the average offloading amount of the edge server is specifically: weighting and averaging the average offloading amount of the edge server at a current moment and the average task amount of the edge server at a previous moment to obtain an updated average offloading amount of the edge server.
7. The unloading method according to claim 5 or 6, characterized in that, The operation of updating the average offloading amount of the edge server can be realized through the following formula: ( ) , This represents the average offload volume for the updated edge servers. These are the filter coefficients. This represents the average offload volume of historical edge servers. This represents the average offload volume of edge servers at the current moment. For the first n Optimal unloading task volume for each edge server n This represents the total number of edge servers.
8. A network data offloading system, comprising: comprise: a user offloading frequency, a total amount of user generated tasks, and an average offloading amount of an edge server generation module, configured to obtain a user offloading frequency, a total amount of user generated tasks, and an average offloading amount of an edge server; The edge server first optimal offloading task quantity generation module is configured to: if the total quantity of tasks generated by the user is not less than the average offloading quantity of the edge server, and the quantity of user privacy is less than the privacy threshold, obtain the first optimal offloading task quantity of the edge server; The user offloading task optimal total quantity generation module is configured to: if the total quantity of tasks generated by the user is less than the average offloading quantity of the edge server, add redundant data to the total quantity of tasks generated by the user, so that the total quantity of tasks generated by the user is equal to the average offloading quantity of the edge server, and obtain the user offloading task optimal total quantity; The edge server second optimal offloading task quantity generation module is configured to: if the total quantity of tasks generated by the user is less than the average offloading quantity of the edge server, and the quantity of user privacy is less than the privacy threshold, obtain the second optimal offloading task quantity of the edge server; The user offloading task optimal total quantity generation module is configured to: if the second optimal offloading task quantity of the edge server is greater than the user offloading task optimal total quantity, add redundant data to the user offloading task optimal total quantity, so that the user offloading task optimal total quantity is equal to the second optimal offloading task quantity of the edge server, and obtain the user offloading task optimal total quantity; The offloading module includes a local calculation and an edge server, and the local calculation and the edge server are both configured to offload network data.
9. A network data offloading apparatus, comprising: A processor and a memory are included, wherein the processor executes a computer program stored in the memory to implement the network data offloading method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program is stored, wherein the computer program is executed by a processor to implement the network data offloading method in any one of claims 1-7.