Edge service transition method for task continuity

The method uses trajectory prediction and reinforcement learning to optimize edge service transitions by preparing the target server with a service log, addressing long interruptions and high energy consumption, ensuring seamless service continuity.

JP7764077B1Active Publication Date: 2025-11-05DALIAN MARITIME UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025060966
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2024-10-08
Filing Date
2025-04-02
Publication Date
2025-11-05
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

Existing edge service transition methods face issues of long service interruptions and high energy consumption due to the need to pause services for synchronization, especially when transitioning between edge servers, and they do not effectively address service continuity during user mobility.

Method used

A method combining trajectory prediction using a GAN model and reinforcement learning (Q-Learning) to determine optimal transition times and locations, allowing service synchronization to be completed ahead of time using state reproduction, reducing data transmission and energy consumption by preparing the target server with a service log before the transition.

Benefits of technology

This approach significantly reduces service interruption time and energy consumption by ensuring service continuity during transitions, minimizing the interruption to only communication link switching time, thereby improving user experience and reducing energy costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007764077000001_ABST
    Figure 0007764077000001_ABST
Patent Text Reader

Abstract

A task continuity oriented edge service transition method, storage medium, and electronic device are provided. [Solution] The method uses a GAN (Generative Adversarial Network) model to predict a user's movement trajectory to obtain a predicted trajectory, determines whether the last point of the predicted trajectory exceeds the service area of ​​the server, determines a transition time and transition location based on the predicted trajectory, constructs a service operation status as a service operation log, the server transmits the service log file and the service transition time to a target server and issues a transition command to it to request it to complete the service restoration work, determines to perform a communication link switching work at the transition time, the target server restores the service to the planned state, and switches servers.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to the technical field of resource allocation, and in particular to an edge service transition method for task continuity. [Background technology]

[0002] Edge service transition refers to the transition of a service in an edge computing environment from one edge server to another that better suits the user's needs. It primarily solves the problem of discontinuous service response due to user mobility, such as a sudden drop in service quality or the interruption of an ongoing edge service due to a mismatch between the edge server's limited service area and the user's device mobility. Service transitions can be divided into stateless transitions and state transitions. Stateless transitions simply redirect user requests to a new server and are not affected by previous requests or states. State transitions are called real-time transitions because they require the service to be fully restored to its pre-transition state after the transition is complete so that it can continue to provide service to the user. Executing state transitions is a prerequisite for ensuring service continuity.

[0003] Currently, service migration methods for resolving service discontinuity issues caused by user mobility and limited edge server coverage require two key tasks: migration decision-making and migration implementation. The goal of migration decision-making is to determine when and where to migrate currently running services that require migration. The current research trend is to select the optimal target server using optimization algorithms or reinforcement learning algorithms, with the optimization goals of latency and energy consumption during the migration process. Migration implementation requires determining how the service should migrate so that the services on the source and target servers are synchronized. It is also crucial to ensure consistency between the service's operational state before and after the migration. Recent research has generally adopted a method using container technology to copy the service's operational state, transmit it to the target server, and then restore it to continue operation. Methods for implementing state transitions using containers can be categorized into two categories: state duplication and state reproduction.

[0004] State replication is a method of completely replicating the service state in the source environment to the target environment. During the transition, the source server takes a snapshot of the current service's operating state, including in-memory data, variable values, and file system state. The snapshot is then transmitted to the target server and restored to its original state. State reproduction is a method of recreating the service in the target environment rather than directly replicating the state of the source environment. It is also called LR log replay transition because it involves replaying the service's operation log on the target server to achieve service synchronization. This method typically involves first collecting service log information on the source server, then transmitting the log to the target server. The target server then analyzes the log and executes the instructions contained in it sequentially, restoring the service to its original state.

[0005] Most prior art studies transition decision-making and transition implementation separately. For example, Patent Document 1 discloses an edge service transition method based on trajectory prediction. Specifically, it selects the optimal target server according to the trajectory prediction results, thereby shortening the user service response time due to user movement and dynamically updating the service based on the total transition time to compensate for the transition. This method shortens the overall service response time by obtaining the transition target based on movement trajectory prediction and determining the optimal service transition path according to the optimal number of route points of the transition base station. However, it does not provide any fundamental improvements to the service transition implementation method. During the transition, the service must be paused to transmit all data synchronized with the service, and problems such as service interruption and long service time remain. Patent Document 2 discloses an edge service transition method based on trajectory prediction and checkpoint recovery technology. Specifically, it obtains the next location to which the user will move based on trajectory prediction, selects the edge server at that location as the transition target server, and then utilizes the hierarchical storage characteristics of the container to first transmit static resource data to the target server, and then uses checkpoint recovery technology to realize memory state data migration. This method reduces the service interruption time during service transition to some extent by transmitting static resource data and memory state data separately, but it directly sets the server at the user's next location obtained by trajectory prediction as the target server, so trajectory prediction is not involved in the execution of service transition, and it is necessary to interrupt the execution of the service to transmit the memory state data.

