A secure collaborative caching and computation offloading method for ultra-dense networks

By improving the Harris Eagle algorithm and diversity mutation, combining the basic information of the ultra-dense network, optimizing edge computing and cache resource allocation, the security problems and high computing energy consumption caused by insufficient allocation of edge computing resources are solved, and low energy consumption is achieved and efficient resource allocation.

CN119052831BActive Publication Date: 2025-02-14EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411517303.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-14
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

Security problems, excessive computing energy consumption and low algorithm efficiency caused by insufficient allocation of edge computing and cache resources in the prior art.

Method used

The improved Harris Eagle algorithm is used for searching, diversity mutation is introduced, and the basic information construction optimization problem of super-dense networks is combined to jointly optimize user association, computing uninstallation, security service selection, task caching, and resource allocation.

Benefits of technology

The optimization goal of minimizing total energy consumption is achieved, performance is improved, and resource allocation and computational offloading can be performed well under the constraints of cache resources, delays and security costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052831B_ABST
    Figure CN119052831B_ABST
Patent Text Reader

Abstract

The present invention discloses a secure collaborative caching and computational offloading method for ultra-dense networks, the method comprising the following steps: obtaining basic network information of the ultra-dense network, and constructing an optimization problem under the constraints of the network system to achieve the optimization goal of minimizing total energy consumption; obtaining an initial solution according to the optimization problem, defining the initial solution as an initial population, searching the initial population using an improved Harris Hawk algorithm, and finally outputting the position of a global optimal Harris Hawk individual; performing secure collaborative caching, computational offloading and resource optimization configuration according to the position of the global optimal Harris Hawk individual; the present invention can meet the constraints of cache resources, deadline delay and security cost, and achieve the optimization goal of minimizing total energy consumption; searching by using the improved Harris Hawk algorithm introduces diversity variation, greatly improves performance, and can well achieve the optimization goal of minimizing total energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a secure collaborative caching and computation offloading method for ultra-dense networks. Background Art

[0002] With the rapid growth of information and communication technology, many emerging technologies have emerged, such as mobile edge computing, virtual reality, artificial intelligence, etc. The rapid development of these applications requires unprecedented high access speed and low latency. At the same time, high access speed and low latency require mobile devices to have larger battery capacity and occupy more computing resources.

[0003] In order to better solve the above problems, mobile edge computing was proposed. Mobile edge computing can move computing and storage resources to the edge of the network close to users, and provide users with delay-sensitive and resource-intensive services through edge caching and task offloading to edge nodes. The effective combination of ultra-dense heterogeneous networks and mobile edge computing can provide better network coverage, lower latency and higher capacity. However, this also brings a series of complex challenges. The edge servers located at the edge of the network are close to attackers and are vulnerable to malicious attacks and eavesdropping. Preventive services against security threats will inevitably incur computing overhead and cause additional computing delays and energy consumption. How to solve these conflicting problems at the same time is a major research challenge. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides a secure collaborative caching and computing offloading method for ultra-dense networks, which aims to solve the security issues, excessive computing energy consumption and low algorithm efficiency caused by insufficient allocation of edge computing and cache resources in the prior art.

[0005] To achieve the above object, the present invention provides the following technical solution: a secure collaborative caching and computation offloading method for ultra-dense networks, comprising the following steps:

[0006] Step S1: Obtain basic information of the ultra-dense network, construct a network system based on the basic information, and construct an optimization problem under the constraints of cache resources, latency, and security service costs of the network system; the network system includes a communication model, a security model, a cache model, and a computing model;

[0007] Step S2: Obtain an initial solution according to the optimization problem, define the initial solution as an initial population, use the improved Harris Hawk algorithm to search the initial population, and finally output the position of the global optimal Harris Hawk individual;

[0008] The process of searching the initial population using the improved Harris Hawk algorithm is:

[0009] Initialize the initial population of the Harris Hawk algorithm and determine the best Harris Hawk individual in history;

[0010] The adaptive escape energy determines whether the Harris Hawk individuals belong to the global exploration stage or the local development stage. In the global exploration stage, the exploration factor is first used to update the position of the Harris Hawk individuals, and then the diversity mutation is performed to generate a new population. In the local development stage, the adaptive escape energy determines whether the Harris Hawk individuals are subjected to a fusion hard encirclement operation or a fusion soft encirclement operation to generate a new population.

[0011] Calculate and compare the fitness of Harris hawk individuals in the generated new population, obtain the fitness value of the best Harris hawk individual in the generated new population, compare the fitness value of the best Harris hawk individual with the fitness value of the best Harris hawk individual in history, and retain the better Harris hawk individual as the global best Harris hawk individual;

[0012] Step S3: restore the position of the global optimal Harris hawk individual to the form of the original optimization parameter solution; perform computation offloading, task caching and resource allocation operations according to the original optimization parameter solution.

[0013] Furthermore, in step S1, an optimization problem is constructed under the constraints of cache resources, latency, and security service costs of the network system, which is expressed as:

[0014] ;

[0015] In the formula, The goal of the optimization problem is to minimize the total energy consumption of the entire network; Indicates user The total energy consumption used to complete the task offloading; express The index collection of users, ; Indicates that each user has The index collection of tasks, ; express The index set of base stations, ; express A set of subchannels, ; express A set of cryptographic algorithms, ; Indicates user The execution time of the task; Indicates user Total security breach costs; Indicates user Mission The execution code size of , is the set of variables that represent the optimization problem, represents the total energy consumption; Represents a collection of associated indexes. Indicates user With base station The associated index between them; Represents a cache index collection, Indicates user Mission At the base station Cache instructions on ; represents the subchannel selection index set, Indicates user Mission and base station Subchannel Channel selection indication between; Represents the execution set of tasks, Indicates user Mission At the base station execution instructions on the Represents the cryptographic algorithm selection index set, Indicates user Mission Cryptographic algorithms Selection instructions; Indicates user The uplink transmit power, Indicates user The transmission power of Indicates that the user is offloading to the associated base station The data volume is a collection of the associated base stations, which are the associations between users and base stations. Indicates user Mission Offload to associated base station The amount of data; Indicates that the user task is associated with the base station Offload to secondary base station The collection of data volume, Indicates user Mission From the associated base station Offload to secondary base station The amount of data; Indicates user The execution time of the task must be less than the deadline ; Indicates user The total security breach cost does not exceed its maximum acceptable cost ; Indicates cache to base station The amount of data is less than , For base station Maximum cache capacity; It means that each user is associated with only one base station; Indicates user Mission Cache only on one base station; Indicates user Mission Only one subchannel is selected for association; Indicates user Mission Executed on only one base station; Indicates user Mission Only choose one cryptographic algorithm for protection; Indicates to select any base station Upload Task Users The number of is less than the number of subchannels; express Only 1 or 0, Indicates user With base station Associated, otherwise ; express Only 1 or 0, Indicates user Mission Cache at the base station On, otherwise ; express Only 1 or 0, Indicates user Select Base Station Subchannel Associated, otherwise ; express Only 1 or 0, Indicates user Mission At the base station Execute on, otherwise ; express Only 1 or 0, Indicates user Mission Selecting a cryptographic algorithm To provide security services, otherwise ; Indicates user The lower bound of the transmit power is 0 and the upper bound is ; Indicates that when the user With base station When associated, the user The task offload part of it to the associated base station , unloaded to the associated base station The amount of data is , associated base station Execute part of the received task Data, the rest is offloaded to the auxiliary base station , offloaded to the auxiliary base station The amount of data is , and Greater than 0 and less than the user Mission Data size ,in, Greater than .

[0016] Furthermore, in step S1, the specific process of obtaining basic information of the ultra-dense network is as follows:

