A mobile perception task offloading method and device based on hidden Markov model

By constructing a hidden Markov model and genetic algorithm optimization, combining user mobility trajectories with edge networks, the suboptimal decision-making and prediction accuracy problems of mobile perception task offloading in existing technologies are solved, and low-latency and high-stability task offloading is achieved.

CN118377546BActive Publication Date: 2025-09-16NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410226274.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-09-16
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

Existing mobility-aware task offloading strategies fail to effectively combine user mobility with edge network scenarios, resulting in suboptimal offloading decisions and low accuracy in user trajectory prediction, increasing latency and energy consumption.

Method used

A method based on hidden Markov model is used to build an edge network scenario model, obtain user movement trajectories, train the model through maximum likelihood estimation, and use genetic algorithm to optimize task offloading decisions to minimize the total system delay.

Benefits of technology

The accuracy of the mobile perception model and the stability of offloading decisions are improved, the overall latency of the task offloading system is reduced, and users' requirements for high stability and low latency are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377546B_ABST
    Figure CN118377546B_ABST
Patent Text Reader

Abstract

The present invention discloses a mobile perception task offloading method and device based on a hidden Markov model. The method comprises: constructing an edge network scenario model, configuring location information of an edge server and a user, and obtaining the user's movement trajectory; constructing a hidden Markov model based on the movement trajectories of multiple users, and training the model by a maximum likelihood estimation method; in response to obtaining a task offloading request issued by the user, taking multiple closest trajectory points in the user's movement trajectory, and obtaining a trajectory point prediction at the next moment based on the trained hidden Markov model; calculating the total delay of the task offloading based on the trajectory point at the current moment and the trajectory point prediction at the next moment; and obtaining a final task offloading decision by iterative optimization using a genetic algorithm with the goal of minimizing the total system delay. The present invention can effectively improve the prediction accuracy of the user's movement trajectory and generate an optimal task offloading decision at the same time, so as to meet the user's low-latency, high-quality network service requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing technology, and in particular to a mobile perception task offloading method and device based on a hidden Markov model. Background Art

[0002] When a mobile device needs to handle a computationally intensive task, it struggles to complete it within a limited timeframe due to its limited computing power and battery capacity. Therefore, computationally intensive tasks are typically offloaded to servers with sufficient computing resources. Mobile edge computing introduces the concept of task offloading, which shifts computing tasks from mobile devices to edge servers, thereby reducing the burden on mobile devices and improving system performance and user experience.

[0003] Edge networks categorize computing tasks on mobile devices based on their characteristics. Based on the task's requirements and available resources, the mobile device decides whether to offload the task to an edge server and selects the appropriate edge server for offloading. To minimize task response latency, edge networks typically offload computing tasks to the nearest edge server.

[0004] However, user devices do not stay in one area for task offloading. Instead, they constantly change their locations over time. The user's regional mobility increases the delivery time of computing tasks and reduces the quality of network services. Imagine a scenario where mobile users in different areas are connected to corresponding 5G base station servers (roadside / rooftop units). The base station has network, computing, and storage capabilities. Mobile users submit some compute-intensive tasks to nearby servers. However, due to fast mobility, users will immediately switch to another base station after submitting the workflow to the previously associated server. Once the mobile user leaves the previous edge server, the offloading task will fail, thereby extending the response time of the mobile application. This offloading failure will lead to a waste of energy and computing resources.

[0005] Existing mobility-aware task offloading strategies separate mobility sensing and task offloading, without integrating edge network scenarios into user mobility modeling. This isolates user trajectory information from the edge network environment, resulting in suboptimal offloading decisions and increased latency and energy consumption. Furthermore, most existing mobility-aware models use a single location as the hidden state of a statistical probability model, which results in insufficient prior information and reduces model accuracy. Summary of the Invention

[0006] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a mobile perception task offloading method and device based on a hidden Markov model, which can solve the technical problems that the prior art means cannot produce optimal offloading decisions and the user movement trajectory prediction accuracy is low.

[0007] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0008] In a first aspect, the present invention provides a method for offloading mobile sensing tasks based on a hidden Markov model, comprising:

[0009] Build an edge network scenario model, configure edge servers and user location information, and obtain user movement trajectories;

[0010] Constructing a hidden Markov model based on the movement trajectories of multiple users, and training the hidden Markov model by using a maximum likelihood estimation method;

[0011] In response to receiving a task offloading request from a user, taking a plurality of closest trajectory points in the user's movement trajectory, and obtaining a trajectory point prediction at the next moment based on the trained hidden Markov model;

[0012] Calculate the total delay of task offloading based on the trajectory points at the current moment and the trajectory points predicted at the next moment;

[0013] With the goal of minimizing the total system delay, a fitness function is designed and the final task offloading decision is obtained through iterative optimization of the genetic algorithm.

[0014] Optionally, the edge network scenario model is constructed:

[0015] Determine N edge servers E = {e1, e2, ...e N The service scope of} divides the network space into N edge network scenarios O = {o1, o2, ...o N};

[0016] The location information of the edge server es n for:

[0017] es n ={x n ,y n}, n = 1, 2, ... N

[0018] Where es n is the location information of the nth edge server, x n ,y n are the longitude and latitude of the nth edge server respectively;

[0019] The user's location information for:

[0020]

[0021] Where, is the location information of the u-th user at time t, are the longitude and latitude of the u-th user at time t;

[0022] The obtaining of the user's movement trajectory includes:

[0023] Calculate the distance d between the u-th user and the n-th edge server at time t based on the Haversine formula t (u,e n ):

[0024]

[0025] Where R is the radius of the earth;

[0026] According to the distance d t (u,e n ) Determine the edge network scenario o corresponding to the nearest edge server of the u-th user at time t t :

[0027]

[0028] The edge network scenario o corresponding to the u-th user at time t t As the trajectory point, obtain the movement trajectory S of the u-th user = {o 1 , o 2 ,...o T}, t=1, 2, ...T.

[0029] Optionally, constructing a hidden Markov model based on the movement trajectories of multiple users includes:

[0030] The moving trajectory is used as the hidden state, and the hidden state set Q = {q1, q2, ...q M}, m = 1, 2, ... M, q m is the mth moving trajectory, M is the total number of moving trajectories;

[0031] Taking the edge network scenario as the observation state, construct the observation state set O = {o1, o2, ...o N};

[0032] Construct the initial probability distribution π={π1,π2,...π M},π m =P(q(0)=q m ),π m The hidden state at time t = 0 is qm probability;

[0033] Construct hidden state transition probability matrix a m1,m2 =P(q(t+1)=q m2 |q(t)=q m1 ), m1, m2=1, 2,...M, a m1,m2 The hidden state at time t is q m1 Transfer to the hidden state at time t+1 to q m2 probability;

[0034] Constructing the observation state generation probability matrix b m (o n )=P(o n |q m ), b m (o n ) is the hidden state q m Generate observation state o n probability;

[0035] Construct a hidden Markov model λ based on the initial probability distribution π, the hidden state transition probability matrix A, and the observation state generation probability matrix B:

[0036] λ={π,A,B}

[0037] Optionally, obtaining a trajectory point prediction at the next moment based on the trained hidden Markov model includes:

[0038] Store the closest points in the user's trajectory into vector x:

[0039] x={o 0_1 , o 0_2 ,...o 0_k}

[0040] Where k is the total number of the closest trajectory points;

[0041] Search all moving trajectories containing vector x in the hidden state set Q and store them in the set φ;

[0042] For each moving trajectory S in the set φ i ∈φ, get the moving trajectory S i The observation state O corresponding to the first k+1 trajectory points i ={o i_1 , o i_2 ,...o i_k+1};

[0043] Initialize the Viterbi variables:

[0044] v1(m1)=π m1 b m1 (o i_1 )

[0045] The Viterbi forward variable v is obtained by recursive calculation 2:k+1 (m2):

[0046]

[0047] For all Viterbi variables v s (m2), s = 2, 3, ... k + 1, find the maximum Viterbi variable transition probability P * :

[0048] P * =max{v s (m2)}

[0049] [P * , S j ] is stored in the vector γ;

[0050] After traversing all the moving trajectories in the set φ, find the one with the largest transition probability P in the vector γ * The moving trajectory S of the Viterbi variable pred :