[0006] In summary, current research on service transition methods still faces the following problems: Existing service synchronization methods all synchronize the current service running state on the original server as the target state for service synchronization. If the service is still running during synchronization, a synchronization difference in the service state will occur. To ensure service consistency, the service must be paused to complete the final synchronization, resulting in long interruption times. State replication methods require a large amount of transmission data, resulting in high transmission energy consumption, which is also one of the reasons for the long service interruption times. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] Chinese Patent Application Publication No. 114554420 [Patent Document 2] Chinese Patent Application Publication No. 116208608 Summary of the Invention [Problem to be solved by the invention]

[0008] The present invention provides an edge service migration method for task continuity. This method combines trajectory prediction and state replication technologies to optimize the entire migration process. Trajectory prediction determines the transition time and location in advance, and a reinforcement learning algorithm is used to obtain the optimal migration strategy based on the location. The service operation state at the time of the migration is then calculated, and this state is used to complete all service synchronization tasks in advance on the target server, fully considering user mobility and avoiding service interruptions due to data transmission. Furthermore, the adoption of state replication for state transition reduces the amount of data transmitted between servers and lowers energy consumption for data transmission. [Means for solving the problem]

[0009] The technical means adopted in the present invention are as follows:

[0010] In one aspect of the present invention, there is provided an edge service transition method for task continuity, which specifically includes: S1: Predicting a user's movement trajectory using a GAN model under a transition scene to obtain a predicted trajectory, and predicting the user's movement trajectory using a deep learning model; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3. S3, determining a transition time and a transition position based on the predicted trajectory; S4, using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculating the service running status at the transition point according to the current running status of the service and the server information, building the service running status as a service running log, and writing the service running log including the running time and service running status into a service log file; S5, the original server transmits the service log file and the service transition time to the target server, and issues a transition command to the target server to request the target server to complete the service restoration operation, and ensures that the communication link is switched at the transition time; S6, after the target server receives the transition command and the service log file, create a new container, then allocate memory and processor resources to the new container, then analyze the service log file to extract the commands therein, collect related resources, and execute the commands in the container in order, and when all the commands are executed, it indicates that the service has reached the expected state on the target server; S7. When the time reaches the transition point and the user has already entered the service area of the target server, execute the communication link switching operation, redirect the request to the new target server through the update of the network path configuration, ensure that the target server continues to provide services to the user, and after ensuring that the service can respond normally, delete the application on the original server.

[0011] Furthermore, in S1, the transition scenario consists of a mobile user, an edge server, and a running service.

[0012] Furthermore, in S1, the predicted user movement trajectory is composed of the positions of the user at 8 future time points, Tra = {(t1,loc1),…(t i ,loc i ),…(t8,loc8)}, where t i represents the time at the i-th point, and loc i represents the position at the i-th time point.

[0013] Furthermore, S2 calculates the distance l between the position loc8 of the last point of the predicted user movement trajectory and the position loc mec of the currently serving server, compares the distance l with the radius r of the server's service area, executes S3 if l > r, and returns to S1 otherwise.

[0014] Furthermore, S3 For each trajectory point in the predicted trajectory, calculates the distance l between each trajectory point and the server one by one in reverse order from the 7th trajectory point and compares it with the radius r of the server's service area. If l < r, set the position of the trajectory point as the transition position point loc mig , and set the time corresponding to the transition position point loc mig as the transition time t mig .

[0015] Furthermore, S4 S41: determining an optimal transition strategy; S42: calculating a service operation state at the transition point; In S41, The transition strategy D is defined as a matrix of size M × N, and is shown in equation (1):

number

number

number

[0016] In a second aspect of the present invention, a storage medium is provided, which stores a program that, when running, executes any one of the edge service transition methods for task continuity described above.

[0017] In a third aspect, the present invention provides an electronic device, comprising: a memory; a processor; and a computer program stored in the memory and executable on the processor, the computer program executing the edge service transition method for task continuity described above. [Effects of the Invention]

[0018] The present invention has the following beneficial effects over the prior art:

[0019] This invention optimizes the entire transition operation process by combining trajectory prediction and state reproduction technology. Trajectory prediction allows for the transition time and transition location to be determined in advance, allowing tasks that would result in excessively long service interruptions to be completed before the actual service transition, fully considering user mobility and shortening service interruptions. Finally, the adoption of a state reproduction state transition method reduces the amount of data transmitted between servers and reduces data transmission energy consumption. [Brief explanation of the drawings]

[0020] In order to more clearly explain the embodiments of the present invention or the technical means in the prior art, the accompanying drawings necessary for the description of the embodiments or the prior art will be briefly introduced below. It goes without saying that the following accompanying drawings are some embodiments of the present invention, and those skilled in the art can further obtain other accompanying drawings from these accompanying drawings without any creative effort.