[0017] First get The index set of a user is , The index set of base stations is , the base station associated with the user is taken as the associated base station, each associated base station selects an auxiliary base station to help with computing offloading, and each user has The index set of tasks is , The set of cryptographic algorithms is , the security service set corresponding to the cryptographic algorithm set is , Indicates the cryptographic algorithm security service level; Indicates the cryptographic algorithm security service level; assume that each user has an independent task to complete, each task consists of execution code and user input parameters, obtain user Computational tasks The five-tuple of ,in, Indicates user Calculate the CPU cycles required for one bit of user task, Indicates user Mission The input parameter size, Indicates user Mission The execution code size of Indicates user Complete the task The cut-off delay, Indicates user The expected security service level.

[0018] Furthermore, the specific process of step S2 is as follows:

[0019] Step S2.1: Initialize the maximum number of iterations of the improved Harris Hawk algorithm , and the current number of iterations Set to 1;

[0020] Step S2.2: Set the total number of Harris Hawk individuals in the population of the improved Harris Hawk algorithm to , a single Harris Hawk individual is , population ; Encode each Harris Hawk individual and optimize the parameters in the problem Encoded as ,in, represents the associated index encoding set, Harris Hawk individual Medium User The associated base station index; Represents the cache index encoding set, Harris Hawk individual Virtual User The cache index is treated as a virtual user. A virtual user means that each task of a user is treated as an independent user. Represents the index collection of virtual users, Indicates the number of virtual users; represents the subchannel selection index encoding set, Harris Hawk individual Medium User The associated subchannel index; represents the execution index encoding set, Harris Hawk individual Virtual User Execution index of represents the transmit power index code set, Harris Hawk individual Medium User The transmission power; Indicates the cryptographic algorithm selection index encoding set, Harris Hawk individual Virtual User The selected cryptographic algorithm index; represents the encoding set of the amount of tasks offloaded to the associated base station, Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; represents the amount of data to be offloaded to the secondary base station. Harris Hawk individual Virtual User The amount of data offloaded to the associated base station;

[0021] Step S2.3: Initialize the population and define the Harris hawk individuals in the population after initialization The fitness function of

[0022] Step S2.4: Determine the current number of iterations Is it less than or equal to the maximum number of iterations? , when the current iteration number Less than the maximum number of iterations , according to the adaptive escape energy, the population is judged to be in the exploration or development stage, and the population is globally explored, diversity-guided variation, fusion hard encirclement, and fusion soft encirclement operations are performed to obtain the global optimal Harris Hawk individual; when the current number of iterations Greater than the maximum number of iterations , then output the code of the globally optimal Harris Hawk individual in the target population.

[0023] Furthermore, in step S2.3, the Harris hawk individuals in the population are initialized. The fitness function is expressed as:

[0024] ;

[0025] In the formula, Represents a set of optimization problem parameters; ; Harris Hawk individual The fitness function value of represents the total energy consumption, Indicates user The penalty factor for the deadline delay of the task; Indicates user Penalty factor for total security breach cost; Indicates base station Penalty factor for cache capacity constraints; Indicates user The deadline delay of the task; Indicates user Total security breach cost; Indicates base station Cache capacity; Indicates base station Maximum cache capacity;

[0026] The fitness function is used to calculate the fitness values ​​of all Harris's hawk individuals in the population, and the Harris's hawk individual with the largest fitness value is taken as the historical optimal Harris's hawk individual.

[0027] Furthermore, the specific process of step S2.4 is as follows:

[0028] Step S2.41: Determine whether the population belongs to the global exploration stage or the local development stage according to the adaptive escape energy; in the global exploration stage, the population explores prey through exploration strategies, which include two equal probability strategies. The first equal probability strategy is to update its own position according to the position of the best Harris's hawk individual in the population and the positions of other Harris's hawk individuals in the population except the best Harris's hawk individual; the second equal probability strategy is to randomly update the position within the distribution range of the population. The exploration strategy is expressed as:

[0029] ;

[0030] ;

[0031] ;

[0032] ;

[0033] ;

[0034] ;

[0035] ;

[0036] ;

[0037] In the formula, To explore the factors, the values ​​follow a uniform distribution between 0 and 1; Indicates the number of base stations; Indicates the number of sub-channels; Indicates the number of cryptographic algorithms; Indicates user Maximum transmit power; Indicates user Mission The input parameter size is ; Indicates user Mission The execution code size of Indicates Harris Hawk individual Medium User The associated base station index of Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The associated base station index of ; Indicates The best Harris Hawk individual in history at the iteration Medium User The associated base station index of ; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User Cache index of Indicates The best Harris Hawk individual in history at the iteration Virtual User Cache index of Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The selected subchannel index; Indicates The best Harris Hawk individual in history at the iteration Medium User The selected subchannel index; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The execution base station index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The execution base station index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The transmission power; Indicates The best Harris Hawk individual in history at the iteration Medium User The transmission power; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From virtual user The amount of data offloaded to the associated base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The best Harris Hawk individual in history at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The average number of Harris hawk individuals in the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The best Harris Hawk individual in history at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The average number of Harris hawk individuals in the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Both represent random numbers that are uniformly distributed from 0 to 1;

[0038] Step S2.42: Performing diversity-guided mutation on the population after the exploration strategy. Diversity-guided mutation means performing a diversity measurement before mutation and guiding mutation according to the diversity measurement.

[0039] Defining diversity measures :

[0040] ;

[0041] In the formula, Respectively The length of the diagonal of the feasible region; Harris Hawk individual Medium User The average value of the associated base station index; Harris Hawk individual Virtual User The average value of cache index; Harris Hawk individual Medium User The average value of the selected subchannel index; Harris Hawk individual Virtual User The average value of the execution base station index; Harris Hawk individual Medium User The average value of the transmission power; Harris Hawk individual Virtual User The average value of the selected cryptographic algorithm index; Harris Hawk individual From virtual user The average amount of data offloaded to the associated base stations; Harris Hawk individual From the virtual user The average amount of data offloaded from the associated base station to the secondary base station;

[0042] Defining the probability of diversity-induced mutation by diversity measure It is expressed as:

[0043] ;

[0044] In the formula, is the first preset mutation probability; is the second preset mutation probability; is the third preset mutation probability, and , ; is the first threshold constant; is the second threshold constant, satisfying ;

[0045] Perform mutation operations based on diversity-guided mutation probabilities:

[0046] ;

[0047] ;

[0048] ;

[0049] ;

[0050] ;

[0051] ;

[0052] ;

[0053] ;

[0054] In the formula, Represents a random number that obeys a uniform distribution from 0 to 1; Indicates Harris Hawk individual Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station;

[0055] Step S2.43: Define an adaptive weight escape energy control strategy to control iterations. The adaptive weight escape energy control strategy is defined as:

[0056] ;

[0057] ;

[0058] In the formula, To escape energy, is the adaptive nonlinear weight value; Represents a random number that obeys a uniform distribution from 0 to 1;

[0059] Step S2.44: The attack phase of the population during the local development phase is simulated by using the two strategies of fused soft encirclement and fused hard encirclement, and a new population is generated, wherein the execution of the soft encirclement strategy and the hard encirclement strategy is determined by the escape energy; when When , the fusion soft encirclement strategy is implemented:

[0060] ;

[0061] ;

[0062] ;

[0063] ;

[0064] ;

[0065] ;

[0066] ;

[0067] ;

[0068] In the formula, represents the random jumping intensity of the prey during its escape, is a random number uniformly distributed from 0 to 1. Represents a random number generated by Levy flight strategy; Represents the selection factor, which is a random number uniformly distributed from 0 to 1. Indicates the selection scale factor;

[0069] when When , the fusion hard encirclement strategy is implemented:

[0070] ;

[0071] ;

[0072] ;

[0073] ;

[0074] ;

[0075] ;

[0076] ;

[0077] ;

[0078] Step S24.5: Calculate and compare the fitness of Harris hawk individuals in the current population to obtain the fitness value of the best Harris hawk individual in the current population;

[0079] Step S24.6: Compare the fitness value of the best Harris Hawk individual in the current population with the fitness value of the best Harris Hawk individual in history. When the fitness value of the best Harris Hawk individual in the current population is better than the fitness value of the best Harris Hawk individual in history, the best Harris Hawk individual in history is updated with the best Harris Hawk individual in the current population. Otherwise, the best Harris Hawk individual in history is retained. The current iteration number is The value of is increased by one.

[0080] Compared with the existing technology, the present invention has the following beneficial effects: the present invention introduces diversity variation by adopting the improved Harris Eagle algorithm for search, greatly improves the performance, and can well achieve the optimization goal of minimizing the total energy consumption; constructs the optimization problem according to the basic information of the ultra-dense network, jointly optimizes user association, computing offloading, security service selection, task caching, and resource allocation, and can well achieve the optimization goal of minimizing the total energy consumption under the constraints of cache resources, deadline delay and security cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 The figure is a flow chart of the method of the present invention.

[0082] Figure 2 This is a schematic diagram of the impact of the number of network users on total energy consumption in the simulation experiment of the present invention.

[0083] Figure 3 Schematic diagram of the convergence of the traditional Harris Hawk algorithm and the improved Harris Hawk algorithm. DETAILED DESCRIPTION

[0084] like Figure 1 As shown, the present invention provides a technical solution: a secure collaborative caching and computing offloading method for ultra-dense networks, comprising the following steps:

[0085] Step S1: Obtain basic information of the ultra-dense network, build a network system based on the basic information, and construct an optimization problem under the constraints of the network system's cache resources, latency, and security service costs. The optimization problem aims to minimize the total energy consumption of the entire network; the network system includes a communication model, a security model, a cache model, and a computing model.

[0086] Step S2: Obtain an initial solution according to the optimization problem, define the initial solution as the initial population, use the improved Harris Hawk algorithm (IHHO) to search the initial population, and finally output the position of the global optimal Harris Hawk individual;

[0087] The process of searching the initial population using the improved Harris Hawk algorithm (IHHO) is as follows:

[0088] Initialize the initial population of the Harris Hawk algorithm and determine the best Harris Hawk individual in history.

[0089] The adaptive escape energy determines whether the Harris hawk individual belongs to the global exploration stage or the local development stage; in the global exploration stage, the exploration factor is first used to update the position of the Harris hawk individual, and then diversity mutation is performed to generate a new population; in the local development stage, the adaptive escape energy determines whether the Harris hawk individual is subjected to a fusion hard surround operation or a fusion soft surround operation to generate a new population.

[0090] Calculate and compare the fitness of Harris Hawk individuals in the generated new population, obtain the fitness value of the best Harris Hawk individual in the generated new population, compare the fitness value of the best Harris Hawk individual with the fitness value of the best Harris Hawk individual in history, and retain the better Harris Hawk individual as the global optimal Harris Hawk individual.

[0091] Step S3: restore the position of the global optimal Harris hawk individual to the form of the original optimization parameter solution; perform computation offloading, task caching and resource allocation operations according to the original optimization parameter solution.

[0092] Among them, in step S1, the specific process of obtaining the basic information of the ultra-dense network is:

[0093] First get The index set of a user is , The index set of base stations is , the base station associated with the user is taken as the associated base station, each associated base station can select an auxiliary base station to help with computing offloading, and each user has The index set of tasks is , The set of cryptographic algorithms is , the security service set corresponding to the cryptographic algorithm set is , Indicates the cryptographic algorithm security service level; Indicates the cryptographic algorithm security service level; assume that each user has an independent task to complete, each task consists of execution code and user input parameters, obtain user Computational tasks The five-tuple of ,in, Indicates user Calculate the CPU cycles required for one bit of user task, Indicates user Mission The input parameter size, Indicates user Mission The execution code size of Indicates user Complete the task The cut-off delay, Indicates user The expected security service level.

[0094] Among them, in step S1, a network system is constructed according to basic information, and the network system includes a communication model, a security model, a cache model, and a computing model.

[0095] Build a communication model;

[0096] First, compared with the amount of data uploaded by the user, the amount of data downloaded from the base station (the result obtained by executing the user task at the base station) is very small. Therefore, the time taken to download the data from the base station is not considered. Different base stations are connected to each other through wired links, and the base stations and users are connected to each other through wireless links. Each base station usually serves at most one user. Each base station has a total of Sub-channels are used for transmission between the base station and the user, and each user can only select one sub-channel of the base station for transmission. , represents the subchannel set, Indicates the number of sub-channels. Select Base Station Subchannel When transmitting, the uplink transmission rate It can be expressed as:

[0097] (1);

[0098] In the formula, Indicates that except user Other users outside the group share the base station through NOMA technology Subchannel Disturbance caused; is the total bandwidth of the communication network included in the communication model; and For users and users The transmission power; and For users and users With base station The channel gain between is the noise power.

[0099] Build a security model;

[0100] In order to ensure the security of offloading, different cryptographic algorithms are used for encryption and decryption when users offload tasks, but additional delays and energy consumption will be generated during the encryption and decryption process. The corresponding energy consumption during the encryption and decryption of one bit of user task Same, cryptographic algorithm The CPU cycles required to encrypt and decrypt one bit of user data are , , when the user Mission Using cryptographic algorithms When safely offloading some of its own tasks, the cryptographic algorithm Protection failure probability It can be expressed as:

[0101] (2);

[0102] In the formula, Indicates user Mission The risk factor of Indicates the cryptographic algorithm The security level; Is a user Mission The expected level of security.

[0103] user Total security breach cost It can be expressed as:

[0104] (3);

[0105] In the formula, Indicates the task Losses incurred when protection by cryptographic algorithms fails; Indicates user and base station The associated index between them; Indicates user With base station Associated, otherwise ; Indicates user Mission The cryptographic algorithm selection indication, Indicates user Mission Selecting a cryptographic algorithm To provide security services, otherwise .

[0106] Build a cache model;

[0107] Consider pre-caching the execution code of the computing task on the base station. When the user executes the task, it will first check whether the base station has cached the available execution code. Once the available execution code is confirmed in the cache server, the user can upload the corresponding input parameters of the available execution code to the base station and directly call the edge server of the base station to run it. There is no need to upload this part of the execution code later.

[0108] The computing model is constructed based on the communication model, security model and cache model. The computing model will be divided into four parts: local computing, cache computing, step-by-step computing and computing resource allocation.

[0109] Local computing: When When the user The task is only executed locally, and the execution time It can be expressed as:

[0110] (4);

[0111] In the formula, Indicates user Mission Execution decision instructions, Indicates user Mission At the base station Execute on, otherwise ; For users computing power; Indicates user Calculates the CPU cycles required to perform one bit of user task.

[0112] user The energy consumption of the task is only in the local execution process for:

[0113] (5);

[0114] In the formula, is an effective capacitive switch.

[0115] Cache calculation: When and , Indicates user Mission At the base station The cache instructions on the user Mission Cache at associated base station or auxiliary base station On, among them ,user Task execution time for:

[0116] (6);

[0117] In the formula, Indicates user and base station The associated index between Indicates user With base station Associated, otherwise ; Indicates user Mission With base station The cache indication between Indicates user Mission Cache at the base station On, otherwise ; Indicates user and base station Subchannel The associated index between Indicates user Select Base Station Subchannel Associated, otherwise ; For users To base station Uplink transmission rate; is the wired backhaul rate between any two base stations; To associate a base station Assign to user Mission computing power; Auxiliary Base Station Assign to user Mission computing power; and They represent the CPU cycles required for the base station to encrypt and decrypt one-bit user tasks respectively; Indicates user Mission At the auxiliary base station implement.