[0051]

[0052] Take the moving trajectory S pred The last trajectory point is used as the trajectory point prediction of the user at the next moment.

[0053] Optionally, the total delay of the computing task offloading includes:

[0054] The edge servers corresponding to the user's current and next moment trajectory points are recorded as local servers and receiving servers, and the target edge server where the user offloads the task is recorded as the target server;

[0055] The total delay T for the task offloading total for:

[0056] T total =T1+T2+T3+T4+T5

[0057] Where T1 is the time when the user uploads the task to the local server at the current moment, T2 is the time when the local server uploads the task to the target server, T3 is the time when the target server calculates the task, T4 is the time when the target server uploads the calculation result to the receiving server, and T5 is the time when the receiving server uploads the calculation result to the user; T1, T4, and T5 are recorded as 0;

[0058]

[0059]

[0060] Where n1 and n2 are the local server and the target server respectively, r n1,n2 、v n1,n2 are the transmission rate and transmission power of the local server uploading the task to the target server, W n2 is the available bandwidth of the target server, D n1,n2 is the amount of task data uploaded from the local server to the target server, s n1,n2 is the channel gain between the local server and the target server, N0 is the noise power spectral density;

[0061]

[0062] Where R n2 is the CPU computing capacity of the target server, C n1,n2 The number of CPU cycles required for the task of uploading data from the local server to the target server.

[0063] Optionally, obtaining the final task offloading decision through iterative optimization using a genetic algorithm includes:

[0064] Initialization: Initialize the population, where each chromosome represents a task offloading decision;

[0065] Selection operation: bring each chromosome in the population into the fitness function and select the G chromosomes with the best fitness as the parent chromosomes; the fitness function is f = -T total ;

[0066] Crossover operation: Pair the parent chromosomes in pairs. For each pairing result, select a crossover point in the chromosome sequences of the two parent chromosomes, cut at the crossover point, exchange the cut fragments, generate two new daughter chromosomes, and add the two generated new daughter chromosomes to the next generation population.

[0067] Mutation operation: For each parent chromosome, randomly select a mutation site in its chromosome sequence, randomly change the genetic information of the selected mutation site to obtain the mutated daughter chromosome, and add the mutated daughter chromosome to the next generation population;

[0068] Repeat the above selection, crossover, and mutation operations until the preset number of iterations is reached or the fitness converges, and output the final population;

[0069] The chromosome with the highest fitness is selected from the final population as the final task offloading decision.

[0070] In a second aspect, the present invention provides a mobile sensing task offloading device based on a hidden Markov model, the device comprising:

[0071] The mobile trajectory acquisition module is used to build an edge network scenario model, configure edge servers and user location information, and obtain user movement trajectories;

[0072] A model building and training module is used to build a hidden Markov model based on the movement trajectories of multiple users and train the hidden Markov model through maximum likelihood estimation method;

[0073] a trajectory point prediction module, configured to, in response to a task offloading request received from a user, obtain a plurality of closest trajectory points in the user's movement trajectory and obtain a trajectory point prediction for the next moment based on the trained hidden Markov model;

[0074] The total delay calculation module is used to calculate the total delay of task offloading based on the trajectory points at the current moment and the trajectory points predicted at the next moment;

[0075] The task offloading decision module is used to design a fitness function with the goal of minimizing the total system delay, and obtain the final task offloading decision through iterative optimization of the genetic algorithm.

[0076] In a third aspect, the present invention provides an electronic device, including a processor and a storage medium;

[0077] The storage medium is used to store instructions;

[0078] The processor is configured to operate according to the instructions to execute the steps of the above method.

[0079] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.

[0080] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0081] Compared with the prior art, the present invention has the following beneficial effects:

[0082] The present invention provides a mobile perception task offloading method and device based on a hidden Markov model. 1) By mapping the user's mobile trajectory within the edge network scenario, the user's mobile data information is converted into regional-level trajectory sequence information, organically combining the task offloading work and mobile perception work in the edge computing scenario, and maximizing the reduction of the total delay of the task offloading system; 2) utilizing the hidden Markov model to predict the user's mobile trajectory, each different trajectory sequence is used as the hidden state of the model, maximizing the amount of prior information in the prediction process, and improving the accuracy of the mobile perception model; 3) with the goal of minimizing the task offloading delay, the task offloading scheme is iteratively optimized through a genetic algorithm to obtain the final offloading decision, meeting the user's high stability and low latency requirements for task offloading. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 This is a flow chart of a method for offloading mobile sensing tasks based on a hidden Markov model provided by an embodiment of the present invention;

[0084] Figure 2 3 is an example schematic diagram of the hidden state and observed state of the Markov model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0085] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0086] Example 1:

[0087] like Figure 1 As shown, an embodiment of the present invention provides a method for offloading a mobile sensing task based on a hidden Markov model, comprising the following steps:

[0088] Step S1: Build an edge network scenario model, configure the user's location information on the edge server, and obtain the user's movement trajectory.

[0089] Step S1.1: Build an edge network scenario model:

[0090] Determine N edge servers E = {e1, e2, ...e N The service scope of} divides the network space into N edge network scenarios O = {o1, o2, ...o N The number and service scope of edge servers are determined according to the actual application scenarios and layout.

[0091] Step S1.2: Edge server location information es n for:

[0092] es n ={xn ,y n}, n = 1, 2, ... N

[0093] Where es n is the location information of the nth edge server, x n ,y n are the longitude and latitude of the nth edge server respectively;

[0094] User's location information for:

[0095]

[0096] Where, is the location information of the u-th user at time t, are the longitude and latitude of the u-th user at time t respectively.

[0097] Step S1.3: The user moves within the edge network scenario, generating a movement trajectory, and mapping the user's location to the service range of the edge server closest to the user. The specific method includes:

[0098] Obtaining the user's movement trajectory includes:

[0099] (1) Calculate the distance d between the uth user and the nth edge server at time t based on the Haversine formula t (u,e n ):

[0100]

[0101] Where R is the radius of the earth;

[0102] (2) According to the distance d t (u,e n ) Determine the edge network scenario o corresponding to the nearest edge server of the u-th user at time t t :

[0103]

[0104] (3) The edge network scenario o corresponding to the u-th user at time t t As the trajectory point, obtain the movement trajectory S of the u-th user = {o 1 , o 2 ,...o T}, t=1, 2, ...T.

[0105] Step S2: constructing a hidden Markov model based on the movement trajectories of multiple users, and training the hidden Markov model by using the maximum likelihood estimation method;

[0106] Step S2.1, constructing a hidden Markov model based on the movement trajectories of multiple users, includes:

[0107] (1) Taking the moving trajectory as the hidden state, construct the hidden state set Q = {q1, q2, ...q M}, m = 1, 2, ... M, q m is the mth moving trajectory, M is the total number of moving trajectories;

[0108] (2) Taking the edge network scenario as the observation state, construct the observation state set O = {o1, o2, ...o N};

[0109] (3) Construct the initial probability distribution π = {π1, π2, ...π M},π m =P(q(0)=q m ),π m The hidden state at time t = 0 is q m probability;

[0110] (4) Constructing the hidden state transition probability matrix a m1,m2 =P(q(t+1)=q m2 |q(t)=q m1 ), m1, m2=1, 2,...M, a m1,m2 The hidden state at time t is q m1 Transfer to the hidden state at time t+1 to q m2 probability;

[0111] (5) Constructing the observation state generation probability matrix b m (o n )=P(o n |q m ), b m (o n ) is the hidden state q m Generate observation state o n probability;

[0112] like Figure 2 As shown, the movement trajectories S1, S2, S3, S4 are included, which are used as hidden states q1, q2, q3, q4, and edge network scenes o1, o2, ...o 16 Taking it as the observed state, the directed line between the hidden states represents the hidden state transition probability, and the directed line between the hidden state and the observed state represents the observed state generation probability.

[0113] (6) Construct a hidden Markov model λ based on the initial probability distribution π, the hidden state transition probability matrix A, and the observation state generation probability matrix B:

[0114] λ={π,A,B}

[0115] Step S3: In response to receiving a task offloading request from a user, obtain the closest multiple trajectory points in the user's movement trajectory, and obtain a trajectory point prediction for the next moment based on the trained hidden Markov model; the specific steps are as follows:

[0116] Step 3.1. Store the closest points in the user's trajectory into vector x:

[0117] x={o 0-1 , o 0-2 ,...o 0_k}

[0118] Where k is the total number of the closest trajectory points;

[0119] Step 3.2: Search the hidden state set Q for all moving trajectories containing the vector x and store them in the set φ.

[0120] Step 3.3: For each moving trajectory S in the set φ i ∈φ, get the moving trajectory S i The observation state O corresponding to the first k+1 trajectory points i ={o i_1 , o i_2 ,...o i_k+1};

[0121] Step 3.4: Initialize the Viterbi variable:

[0122] v1(m1)=π m1 b m1 (o i_1 )

[0123] Step 3.5: Obtain the Viterbi forward variable v through recursive calculation 2:k+1 (m2):

[0124]

[0125] Step 3.6, for all Viterbi variables v s (m2), s = 2, 3, ... k + 1, find the maximum Viterbi variable transition probability P * :

[0126] P * =max{v s (m2)}

[0127] Step 3.7, [P * , S j ] is stored in the vector γ;

[0128] Step 3.8: After traversing all the moving trajectories in the set φ, find the one with the largest transition probability P in the vector γ. * The moving trajectory S of the Viterbi variable pred :

[0129]

[0130] Step 3.9, take the moving trajectory S pred The last trajectory point is used as the trajectory point prediction of the user at the next moment.

[0131] Step S4: Calculate the total delay of task offloading based on the trajectory point at the current moment and the trajectory point prediction at the next moment;

[0132] The total latency of computing task offloading includes:

[0133] Step S4.1: Record the edge servers corresponding to the user's current and next time points as the local server and the receiving server, and record the target edge server for the user to offload the task as the target server;

[0134] Step S4.2: The total delay T of the task offloading total for:

[0135] T total =T1+T2+T3+T4+T5

[0136] Where T1 is the time when the user uploads the task to the local server at the current moment, T2 is the time when the local server uploads the task to the target server, T3 is the time when the target server calculates the task, T4 is the time when the target server uploads the calculation result to the receiving server, and T5 is the time when the receiving server uploads the calculation result to the user; T1, T4, and T5 are recorded as 0;

[0137]

[0138]

[0139] Where n1 and n2 are the local server and the target server respectively, r n1,n2 、v n1,n2 are the transmission rate and transmission power of the local server uploading the task to the target server, W n2 is the available bandwidth of the target server, D n1,n2is the amount of task data uploaded from the local server to the target server, s n1,n2 is the channel gain between the local server and the target server, N0 is the noise power spectral density;

[0140]

[0141] Where, P n2 is the CPU computing capacity of the target server, C n1,n2 The number of CPU cycles required for the task of uploading data from the local server to the target server.

[0142] Step S5: With the goal of minimizing the total system delay, a fitness function is designed, and the final task offloading decision is obtained through iterative optimization using a genetic algorithm;

[0143] The final task offloading decision obtained through iterative optimization of genetic algorithm includes:

[0144] Step S5.1, initialization: Initialize the population, where each chromosome in the population represents a task offloading decision;

[0145] Step S5.2, selection operation: bring each chromosome in the population into the fitness function, and select the G chromosomes with the best fitness as the parent chromosomes; the fitness function is f = -T total ;

[0146] Step S5.3, crossover operation: Pair the parent chromosomes in pairs. For each pairing result, select a crossover point in the chromosome sequences of the two parent chromosomes, cut at the crossover point, exchange the cut fragments, and generate two new daughter chromosomes. The two generated new daughter chromosomes are added to the next generation population.

[0147] Step S5.4, mutation operation: For each parent chromosome, randomly select a mutation site in its chromosome sequence, randomly change the genetic information of the selected mutation site to obtain a mutated daughter chromosome, and add the mutated daughter chromosome to the next generation population;

[0148] Step S5.5: Repeat the above selection, crossover, and mutation operations (i.e., steps S5.2 to S5.4) until the preset number of iterations is reached or the fitness converges, and output the final population;

[0149] Step S5.6: Select the chromosome with the highest fitness from the final population as the final task offloading decision.

[0150] Example 2:

[0151] An embodiment of the present invention provides a mobile sensing task offloading device based on a hidden Markov model, the device comprising:

[0152] The mobile trajectory acquisition module is used to build an edge network scenario model, configure edge servers and user location information, and obtain user movement trajectories;

[0153] A model building and training module is used to build a hidden Markov model based on the movement trajectories of multiple users and train the hidden Markov model through maximum likelihood estimation method;

[0154] a trajectory point prediction module, configured to, in response to a task offloading request received from a user, obtain a plurality of closest trajectory points in the user's movement trajectory and obtain a trajectory point prediction for the next moment based on the trained hidden Markov model;

[0155] The total delay calculation module is used to calculate the total delay of task offloading based on the trajectory points at the current moment and the trajectory points predicted at the next moment;

[0156] The task offloading decision module is used to design a fitness function with the goal of minimizing the total system delay, and obtain the final task offloading decision through iterative optimization of the genetic algorithm.

[0157] Example 3:

[0158] Based on the first embodiment, the present invention provides an electronic device including a processor and a storage medium;

[0159] The storage medium is used to store instructions;

[0160] The processor is configured to operate according to the instructions to execute the steps of the above method.

[0161] Example 4:

[0162] Based on the first embodiment, the embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented.

[0163] Embodiment 5:

[0164] Based on the first embodiment, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0165] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0169] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A mobile sensing task offloading method based on hidden Markov model, characterized in that: include: Build an edge network scenario model, configure edge servers and user location information, and obtain user movement trajectories; Constructing a hidden Markov model based on the movement trajectories of multiple users, and training the hidden Markov model by using a maximum likelihood estimation method; In response to receiving a task offloading request from a user, taking a plurality of closest trajectory points in the user's movement trajectory, and obtaining a trajectory point prediction at the next moment based on the trained hidden Markov model; Calculate the total delay of task offloading based on the trajectory points at the current moment and the trajectory points predicted at the next moment; With the goal of minimizing the total system delay, a fitness function is designed and the final task offloading decision is obtained through iterative optimization using a genetic algorithm. Wherein, the edge network scenario model is constructed: Sure Edge servers The service scope divides the network space into Edge network scenarios ; The location information of the edge server for: ; Where, For the The location information of the edge servers, Respectively The longitude and latitude of each edge server; The user's location information for: ; Where, For the Users in Location information at all times, Respectively Users in Longitude and latitude at the time; The obtaining of the user's movement trajectory includes: Based on the Haversine formula, the Users in Moment and The distance to the edge server : ; Where, is the radius of the Earth; According to distance Determine the Users in Edge network scenario corresponding to the edge server closest to the user at any time : ; The first Users in Edge network scenarios corresponding to each moment As the trajectory point, get the The movement trajectory of a user .