[0021] [Figure 1]1 is a flow diagram of the method of the present invention. [Figure 2] FIG. 2 is a diagram showing the transition scene of the method of the present invention. [Figure 3] 1 is a flow chart of a cold transition method. [Figure 4] This is a work flow diagram of the pre-dump service transition. [Figure 5] 1 is a flow chart of the method of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0022] In order to clarify the purpose, technical means and advantages of the embodiments of the present invention, the technical means of the embodiments of the present invention will be described clearly and completely below with reference to the drawings in the embodiments of the present invention, and it goes without saying that the described embodiments are not all embodiments but only some embodiments of the present invention. Any other embodiments that a person skilled in the art can obtain based on the embodiments of the present invention without any creative effort shall all be included in the scope of protection of the present invention.

[0023] It should be noted that terms such as "first" and "second" in the present specification, claims, and drawings are used to distinguish between similar objects, not to describe a particular order or priority. It should be understood that the embodiments of the present invention described herein can be performed in an order other than as illustrated herein, and therefore the data employed in this manner may be interchanged where appropriate. Furthermore, the terms "comprise" and "have," as well as any variations thereof, refer to a non-exclusive inclusion. For example, a process, method, system, product, or apparatus comprising a series of steps or units need not be limited to those steps or units explicitly recited, but may also include other steps or units that are not explicitly recited or that make the process, method, product, or apparatus unique.

[0024] Conventional edge service migration methods for task continuity in edge computing environments have the drawback of requiring server switching, including file copying, data transmission, service restoration, and communication link switching, after pausing the service, resulting in long service interruptions. This invention addresses data transmission-based service transition scenarios by providing an edge service migration method based on trajectory prediction and improved log-replay migration (LR). This method first predicts the future movement trajectory of the current mobile user using a generative adversarial network (GAN) algorithm and determines the service transition time and transition location based on the predicted trajectory and the server's service area. Next, it selects the optimal transition decision and performs transition implementation preparation work in parallel. Specifically, it selects the optimal target server based on the transition location using a Q-Learning algorithm and performs service synchronization using improved LR. The improved LR actively determines the service operating state at the time of the link switch based on the transition point, and prepares the service in that state in advance on the target server. This allows all service synchronization work to be completed before the official transition, solving the problem of poor service synchronization caused by services still running during data transmission and ensuring normal service response during service synchronization. Finally, because only the link switch is required at the transition point, service interruption time is shortened, service response continuity is ensured, and energy consumption during data transmission is reduced.

[0025] This invention considers the dynamic transition problem of resource-transmitting services in an edge computing environment. The entire transition system consists of multiple edge servers and users using mobile devices, and the service areas of the servers overlap each other to ensure complete coverage. Users use online services provided by edge servers, and each edge server is assumed to own the relevant resources required for the service, meaning that each server can provide the service to the user.

[0026] The present invention improves the LR log replay transition method by allowing the server to actively determine the service operating state at the time of the communication link switch before the transition, and allowing the target server to prepare the service in that state in advance. Once the service on the original server is also running in that state, the services on both servers are synchronized. To achieve this goal, the present invention determines a future point in time as the transition point based on trajectory prediction, calculates the service operating state at the transition point based on information such as the server's current processing capacity, network transmission speed, and the current operating state of the service, and defines this state as the service operating state at the time of the communication link switch. Based on the characteristic of state replay methods that use service operation logs to represent service operating states, the present invention writes the calculated service operating state to the service operation log in the form of commands, then transmits the log to the target server. Once the target server executes all state replay commands according to the log, the services on both servers are synchronized. During the entire service synchronization process using the improved LR method, each operation does not require service interruption, and the service always responds normally, ensuring service continuity during the process.

[0027] As shown in FIG. 1, the task continuity oriented edge service transition method provided by the present invention includes the following steps:

[0028] S1,Predict user movement trajectory using GAN model.

[0029] First, the overall transition scenario is a mobile edge computing network communication scenario consisting of mobile users, edge servers, and running services.

[0030] To avoid energy consumption caused by frequent transitions and service interruptions when a user moves beyond the service area of ​​the current server, the method of the present invention uses a real-time user movement trajectory prediction method to determine whether to transition the service. The server collects user movement trajectories in real time and performs trajectory prediction once per time interval. The specific process is as follows:

[0031] This invention uses a GAN model to predict a user's trajectory. GAN is a deep learning model based on a generator and a classifier, and by pitting two networks against each other, the prediction result constantly approaches the true value. This model has advantages such as complex data processing, generation diversity, and strong adaptability, making it an effective method in the field of trajectory prediction. The server performs trajectory prediction once per time interval according to the user's past trajectory. The trajectory predicted by this invention is composed of the user's positions at eight future time points, Tra={(t1,loc1),...(t i ,loc i ),...(t8,loc8)}, where t i represents the time of the i-th point, and loc i represents the position at the i-th time point.