[0118] When the user Mission Cache at associated base station or auxiliary base station When the user Energy consumption to perform tasks It can be expressed as:

[0119] (7);

[0120] In the formula, Indicates the energy consumption of each CPU cycle of the base station; For users The transmission power; represents the energy consumption required for encrypting or decrypting one bit of user task; Indicates the power consumption per second on the wired link.

[0121] Step-by-step calculation: or When the user No cache tasks At the corresponding associated base station and auxiliary base station In this case, in order to make full use of network computing resources, a step-by-step computing offloading scheme is considered, that is, user The task Part of the data Offload to associated base station , associated base station Only for data part of the data, and then the remaining data Offload to secondary base station Continue to execute, so the user Local execution tasks The data size is ,user Execute tasks locally Time It can be expressed as:

[0122] (8).

[0123] user Total time to execute tasks locally for:

[0124] (9).

[0125] user Mission Energy consumption of local execution It can be expressed as:

[0126] (10).

[0127] When the user With base station When associated, the user Some tasks offloaded from local Data First associate the base station Execute, in the associated base station The amount of data for the executed task is ; Then, from the associated base station Uninstall size is The data is in the auxiliary base station Execute. User In the associated base station Execute the task Time It can be expressed as:

[0128] (11);

[0129] In the formula, Indicates associated base station Assign to user Mission computing power; Indicates auxiliary base station Assign to user Mission computing power.

[0130] user Total time to perform tasks at the base station for:

[0131] (12).

[0132] user Perform tasks at the base station Energy consumption for:

[0133] (13).

[0134] In summary, when or When the user The total latency and energy consumption of performing a step-by-step calculation are:

[0135] (14);

[0136] (15);

[0137] In the formula, Indicates user Total time to perform the task; Indicates user Total energy consumption to perform the task; Indicates user Mission Energy consumption of local execution.

[0138] Assume that each user's tasks are executed sequentially, and any task can be executed and processed locally and at the edge; therefore, to complete the user The total time spent on all tasks It can be expressed as:

[0139] (16).

[0140] user The total energy consumption for completing task offloading is the sum of the energy consumption of local execution and edge execution, which can be expressed as:

[0141] (17).

[0142] Computing resource allocation: Computing resources are allocated based on the ratio of the number of CPU cycles required by the base station to process user tasks to the total number of CPU cycles of all tasks that the base station needs to process; base station Assign to user Mission Computing power It can be expressed as:

[0143] (18);

[0144] In the formula, Indicates base station Total computing power; Indicates that if there is a cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the case of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that if there is a cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the case of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data.

[0145] It is expressed as:

[0146] (19);

[0147] In the formula, Indicates user and base station The associated index between them; Indicates user Mission With base station Cache indication between; Indicates user Mission With base station execution instructions between; Indicates user Mission The input parameter size; Indicates user Mission The execution code size of Indicates user Calculate the CPU cycles required for one bit of user task; Indicates user Mission Safety decision instructions; Indicates user Mission With auxiliary base station Cache indication between; Indicates user Mission With auxiliary base station execution instructions between.

[0148] It is expressed as:

[0149] (20);

[0150] In the formula, Indicates user and auxiliary base station The associated index between .

[0151] It is expressed as:

[0152] (twenty one).

[0153] It is expressed as:

[0154] (twenty two).

[0155] Among them, in step S1, the optimization problem constructed under the constraints of cache resources, latency, and security service costs of the network system can be expressed as:

[0156] (twenty three);

[0157] In the formula, It means that the goal of this optimization problem is to minimize the total energy consumption of the whole network; Indicates user The execution time of the task; Indicates user Total security breach costs; Indicates user Mission The execution code size of represents the total energy consumption; , is the set of variables that represent the optimization problem, Represents a collection of associated indexes. Indicates user With base station The associated index between them; Represents a cache index collection, Indicates user Mission At the base station Cache instructions on ; represents the subchannel selection index set, Indicates user Mission and base station Subchannel Channel selection indication between; Represents the execution set of tasks, Indicates user Mission At the base station execution instructions on the Represents the cryptographic algorithm selection index set, Indicates user Mission Cryptographic algorithms Selection instructions; Indicates user The uplink transmit power, Indicates user The transmission power of Indicates that the user is offloading to the associated base station The collection of data volume, Indicates user Mission Offload to associated base station The amount of data; Indicates that the user task is associated with the base station Offload to secondary base station The collection of data volume, Indicates user Mission From the associated base station Offload to secondary base station The amount of data; Indicates user The execution time of the task must be less than the deadline ; Indicates user The total security breach cost cannot exceed its maximum acceptable cost ; Indicates cache to base station The amount of data must be less than , For base station Maximum cache capacity; It means that each user can only be associated with one base station; Indicates user Mission Can only be cached on one base station; Indicates user Mission Only one subchannel can be selected for association; Indicates user Mission Can only be executed on one base station; Indicates user Mission Only one cryptographic algorithm can be selected for protection; Indicates to select any base station Upload Task Users The number of should be less than the number of sub-channels; express Can only be 1 or 0. Indicates user With base station Associated, otherwise ; express Can only be 1 or 0. Indicates user Mission Cache at the base station On, otherwise ; express Can only be 1 or 0. Indicates user Select Base Station Subchannel Associated, otherwise ; express Can only be 1 or 0. Indicates user Mission At the base station Execute on, otherwise ; express Can only be 1 or 0. Indicates user Mission Selecting a cryptographic algorithm To provide security services, otherwise ; Indicates user The lower bound of the transmit power is 0 and the upper bound is ; Indicates that when the user With base station When associated, the user The task offload part of it to the associated base station , unloaded to the associated base station The amount of data is , associated base station Execute part of the received task Data, the rest is offloaded to the auxiliary base station , offloaded to the auxiliary base station The amount of data is , and Should be greater than 0 and less than the user Mission Data size ,in, To be greater than .

[0158] The specific process of step S2 is as follows:

[0159] Step S2.1: Initialize the maximum number of iterations of the Improved Harris Hawk Algorithm (IHHO) , and the current number of iterations Set to 1.

[0160] Step S2.2: Set the total number of Harris Hawk individuals in the population of the improved Harris Hawk algorithm to , a single Harris Hawk individual is , population ; Encode each Harris Hawk individual and optimize the parameters in the problem Encoded as ,in, represents the associated index encoding set, Harris Hawk individual Medium User The associated base station index; Represents the cache index encoding set, Harris Hawk individual Virtual User Cache index, because each task is independent of each other, for the convenience of representation, each task can be regarded as a virtual user. A virtual user means that each task of a user is treated as an independent user. A collection of indices representing virtual users; Indicates the number of virtual users; represents the subchannel selection index encoding set, Harris Hawk individual Medium User The associated subchannel index; represents the execution index encoding set, Harris Hawk individual Virtual User Execution index of represents the transmit power index code set, Harris Hawk individual Medium User The transmission power; Indicates the cryptographic algorithm selection index encoding set, Harris Hawk individual Virtual User The selected cryptographic algorithm index; represents the encoding set of the amount of tasks offloaded to the associated base station, Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; represents the amount of data to be offloaded to the secondary base station. Harris Hawk individual Virtual User The amount of data offloaded to the associated base station.

[0161] Step S2.3: Initialize the population and define the Harris hawk individuals in the population after initialization The fitness function of is:

[0162] (twenty four);