2. The mobile sensing task offloading method based on hidden Markov model according to claim 1 is characterized in that: The constructing of a hidden Markov model based on the movement trajectories of multiple users includes: Use the movement trajectory as the hidden state and construct a hidden state set , For the A moving trajectory, is the total number of moving trajectories; Take the edge network scenario as the observation state and build the observation state set ; Constructing the initial probability distribution , , For The hidden state is probability; Construct hidden state transition probability matrix , , For The hidden state is Transfer to The hidden state is probability; Constructing the observation state generation probability matrix , , The hidden state is Generate observation state probability; According to the initial probability distribution , hidden state transition probability matrix And the observation state generation probability matrix Building a Hidden Markov Model : 。 3. The mobile sensing task offloading method based on hidden Markov model according to claim 2 is characterized in that: The step of obtaining the trajectory point prediction at the next moment based on the trained hidden Markov model includes: Store the closest multiple trajectory points in the user's movement trajectory into a vector : ; Where, is the total number of the closest trajectory points; In the hidden state set Search for all occurrences of the vector The movement trajectory is stored in the collection ; For collections Each moving trajectory in , get the movement trajectory Before The observation state corresponding to the trajectory point ; Initialize the Viterbi variables: ; Obtain Viterbi forward variables by recursive calculation : ; For all Viterbi variables , find the maximum transition probability of the Viterbi variable : ; Will Store in vector middle; Traverse the collection After all the moving trajectories in the vector Find the one with the largest transition probability The moving trajectory of the Viterbi variable : ; Get movement trajectory The last trajectory point is used as the trajectory point prediction of the user at the next moment.