[0032] S2, determine whether the last point of the predicted trajectory is outside the service area of ​​the server.

[0033] The 8th position loc8 after obtaining the predicted trajectory Tra and the current position loc of the server providing the service mec The distance l between them is calculated based on the above and compared with the radius r of the server's service area. If l>r, execute S3; otherwise, return to S1.

[0034] S3. Determine the transition time and transition position based on the predicted trajectory.

[0035] When to transition and where to transition are two important issues that the transition decision-making needs to solve. Since the user is always in a moving state regardless of whether to transition or not, minimizing the service interruption time during the transition while minimizing the service response delay after the transition as much as possible, and ensuring that the user can obtain the service response in both cases before and after the transition are essential elements for ensuring service continuity.

[0036] In this invention, the predicted trajectory is used to determine the transition time and transition position, and its purpose includes the following three purposes. First, fully considering the user's mobility, make the transition position closer to the user's position after the transition is completed, and ensure the reliability of the transition decision-making. Second, determine the transition time in advance to reserve time for completing service synchronization. Third, calculate the service operating state based on the transition time to prepare for the execution of the subsequent service transition using the improved LR.

[0037] Based on the predicted trajectory Tra, calculate the distance l between each trajectory point and the server one by one in reverse order from the seventh trajectory point, and compare it with the radius r of the server's service area. If l < r, set the position of the trajectory point as the transition position point loc mig and set the time corresponding to that point as the transition time t mig . By selecting the target server based on this position, the user can surely obtain the service response in both cases before and after the transition.

[0038] S4. Obtain the optimal transition strategy and calculate the service operating state at the transition time.

[0039] (1) Obtain the optimal transition strategy.

[0040] First, define the transition strategy D as a matrix of size M×N and express it as formula (1).

Equation

[0041] where M represents the maximum number of tasks, N represents the number of edge servers, and D j,i is the jth service Task j Runs on the server MEC i D j,i The value of is 0 or 1, 0 is Task j MEC for execution i 1 indicates that the transition to MEC is not performed. i This indicates a transition to

[0042] Next, we construct a service transition model with the optimization goals of data transmission delay and data transmission energy consumption of the service. j and Server MEC i The data transmission delay between is shown in equation (2). T j,i =data j / V i (2)

[0043] In the formula, T j,i represents the data transmission delay, and data j is the service task requested by the user j represents the required amount of data to be transmitted, and V i Server MEC i represents the data transmission rate between the i is calculated according to equation (3).

number

[0044] In the formula, B i Server MEC i represents the available bandwidth of the transmission channel corresponding to p i Server MEC i represents the transmission power of the base station corresponding to , g represents the power gain of the channel, and d i is the transition position loc mig and Server MECi represents the distance between δ and σ, δ represents the channel loss coefficient, and σ represents the noise power.

[0045] Service Task j Server MEC i The data transmission energy consumption when transitioning to is calculated according to equation (4). E j,i =data mig d mig P i (4)

[0046] In the formula, E j,i represents the energy consumption during the transition, and data mig represents the amount of data that has been transferred, and d mig represents the distance between the source server and the target server, and P i represents the transmission power of the wired link between the servers.

[0047] The objective functions of the model are shown in equations (5) and (6).

number

[0048] where D represents the transition strategy, α represents the weighted value of delay, β represents the weighted value of energy consumption, and the optimization goal is to minimize the total consumption per transition.

[0049] Next, based on the transition location and server related information, the Q-Learning algorithm is used to find the optimal target server. The Q-Learning algorithm is a traditional reinforcement learning algorithm that is suitable for solving decision problems in discrete action spaces. Compared to using optimization algorithms to find transition strategies, reinforcement learning algorithms are advantageous in improving the performance of the entire transition system because they can adapt well to complex and diverse edge environments and also take into account long-term return issues.

[0050] (2) Calculate the service operation state at the transition point.

[0051] The server collects relevant information such as memory, CPU, bandwidth, etc., and the current running progress of the service, and calculates the running progress of the service at the transition point according to equations (3) and (7). S'=S+(V i *t / data task ) (7)

[0052] In the formula, S represents the current service operation progress, S' represents the service operation progress at the transition point, and V i represents the current data transmission rate between the server and the user, and t is the transition time t mig represents the difference between the current time and the data task represents the total data volume of the service.

[0053] In this invention, in a resource-transfer-type service transition scenario, the service running progress at the time of the transition is used as the service running status at the time of the transition. A state-reproduction state transition method is adopted, and the virtualization tool used is Docker containers. Each service runs on the server as a container, and each container generates a log when it is started. After obtaining the service running status at the time of the transition, the server collects the log file of the service, then constructs the calculated service running status as a service running log, and writes the service running log containing the running time and service running status to the log file of the service.

[0054] S5: Transmit the data and notify the target server.