[0163] In the formula, Represents a set of optimization problem parameters; , Harris Hawk individual The fitness function value of represents the total energy consumption, Indicates user The penalty factor for the deadline delay of the task; Indicates user Penalty factor for total security breach cost; Indicates base station Penalty factor for cache capacity constraints; Indicates user The deadline delay of the task; Indicates user Total security breach cost; Indicates base station Cache capacity; Indicates base station The maximum cache capacity.

[0164] The fitness function is used to calculate the fitness values ​​of all Harris's hawk individuals in the population, and the Harris's hawk individual with the largest fitness value is taken as the historical optimal Harris's hawk individual.

[0165] Step S2.4: Determine the current number of iterations Is it less than or equal to the maximum number of iterations? , if the current number of iterations Less than the maximum number of iterations , according to the adaptive escape energy, the population is judged to be in the exploration or development stage, and global exploration, diversity-guided mutation, fusion hard encirclement, and fusion soft encirclement operations are performed on the population to obtain the global optimal Harris Hawk individual; if the current number of iterations is Greater than the maximum number of iterations , then output the code of the globally optimal Harris Hawk individual in the target population.

[0166] Step S2.41: Determine whether the population belongs to the global exploration stage or the local development stage according to the adaptive escape energy; in the global exploration stage, the population explores prey through exploration strategies, which include two equal probability strategies. The first equal probability strategy is to update its own position according to the position of the best Harris hawk individual in the population and the positions of other Harris hawk individuals in the population except the best Harris hawk individual; the second equal probability strategy is to randomly update the position within the distribution range of the population. The exploration strategy can be expressed as follows:

[0167] (25);

[0168] (26);

[0169] (27);

[0170] (28);

[0171] (29);

[0172] (30);

[0173] (31);

[0174] (32);

[0175] In the formula, To explore the factors, their values ​​follow a uniform distribution between 0 and 1; Indicates the number of base stations; Indicates the number of sub-channels; Indicates the number of cryptographic algorithms; Indicates user Maximum transmit power; , which is used to find virtual users The corresponding real user's index number With the task index number , Can The linear index of an array or matrix is ​​converted to the corresponding subscript; Indicates user Mission The input parameter size is ; Indicates user Mission The execution code size of Indicates Harris Hawk individual Medium User The associated base station index of Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The associated base station index of ; Indicates The best Harris Hawk individual in history at the iteration Medium User The associated base station index of ; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User Cache index of Indicates The best Harris Hawk individual in history at the iteration Virtual User Cache index of Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The selected subchannel index; Indicates The best Harris Hawk individual in history at the iteration Medium User The selected subchannel index; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The execution base station index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The execution base station index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The transmission power; Indicates The best Harris Hawk individual in history at the iteration Medium User The transmission power; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From virtual user The amount of data offloaded to the associated base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The best Harris Hawk individual in history at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The average number of Harris hawk individuals in the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The best Harris Hawk individual in history at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The average number of Harris hawk individuals in the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Both represent random numbers that are uniformly distributed from 0 to 1.

[0176] Step S2.42: Different from the traditional Harris Hawk algorithm, this algorithm introduces diversity-guided mutation to enhance the local search capability of the improved Harris Hawk algorithm, that is, diversity-guided mutation is performed on the population after the exploration strategy. Diversity-guided mutation means that a diversity measurement is performed before mutation, and mutation is guided according to the diversity measurement;

[0177] Defining diversity measures :

[0178] (33);

[0179] In the formula, Respectively The length of the diagonal of the feasible region; Harris Hawk individual Medium User The average value of the associated base station index; Harris Hawk individual Virtual User The average value of cache index; Harris Hawk individual Medium User The average value of the selected subchannel index; Harris Hawk individual Virtual User The average value of the execution base station index; Harris Hawk individual Medium User The average value of the transmission power; Harris Hawk individual Virtual User The average value of the selected cryptographic algorithm index; Harris Hawk individual From virtual user The average amount of data offloaded to the associated base stations; Harris Hawk individual From the virtual user Average value of the amount of data offloaded from the associated base station to the secondary base station.

[0180] Defining the probability of diversity-induced mutation by diversity measure It can be expressed as:

[0181] (34);

[0182] In the formula, is the first preset mutation probability; is the second preset mutation probability; is a third preset mutation probability; and , ; is the first threshold constant; is the second threshold constant, satisfying .

[0183] Perform mutation operations based on diversity-guided mutation probabilities:

[0184] (35);

[0185] (36);

[0186] (37);

[0187] (38);

[0188] (39);

[0189] (40);

[0190] (41);

[0191] (42);

[0192] In the formula, Represents a random number that obeys a uniform distribution from 0 to 1; Indicates Harris Hawk individual Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station.

[0193] Step S2.43: The population mainly relies on escape energy to switch from the global exploration stage to the local development stage. Compared with the traditional Harris Hawk algorithm, the present invention defines an adaptive weight escape energy control strategy. At the beginning of the iteration, the escape energy decreases rapidly, so that the algorithm can quickly enter the local development stage from the global exploration stage, thereby improving the convergence speed; in the later stage of the iteration, the search speed gradually slows down to ensure the optimization accuracy of the algorithm. The adaptive weight escape energy control strategy can be defined by the following formula:

[0194] (43);

[0195] (44);

[0196] In the formula, To escape energy, is the adaptive nonlinear weight value; Represents a random number that follows a uniform distribution from 0 to 1.

[0197] Step S2.44: In the local development phase, two possible strategies, fusion soft encirclement and fusion hard encirclement, are used to simulate the attack phase of the population and generate a new population. The execution of the soft encirclement strategy and the hard encirclement strategy is determined by the escape energy. When , the fusion soft encirclement strategy is implemented:

[0198] (45);

[0199] (46);

[0200] (47);

[0201] (48);

[0202] (49);

[0203] (50);

[0204] (51);

[0205] (52);

[0206] In the formula, represents the random jumping intensity of the prey during its escape, is a random number uniformly distributed from 0 to 1. Represents a random number generated by Levy flight strategy; Represents the selection factor, which is a random number uniformly distributed from 0 to 1. Indicates the selection of the scaling factor, .

[0207] when When , the fusion hard encirclement strategy is implemented:

[0208] (53);

[0209] (54);

[0210] (55);

[0211] (56);

[0212] (57);

[0213] (58);

[0214] (59);

[0215] (60);

[0216] Step S24.5: Calculate and compare the fitness of Harris's hawk individuals in the current population, and obtain the fitness value of the best Harris's hawk individual in the current population.

[0217] Step S24.6: Compare the fitness value of the best Harris Hawk individual in the current population with the fitness value of the best Harris Hawk individual in history. If the fitness value of the best Harris Hawk individual in the current population is better than the fitness value of the best Harris Hawk individual in history, then use the best Harris Hawk individual in the current population to update the best Harris Hawk individual in history. Otherwise, keep the best Harris Hawk individual in history. The current iteration number is The value of is increased by one.

[0218] The effect of the present invention is illustrated by simulation experiments;

[0219] The simulation conditions are set as follows: base stations and users are randomly distributed in a network with a radius of 500m; there are 20 small base stations, 20 users, and each user has 3 tasks; the system bandwidth is 20MHz, the maximum user transmission power is 23dBm, the maximum user computing power is 1GHz, and the maximum base station computing power is 20GHz; there are 6 cryptographic algorithms assigned to the security service, and the number of CPU cycles required to encrypt one bit of data is [100, 200, 250, 300, 350, 1050], and the number of CPU cycles required to decrypt one bit of data is [90, 280, 350, 300], respectively. 0, 400, 1700], the energy consumption of encrypting or decrypting one bit of data is [2.5296, 5.0425, 6.837, 7.8528, 8.7073, 26.3643]*1e-7 joules respectively; the base station cache capacity is 2e20KB; the task execution code data size is 200~500KB, the user input data size is 50~100KB, the deadline delay is 10~20s, and the CPU cycles required to execute one bit of data are 50~100; the task safety factor is {5, 6}, and the cost of task safety protection failure is 5000~10000$.

