Task scheduling method based on improved bat algorithm in mobile edge computing environment
Through the improved bat algorithm and MinHash minimum hash algorithm, task scheduling in the mobile edge computing environment is optimized, and the problems of total energy consumption and delay control of equipment are solved, and an efficient and accurate task offloading strategy is achieved.
Patent Information
- Application Number
- CN202411502699.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In a mobile edge computing environment, how to effectively optimize task scheduling to minimize device total energy consumption and control latency, especially when there is complexity in user mobility and task offload decisions.
The improved bat algorithm is used to obtain user task information, edge server information and user trajectory, map individuals of bat population to task sequences, and use bat search algorithm to solve the optimal unloading scheme and optimal total energy consumption. Local search is performed in combination with MinHash minimum hash algorithm to avoid local optimal solutions and improve algorithm efficiency.
It has achieved scientific solution to task offloading and scheduling problems in a mobile edge computing environment, which is highly practical and accurate, significantly improving the rationality and efficiency of the task offloading strategy, reducing energy consumption and improving the timeliness of the system.
Smart Images

Figure CN119521309A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobility-aware edge computing technology, and more specifically, to a task scheduling method based on an improved bat algorithm in a mobile edge computing environment. Background Art
[0002] As the global digitalization process accelerates, mobile users' demands for data transmission speed and service quality have increased dramatically. However, due to limited resources, mobile devices are difficult to handle complex application tasks independently, which has prompted the collaboration between cloud computing and terminal devices. However, long-distance data transmission in the cloud computing model leads to high latency and bandwidth pressure, especially for application scenarios with extremely high real-time requirements (such as precision industry, medical equipment, etc.). In order to cope with these situations, mobile edge computing (MEC) technology came into being. MEC reduces data transmission latency and improves computing efficiency and service quality by deploying computing resources at the edge of the network.
[0003] As a computing paradigm, edge computing is about removing data processing and storage capabilities from traditional centralized or cloud computing architectures and redeploying them to edge devices that are physically closer to the source of data generation. By shortening the data processing path, the latency of data transmission is significantly reduced, and network bandwidth pressure and potential congestion issues are effectively alleviated, thereby significantly improving the real-time and efficiency of data processing. The implementation of edge computing usually relies on Internet of Things (IoT) devices, various sensor networks, and smart terminals (such as smartphones) as edge nodes. These nodes can directly or instantly perform preliminary processing and analysis on locally generated data, reducing dependence on remote cloud data centers.
[0004] In the MEC environment, the task scheduling strategy aims to optimize the offloading decision of computing tasks to achieve the goals of minimizing energy consumption and reducing latency. However, with the popularity of portable devices, user mobility has become an important factor in MEC task scheduling, which not only affects the distribution of workloads, but also increases the complexity of communication between edge network devices, becoming a challenging research task.
[0005] Mobility perception technology combines the advantages of edge computing to achieve real-time capture and analysis of dynamic entity location information. This technology deploys data processing capabilities to the edge of the network, shortens the data transmission path, significantly reduces latency, and improves system response speed. Through high-precision positioning, sensor data, and machine learning algorithms, edge nodes can analyze mobile trajectories in real time, predict future locations, and optimize resource allocation. In the fields of smart transportation, smart logistics, etc., mobility perception helps achieve more efficient resource scheduling and decision support, reduce congestion, and improve user experience. This technological integration not only enhances the real-time and intelligence of the system, but also promotes the intelligent transformation in the digital age.
[0006] In the above context, swarm intelligence algorithms, as a distributed problem-solving paradigm, have shown great potential for optimizing task scheduling strategies in mobile edge computing (MEC) environments. Swarm intelligence algorithms simulate the collaborative behavior of biological groups in nature (such as ant colonies, bird flocks, fish schools, etc.), and solve complex problems through simple interactions and rules between individuals. They have the characteristics of self-organization, strong robustness, and easy distributed implementation. In the field of MEC task scheduling, swarm intelligence algorithms can effectively deal with the uncertainty brought by user mobility, dynamically adjust the allocation of computing resources and task offloading strategies, so as to achieve overall optimization of system performance.
[0007] After analysis, it is found that the existing solutions for the local optimization problem of large-scale task scheduling affect the efficiency of task scheduling in the mobile edge computing environment. Although some studies have incorporated user mobility into task scheduling, how to determine the optimal task execution sequence to minimize the total energy consumption of the device and control the latency is still a problem worthy of further exploration. Summary of the invention
[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a task scheduling method based on an improved bat algorithm in a mobile edge computing environment. The method comprises the following steps:
[0009] For edge computing systems, obtain user task information, edge server information, and obtain the task sequence to be offloaded based on the user trajectory;
[0010] Taking the user trajectory, the user task information and the edge server information as input, a bat search algorithm is used to solve the optimal solution of the current population, wherein each individual in the bat population is mapped to a corresponding task sequence, and the optimal solution represents an optimal unloading scheme and an optimal total energy consumption;
[0011] Determine whether a local search is required for the task sequence. If so, use local sensitive hashing to perform a local search to obtain the global optimal solution after the local search.
[0012] According to the searched global optimal solution, the individual positions of the bat population are dynamically updated until the set stopping criteria are met, and the final task scheduling decision is output.
[0013] Compared with the prior art, the advantage of the present invention is that, by constructing an optimization model with minimizing device energy consumption as the core and taking into account task deadline constraints, the problem of task offloading scheduling in the mobile edge computing environment is scientifically solved, and it has high practicality and accuracy. For example, on the basis of the bat search algorithm, the characteristics of MinHash minimum hash are fully utilized for optimization to minimize the energy consumption of the MEC server and improve the efficiency of the algorithm. By adopting the bat search algorithm, the rationality and efficiency of the task offloading strategy are significantly improved for NP-hard optimization problems; combined with the MinHash linear hash algorithm and the three neighborhood structure methods of task swapping, inserting, and sequence reversing, the original bat algorithm is effectively improved. The disadvantage of being prone to local optimal solutions, and the unnecessary computational burden in the local search process is reduced, and the overall algorithm efficiency is improved. In short, in the process of task scheduling optimization, the present invention realizes efficient exploration of the solution space, improves the global optimization capability, and maintains the diversity and flexibility of the search process. While ensuring computational efficiency, it further improves the quality of the solution, and has strong versatility and scalability.
[0014] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0016] Figure 1 is a flowchart of a task scheduling method based on an improved bat algorithm in a mobile edge computing environment according to an embodiment of the present invention;
[0017] Figure 2 is a process diagram of a task scheduling method based on an improved bat algorithm in a mobile edge computing environment according to an embodiment of the present invention;
[0018] Figure 3 is a schematic diagram of a mobility-aware edge computing model according to an embodiment of the present invention;
[0019] Figure 4 is a schematic diagram of two search spaces according to an embodiment of the present invention;
[0020] Figure 5 is a flowchart of energy consumption calculation task of bat search algorithm according to one embodiment of the present invention;
[0021] Figure 6 The figure is a flow chart of minimum hash MinHash calculation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0023] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0024] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0025] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0026] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0027] The present invention provides a task scheduling method based on an improved bat algorithm in a mobile edge computing environment. The method schedules tasks uploaded by mobile users among multiple MEC servers, and obtains a task scheduling solution that can minimize the total energy consumption of the system under the conditions of satisfying the delay constraint, prohibiting parallel processing constraints, and transmission interruption constraints, thereby minimizing the total energy consumption of the device within an acceptable delay range.
[0028] Specifically, combined Figure 1 and Figure 2 As shown, the task scheduling method based on the improved bat algorithm in the mobile edge computing environment provided includes the following steps:
[0029] Step S1, for the edge computing system, read the user task information and edge computing server information, and obtain the dynamic task offloading sequence according to the user movement trajectory.
[0030] In step S1, an edge computing model is constructed, and multiple edge servers are deployed in the MEC system. Each edge server is connected to a base station. Figure 3As shown. The device information read includes but is not limited to the number of tasks of the terminal device, the device transmission power, etc. The task information includes but is not limited to the task data size and the number of CPU cycles required to process each bit of task data. MEC server information includes but is not limited to server computing power, server location information, etc. Assume that the number of tasks to be processed by the mobile terminal is k, each of which is atomic and indivisible, and task processing must meet the first-come-first-served principle, that is, parallel data processing is not allowed.
[0031] Each functional model of the edge system model is described in detail as follows.
[0032] (1) MEC system model
[0033] The MEC system deploys multiple edge servers, each of which is connected to a base station. The set of deployed MEC servers is represented by S = {s1, s2, …, s M}, where M is the number of servers in the MEC system. For a specific server s k (j∈{1,2,…,M}), whose CPU runs at a frequency of f k Represents (unit: Hz). In the MEC system, information data is efficiently transmitted via high-speed links, and edge servers can communicate with each other through wireless channels. All edge nodes in the system together constitute a computing resource library. When necessary, computing tasks originally offloaded to a certain edge server can be transferred to another edge server for execution, thereby reducing processing latency and achieving balanced load distribution. Mobile devices access the system resource library formed by edge nodes through their reachable base stations as access points.
[0034] (2) Task transfer model
[0035] The user trajectory is represented by a series of two-dimensional coordinates, that is, Path = {<x1,y1> ,<x2,y2> ,…, <x T ,y T >}, where the subscript represents the time slot index (unit: s). In any time slot t∈{1,2,…,T}, in order to minimize the energy consumption of the overall MEC server of the system when executing the task sequence and shorten the completion time of the task subsequence, a closer server should be selected for offloading to reduce the energy consumption and delay caused by the transmission process.
[0036] For example, at time slot t, the distance between the mobile user and each edge server is calculated according to the distance between the mobile device and the base station: The calculation is done and the nearest edge server is selected as the access point to access the edge network. The calculation formula for the distance between the mobile user and the nearest edge server is: Among them, (x t ,yt ) represents the two-dimensional coordinates of the mobile user at time slot t, Represents edge servers j The two-dimensional coordinates of , M is the total number of edge servers. Then at time slot t, the current network transmission information can be obtained according to the calculation formula of the average transmission rate between the mobile device and the edge server base station. The average transmission rate between the mobile device and the edge server base station is expressed as:
[0037]
[0038] Among them, ω is the channel bandwidth, g0 is the path loss constant, θ is the path loss index, dis0 is the reference distance, N0 is the noise power spectrum density between the terminal device and the edge server, and P represents the transmission power between the local mobile device and the edge device. The detailed parameter settings related to task transmission are shown in Table 1 below.
[0039] Table 1: Task transfer related parameters
[0040]
[0041] (3) Task Model
[0042] In actual situations, a mobile terminal device often has multiple independent tasks to be processed. Each task cannot be further divided due to its atomicity. N} represents a set of tasks, where N is the total number of tasks. i ∈(i=1,2,…,N) all use tuples To represent, where DS i Representation Task Unload data size, CL i express The computing intensity (unit: CPU cycles / bit), DL i Representation Task Since data-intensive tasks consume a lot of time and energy when executed on terminal devices, the tasks will be offloaded to the corresponding edge servers for execution, thereby reducing task latency and energy consumption.
[0043] In step S2, the mobile user trajectory, task information and edge computing server information are used as input data, and the bat search algorithm is used to solve the optimal unloading solution and the optimal total energy consumption of the current population.
[0044] Swarm intelligence (SI) algorithms originate from the study of the behavior of "social" biological groups. In nature, many biological groups use the mechanism of interaction to exert powerful group intelligence to solve complex problems. The SI algorithm draws on the behavioral patterns of such biological groups and simulates the optimization process into various behavioral activities of biological individuals. Therefore, it has strong self-learning and self-adaptive characteristics. In the algorithm's search space, each point represents a possible solution. The objective function essentially represents the adaptability of biological individuals to the environment. The higher the value of the objective function, the stronger the adaptability of the individual in the environment, and the closer the solution it represents is to the optimal solution.
[0045] For example, the bat search algorithm is selected and improved. The acquired mobile user trajectory, task information, and MEC (mobile edge computing) server information are used as input data and applied to the improved bat search algorithm. Through the sigmoid mapping method, each individual in the bat population is mapped to the corresponding task sequence, and then the optimal unloading scheme and optimal total energy consumption of the current population are solved through the bat search algorithm.
[0046] In one embodiment, in combination Figure 4 and Figure 5 As shown, step S2 mainly includes the following sub-steps:
[0047] Step 2.1, initialize the bat search algorithm parameters, set the initial population and calculate the corresponding task list.
[0048] For example, initializing the bat search algorithm includes but is not limited to setting the bat population size, individual bat positions, maximum number of iterations, and other related parameters. After initialization, the sigmoid mapping method is used to map each bat individual Φ i ={φ1,φ2,…,φ i ,…,φ N} is mapped to the corresponding task sequence for subsequent optimal energy consumption calculation. The relevant parameter settings of the bat algorithm are shown in Table 2 below.
[0049] Table 2: Bat algorithm related parameters
[0050]
[0051] In Table 2, P min and P max represents the minimum and maximum values of the solution in the bat optimization algorithm. This range determines the value interval of the solution in each iteration. min Indicates the minimum frequency of the individual bat sound wave, f max represents the maximum frequency of the individual bat sound wave, v min represents the minimum speed of individual bats, v maxThe maximum speed of the individual bat, A0 represents the initial sound wave loudness of the individual bat, r0 represents the initial sound wave frequency of the individual bat, v0 represents the initial speed of the individual bat, α and γ are both constants, and α∈[0,1], γ>0.
[0052] Step S2.2, initialize an empty hash set HashSet.
[0053] Initialize and create an empty hash set HashSet to store the task sequence signatures corresponding to the local optimal solution searched by the bat algorithm in each iteration, so as to facilitate comparison and update of subsequent optimization steps.
[0054] Step S2.3, calculate the overall system energy consumption value corresponding to each task sequence according to the energy consumption calculation formula as the fitness value of the individual bat.
[0055] In one embodiment, according to the energy consumption calculation formula Calculate the overall system energy consumption value E corresponding to each task sequence, that is, the fitness value of the individual bat, where FT i Representation task i Completion time, ST i Representation task i The starting time of the task sequence is , N is the total number of tasks in the task sequence, and p is the data transmission power when the mobile terminal device unloads data. It mainly includes the following steps:
[0056] Step S2.3.1: Determine a specific set of execution time slots and corresponding edge servers for each task in the task sequence.
[0057] Specifically, the task sequence mapped by the bat algorithm is used as input, all time slots are traversed, and the task that causes the mobile device to offload is identified. Then, select the task The target server s is used to determine the time slot group where the task will eventually be executed, and all time slots within this time window are marked as unavailable.
[0058] Step S2.3.2: Calculate the total energy consumption based on the energy consumption calculation formula.
[0059] Traverse the task sequence mapped by the bat algorithm. When the traversal is completed, it means that the unloading of all terminal tasks has been completed. Based on the energy consumption calculation formula Get the fitness value of the bat individual.
[0060] Step S2.3.3: Evaluate task feasibility and total energy consumption based on energy consumption.
[0061] According to the remaining resources of the current edge server, it is determined whether the current task can be completed in the idle time slot. If it cannot be completed, there is no feasible solution for this task sequence; if it can be completed, the current total energy consumption is calculated and the termination condition is determined.
[0062] In step S2.3, in order to minimize the energy consumption of the overall MEC server of the system and shorten the completion time of the task subsequence when executing the task sequence, a closer server should be selected for offloading to reduce the energy consumption and delay caused by the transmission process.
[0063] Step S2.4, the bat population is adjusted according to the optimal bat individual, and the global optimal solution is added to the HashSet set.
[0064] For example, a bat individual at position x i At speed v i Random movement, using a fixed sound wave frequency f i , variable sound wave loudness A i Sum frequency r i The bats search for prey and automatically adjust the sound wave loudness and frequency according to the distance between the individual and the prey. The bat population is iteratively adjusted according to the optimal individual bat position. Each bat in each generation of the population updates its position according to the formula And the formula for update speed Update the individual position and velocity respectively, where ε∈[-1,1] is a random number, x best represents the position of the best individual bat in the bat population, and the loudness of the sound wave of bat i at time t The calculation formula is Finally, the fitness values of the individual bats calculated in step S2.3 are sorted, and the optimal individual bat is set according to the sorting result. After the global optimal solution is determined, it is added to the HashSet set, and each individual bat in the bat population updates its position and speed again according to the position update formula and speed update formula.
[0065] Step S3, determining whether the task sequence needs to be searched locally, and further searching for the global optimal solution based on the local search results.
[0066] For example, the MinHash minimum hash algorithm is used to determine whether the task sequence needs to be searched locally. According to the judgment result, if the conditions are met, a local search is performed to update the population individuals and the optimal solution, and finally a task offloading solution and the corresponding optimal energy consumption value are output.
[0067] Locality-Sensitive Hashing (LSH) is an efficient approximate nearest neighbor search algorithm that can be used to quickly find similar elements or perform clustering preprocessing in large-scale data sets. MinHash is a specific implementation of LSH, which is suitable for processing similarity calculations between sets and has a low time complexity. Therefore, in the local search phase of the bat algorithm, MinHash technology can be used to search for a better solution around it to avoid premature convergence to the local optimum, thereby obtaining a better solution within an acceptable delay.
[0068] In step S3, considering that local search is universal and easy to implement, if local search is performed for each feasible solution of the task offloading sequence, it will bring huge time overhead, affecting the practicality and efficiency of the system. Therefore, the MinHash algorithm is used to find similar solutions near the local optimal solution for local search, which prevents the algorithm from falling into the local optimal solution while also controlling the possible increase in time cost. Figure 6 As shown, step S3 mainly includes:
[0069] Step S3.1: Set k different hash functions.
[0070] Set the hash function, take x as an integer, and define the hash function as h(x) = (ax + b) % c, where a and b are randomly selected integers less than the maximum value of x, and c is a prime number slightly greater than the maximum value of x. This method generates k different hash functions
[0071] Step S3.2: For the current task sequence, use k hash functions to calculate its MinHash signature, and for each hash function, calculate the minimum value of all hash values of the current task sequence as the i-th element of the signature.
[0072] For example, the first hash function is used to calculate the hash value of the current task sequence, and the minimum value of all calculation results is taken as the first value of the MinHash signature; then the second hash function is used to calculate the minimum hash value as the second value of the signature. And so on, until a MinHash signature vector of length k is obtained. Based on MinHash minimum hashing, the local search strategy of the original bat algorithm is improved, thereby improving the disadvantage that the original bat algorithm is prone to fall into local optimality.
[0073] Step S3.3: For each task sequence, use the same k hash functions to generate signatures, and determine whether the current task sequence is similar to the local optimal solution in the HashSet by counting the number of identical signatures. If a similar task sequence is found, perform a local search on the current task sequence, that is, search near the local optimal solution; if no similar task sequence is found, skip the local search operation. In step S3.3, the specific comparison method is as follows:
[0074] Step S3.3.1: Calculate the MinHash signature of the current task sequence, traverse the MinHash signatures of all local optimal task sequences in the HashSet set, and traverse all hash value positions i, and count the number of equal hash values of two signatures at the same position i.
[0075] Step S3.3.2: Calculate the similarity estJsim, and calculate the similarity according to the similarity calculation formula estJsim=count / k. If the calculated similarity estJsim is greater than the preset threshold threshold, it means that the current task sequence is similar to the local optimal solution. At this time, a local search operation is performed on the current task sequence to search for a better solution that may exist near the local optimal solution.
[0076] In summary, as an advanced indexing and searching algorithm, the core idea of local sensitive hashing is to design a series of hash functions so that data points with similar distances in the original space are mapped to the same bucket or similar buckets with high probability in the hashed space; conversely, data points with distant distances are unlikely to be mapped to the same bucket. This feature enables LSH to effectively reduce the search space and improve search efficiency when processing large-scale data sets, especially in scenarios where high-dimensional data is processed or Approximate Nearest Neighbor (ANN) search is required.
[0077] Step S3.4: Perform a local search on the task sequence space to obtain the fitness value of the optimal solution in this task sequence space after the search. If it is better than the fitness value of the global optimal solution, update the global optimal solution and add it to the HashSet set.
[0078] For example, step S3.4 includes: step S3.4.1, using three methods of swapping, inserting, and reversing to construct a domain structure and perform local search; step S3.4.2, evaluating the domain solutions generated by each method and recording the optimal solution.
[0079] Specifically, three methods of constructing neighborhood structures are randomly selected to perform local searches on the space of similar task sequences, namely task swapping, task insertion, and task sequence reversing. For the current task scheduling sequence, swapping randomly selects two tasks to swap their order, inserting randomly selects two positions and inserts the task at position 1 into position 2, and reversing randomly selects two positions as the two reversal points of the task sequence to reverse the order of the task sequence within the range. If a better solution appears, the scheduling solution is changed to the better solution, and the best solution is added to the HashSet set.
[0080] Step S4: Based on the searched global optimal solution, the bat population dynamically updates the individual positions to ensure that the population continues to move toward the global optimal direction.
[0081] Step S5, determining whether the set stop condition is met, until the optimal task offloading solution and the lowest energy consumption are obtained.
[0082] Determine whether the set stop criteria are met (for example, whether the maximum number of iterations is reached). If so, output the solution and minimum energy consumption value corresponding to the optimal bat individual; otherwise, repeat steps S2 to S5 until the conditions are met.
[0083] By executing the above steps S1 to S5, the present invention realizes the edge computing task scheduling optimization process based on mobility perception. This process makes full use of the low latency characteristics of edge computing and the dynamic characteristics of mobile users, and realizes intelligent decision-making on task offloading schemes through the improved bat search algorithm, which can minimize the total energy consumption of the system while ensuring the quality of service.
[0084] In summary, the present invention provides a task scheduling method based on an improved bat algorithm in a mobile edge computing environment, which reads task information, edge server information, and mobile user trajectory information, and inputs the read information into the improved bat algorithm to obtain the task offloading scheme and its corresponding optimal energy consumption. The present invention is suitable for large-scale task scheduling and energy efficiency optimized edge computing task scheduling, which reduces energy consumption and improves the timeliness of the system by combining global search of task offloading schemes with local optimization.
[0085] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0086] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0087] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0088] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, Python, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0089] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0090] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0091] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0092] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0093] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A task scheduling method based on an improved bat algorithm in a mobile edge computing environment comprises the following steps: Step 1: For the edge computing system, obtain user task information, edge server information, and obtain the task sequence to be offloaded according to the user trajectory; Step 2: taking the user trajectory, the user task information and the edge server information as input, and using a bat search algorithm to solve the optimal solution of the current population, wherein each individual in the bat population is mapped to a corresponding task sequence, and the optimal solution represents the optimal unloading scheme and the optimal total energy consumption; Step 3: Determine whether a local search is required for the task sequence. If so, use local sensitive hashing to perform a local search to obtain the global optimal solution after the local search. Step 4: According to the searched global optimal solution, the individual positions of the bat population are dynamically updated until the set stopping criteria are met, and the final task scheduling decision is output.
2. The method according to claim 1, characterized in that Step 2 includes: Step 21: Initialize the bat population size, individual bat positions, and maximum number of iterations, and use sigmoid mapping to transform each bat individual Φ i ={φ1,φ2,…,φ i ,…,φ N } is mapped to the corresponding task sequence, N is the total number of tasks; Step 22: Initialize and create an empty hash set HashSet to store the task sequence signature corresponding to the local optimal solution searched in each iteration; Step 23: Calculate the system energy consumption value E corresponding to each task sequence as the fitness value of the individual bat; Step 24: Iteratively adjust the bat population according to the optimal bat individual, and then sort the bat individuals according to the calculated fitness values, and set the optimal bat individual according to the sorting results. After determining the global optimal solution, add it to the HashSet set, where each bat individual in the current bat population is updated according to the position formula x new =x old +εA t Update position, x new represents the updated position, x old represents the position before the update, ε is a set constant, A t Indicates the loudness of the sound wave at time slot t.
3. The method according to claim 2, characterized in that For task collection Any task Using Tuples To indicate that DS i Indicates the task Unload data size, CL i express The computational intensity of DL i Indicates the task The deadline for completion, step 23 includes: For the task sequence input into the bat algorithm, traverse all time slots and identify the tasks that make the mobile device unload. The group of consecutive time slots with the lowest energy consumption is selected, and then the task is selected The target server s determines the time slot group where the task is finally executed, and marks all time slots corresponding to the time slot group as unavailable; After traversing the task sequence mapped by the bat algorithm, when the traversal is completed, the fitness value of the individual bat is obtained based on the following energy consumption calculation formula: Where p is the data transmission power when the mobile terminal device offloads the task, FT i Represents a task in a task sequence Completion time, ST i Indicates the task The start time of According to the remaining resources of the current edge server, it is determined whether the current task can be unloaded in the idle time slot. If it can be completed, the current total energy consumption is calculated and the termination condition is determined.
4. The method according to claim 3, characterized in that Step 3 includes: Step 31: define the hash function as h(x)=(ax+b)%c, and generate k different hash functions, where x is an integer, a and b are randomly selected integers less than the maximum value of x, and c is a prime number slightly greater than the maximum value of x; Step 32: Use the first hash function to calculate the hash value of the current task sequence, and take the minimum value of all calculation results as the first value of the minimum hash signature; then use the second hash function to calculate the minimum hash value as the second value of the minimum hash signature, and then obtain a minimum hash signature vector with a length of k; Step 33: For each task sequence, use the same k hash functions to generate signatures, and determine whether the current task sequence is similar to the local optimal solution in the HashSet by counting the number of identical signatures. If a task sequence whose similarity meets the set conditions is found, perform a local search on the current task sequence; if no task sequence whose similarity meets the set conditions is found, skip the local search operation; Step 34: After performing a local search on the task sequence space, obtain the fitness value of the optimal solution in the task sequence space after the search. If it is better than the fitness value of the global optimal solution, update the global optimal solution and add it to the HashSet set.
5. The method according to claim 4, characterized in that In step 33, it is determined whether the current task sequence is similar to the local optimal solution in the HashSet according to the following steps: Calculate the minimum hash signature of the current task sequence, traverse the minimum hash signatures of all local optimal task sequences in the HashSet collection, and traverse all hash value positions i, and count the number of times two signatures have the same hash value at the same position i; The similarity estJsim is calculated according to the similarity calculation formula estJsim=count / k. If the calculated similarity estJsim is greater than a preset threshold, a local search operation is performed on the current task sequence to search for a better solution that may exist near the local optimal solution.
6. The method according to claim 4, characterized in that In step 34, three methods of constructing neighborhood structures are randomly selected to perform local search on the task sequence, namely task exchange, task insertion and task sequence flipping. For the current task scheduling sequence, task exchange randomly selects two tasks to swap their order, task insertion randomly selects two positions and inserts the task at the first position into the second position, and task sequence flipping randomly selects two positions as two flipping points of the task sequence to flip the order of the task sequence within the range.
7. The method according to claim 1, characterized in that The network transmission information is represented as: Among them, R t is the average transmission rate between the mobile device and the edge server at time slot t. At time slot t, the distance between the mobile device and each edge server is dis t,j , ω is the channel bandwidth, g0 is the path loss constant, θ is the path loss exponent, dis0 is the reference distance, N0 is the noise power spectral density between the mobile device and the edge server, (x t ,y t ) represents the two-dimensional coordinates of the mobile device at time slot t, Represents edge servers j The two-dimensional coordinates of , M is the total number of edge servers.
8. The method according to claim 2, characterized in that: In step 24, the individual position update formula and update speed formula of each bat in each generation population are expressed as follows: Among them, ε∈[-1,1] is a random number, x best represents the position of the best individual bat in the bat population, represents the speed of time slot t, represents the speed of the t-1 time slot, represents the position of the t-1 time slot, represents the position of time slot t, f i Indicates the frequency of sound waves.
9. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer device comprising a memory and a processor, wherein a computer program capable of running on the processor is stored in the memory, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Improved binary bat algorithm-based distributed system task scheduling method
CN108694077A
Resource scheduling method of cloud platform based on improved bat algorithm
CN114358234A
Calculation unloading method based on multi-strategy adaptive bat algorithm
CN115129387A
Large-scale parallel computing-based rainstorm flood model system
CN116976499A
Regenerated coarse aggregate concrete strength prediction method based on combination of improved bat optimization algorithm and LightGBM model
CN117334276A
Cited By
Remote sensing monitoring method and system based on edge calculation
CN120029855A
Edge computing fine granularity scheduling method based on IBBO algorithm
CN120066742A