[0055] After acquiring the transition strategy and the service log file at the transition time, the server transmits the log file and the service transition time to the target server via the wired link between the servers, issues a transition command to the target server, requests the target server to complete the service restoration work, and determines to perform the communication link switching work at the transition time.

[0056] The data transmission during this process is the main source of energy consumption, and service regeneration can be achieved by simply transmitting the service operation log and having the target server regenerate the service according to the log. Log files are usually much smaller than the service data and resources, and consume less energy.

[0057] S6: The target server restores service to the expected state.

[0058] After receiving the command and log information, the target server first creates a new container, allocates memory and processor resources to the new container, analyzes the log to extract the command, collects related resources, and executes the command in the container in order. When all the commands are executed, the service is in the expected state on the target server.

[0059] Compared with state replication, the method of replaying using log commands takes a longer time to restore the service. However, in the present invention, a future point in time is used as the transition point using trajectory prediction, and then the service operating state at the transition point is calculated. The service restoration work is performed before the official transition. Therefore, although the service restoration still takes a long time, it does not result in an excessively long interruption of the service.

[0060] S7, switch servers.

[0061] If the time for the transition arrives and the user is already in the service area of ​​the target server, the communication link will be switched, and the request will be redirected to the new target server through an updated network routing configuration, allowing the target server to continue providing service to the user. Once the service is able to respond normally, the application on the original server will be deleted. This process involves communication switching, which may cause a temporary service interruption, and the interruption time is the time it takes to switch the communication link.

[0062] In summary, the task continuity-oriented edge service transition method provided by the present invention uses trajectory prediction and improved LR to complete tasks such as data transmission and service restoration during service transition before the actual transition. The service interruption time is reduced to include only the communication link switching time, which is affected by factors such as network topology, physical distance, server load, and network traffic. After multiple service transition simulations under 5G scenarios, the present invention showed that the communication link switching time ranged from 30 ms to 80 ms. However, because typical services have a buffer function, buffered data can continue to provide service to users for approximately 1000 ms when the network is disconnected. Therefore, by using the method of the present invention to perform service transition, the service interruption time can be significantly reduced without significantly affecting the user's service experience during this period, improving the user's service experience and effectively ensuring service continuity.

[0063] This invention addresses the issue of service interruptions during service transitions by providing a new dynamic edge service transition method based on trajectory prediction and state reproduction. This method is evaluated primarily in terms of energy consumption and latency. Latency includes transition latency and service response latency, while energy consumption primarily refers to the energy consumed by data transmission during the transition process. This invention achieves better results primarily by improving the overall transition process. Therefore, the effectiveness of this method in terms of process optimization, energy consumption, and latency is demonstrated by comparing it with two other transition methods in terms of both process and experimental data. Figure 2 shows the transition scenario of this invention.

[0064] 1. Comparison of work processes Representative service transition methods include the cold migration method and the pre-dump service transition method. Below, we will analyze the transition method provided by the present invention and the work processes of these two methods to explain how the work processes of the present invention have been improved compared to conventional methods, thereby achieving a significant reduction in service interruption delay.

[0065] 1. Cold transition method Figure 3 illustrates the transition process of the cold transition method. This method initiates server selection when a transition is decided. It then gradually performs tasks such as pausing the service, backing up data, and transmitting data according to the state replication service transition method. Once the target server receives the relevant data, it begins recreating the service. After service synchronization is complete, the server is switched over. The target server continues to provide services to users, and any applications already stopped on the original server are deleted. After selecting a target server, the cold transition method requires the service to be stopped until the entire transition process is completed. The transition delay includes the time required for data copying, data transmission, service restoration, and communication link switching. The cold transition method selects a server based on the user's location at the time of the planned transition. However, because the user continues to move during the transition, the selected server may not necessarily be optimal, potentially resulting in a certain increase in service response delay. Furthermore, the full state replication method requires a large amount of data to be transmitted, which also consumes excessive energy.

[0066] 2. How to transition to the pre-dump service Pre-dump service transition is an improved version of the cold transition method, and its transition process is shown in Figure 4. This method addresses the problem of excessively long service interruptions in the cold transition method by utilizing the hierarchical storage characteristics of the container to transmit all mirror layer data and most of the base layer data to the target server before the service is temporarily suspended. This significantly reduces the amount of data transmitted during the service interruption, thereby shortening the transition delay. The transition delay of this method includes the time to synchronize the remaining base layer data and the time to switch the communication link. Since the base layer data is generated during service operation and constantly changes as the service operates, this method synchronizes this data by transmitting the data changed within the previous transmission period multiple times, and then stopping the service only once to transmit the remaining data. This method shortens the transition delay, but it also increases the energy consumption required for data transmission to a certain extent.

