Edge service migration method, system and terminal based on three-branch decision
Through the edge service migration method based on three decisions, users' mobile status is predicted and regions are divided, and service migration decisions are optimized. The problem of insufficient optimization of energy consumption and delay time in the existing technology is solved, and more scientific decisions and lower energy consumption are achieved.
Patent Information
- Application Number
- CN202111582084.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-12-22
AI Technical Summary
The prior art fails to fully consider all energy consumption losses of the source and target servers in service migration decisions, as well as optimization of delay time during service migration.
The edge service migration method based on three decisions is adopted to predict user movement status through evaluation functions, divide service migration areas, delay areas and non-migration areas, and make service migration decisions based on the optimal energy consumption migration location and the latest migration location.
It effectively avoids frequent service migration when users hover at the far end of the service radius of the edge server, resulting in a significant increase in energy consumption; at the same time, the service delay time is optimized to ensure the stability and low energy consumption of user network services.
Smart Images

Figure CN114237905B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communication, and in particular relates to an edge service migration method, system and terminal based on three-branch decision making. Background Art
[0002] Service migration is an issue that many network services based on distributed base stations often need to consider. For example, existing mobile communication networks and cloud computing services all adopt this network architecture. In this network architecture, a large service network is formed by countless optimized distributed edge servers. When the user's terminal device works in the service network, it can switch communications between different edge servers. The edge server performs service migration based on the user's location, thereby ensuring that the user can continue to enjoy network services without network interruption. In this process, how to optimize the migration strategy during the user service migration process and reduce the energy consumption during the network service migration process has become an important issue that technicians in this field need to solve.
[0003] Under the multi-MEC (Mobile Edge Computing) platform, some technicians transformed the service migration problem into the problem of finding the optimal migration server, used the optimal stopping theory to reduce the number of search target servers, and then found the target server with the optimal migration cost based on the calculated energy consumption cost of migrating to different target servers. Furthermore, the technicians also proposed a service migration model and designed a service migration algorithm based on particle swarms. The service migration problem is expressed as a 0-1 nonlinear programming problem, and the migration energy consumption is optimized. However, this technical solution does not fully consider the energy consumption cost. Only the cost of sending user service data from the source edge server to the target edge server when the user migrates the service is considered, ignoring the cost of the user's communication with the target server for a period of time before and after the user migration is completed. At the same time, the solution does not consider the problem of optimizing the delay time or service interruption caused by service migration.
[0004] Some other technicians formulate the service migration problem as a Markov decision process to optimize the service migration cost problem. By establishing a migration cost model to create a 2-D user movement probability model, the average migration probability is calculated based on the ratio of the number of user migrations at multiple times in the current area to the total number of users. The migration probability and migration cost are then used to search for the best target server for user service migration, thereby reducing the service cost. The disadvantages of this solution include: (1) This solution is only suitable for scenarios with high regional migration rates, that is, scenarios with a high probability of users moving to other edge service areas in a short period of time. It is not universal and is not applicable to service migration decisions for slow pedestrians. (2) The delay time caused by optimizing service migration is not considered.
[0005] In addition, some technicians have also tried to solve the decision-making problem of service migration through neural networks. The model is established using the locations of multiple users at different times. The model is trained, and then the deep neural network model is used to predict the user's location at the next moment and find the best target server for migration. At the same time, denoising is performed based on the scatter plot of the locations of multiple users at multiple times to remove abnormal points, and then training is performed to predict the user's location at the next moment. Finally, the cost model is used to predict the best server for service migration, reducing the delay of service migration. This technical solution has certain effectiveness, but this method requires a lot of prior knowledge to learn, does not consider optimizing service delay time, and the interpretability of deep learning is poor. Summary of the invention
[0006] In order to solve the problem that the existing service migration decision method does not fully consider all energy consumption losses of the source server and the target server in the migration service, and does not take into account the service delay time of the migration process; the present invention provides an edge service migration method, system and terminal based on three-branch decision.
[0007] The present invention is implemented by the following technical solutions:
[0008] An edge service migration method based on three-branch decision-making is used to determine the best switching time when a user switches between different edge servers. The migration method includes the following steps:
[0009] S1: Define an evaluation function v(u j ), evaluate the function v(u j ) is used to predict the user's movement status at the next moment;
[0010]
[0011] Where j represents the user number, M(u j ) is a motion trend function, M(u j ) represents the movement change trend of the user within the preset scanning period T; n represents the total number of scanning periods T corresponding to the current time interval.
[0012] S2: According to the three-branch decision-making idea, the evaluation function v(u j ) is divided into three areas represented by the value of , and the three areas are defined as the service migration area POS, the delay area BNG and the non-migration area NEG; the definitions of the three are as follows:
[0013] POS (α,β) (U) = {u j ∈U|v(u j )≥α}
[0014] BND(α,β) (U) = {u j ∈U|β<v(u j )<α}
[0015] NEG (α,β) (U) = {u j ∈U|v(u j )≤β}
[0016] Among them, α is the boundary threshold between the service migration area and the delay area; β is the boundary threshold between the delay area and the non-migration area; U represents the user list where each user is located.
[0017] S3: According to the power variation characteristics of the signal transmission of the edge server, the optimal energy consumption migration position for the user to perform service migration is calculated. At the optimal energy consumption migration position, the energy consumption cost of the user to perform the service migration task is the minimum. And the service migration process satisfies the following relationship:
[0018] E ss =E st +E m
[0019] Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source edge server SS; E st Represents the communication cost between the user and the target edge server ST.
[0020] S4: Obtain the exclusive service radius Rc and device service radius Rm of the edge server to which the user is currently connected; the circular area within the exclusive service radius is the area that the corresponding edge server can reach and is only served by the edge server, and the device service radius Rm is the farthest distance that the edge server can reach.
[0021] S5: Every preset scanning period T, obtain the distance d between the user and the edge server center in the current state, and then make the following decision:
[0022] (1) When d<Rc is satisfied, it is determined that the user will not leave the service range of the current edge server, and the user is classified into the migration rejection class, and no service migration request is issued.
[0023] (2) When Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified into the tracking and monitoring category. The status information of the current user is collected, and the evaluation function v(u j ) value, waiting for a service migration request to be issued.
[0024] S6: In the current user's evaluation function v(u j) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made:
[0025] (1) When v(u j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment. The edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once.
[0026] (2) When α<c(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value.
[0027] (3) When v(u j )≥α, the user is determined to be in the service migration area, and the edge server collects the user's current status information, including the current location and movement speed; then determines the user's latest migration location; the latest migration location satisfies:
[0028] R l =R m -V(u j )·t m
[0029] In the above formula, R l represents the distance from the latest migration location to the edge server center; V(u j ) represents the user's current speed; t m Indicates the service migration delay of the edge server.
[0030] S7: When the current user is located in the service migration area, the following decision is made based on the relationship between the user's current location, the latest migration location, and the optimal energy consumption migration location of the edge server:
[0031] (1) When the user's current location belongs to the latest migration location or meets the optimal energy consumption migration location, the service migration task is executed immediately.
[0032] (2) When the user's current location does not belong to the latest migration location and does not meet the optimal energy consumption migration location, the service migration task will not be executed.
[0033] As a further improvement of the present invention, in step S1, the motion trend function M(u j ) is as follows:
[0034]
[0035] In the above formula, d(uj ) TEM represents the distance between the initial position of the user numbered j and the edge server center in a scanning cycle; d(u j ) INI represents the distance between the end position of the user numbered j and the edge server center in a scanning cycle; the movement trend function M(u j ) is 1, -1, and 0, which respectively indicate that the current user is moving away from the edge server, approaching the edge server, and staying around the edge server.
[0036] As a further improvement of the present invention, in step S3, the service migration energy consumption cost E m The calculation formula is as follows:
[0037]
[0038] In the above formula, C represents the data size of the migration service; R represents the data transmission speed of the edge server; P represents the transmission power of the edge server, and its calculation formula is as follows:
[0039]
[0040] In the above formula, σ represents the noise power; d u is the distance between the edge server and the user's terminal device; λ is a coefficient in the channel attenuation factor g, and the calculation formula of the channel attenuation factor g is: g = d u / λ; SNR represents the signal-to-noise ratio of the transmitted signal, which is calculated by the following formula:
[0041] SNR = 2 R / W -1
[0042] In the above formula, W represents the channel bandwidth of the edge server.
[0043] As a further improvement of the present invention, when a user moves within the service range of a certain edge server, the communication energy consumption cost E between the user's terminal device and the edge server is s The calculation formula is as follows:
[0044]
[0045] In the above formula, t s Indicates the communication duration between the user's terminal device and the edge server.
[0046] As a further improvement of the present invention, in step S6, the user's current speed V(u j ) is calculated as follows:
[0047]
[0048] In the above formula, d i (u j ) TEM represents the distance between the initial position of the user numbered j and the edge server center in the i-th scanning cycle; d(u j ) INI represents the distance between the end position of the user numbered j and the edge server center at the i-th scanning cycle; T represents a scanning cycle;
[0049] Assume that the center distance between the user and the edge server is d ij ; Then the distance between the latest migration location and the edge server center satisfies:
[0050] d ij ≤R l .
[0051] As a further improvement of the present invention, in step S6, the service migration delay time t of the edge server m The calculation formula is as follows:
[0052] t m =t exe +t trans +t sendR
[0053] In the above formula, t exe represents the task execution time, which refers to the time it takes for user data to be calculated on the edge server; t trans Indicates the data transmission time, which refers to the time it takes for user data to be sent from the original edge server to the target edge server; t sendR Indicates the result transmission time, which refers to the time it takes for the calculation result to be sent from the edge server to the user device.
[0054] As a further improvement of the present invention, the edge server currently connected by the user in the delay area is defined as the source server, and the edge server connected after the service migration is performed is defined as the target server. In the delay area, according to the current speed V(j) of the user and the service migration delay time t m Calculate in advance the distance that the user moves during the service migration process as d delay , and then the distance from the edge of the service range of the target server is no more than d delay During service migration, users continue to stay connected to the source server to obtain computing support; at the same time, the source server transfers user data to the target server to ensure that the service migration process is completed before the user moves out of the service range of the source server.
[0055] The present invention also includes an edge service migration system based on three-branch decision making, which is used to generate a decision result of a user performing service migration within the service range of different edge servers by using the edge service migration method based on three-branch decision making as described above. The edge service migration system includes: an evaluation function updating unit, a region segmentation unit, an optimal energy consumption migration position calculation module, a state information acquisition module, a latest migration position calculation module, and a latest migration position calculation module.
[0056] The evaluation function update module is used to calculate the evaluation function v(u) used to evaluate and predict the user's movement state at the next moment based on the user's historical data in each scanning cycle T. j ) value.
[0057] The region segmentation module adopts a three-branch decision-making idea to evaluate the evaluation function v(u j ) is divided into three areas, which are defined as the service migration area POS, the delay area BNG and the non-migration area NEG respectively; wherein α is the boundary threshold of the service migration area and the delay area; β is the boundary threshold of the delay area and the non-migration area.
[0058] The optimal energy consumption migration position calculation module is used to determine the position where the lowest energy consumption state can be achieved when performing service migration between adjacent edge servers.
[0059] The status information acquisition module is used to obtain the exclusive service radius Rc, device service radius Rm, and service migration delay time t of each edge server. m , and obtain the user's current speed V(u j ) and the center distance d from the currently connected edge server; and calculate the movement trend function M(u j ) value.
[0060] The latest migration position calculation module is used to calculate the latest migration position of the user based on the information obtained by the status information acquisition module. The latest migration position is at a center distance R from the currently connected edge server. l , and satisfies: R l =R m -V(u j )·t m .
[0061] The migration instruction generation unit is used to generate instructions related to whether the user performs service migration between edge servers. The instruction generation process is as follows: every preset scanning cycle T, obtain the distance d of the user from the edge server center in the current state. When d<Rc is satisfied, it is determined that the user will not leave the service range of the current edge server, and the user is classified as a rejection migration class, and no service migration request is issued; when Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified as a tracking and monitoring class, and the current user's status information is collected, and the user's evaluation function v(u j ) value; in the current user's evaluation function v(u j ) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made: j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment; the edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; when α<v(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value; when v(u j )≥α, the user is determined to be located in the service migration area, and the edge server collects the user's current status information, including the current position and movement speed; then the user's latest migration position is determined; when the current user is located in the service migration area, the following decision is made based on the relationship between the user's current position, the latest migration position and the optimal energy consumption migration position of the edge server: when the user's current position belongs to the latest migration position or meets the optimal energy consumption migration position, the service migration task is executed immediately; when the user's current position does not belong to the latest migration position and does not meet the optimal energy consumption migration position, the service migration task is not executed.
[0062] As a further improvement of the present invention, the optimal energy consumption migration position determined by the optimal energy consumption migration position calculation module satisfies E ss =E st +E m ; Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source edge server SS; E st represents the communication cost between the user and the target edge server ST; under the optimal energy consumption migration position, the energy consumption cost of the user performing the service migration task is the minimum.
[0063] The present invention also includes an edge service migration terminal based on three-way decision making, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and is characterized in that when the processor executes the program, the steps of the edge service migration method based on three-way decision making as described above are implemented.
[0064] The technical solution provided by the present invention has the following beneficial effects:
[0065] The edge service migration method based on three-branch decision-making provided by the present invention divides the determination process of whether different users need to perform server migration more finely. In addition to the states of needing migration service and not needing migration service, a delay state is also introduced. In the delay state, the system will not immediately determine the user's service migration, but will consider the user's next state change and make more accurate decisions in a timely manner. In this way, it can effectively avoid the disadvantage that when the user wanders at the far end of the edge server service radius, the system will frequently perform service migration, which will lead to a significant increase in migration energy consumption. This decision-making method is more scientific and energy-saving than the existing method. At the same time, this method also has better rapid response characteristics, which overcomes the problem that when the user's motion state changes instantaneously, the system cannot respond to service migration in time, causing the user's network service to be interrupted.
[0066] The method of the present invention proposes the concept of the latest migration position. When the user always completes the service migration process before reaching the latest migration position, the service delay time can be optimized to ensure that the user's network service is not interrupted. The specific operation strategy and principle are as follows: When the user performs service migration at the latest migration position, the user continues to maintain a connection with the source server to obtain computing support. At the same time, the source server transmits the user data to the target server, which can ensure that the service migration process is completed before the user moves out of the service range of the current edge server, thereby reducing the service delay time.
[0067] In addition, the present invention also proposes the concept of optimal energy consumption migration location. This theory can greatly optimize the energy consumption cost during service migration. The current service migration strategy only considers the energy consumption cost generated by the source edge server migrating user data to the target edge server during migration, and does not consider the energy consumption cost generated by the communication when the user maintains a connection with the edge server. The method proposed by us makes service migration decisions while considering these two costs at the same time, so that more scientific decisions can be made based on more sufficient information, and a migration strategy with lower energy consumption cost can be given. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a flowchart of the steps of an edge service migration method based on three-branch decision-making provided in Example 1 of the present invention.
[0069] Figure 2 This is a schematic diagram of the relationship between various energy consumption costs generated between edge servers during the migration service process provided in Example 1 of the present invention.
[0070] Figure 3 This is a schematic diagram of the locations of the exclusive service radius and the device service radius of the edge server in Embodiment 1 of the present invention.
[0071] Figure 4 This is a program flow chart of the edge server network migration decision process in Example 1 of the present invention.
[0072] Figure 5 This is a module diagram of an edge service migration system based on three-branch decision-making provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0074] Example 1
[0075] When users move in a service network consisting of multiple edge servers, they may move from the service coverage of one edge server to the service coverage of another edge server. In this process, service migration between edge servers is required in a timely manner to ensure that users can obtain stable and continuous network services.
[0076] The traditional service migration strategy based on two-branch decision-making mainly makes migration decisions based on the distance between the user and different edge servers. This service migration strategy does not consider the user's mobility information. When the user's distance from the center of an edge server is greater than a critical value, the service migration is immediately performed. The disadvantage of this service migration strategy is that when the user wanders at the edge of the service range of a certain edge server, the service migration strategy based on two-branch decision-making may make service migration operations based on the user's location information in each time period. This will lead to problems such as excessive service migration frequency, significantly increased energy consumption costs, or service delays, thereby reducing the quality of network services.
[0077] For example, if a user moves randomly within the service range of an edge server, when the user is close to the edge server, it is difficult for the user to move out of the service range of the edge server in a short period of time, so there is no need to migrate the service. Other users who are far away from the edge server may migrate the service or not. For the latter, if the edge server makes a migration decision, but the user does not leave the service range of the current edge server, it will cause service delays or even service interruptions, seriously damaging the user's service experience. The technical solution provided by this implementation can solve the above problems of traditional service migration strategies.
[0078] Specifically, this embodiment provides an edge service migration method based on three-branch decision making, which is used to determine the best switching time when a user switches between different edge servers, such as Figure 1 As shown, the determination method includes the following steps:
[0079] S1: Define an evaluation function v(u j ), evaluate the function v(u j ) is used to predict the user's movement status at the next moment:
[0080]
[0081] Where j represents the user number, M(u j ) is a motion trend function, M(u j ) represents the movement change trend of the user within the preset scanning period T; n represents the total number of scanning periods T corresponding to the current time interval.
[0082] In this embodiment, the theoretical basis for defining the evaluation function to predict the user's motion state at the next moment is: for a certain user, if his movement trend does not change significantly in multiple consecutive time periods, then he should still maintain the motion trend in the current state in the next time period.
[0083] Based on the above theory, this embodiment uses a motion trend function to represent the user's motion trend. In the motion trend function, the trend of the user moving away from or approaching the edge server before and after a preset period is used as a state quantity to characterize the user's motion trend. j ) is as follows:
[0084]
[0085] In the above formula, d(u j ) TEM represents the distance between the initial position of the user numbered j and the edge server center in a scanning cycle; d(u j )INI represents the distance between the end position of the user numbered j and the edge server center in a scanning cycle; the movement trend function M(u j ) is 1, -1, and 0, respectively, indicating that the current user is moving away from the edge server, approaching the edge server, and staying or wandering around the edge server (i.e., the distance remains unchanged).
[0086] S2: According to the three-branch decision-making idea, the evaluation function v(u j ) is divided into three areas represented by the value of , and the three areas are defined as the service migration area POS, the delay area BNG and the non-migration area NEG; the definitions of the three are as follows:
[0087] POS (α,β) (U) = {u j ∈U|v(u j )≥α}
[0088] BND (α,β) (U) = {u j ∈U|β<v(u j )<α}
[0089] NEG (α,β) (U) = {u j ∈U|v(u j )≤β}
[0090] Among them, α is the boundary threshold between the service migration area and the delay area; β is the boundary threshold between the delay area and the non-migration area; U represents the user list where each user is located.
[0091] In this embodiment, based on the idea of three-branch decision, for all users in the service migration area, these users are very likely to leave the current edge server service range, so it is necessary to perform the service migration task as soon as possible. For all users in the delay area, it is temporarily difficult to determine the user's mobility trend, so it is impossible to quickly determine whether to perform service migration or continue to wait. Therefore, delay processing can be performed for these users, and user information continues to be collected for the next round of judgment. For all users in the non-migration area, these users will not migrate in a short time, so the edge server will not collect user information in the next cycle.
[0092] S3: According to the power variation characteristics of the signal transmission of the edge server, the optimal energy consumption migration position for the user to perform service migration is calculated. Under the optimal energy consumption migration position, the energy consumption cost of the user to perform the service migration task is the minimum.
[0093] When solving the optimal energy consumption migration position of the edge server, for the sake of convenience, the edge server that the user is currently connected to is called the source server, and the edge server that the user transfers to after performing service migration is called the target server. Figure 2 As shown in the figure, assuming that during the user's service migration, the source server packages and transmits user data to the target server, the energy consumption cost of the service migration process is E m At the same time, the user also needs to maintain communication with the source server at all times. The communication cost between the user and the source server is E ss Assuming that the communication cost between the user and the target server is E st When E ss ≤E st +E m , it means that the energy cost of users maintaining connection with the source server is the lowest, and not migrating services is the optimal decision. ss ≥E st +E m When , it means that the energy cost of connecting to the target server after service migration is the smallest, and service migration is the optimal decision at this time. Combining the above content, it can be found that if you want to ensure the minimum energy cost when executing the service migration task, the optimal energy consumption migration position of the service migration process should satisfy the following relationship:
[0094] E ss =E st +E m
[0095] Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source server SS; E st Represents the communication cost between the user and the target server ST.
[0096] In this embodiment, the energy consumption cost of communication and service migration between the user and the edge server is calculated as follows:
[0097] First, according to the Shannon formula, the signal-to-noise ratio calculation formula is as follows:
[0098] SNR = 2 R / W -1
[0099] In the above formula, W represents the channel bandwidth of the edge server; R represents the data transmission speed of the edge server and is determined by the channel bandwidth W; SNR represents the signal-to-noise ratio.
[0100] According to the signal-to-noise ratio formula, the transmission power P of the edge server can also be calculated. The calculation formula is as follows:
[0101]
[0102] In the above formula, σ represents the noise power; d u is the distance between the edge server and the user's terminal device; λ is a coefficient in the channel attenuation factor g, and the calculation formula of the channel attenuation factor g is: g = d u / λ, the value is specified by experts. SNR represents the signal-to-noise ratio of the transmitted signal.
[0103] When a user leaves the current edge server, the edge server migrates the user service. The energy cost of the service migration process is mainly related to the amount of data involved in the service migration process, the data transmission speed of the edge server, and the power generation of the edge server. At this time, the service migration energy cost E m The calculation formula is as follows:
[0104]
[0105] In the above formula, C represents the data size of the migration service; R represents the data transmission speed of the edge server.
[0106] When a user moves within the service range of an edge server, the user's terminal device always maintains communication with the edge server to obtain the data results returned by the edge server. Assume that the communication time between the user and the edge server is t s According to the transmission power P, the communication energy consumption cost E between the user's terminal device and the edge server can be obtained s The calculation formula is as follows:
[0107]
[0108] S4: Obtain the exclusive service radius Rc and device service radius Rm of the edge server to which the user is currently connected; the circular area within the exclusive service radius is the area that the corresponding edge server can reach and is only served by the edge server, and the device service radius Rm is the farthest distance that the edge server can reach.
[0109] Each edge server will optimize its position during deployment to ensure that a larger service range can be covered with as few edge servers as possible. Specifically, the overlap between the coverage of services provided by each edge server and the coverage of services provided by other edge servers should be minimized.
[0110] On this basis, an exclusive coverage area for each edge server is generated. This area is usually radiated outward from the center of the edge server to form a circular area, and this part is closer to the center of the edge server. In this implementation, this part of the local area is defined as an exclusive service area, and the distance from the exclusive service area to the center of the edge server is called the exclusive service radius Rc. Generally speaking, the exclusive service area is not the farthest end that the network service provided by a certain edge server can reach. In this embodiment, the farthest distance that the edge service area can reach is called the device service radius Rm of the edge server. The location diagram of the two is roughly as follows: Figure 3 shown.
[0111] S5: When a user is connected to an edge server and moves within the service coverage of the edge server, the edge server obtains the distance d between the user and the edge server center in the current state every preset scanning period T, and then makes the following decision:
[0112] (1) When d<Rc is satisfied, it is determined that the user will not leave the service range of the current edge server, and the user is classified into the migration rejection class, and no service migration request is issued.
[0113] (2) When Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified into the tracking and monitoring category. The current user's status information is collected, the value of the user's evaluation function v(j) is updated, and a service migration request is waited for.
[0114] The reason for making the above decision is that for users whose distance from the edge server center is d<Rc, these users are too close to the edge server. And they are still in the service-exclusive server of the edge server. Even if the user is ready to move away from the exclusive server, it will take a long time to reach a location beyond the service radius Rm of the edge server device. At least before the next preset period arrives, the user cannot reach Rm. Therefore, these users should be classified as refused migration, and the service should be maintained for these users without service migration.
[0115] For users whose distance d from the edge server center satisfies Rc≤d<Rm, the situation is relatively complicated. These users may reach a location beyond the service range in a short period of time, so it is necessary to determine whether the user has a trend of moving away from the edge server center. That is, it is necessary to track and monitor the users in the area. If the user has a trend of moving away from the edge server, consider service migration. If the user has a trend of moving close to the edge server, consider continuing to provide network services without service migration. In this embodiment, the user's next movement trend is predicted by updating the user's evaluation function v(j).
[0116] S6: In the current user's evaluation function v(u j ) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made:
[0117] (1) When v(u j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment. The edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; this can reduce the energy consumption of the device.
[0118] (2) When α<c(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value; keep tracking and monitoring the user continuously.
[0119] (3) When v(u j )≥α, the user is determined to be in the service migration area, and the edge server collects the user's current status information, including the current location and movement speed; and then determines the user's latest migration location.
[0120] In this embodiment, considering that the user may easily experience service delay or even service interruption when switching edge servers during service migration, the concept of the latest migration position is proposed. The latest migration position refers to the latest position where the user should perform service migration, that is, the user should complete service migration before the latest migration position. If the position is exceeded, service delay or service interruption may occur. This position is the bottom limit position for the user to perform service migration operations.
[0121] Assume that the latest migration location of a user is R away from the center of the edge server l , then the user reaches R l Before the service migration is performed, it can continue to maintain the connection with the source server to obtain computing support. At the same time, the source server transfers the user data to the target server, thereby ensuring that the service migration process is completed before the user moves out of the service range of the current edge server, reducing the service migration delay time and optimizing the user service experience. Among them, the latest migration position must satisfy: Rc≤R l <Rm.
[0122] Specifically, in this embodiment, the latest migration position should satisfy:
[0123] R l =R m -V(u j )·tm
[0124] In the above formula, R l represents the distance from the latest migration location to the edge server center; V(u j ) represents the user's current speed; t m Indicates the service migration delay of the edge server.
[0125] Among them, the user's current speed V(u j ) is calculated as follows:
[0126]
[0127] In the above formula, d i (u j ) TEM represents the distance between the initial position of the user numbered j and the edge server center in the i-th scanning cycle; d(u j ) INI represents the distance between the end position of the user numbered j and the edge server center at the i-th scanning cycle; T represents a scanning cycle;
[0128] Assume that the center distance between the user and the edge server is d ij ; In order to ensure that users do not experience service delays or network disconnection during the service migration process, the distance between the latest migration location and the edge server center must meet the following requirements: d ij ≤R l That is, the location where the user performs service migration should be earlier than the latest migration location.
[0129] In this embodiment, a complete service migration process involves three stages: local execution of tasks, data transmission, and result return. Therefore, the service migration delay time t of the edge server is m It should also include the total time to complete the three phases of work, the service migration delay time t m The calculation formula is as follows:
[0130] t m =t exe +t trans +t sendR
[0131] In the above formula, t exe represents the task execution time, which refers to the time it takes for user data to be calculated on the edge server; t trans Indicates the data transmission time, which refers to the time it takes for user data to be sent from the original edge server to the target edge server; t sendR Indicates the result transmission time, which refers to the time it takes for the calculation result to be sent from the edge server to the user device.
[0132] S7: When the current user is located in the service migration area, the following decision is made based on the relationship between the user's current location, the latest migration location, and the optimal energy consumption migration location of the edge server:
[0133] (1) When the user's current location belongs to the latest migration location or meets the optimal energy consumption migration location, the service migration task is executed immediately.
[0134] (2) When the user's current location does not belong to the latest migration location and does not meet the optimal energy consumption migration location, the service migration task will not be executed.
[0135] In this embodiment, when a user is included in the service migration area, it means that the user will leave the service range of the current edge server in a short time, so service migration is required. The question that needs to be considered at this time is at what time to start the task of service migration. In this embodiment, the optimal energy consumption migration position and the latest migration position are used as restrictive conditions for determining when the user performs service migration. In fact, the optimal energy consumption migration position and the latest migration position do not necessarily coincide. The optimal energy consumption migration position is the best position for performing service migration. If the conditions are met, the service migration is performed immediately. However, if the conditions cannot be met, it is necessary to consider whether the latest migration position is reached. When the latest migration position is reached, even if the conditions of the optimal energy consumption position are still not met, the service migration task must be performed immediately. That is, it is uncertain which condition of the optimal energy consumption migration position and the latest migration position is met first. In the actual instruction execution process, the service migration instruction should be executed as long as one of the two is met.
[0136] The following combination Figure 4 The decision-making process of how the edge server performs the service migration task timing in this embodiment is described as follows:
[0137] (1) Each edge server obtains a user list U of all users currently connected to it, initializes the positions of all users in the user list, and a preset scanning period T.
[0138] (2) When the user list U is not empty, take out the first user u in the queue one by one i , and calculate the current movement speed V(u j ), the center distance d from the edge server i , and the evaluation function v(u j ) and make the following judgment:
[0139] A. If the center distance d between the user and the edge server satisfies: d<Rc, it is judged that the user is close to the edge server at this time and service migration will not be performed in a short time. The user is classified as a rejected migration class and will not be scanned in the next cycle until the next cycle is entered.
[0140] B. If the distance d between the user and the edge server center satisfies: Rc≤d<Rm, the user may leave the currently connected edge server in a short period of time and need to migrate services. Therefore, in order to further determine whether the user is indeed leaving the service range of the edge server, the value of the user's evaluation function needs to be further updated.
[0141] (3) Calculate the optimal energy consumption migration position corresponding to the current edge server, and update the evaluation function v(u j ) value to make the following judgment:
[0142] A. The value of the evaluation function v(u j )≤β, the user is determined to be in the service range of the currently connected scanning server for multiple consecutive scanning cycles and is getting closer to the edge server. The user will not leave the service range of the corresponding edge server at the current moment, and the user is classified as a non-migration area. The edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; this can reduce the energy consumption of the device.
[0143] B. If the value of the evaluation function α<v(u j )<β, it means that the user may be constantly wandering in the service range of the edge server, and the user needs to be continuously tracked and monitored. Therefore, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value.
[0144] C. If the value of the evaluation function v(u j )≥α, it means that the user has been moving away from the edge server in the past multiple connection cycles. That is, the user is determined to be in the service migration area. The edge server collects the user's current state information, including the current location and movement rate; then determines the user's latest migration location, and performs service migration for the user when the user reaches the optimal energy consumption migration location or the latest migration location.
[0145] (4) In each scanning cycle T, a judgment and decision-making process is completed for all users in the user list U, which is a work round. After completing one round, the next round begins.
[0146] Example 2
[0147] This embodiment provides an edge service migration system based on three-branch decision making, which is used to adopt the edge service migration method based on three-branch decision making in Embodiment 1 to generate a decision result for a user to perform service migration within the service range of different edge servers. Figure 5 As shown, the edge service migration system includes: an evaluation function updating unit, a region segmentation unit, an optimal energy consumption migration position calculation module, a state information acquisition module, a latest migration position calculation module, and a latest migration position calculation module.
[0148] The evaluation function update module is used to calculate the evaluation function v(u) used to evaluate and predict the user's movement state at the next moment based on the user's historical data in each scanning cycle T. j ) value.
[0149] The region segmentation module adopts a three-branch decision-making idea to evaluate the evaluation function v(u j ) is divided into three areas, which are defined as the service migration area POS, the delay area BNG and the non-migration area NEG respectively; wherein α is the boundary threshold of the service migration area and the delay area; β is the boundary threshold of the delay area and the non-migration area.
[0150] The optimal energy consumption migration position calculation module is used to determine the position where the lowest energy consumption state can be achieved when performing service migration between adjacent edge servers.
[0151] The status information acquisition module is used to obtain the exclusive service radius Rc, device service radius Rm, and service migration delay time t of each edge server. m , and obtain the user's current speed V(u j ) and the center distance d from the currently connected edge server, and calculates the movement trend function M(u j ) value.
[0152] The latest migration position calculation module is used to calculate the latest migration position of the user based on the information obtained by the status information acquisition module. The latest migration position is at a center distance R from the currently connected edge server. l , and satisfies: R l =R m -V(u j )·t m .
[0153] The migration instruction generation unit is used to generate instructions related to whether the user performs service migration between edge servers. The instruction generation process is as follows: every preset scanning cycle T, obtain the distance d of the user from the edge server center in the current state. When d<Rc is satisfied, it is determined that the user will not leave the service range of the current edge server, and the user is classified as a rejection migration class, and no service migration request is issued; when Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified as a tracking and monitoring class, and the current user's status information is collected, and the user's evaluation function v(u j ) value; in the current user's evaluation function v(u j ) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made: j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment; the edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; when α<v(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value; when v(u j )≥α, the user is determined to be located in the service migration area, and the edge server collects the user's current status information, including the current position and movement speed; then the user's latest migration position is determined; when the current user is located in the service migration area, the following decision is made based on the relationship between the user's current position, the latest migration position and the optimal energy consumption migration position of the edge server: when the user's current position belongs to the latest migration position or meets the optimal energy consumption migration position, the service migration task is executed immediately; when the user's current position does not belong to the latest migration position and does not meet the optimal energy consumption migration position, the service migration task is not executed.
[0154] As a further improvement of the present invention, the optimal energy consumption migration position determined by the optimal energy consumption migration position calculation module satisfies E ss =E st +E m ; Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source edge server SS; E st represents the communication cost between the user and the target edge server ST; under the optimal energy consumption migration position, the energy consumption cost of the user performing the service migration task is the minimum.
[0155] Example 3
[0156] This embodiment provides an edge service migration terminal based on three-way decision making, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the edge service migration method based on three-way decision making in Embodiment 1 are implemented.
[0157] The computer device may be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. The computer device of this embodiment includes at least but is not limited to: a memory and a processor that can communicate with each other through a system bus.
[0158] In this embodiment, the memory (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Of course, the memory may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store an operating system and various application software installed on the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.
[0159] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is generally used to control the overall operation of a computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data to implement the processing of the edge service migration method based on three decisions as in Example 1, so that when the user moves within the service range of different edge servers, the edge server can complete the service migration in time, ensure that the user enjoys a stable network service, and improve the network delay problem. At the same time, the energy consumption of the service migration process is minimized through policy optimization.
[0160] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for migrating edge services based on three-branch decision making, which is used to determine the best switching time when a user switches between different edge servers, characterized in that: The migration method comprises the following steps: S1: Define an evaluation function v(u j ), the evaluation function v(u j ) is used to predict user u j The moving state at the next moment; Where j represents the user number, M(u j ) is a motion trend function, M(u j ) represents the movement change trend of the user within the preset scanning period T; n represents the total number of scanning periods T corresponding to the current time interval; S2: According to the three-branch decision-making idea, the evaluation function v(u j ) is divided into three areas represented by the value of , and the three areas are defined as the service migration area POS, the delay area BNG and the non-migration area NEG; the definitions of the three are as follows: PoS (α,β) (U)={u j ∈U|v(u j )≥α} GNI (α,β) (U)={u j ∈U|β<v(u j )<α} NEG (α,β) (You)={you j ∈U|v(u j )≤β} Among them, α is the boundary threshold of the service migration area and the delay area; β is the boundary threshold of the delay area and the non-migration area; U represents the user list; S3: Calculate the optimal energy consumption migration position for the user to perform service migration based on the power variation characteristics of the signal transmission of the edge server; at the optimal energy consumption migration position, the energy consumption cost of the user to perform the service migration task is minimal; and the service migration process satisfies the following relationship: AND ss =And st +E m Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source edge server SS; E st represents the communication cost between the user and the target edge server ST; S4: Obtain the exclusive service radius Rc and device service radius Rm of the edge server to which the user is currently connected; the circular area within the exclusive service radius is the area that the corresponding edge server can reach and is only provided with services by the edge server; the device service radius Rm is the farthest distance that the edge server can reach; S5: Every preset scanning period T, obtain the distance d between the user and the edge server center in the current state, and then make the following decision: (1) When d < Rc, it is determined that the user will not leave the service range of the current edge server, and the user is classified as a migration rejection class, and no service migration request is issued; (2) When Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified into the tracking and monitoring category. The status information of the current user is collected, and the evaluation function v(u j ) value; Waiting for a service migration request to be issued; S6: In the current user's evaluation function v(u j ) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made: (1) When v(u j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment; the edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; (2) When α<v(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value; (3) When v(u j )≥α, the user is determined to be in the service migration area, and the edge server collects the user's current status information, including the current location and movement speed; then determines the user's latest migration location; the latest migration location satisfies: R l =R m -V(u j )·t m In the above formula, R l represents the distance from the latest migration location to the edge server center; V(u j ) represents the user's current speed; t m Indicates the service migration delay time of the edge server; S7: When the current user is in the service migration area, the following decision is made based on the relationship between the user's current location, the latest migration location, and the optimal energy consumption migration location: (1) When the user's current location belongs to the latest migration location or meets the optimal energy consumption migration location, the service migration task is executed immediately; (2) When the user's current location does not belong to the latest migration location and does not meet the optimal energy consumption migration location, the service migration task will not be executed.
2. The edge service migration method based on three-branch decision-making as claimed in claim 1, characterized in that: In step S1, the motion trend function M(u j ) is as follows: In the above formula, d(u j ) TEM Indicates user u with ID j j The distance between the initial position of a scanning cycle and the edge server center; d(u j ) INI Indicates user u with ID j j The distance between the end position of a scanning cycle and the center of the edge server; the motion trend function M(u j ) is 1, -1, and 0, which respectively indicate that the current user is moving away from the edge server, approaching the edge server, and staying around the edge server.
3. The edge service migration method based on three-branch decision-making as claimed in claim 1, characterized in that: In step S3, the energy cost of service migration E m The calculation formula is as follows: In the above formula, C represents the data size of the migration service; R represents the data transmission speed of the edge server; P represents the transmission power of the edge server, and its calculation formula is as follows: In the above formula, σ represents the noise power; d u is the distance between the edge server and the user's terminal device; λ is a coefficient in a channel attenuation factor g, and the calculation formula of the channel attenuation factor g is: g = d u / λ; SNR represents the signal-to-noise ratio of the transmitted signal, which is calculated by the following formula: SNR=2 R / W -1 In the above formula, W represents the channel bandwidth of the edge server.
4. The edge service migration method based on three-branch decision making as claimed in claim 3, characterized in that: When a user moves within the service range of an edge server, the communication energy consumption cost E between the user's terminal device and the edge server is s The calculation formula is as follows: In the above formula, t s Indicates the communication duration between the user's terminal device and the edge server.
5. The edge service migration method based on three-branch decision making as claimed in claim 1, characterized in that: In step S6, the user's current speed V(u j ) is calculated as follows: In the above formula, d i (u j ) TEM represents the distance between the initial position of the user numbered j and the edge server center in the i-th scanning cycle; d(u j ) INI represents the distance between the end position of the user numbered j and the edge server center at the i-th scanning cycle; T represents a scanning cycle; Assume that the center distance between the user and the edge server is d ij ; Then the distance between the latest migration location and the edge server center satisfies: d ij ≤R l 。 6. The edge service migration method based on three-branch decision making as claimed in claim 5, characterized in that: In step S6, the service migration delay time t of the edge server m The calculation formula is as follows: t m =t exe +t trans +t sendR In the above formula, t exe Indicates the task execution time, which refers to the time it takes for user data to be calculated on the edge server; t trans Indicates data transmission time, which refers to the time it takes for user data to be sent from the original edge server to the target edge server; t sendR Indicates the result transmission time, which refers to the time it takes for the calculation result to be sent from the edge server to the user device.
7. The edge service migration method based on three-branch decision making as claimed in claim 6, characterized in that: Define the edge server that the user connects to in the delay area as the source server, and the edge server that the user connects to after service migration is the target server; in the delay area, according to the current speed V(u j ) and service migration delay time t m Calculate in advance the distance that the user moves during the service migration process as d delay , and then the distance from the edge of the service range of the target server is no more than d delay Migrate in advance to the location of During service migration, users continue to maintain connection with the source server to obtain computing support; at the same time, the source server transfers user data to the target server to ensure that the service migration process is completed before the user moves out of the service range of the source server.
8. An edge service migration system based on three-branch decision making, characterized in that: It is used to adopt the edge service migration method based on three-branch decision as described in any one of claims 1 to 7 to generate a decision result of the user performing service migration within the service range of different edge servers; The edge service migration system includes: The evaluation function update module is used to calculate the evaluation function v(u) used to evaluate and predict the user's movement state at the next moment based on the user's historical data in each scanning cycle T. j ) value; The region segmentation module adopts a three-branch decision-making idea to evaluate the evaluation function v(u j ) is divided into three areas represented by the value of , and the three areas are defined as the service migration area POS, the delay area BNG and the non-migration area NEG; where α is the boundary threshold of the service migration area and the delay area; β is the boundary threshold of the delay area and the non-migration area; The optimal energy consumption migration position calculation module is used to determine the position where the lowest energy consumption can be achieved when performing service migration between adjacent edge servers; The status information acquisition module is used to obtain the exclusive service radius Rc, device service radius Rm, and service migration delay time t of each edge server. m , and obtain the user's current speed V(u j ) and the center distance d from the currently connected edge server; and calculate the movement trend function M(u j ) value; The latest migration position calculation module is used to calculate the latest migration position of the user according to the information obtained by the status information acquisition module. The latest migration position is at a distance R from the center of the currently connected edge server. l , and satisfies: R l =R m -V(u j )·t m ;as well as The migration instruction generation module is used to generate instructions related to whether the user performs service migration between edge servers; the instruction generation process is as follows: every preset scanning cycle T, obtain the distance d of the user from the edge server center in the current state. When d<Rc is satisfied, it is determined that the user will not leave the service range of the current edge server, and the user is classified into the rejection migration class, and no service migration request is issued; when Rc≤d<Rm is satisfied, it is determined that the user has the possibility of leaving the service range of the current server, and the user is classified into the tracking and monitoring class, and the current user's status information is collected, and the user's evaluation function v(u j ) value; in the current user's evaluation function v(u j ) is updated, the relationship between this value and the boundary thresholds α and β is determined, and the following decision is made: j )≤β, the user is determined to be in a non-migration area and will not leave the service range of the corresponding edge server at the current moment; the edge server does not collect the user's status information in the next scanning cycle T and stops updating the evaluation function v(u j ) value once; when α<v(u j )<β, the user is determined to be in the delay area, and the edge server continues to collect the user's status information in the next scanning cycle and updates the user's evaluation function v(u j ) value; when v(u j )≥α, the user is determined to be located in the service migration area, and the edge server collects the user's current status information, including the current position and movement speed; then the user's latest migration position is determined; when the current user is located in the service migration area, the following decision is made based on the relationship between the user's current position, the latest migration position and the optimal energy consumption migration position of the edge server: when the user's current position belongs to the latest migration position or meets the optimal energy consumption migration position, the service migration task is executed immediately; when the user's current position does not belong to the latest migration position and does not meet the optimal energy consumption migration position, the service migration task is not executed.
9. The edge service migration system based on three-branch decision making as claimed in claim 8, characterized in that: The optimal energy consumption migration position determined by the optimal energy consumption migration position calculation module satisfies E ss =E st +E m ; Among them, E m represents the energy cost of service migration; E ss represents the communication cost between the user and the source edge server SS; E st represents the communication cost between the user and the target edge server ST; under the optimal energy consumption migration position, the energy consumption cost of the user performing the service migration task is the minimum.
10. An edge service migration terminal based on three-branch decision making, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that when the processor executes the program, the steps of the edge service migration method based on three-branch decision-making as described in any one of claims 1 to 7 are implemented.