[0220] like Figure 2 As shown, in a network where base stations and users are randomly distributed in a radius of 500m, the small base station deployment density is 20, and the user transmission power is 23dBm. Under the condition that other conditions remain unchanged, as the number of users increases, the total energy consumption of the traditional Harris Hawk algorithm and the improved Harris Hawk algorithm increases with the increase in the number of network users. In addition, the total energy consumption of the improved Harris Hawk algorithm used in the present invention is lower than that of the traditional Harris Hawk algorithm.

[0221] like Figure 3 As shown, the traditional Harris Hawk algorithm is prone to fall into the local optimum and thus cannot converge well, while the improved Harris Hawk algorithm adopted in the present invention can obtain a better fitness function value.

[0222] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A secure collaborative caching and computation offloading method for ultra-dense networks, characterized in that: The steps include: Step S1: Obtain basic information of the ultra-dense network, construct a network system based on the basic information, and construct an optimization problem under the constraints of cache resources, latency, and security service costs of the network system; the network system includes a communication model, a security model, a cache model, and a computing model; Step S2: Obtain an initial solution according to the optimization problem, define the initial solution as an initial population, use the improved Harris Hawk algorithm to search the initial population, and finally output the position of the global optimal Harris Hawk individual; The process of searching the initial population using the improved Harris Hawk algorithm is: Initialize the initial population of the Harris Hawk algorithm and determine the best Harris Hawk individual in history; The adaptive escape energy determines whether the Harris Hawk individuals belong to the global exploration stage or the local development stage. In the global exploration stage, the exploration factor is first used to update the position of the Harris Hawk individuals, and then the diversity mutation is performed to generate a new population. In the local development stage, the adaptive escape energy determines whether the Harris Hawk individuals are subjected to a fusion hard encirclement operation or a fusion soft encirclement operation to generate a new population. Calculate and compare the fitness of Harris hawk individuals in the generated new population, obtain the fitness value of the best Harris hawk individual in the generated new population, compare the fitness value of the best Harris hawk individual with the fitness value of the best Harris hawk individual in history, and retain the better Harris hawk individual as the global best Harris hawk individual; Step S3: restore the position of the global optimal Harris hawk individual to the form of the original optimization parameter solution; perform calculation offloading, task caching and resource allocation operations according to the original optimization parameter solution; In step S1, an optimization problem is constructed under the constraints of the network system's cache resources, latency, and security service costs, which can be expressed as: ; In the formula, The goal of the optimization problem is to minimize the total energy consumption of the entire network; Indicates user The total energy consumption used to complete the task offloading; express The index collection of users, ; Indicates that each user has The index collection of tasks, ; express The index set of base stations, ; express A set of subchannels, ; express A set of cryptographic algorithms, ; Indicates user The execution time of the task; Indicates user Total security breach cost; Indicates user Mission The execution code size of , A set of variables representing the optimization problem; represents the total energy consumption; Represents a collection of associated indexes. Indicates user With base station The associated index between them; Represents a cache index collection, Indicates user Mission At the base station Cache instructions on ; represents the subchannel selection index set, Indicates user Mission and base station Subchannel Channel selection indication between; Represents the execution set of tasks, Indicates user Mission At the base station execution instructions on the Represents the cryptographic algorithm selection index set, Indicates user Mission Cryptographic algorithms Selection instructions; Indicates user The uplink transmit power, Indicates user The transmission power of Indicates that the user is offloading to the associated base station The data volume is a collection of the associated base stations, which are the associations between users and base stations. Indicates user Mission Offload to associated base station The amount of data; Indicates that the user task is associated with the base station Offload to secondary base station The collection of data volume, Indicates user Mission From the associated base station Offload to secondary base station The amount of data; Indicates user The execution time of the task must be less than the deadline ; Indicates user The total security breach cost does not exceed its maximum acceptable cost ; Indicates cache to base station The amount of data is less than , For base station Maximum cache capacity; It means that each user is associated with only one base station; Indicates user Mission Cache only on one base station; Indicates user Mission Only one subchannel is selected for association; Indicates user Mission Executed on only one base station; Indicates user Mission Choose only one cryptographic algorithm for protection; Indicates to select any base station Upload Task Users The number of is less than the number of subchannels; express Only 1 or 0, Indicates user With base station Associated, otherwise ; express Only 1 or 0, Indicates user Mission Cache at the base station On, otherwise ; express Only 1 or 0, Indicates user Select Base Station Subchannel Associated, otherwise ; express Only 1 or 0, Indicates user Mission At the base station Execute on, otherwise ; express Only 1 or 0, Indicates user Mission Selecting a cryptographic algorithm To provide security services, otherwise ; Indicates user The lower bound of the transmit power is 0 and the upper bound is ; Indicates that when the user With base station When associated, the user The task offload part of it to the associated base station , unloaded to the associated base station The amount of data is , associated base station Execute part of the received task Data, the rest is offloaded to the auxiliary base station , offloaded to the auxiliary base station The amount of data is , and Greater than 0 and less than the user Mission Data size ,in, Greater than ; Define an adaptive weight escape energy control strategy to control iterations. The adaptive weight escape energy control strategy is defined as: ; ; In the formula, To escape energy, is the adaptive nonlinear weight value; Represents a random number that obeys a uniform distribution from 0 to 1; Indicates the current iteration number; Indicates the maximum number of iterations; when When , the fusion soft encirclement strategy is executed; when When , the fusion hard encirclement strategy is implemented; In the global exploration phase, the population explores prey through exploration strategies. After the exploration strategy, the population is subjected to diversity-guided mutation. Diversity-guided mutation refers to performing a diversity measurement before mutation and guiding mutation based on the diversity measurement. Defining diversity measures : ; In the formula, Respectively The length of the diagonal of the feasible region; Harris Hawk individual Medium User The average value of the associated base station index; Harris Hawk individual Virtual User The average value of cache index; Harris Hawk individual Medium User The average value of the selected subchannel index; Harris Hawk individual Virtual User The average value of the execution base station index; Harris Hawk individual Medium User The average value of the transmission power; Harris Hawk individual Virtual User The average value of the selected cryptographic algorithm index; Harris Hawk individual From virtual user The average amount of data offloaded to the associated base stations; Harris Hawk individual From the virtual user The average amount of data offloaded from the associated base station to the secondary base station; represents the associated index encoding set, Harris Hawk individual Medium User The associated base station index; Represents the cache index encoding set, Harris Hawk individual Virtual User The cache index is treated as a virtual user. A virtual user means that each task of a user is treated as an independent user. Represents the index collection of virtual users, Indicates the number of virtual users; represents the subchannel selection index encoding set, Harris Hawk individual Medium User The associated subchannel index; represents the execution index encoding set, Harris Hawk individual Virtual User Execution index of represents the transmit power index code set, Harris Hawk individual Medium User The transmission power; Indicates the cryptographic algorithm selection index encoding set, Harris Hawk individual Virtual User The selected cryptographic algorithm index; represents the encoding set of the amount of tasks offloaded to the associated base station, Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; represents the amount of data to be offloaded to the secondary base station. Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; Represents the population of the improved Harris Hawk algorithm Total number of Harris's Hawk individuals; Defining the probability of diversity-induced mutation by diversity measure It is expressed as: ; In the formula, is the first preset mutation probability; is the second preset mutation probability; is the third preset mutation probability, and , ; is the first threshold constant; is the second threshold constant, satisfying .