[0067] 3. The method of the present invention The transition process of the method of the present invention is shown in Figure 5. It uses trajectory prediction to obtain the user's movement trajectory for a certain period of time in the future. Based on the trajectory, an appropriate transition point is selected. The target server ensures that the service is replicated before the selected point. The service continues to operate without interruption during this period, pausing the service response only when the transition point is reached and the communication link is switched. Therefore, the transition delay of the present invention only includes the time required to switch the communication link. Furthermore, the present invention uses the transition point determined by trajectory prediction to select the target server. This position helps select the optimal target server, which is closest to the user's location when the transition is completed in the actual situation, thereby shortening the service response delay. The present invention employs a service synchronization method for state replication, which eliminates the need to transmit large amounts of static and dynamic data; only service operation log records need to be transmitted to the target server, thereby reducing energy consumption to a certain extent.

[0068] 2. Comparative analysis of experimental data The comparative experiment of the present invention was conducted on a Linux system installed on a Windows 11 system. The virtual machine was assigned 2 GB of virtual memory and two virtual CPU cores, and the physical machine was equipped with a Core i7-12900 processor and 16 GB of memory. The CRIU version used was 3.16, and the Docker version was 20.10. The transition decision-making experiment was conducted in a Python 3.8 environment.

[0069] (1) Experimental evaluation index The metrics compared in this paper are latency and energy consumption. Latency includes transition latency and response latency. Transition latency represents the duration of service interruption and is primarily determined by the amount of work that needs to be performed after the service interruption. In the experiment, transition latency was obtained by calculating the time difference between the start and end of the service interruption, as shown in Equation (8). Response latency represents the response time of a user's request to the target server and is determined by factors such as server performance, base station output, and the distance between the user and the server. It is calculated according to Equations (2) and (3). Energy consumption refers to the energy consumed by transmitting data from the original server to the target server during service transition. It is primarily affected by the amount of data transition and transmission and is calculated according to Equation (4). T mig =t over -t start (8)

[0070] In the formula, T mig represents the transition delay, and t over represents the end time of the service interruption, and t start represents the start time of the service interruption, and T j MEC j represents the response delay between the user and the request, and data represents the amount of data requested by the user.

[0071] (2) Comparative experiment This invention addresses the problem of excessively long service interruptions during service transitions, and improves upon traditional transition methods based on trajectory prediction and state reproduction technologies to optimize the work process, thereby reducing delays during service transitions and energy consumption. To demonstrate the effectiveness of this method, an experimental comparison was conducted with two other representative methods, the cold transition method and the pre-dump service transition method. Transition tests were conducted 20 times using each of the three methods, and the average values ​​of each index were calculated. The experimental results are shown in Table 1.

[0072] Table 1 Experimental comparison results [Table 1]

[0073] As can be seen from Table 1, by completing service restoration work in advance, the present invention reduces transition delay by 99.3% compared to the cold transition method and 95.3% compared to the pre-dump service transition method. In terms of response delay, the present invention, because the user's location obtained by trajectory prediction is closer to the user's location upon completion of the transition in the actual situation, reduces the response delay of the server selected based on this location by 6.6% compared to the other two methods, improving service quality and preventing the user's movement during the transition process from exceeding the service area of ​​the current server. In terms of energy consumption, the present invention uses a state reproduction method and transmits data primarily in log format, thereby reducing data transmission volume compared to containers. The present invention's energy consumption is reduced by 75.1% compared to the cold transition method and 76.2% compared to the pre-dump service transition method.

[0074] In summary, the method of the present invention significantly reduces latency and energy consumption compared to the other two transition methods. The reduced energy consumption helps service providers save energy and alleviate the energy pressure on edge servers. The reduced latency improves service quality and improves user experience, especially when service interruptions occur, as the latency is significantly reduced, effectively ensuring service continuity.

[0075] Finally, it should be noted that the above embodiments are merely for explaining the technical means of the present invention and are not intended to limit the same, and although the present invention has been described in detail with reference to the above embodiments, it is possible to modify the technical means described in the above embodiments or to implement equivalent replacements for part or all of the technical features, and it is obvious to those skilled in the art that such modifications or replacements will not deviate from the scope of the technical means of the embodiments of the present invention.

[0076] (Addendum) (Appendix 1) S1: Predicting a user's movement trajectory using a GAN model under a transitional scene and obtaining a predicted trajectory; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3. S3, determining a transition time and a transition position based on the predicted trajectory; S4, using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculating the service running status at the transition point according to the current running status of the service and the server information, building the service running status as a service running log, and writing the service running log including the running time and service running status into a service log file; S5, the original server transmits the service log file and the service transition time to the target server, and issues a transition command to the target server to request the target server to complete the service restoration operation, and determines to perform a communication link switching operation at the transition time; S6, after the target server receives the transition instruction and the service log file, create a new container, allocate memory and processor resources to the new container, then analyze the service log file to extract the instructions therein, collect related resources, execute the instructions in the container in order, and indicate that the service has entered the expected state on the target server after all the instructions have been executed; S7. When the transition time arrives and the user is already in the service area of ​​the target server, performing a communication link switching operation and redirecting the request to the new target server through updating the network route configuration, so that the target server continues to provide the service to the user, and deleting the application on the original server after the service responds normally.