4. The mobile sensing task offloading method based on hidden Markov model according to claim 3 is characterized in that: The total delay of the computing task offloading includes: The edge servers corresponding to the user's current and next moment trajectory points are recorded as local servers and receiving servers, and the target edge server where the user offloads the task is recorded as the target server; The total latency of the task offload for: ; Where, The time when the user uploads the task to the local server at the current moment. The time when the local server uploads the task to the target server. The time for the target server to calculate the task, The time when the target server uploads the calculation results to the receiving server. The time when the receiving server uploads the calculation results to the user; Recorded as 0; ; ; Where, The local server and the target server respectively. are the transmission rate and transmission power of the local server uploading the task to the target server, is the available bandwidth of the target server, The amount of task data uploaded from the local server to the target server. is the channel gain between the local server and the target server, is the noise power spectral density; ; Where, is the CPU computing capacity of the target server, The number of CPU cycles required for the task of uploading data from the local server to the target server.

5. The mobile sensing task offloading method based on hidden Markov model according to claim 4 is characterized in that: The final task offloading decision obtained by iterative optimization of the genetic algorithm includes: Initialization: Initialize the population, where each chromosome represents a task offloading decision; Selection operation: bring each chromosome in the population into the fitness function and select the G chromosomes with the best fitness as the parent chromosomes; the fitness function is ; Crossover operation: Pair the parent chromosomes in pairs. For each pairing result, select a crossover point in the chromosome sequences of the two parent chromosomes, cut at the crossover point, exchange the cut fragments, generate two new daughter chromosomes, and add the two generated new daughter chromosomes to the next generation population. Mutation operation: For each parent chromosome, randomly select a mutation site in its chromosome sequence, randomly change the genetic information of the selected mutation site to obtain the mutated daughter chromosome, and add the mutated daughter chromosome to the next generation population; Repeat the above selection, crossover, and mutation operations until the preset number of iterations is reached or the fitness converges, and output the final population; The chromosome with the highest fitness is selected from the final population as the final task offloading decision.

6. A mobile sensing task offloading device based on hidden Markov model, characterized in that: The device comprises: The mobile trajectory acquisition module is used to build an edge network scenario model, configure the edge server and user location information, and obtain the user's mobile trajectory; the construction of the edge network scenario model: Sure Edge servers The service scope divides the network space into Edge network scenarios ; The location information of the edge server for: ; Where, For the The location information of the edge servers, Respectively The longitude and latitude of each edge server; The user's location information for: ; Where, For the Users in Location information at all times, Respectively Users in Longitude and latitude at the time; The obtaining of the user's movement trajectory includes: Based on the Haversine formula, the Users in Moment and The distance to the edge server : ; Where, is the radius of the Earth; According to distance Determine the Users in Edge network scenario corresponding to the edge server closest to the user at any time : ; The first Users in Edge network scenarios corresponding to each moment As the trajectory point, get the The movement trajectory of a user ; A model building and training module is used to build a hidden Markov model based on the movement trajectories of multiple users and train the hidden Markov model through maximum likelihood estimation method; a trajectory point prediction module, configured to, in response to a task offloading request received from a user, obtain a plurality of closest trajectory points in the user's movement trajectory and obtain a trajectory point prediction for the next moment based on the trained hidden Markov model; The total delay calculation module is used to calculate the total delay of task offloading based on the trajectory points at the current moment and the trajectory points predicted at the next moment; The task offloading decision module is used to design a fitness function with the goal of minimizing the total system delay, and obtain the final task offloading decision through iterative optimization of the genetic algorithm.

7. An electronic device, characterized in that: including processors and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Vehicle trajectory prediction method, system and device based on surrounding environment and behavior intention

    CN112133089A

  • Real-time motion trail monitoring method, device and equipment and readable storage medium

    CN114578367A