2. The method for secure collaborative caching and computation offloading for ultra-dense networks according to claim 1, characterized in that: In step S1, the specific process of obtaining the basic information of the ultra-dense network is as follows: First get The index set of a user is , The index set of base stations is , the base station associated with the user is taken as the associated base station, each associated base station selects an auxiliary base station to help with computing offloading, and each user has The index set of tasks is , The set of cryptographic algorithms is , the security service set corresponding to the cryptographic algorithm set is , Indicates the cryptographic algorithm security service level; Indicates the cryptographic algorithm security service level; assume that each user has an independent task to complete, each task consists of execution code and user input parameters, obtain user Computational tasks The five-tuple of ,in, Indicates user Calculate the CPU cycles required for one bit of user task, Indicates user Mission The input parameter size, Indicates user Mission The execution code size of Indicates user Complete the task The cut-off delay, Indicates user The expected security service level.

3. The method for secure collaborative caching and computation offloading for ultra-dense networks according to claim 2, characterized in that: Build a communication model; The time taken to download data from the base station is not considered; different base stations are connected to each other through wired links, and base stations and users are connected to each other through wireless links. Each base station serves at most one user; each base station has a total of Sub-channels are used for transmission between the base station and the user, and each user selects only one sub-channel of the base station for transmission. , represents the subchannel set, Indicates the number of sub-channels. Select Base Station Subchannel When transmitting, the uplink transmission rate It is expressed as: ; In the formula, Indicates that except user Sharing the base station with other users Subchannel the interference caused; is the total bandwidth of the communication network included in the communication model; and For users and users The transmission power; and For users and users With base station The channel gain between is the noise power.

4. The method for secure collaborative caching and computation offloading for ultra-dense networks according to claim 3, characterized in that: Build a security model; Set the cryptographic algorithm The corresponding energy consumption during the encryption and decryption of one bit of user task Same, cryptographic algorithm The CPU cycles required to encrypt and decrypt one bit of user data are , , when the user Mission Using cryptographic algorithms When safely offloading some of its own tasks, the cryptographic algorithm Protection failure probability It is expressed as: ; In the formula, Indicates user Mission The risk factor of Indicates the cryptographic algorithm The security level; Is a user Mission the expected level of security; user Total security breach cost It is expressed as: ; In the formula, Indicates the task Losses incurred when protection by cryptographic algorithms fails; Indicates user and base station The associated index between them; Indicates user With base station Associated, otherwise ; Indicates user Mission The cryptographic algorithm selection indication, Indicates user Mission Selecting a cryptographic algorithm To provide security services, otherwise .

5. The method for secure collaborative caching and computation offloading for ultra-dense networks according to claim 4, characterized in that: Build a cache model; When the user executes a task, the base station first checks whether the available executable code has been cached. When the available executable code is confirmed in the cache server, the user uploads the available executable code to the base station, and there is no need to upload this part of the available executable code later; A computing model is built on the basis of the communication model, security model and cache model. The computing model includes four parts: local computing, cache computing, step-by-step computing and computing resource allocation. Local computing: When When the user The task is only executed locally, and the execution time It is expressed as: ; In the formula, Indicates user Mission Execution decision instructions, Indicates user Mission At the base station Execute on, otherwise ; For users computing power; Indicates user Calculate the CPU cycles required for one bit of user task; user The energy consumption of the task is only in the local execution process for: ; In the formula, is an effective capacitive switch; Cache calculation: When and , Indicates user Mission At the base station The cache instructions on the user Mission Cache at associated base station or auxiliary base station On time, among them, ,user Task execution time for: ; In the formula, Indicates user and base station The associated index between Indicates user With base station Associated, otherwise ; Indicates user Mission With base station The cache indication between Indicates user Mission Cache at the base station On, otherwise ; Indicates user and base station Subchannel The associated index between Indicates user Select Base Station Subchannel Associated, otherwise ; For users To base station Uplink transmission rate; is the wired backhaul rate between any two base stations; To associate a base station Assign to user Mission computing power; Auxiliary Base Station Assign to user Mission computing power; and They represent the CPU cycles required for the base station to encrypt and decrypt one-bit user tasks respectively; Indicates user Mission On auxiliary base station implement; When the user Mission Cache at associated base station or auxiliary base station When the user Energy consumption to perform tasks It is expressed as: ; In the formula, Indicates the energy consumption of each CPU cycle of the base station; For users The transmission power; represents the energy consumption required for encrypting or decrypting one bit of user task; Indicates the power consumption per second on the wired link; Step-by-step calculation: or When the user No cache tasks At the corresponding associated base station and auxiliary base station ,user The task Part of the data Offload to associated base station , associated base station Only a portion of the data Process it, and then transfer the remaining data Offload to secondary base station Continue to execute, so the user Local execution tasks The data size is ,user Execute tasks locally Time It is expressed as: ; user Total time to execute tasks locally for: ; user Mission Energy consumption of local execution It is expressed as: ; When the user With base station When associated, the user Some tasks offloaded from local Data First associate the base station Execute, in the associated base station The amount of data for the executed task is ; Then, from the associated base station Uninstall size is The data is in the auxiliary base station Execution; User In the associated base station Execute the task Time It is expressed as: ; In the formula, Indicates associated base station Assign to user Mission computing power; Indicates auxiliary base station Assign to user Mission computing power; user Total time to perform tasks at the base station for: ; user Performing tasks at the base station Energy consumption for: ; when or When the user The total latency and energy consumption of performing a step-by-step calculation are: ; ; In the formula, Indicates user Total time to perform the task; Indicates user Total energy consumption to perform the task; Indicates user Mission Energy consumption for local execution; Assume that each user's tasks are executed sequentially, and any task is executed and processed locally and at the edge; therefore, to complete the user The total time spent on all tasks It is expressed as: ; user The total energy consumption to complete task offloading is the sum of the energy consumption of local execution and edge execution, expressed as: ; Computing resource allocation: Computing resources are allocated based on the ratio of the number of CPU cycles required by the base station to process user tasks to the total number of CPU cycles of all tasks to be processed by the base station; base station Assign to user Mission Computing power It is expressed as: ; In the formula, Indicates base station Total computing power; Indicates that if there is a cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the case of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that if there is a cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the case of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the associated base station Handling Users Mission The CPU cycles required for the relevant data; Indicates that in the absence of cache, the auxiliary base station Handling Users Mission The CPU cycles required for the relevant data.

6. The method of secure collaborative caching and computation offloading for ultra-dense networks according to claim 5, characterized in that: It is expressed as: ; In the formula, Indicates user and base station The associated index between them; Indicates user Mission With base station Cache indication between; Indicates user Mission With base station execution instructions between; Indicates user Mission The input parameter size; Indicates user Mission The execution code size of Indicates user Calculate the CPU cycles required for one bit of user task; Indicates user Mission Safety decision instructions; Indicates user Mission With auxiliary base station Cache indication between; Indicates user Mission With auxiliary base station execution instructions between; It is expressed as: ; In the formula, Indicates user and auxiliary base station The associated index between them; It is expressed as: ; It is expressed as: 。 7. The method of secure collaborative caching and computation offloading for ultra-dense networks according to claim 6, characterized in that: The specific process of step S2 is: Step S2.1: Initialize the maximum number of iterations of the improved Harris Hawk algorithm , and the current number of iterations Set to 1; Step S2.2: Set the total number of Harris Hawk individuals in the population of the improved Harris Hawk algorithm to , a single Harris Hawk individual is , population ; Encode each Harris Hawk individual and optimize the parameters in the problem Encoded as ,in, represents the associated index encoding set, Harris Hawk individual Medium User The associated base station index; Represents the cache index encoding set, Harris Hawk individual Virtual User The cache index is treated as a virtual user. A virtual user means that each task of a user is treated as an independent user. Represents the index collection of virtual users, Indicates the number of virtual users; represents the subchannel selection index encoding set, Harris Hawk individual Medium User The associated subchannel index; represents the execution index encoding set, Harris Hawk individual Virtual User Execution index of represents the transmit power index code set, Harris Hawk individual Medium User The transmission power; Indicates the cryptographic algorithm selection index encoding set, Harris Hawk individual Virtual User The selected cryptographic algorithm index; represents the encoding set of the amount of tasks offloaded to the associated base station, Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; represents the amount of data to be offloaded to the secondary base station. Harris Hawk individual Virtual User The amount of data offloaded to the associated base station; Step S2.3: Initialize the population and define the Harris hawk individuals in the population after initialization The fitness function of Step S2.4: Determine the current number of iterations Is it less than or equal to the maximum number of iterations? , when the current iteration number Less than the maximum number of iterations , according to the adaptive escape energy, the population is judged to be in the exploration or development stage, and the population is globally explored, diversity-guided variation, fusion hard encirclement, and fusion soft encirclement operations are performed to obtain the global optimal Harris Hawk individual; when the current number of iterations Greater than the maximum number of iterations , then output the code of the globally optimal Harris Hawk individual in the target population.