[0077] (Appendix 2) The method described in Appendix 1, wherein in S1, the transition scene consists of mobile users, edge servers, and running services.

[0078] (Appendix 3) In S1, the predicted user trajectory is composed of the user's eight future locations, Tra={(t1,loc1),...(t i ,loc i ),…(t8,loc8)}, and t i represents the time of the i-th point, and loc i 2. The method of claim 1, wherein: represents the position at the i-th time point.

[0079] (Appendix 4) S2, The distance l between the position loc8 of the last point of the predicted user movement trajectory and the position loc of the server currently providing the service mec is calculated, and if l > r where r is the radius of the service area of the server, S3 is executed; otherwise, return to S1. The method according to appended note 1, characterized by including this.

[0080] (Appended note 5) S3 includes For the trajectory points in the predicted trajectory, the distance l between each trajectory point and the server is calculated one by one in reverse order from the seventh trajectory point and compared with the radius r of the service area of the server. If l < r, the position of the trajectory point is set as the transition position point loc mig and the time corresponding to the transition position point loc mig is set as the transition time t mig . The method according to appended note 1, characterized by including this.

[0081] (Appended note 6) S4 includes S41, a step of obtaining an optimal transition strategy, and S42, a step of calculating the service operation state at the transition time, In S41, the transition strategy D is defined as a matrix of size M × N and shown in Equation (1),

Equation

number

number

[0082] (Appendix 7) A storage medium storing a program, which executes a task continuity-oriented edge service transition method described in any one of Appendices 1 to 6 when the program is running.

[0083] (Appendix 8) An electronic device comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes a task continuity oriented edge service transition method described in any one of Supplementary Notes 1 to 6 via the computer program.

Claims

1. S1: Predicting a user's movement trajectory using a GAN model under a transitional environment to obtain a predicted trajectory; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3; S3: determining a transition time and a transition position based on the predicted trajectory; S4. Using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculate the service running status at the transition point according to the current running status of the service and the server information, construct the service running status as a service running log, and write the service running log including the running time and the service running status into a service log file; S5. The original server transmits the service log file and the service transition time to the target server, issues a transition command to the target server to request the target server to complete the service restoration operation, and determines to perform a communication link switching operation at the transition time; S6: After the target server receives the transition command and the service log file, create a new container, allocate memory and processor resources to the new container, then analyze the service log file to extract the commands therein, collect related resources, execute the commands in the container in order, and indicate that the service has reached the expected state on the target server after all the commands have been executed; S7. When the transition time arrives and the user has already entered the service area of ​​the target server, perform a communication link switching operation and redirect the request to the new target server through updating the network route configuration, so that the target server continues to provide the service to the user, and delete the application on the original server after the service responds normally. In S1, the edge service transition method for task continuity is characterized in that the predicted user movement trajectory is composed of the user's positions at eight future time points, and is represented by Tra = {(t 1 , loc 1 ), ... (t i , loc i ), ... (t 8 , loc 8 )}, where t i represents the time of the i-th point and loc i represents the position at the i-th time point.

2. S1: Predicting a user's movement trajectory using a GAN model under a transitional environment and obtaining a predicted trajectory; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3; S3: determining a transition time and a transition position based on the predicted trajectory; S4. Using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculate the service running status at the transition point according to the current running status of the service and the server information, construct the service running status as a service running log, and write the service running log including the running time and the service running status into a service log file; S5. The original server transmits the service log file and the service transition time to the target server, issues a transition command to the target server to request the target server to complete the service restoration operation, and determines to perform a communication link switching operation at the transition time; S6: After the target server receives the transition command and the service log file, create a new container, allocate memory and processor resources to the new container, then analyze the service log file to extract the commands therein, collect related resources, execute the commands in the container in order, and indicate that the service has reached the expected state on the target server after all the commands have been executed; S7. When the transition time arrives and the user has already entered the service area of ​​the target server, perform a communication link switching operation and redirect the request to the new target server through updating the network route configuration, so that the target server continues to provide the service to the user, and delete the application on the original server after the service responds normally. S2, The position of the last point of the predicted user trajectory, loc 8 and the location of the server currently providing the service mec and calculating a distance l between the server and the target node, comparing the distance l with a radius r of the server's service area, and if l>r, executing S3; otherwise, returning to S1.

3. S1: Predicting a user's movement trajectory using a GAN model under a transitional environment and obtaining a predicted trajectory; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3; S3: determining a transition time and a transition position based on the predicted trajectory; S4. Using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculate the service running status at the transition point according to the current running status of the service and the server information, construct the service running status as a service running log, and write the service running log including the running time and the service running status into a service log file; S5. The original server transmits the service log file and the service transition time to the target server, issues a transition command to the target server to request the target server to complete the service restoration operation, and determines to perform a communication link switching operation at the transition time; S6: After the target server receives the transition command and the service log file, create a new container, allocate memory and processor resources to the new container, then analyze the service log file to extract the commands therein, collect related resources, execute the commands in the container in order, and indicate that the service has reached the expected state on the target server after all the commands have been executed; S7. When the transition time arrives and the user has already entered the service area of ​​the target server, perform a communication link switching operation and redirect the request to the new target server through updating the network route configuration, so that the target server continues to provide the service to the user, and delete the application on the original server after the service responds normally. S3 is, For each trajectory point on the predicted trajectory, the distance l between each trajectory point and the server is calculated one by one in reverse order starting from the seventh trajectory point, and compared with the radius r of the server's service area. If l<r, the position of the trajectory point is designated as the transition position point loc mig and the transition location point loc mig The time corresponding to the transition time t mig 2. A task continuity oriented edge service transition method, comprising:

4. S1: Predicting a user's movement trajectory using a GAN model under a transitional environment and obtaining a predicted trajectory; S2: Determine whether the last point of the predicted trajectory is beyond the service area of ​​the server. If not, return to S1; if yes, execute S3; S3: determining a transition time and a transition position based on the predicted trajectory; S4. Using a Q-Learning algorithm to find an optimal transition strategy based on the transition location and server information, calculate the service running status at the transition point according to the current running status of the service and the server information, construct the service running status as a service running log, and write the service running log including the running time and the service running status into a service log file; S5. The original server transmits the service log file and the service transition time to the target server, issues a transition command to the target server to request the target server to complete the service restoration operation, and determines to perform a communication link switching operation at the transition time; S6: After the target server receives the transition command and the service log file, create a new container, allocate memory and processor resources to the new container, then analyze the service log file to extract the commands therein, collect related resources, execute the commands in the container in order, and indicate that the service has reached the expected state on the target server after all the commands have been executed; S7. When the transition time arrives and the user has already entered the service area of ​​the target server, perform a communication link switching operation and redirect the request to the new target server through updating the network route configuration, so that the target server continues to provide the service to the user, and delete the application on the original server after the service responds normally. S4 is, S41: determining an optimal transition strategy; S42: calculating a service operation state at the transition point; In S41, The transition strategy D is defined as a matrix of size M×N, and is shown in equation (1): [Equation 1] where M represents the maximum number of tasks, N represents the number of edge servers, and D j,i is the jth service Task j Runs on the server MEC i indicates whether to transition to D j,i The value of is 0 or 1, 0 is Task j MEC for implementation i 1 indicates that the transition to MEC is not performed. i and A service transition model is constructed with the optimization goal of data transmission delay and data transmission energy consumption of the service, and the service Task j and Server MEC i Calculate the data transmission delay between T j,i =data j / V i (2) In the ceremony, T j,i represents the data transmission delay, and data j is the service requested by the user. j represents the required amount of data to be transmitted, and V i is Server MEC i represents the data transmission rate between the i is calculated according to equation (3), [Equation 2] In the formula, B i is Server MEC i represents the available bandwidth of the transmission channel corresponding to p i is Server MEC i represents the transmission power of the base station corresponding to , g represents the power gain of the channel, and d i is the transition position loc mig and Server MEC i represents the distance between, δ represents the channel loss coefficient, σ represents the noise power, Service Task j Server MEC i Calculate the data transmission energy consumption when transitioning to according to equation (4); E j,i =data mig d mig P i (4) In the formula, E j,i represents the energy consumption during the transition, and data mig represents the amount of data that has transitioned, and d mig represents the distance between the original server and the target server, and P i represents the transmission power of the wired link between the servers, The objective functions of the service transition model are shown in Equation (5) and Equation (6). [Equation 3] α+β=1,(α>0,β>0) (6) where D represents the transition strategy, α represents the delay weight, β represents the energy consumption weight, and the optimization goal is to minimize the total consumption per transition. Then, find the optimal target server using Q-Learning algorithm according to the transition location and the related information of the server; In S42, The server collects memory, CPU, and bandwidth related information and the current service running progress, i , S' is used to calculate the service operation progress at the transition point, and S' is calculated according to equation (7), S’=S+(V i *t / data task ) (7) In the formula, S represents the current service operation progress, S' represents the service operation progress at the transition point, and V i represents the current data transmission rate between the server and the user, and t is the transition time t mig represents the difference between the current time and the task represents the total data volume of the service.

5. The method according to any one of claims 1 to 4, wherein in step S1, the transition scene is composed of mobile users, edge servers and running services.

Citation Information

Patent Citations

  • Virtual network function migration method based on edge network

    CN113114722A

  • Edge computing service migration method based on trajectory prediction

    CN114554420A

  • Edge service active migration method based on mobility prediction

    CN116208608A

  • Edge computing-based application relocation method and device

    JP2022505802A

  • Method for predicting human mobility route based on a generative adversarial network

    KR1020210030133A