8. The method of secure collaborative caching and computation offloading for ultra-dense networks according to claim 7, characterized in that: In step S2.3, the Harris hawk individuals in the population are initialized. The fitness function is expressed as: ; In the formula, Represents a set of optimization problem parameters; ; Harris Hawk individual The fitness function value of represents the total energy consumption, Indicates user The penalty factor for the deadline delay of the task; Indicates user Penalty factor for total security breach cost; Indicates base station Penalty factor for cache capacity constraints; Indicates user The deadline delay of the task; Indicates user Total security breach cost; Indicates base station Cache capacity; Indicates base station Maximum cache capacity; The fitness function is used to calculate the fitness values ​​of all Harris's hawk individuals in the population, and the Harris's hawk individual with the largest fitness value is taken as the historical optimal Harris's hawk individual.

9. The method for secure collaborative caching and computation offloading for ultra-dense networks according to claim 8, characterized in that: The specific process of step S2.4 is: Step S2.41: Determine whether the population belongs to the global exploration stage or the local development stage according to the adaptive escape energy; in the global exploration stage, the population explores prey through exploration strategies, which include two equal probability strategies. The first equal probability strategy is to update its own position according to the position of the best Harris's hawk individual in the population and the positions of other Harris's hawk individuals in the population except the best Harris's hawk individual; the second equal probability strategy is to randomly update the position within the distribution range of the population. The exploration strategy is expressed as: ; ; ; ; ; ; ; ; In the formula, To explore the factors, the values ​​follow a uniform distribution between 0 and 1; Indicates the number of base stations; Indicates the number of sub-channels; Indicates the number of cryptographic algorithms; Indicates user Maximum transmit power; Indicates user Mission The input parameter size is ; Indicates user Mission The execution code size of Indicates Harris Hawk individual Medium User The associated base station index of Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The associated base station index of ; Indicates The best Harris Hawk individual in history at the iteration Medium User The associated base station index of ; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User Cache index of Indicates The best Harris Hawk individual in history at the iteration Virtual User Cache index of Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The selected subchannel index; Indicates The best Harris Hawk individual in history at the iteration Medium User The selected subchannel index; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The execution base station index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The execution base station index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates A Harris hawk individual randomly selected from the population at the iteration Medium User The transmission power; Indicates The best Harris Hawk individual in history at the iteration Medium User The transmission power; Indicates The average number of Harris hawk individuals in the population at the iteration Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From virtual user The amount of data offloaded to the associated base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The best Harris Hawk individual in history at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates The average number of Harris hawk individuals in the population at the iteration From virtual user The amount of data offloaded to the associated base station; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates A Harris hawk individual randomly selected from the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates The best Harris Hawk individual in history at the iteration Virtual User The selected cryptographic algorithm index; Indicates The average number of Harris hawk individuals in the population at the iteration Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates A Harris hawk individual randomly selected from the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The best Harris Hawk individual in history at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Indicates The average number of Harris hawk individuals in the population at the iteration From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Both represent random numbers that are uniformly distributed from 0 to 1; Step S2.42: Performing diversity-guided mutation on the population after the exploration strategy. Diversity-guided mutation means performing a diversity measurement before mutation and guiding mutation according to the diversity measurement. Defining diversity measures : ; In the formula, Respectively The length of the diagonal of the feasible region; Harris Hawk individual Medium User The average value of the associated base station index; Harris Hawk individual Virtual User The average value of cache index; Harris Hawk individual Medium User The average value of the selected subchannel index; Harris Hawk individual Virtual User The average value of the execution base station index; Harris Hawk individual Medium User The average value of the transmission power; Harris Hawk individual Virtual User The average value of the selected cryptographic algorithm index; Harris Hawk individual From virtual user The average amount of data offloaded to the associated base stations; Harris Hawk individual From the virtual user The average amount of data offloaded from the associated base station to the secondary base station; Defining the probability of diversity-induced mutation by diversity measure It is expressed as: ; In the formula, is the first preset mutation probability; is the second preset mutation probability; is the third preset mutation probability, and , ; is the first threshold constant; is the second threshold constant, satisfying ; Perform mutation operations based on diversity-guided mutation probabilities: ; ; ; ; ; ; ; ; In the formula, Represents a random number that obeys a uniform distribution from 0 to 1; Indicates Harris Hawk individual Medium User The associated base station index of Indicates Harris Hawk individual Virtual User Cache index of Indicates Harris Hawk individual Medium User The selected subchannel index; Indicates Harris Hawk individual Virtual User The execution base station index; Indicates Harris Hawk individual Medium User The transmission power; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual Virtual User The selected cryptographic algorithm index; Indicates Harris Hawk individual From the virtual user The amount of data offloaded by the associated base station to the secondary base station; Step S2.43: Define an adaptive weight escape energy control strategy to control iterations. The adaptive weight escape energy control strategy is defined as: ; ; In the formula, To escape energy, is the adaptive nonlinear weight value; Represents a random number that obeys a uniform distribution from 0 to 1; Step S2.44: The attack phase of the population during the local development phase is simulated by using the two strategies of fused soft encirclement and fused hard encirclement, and a new population is generated, wherein the execution of the soft encirclement strategy and the hard encirclement strategy is determined by the escape energy; when When , the fusion soft encirclement strategy is implemented: ; ; ; ; ; ; ; ; In the formula, represents the random jumping intensity of the prey during its escape, is a random number uniformly distributed from 0 to 1. Represents a random number generated by Levy flight strategy; Represents the selection factor, which is a random number uniformly distributed from 0 to 1. Indicates the selection scale factor; when When , the fusion hard encirclement strategy is implemented: ; ; ; ; ; ; ; ; Step S24.5: Calculate and compare the fitness of Harris hawk individuals in the current population to obtain the fitness value of the best Harris hawk individual in the current population; Step S24.6: Compare the fitness value of the best Harris Hawk individual in the current population with the fitness value of the best Harris Hawk individual in history. When the fitness value of the best Harris Hawk individual in the current population is better than the fitness value of the best Harris Hawk individual in history, the best Harris Hawk individual in history is updated with the best Harris Hawk individual in the current population. Otherwise, the best Harris Hawk individual in history is retained. The current iteration number is The value of is increased by one.

Citation Information

Patent Citations

  • Privacy perception computing unloading method based on privacy entropy for application environment of Internet of Things

    CN116405975A

  • Improved Harris eagle algorithm for cloud computing task scheduling

    CN116579370A