CN115033371A - Method, equipment and system for service migration in vehicle network - Google Patents
Method, equipment and system for service migration in vehicle network Download PDFInfo
- Publication number
- CN115033371A CN115033371A CN202210961471.3A CN202210961471A CN115033371A CN 115033371 A CN115033371 A CN 115033371A CN 202210961471 A CN202210961471 A CN 202210961471A CN 115033371 A CN115033371 A CN 115033371A
- Authority
- CN
- China
- Prior art keywords
- service
- migration
- time slot
- resource node
- resource
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
- G06F17/12—Simultaneous equations, e.g. systems of linear equations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/40—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Abstract
The invention discloses a method, equipment and a system for service migration in a vehicle network, wherein the method comprises the following steps: defining a vehicle time slotInternal use serviceThe migration scheme of (a) generates a cost of(ii) a Setting constraint conditions; according to time slot of vehicleInternal use serviceCost of migration schemeThe calculation formula and the constraint condition of (2), the calculation is in the time slotMigration policy that minimizes the total cost of migration of all services within. In the embodiment of the invention, different migration schemes are provided for the instant service and the continuous service, different migration schemes and constraint conditions corresponding to different service types are comprehensively considered, and the lowest migration cost is realized under the condition of ensuring the service quality.
Description
Technical Field
The invention relates to the technical field of vehicle networking, in particular to a method, equipment and a system for service migration in a vehicle network.
Background
In a vehicle-road cloud cooperative computing scene, the dynamic mobility of an intelligent networked automobile challenges the continuity and stability of services of resource nodes deployed at roadside edges of the intelligent networked automobile, and along with the dynamic change of the position of the intelligent networked automobile in the driving process, the distance between the intelligent networked automobile and the roadside edge resource nodes is changed, the coverage range of base station signals of the roadside edge resource nodes is limited, so that the services running in the intelligent networked automobile face transmission delay which is obviously increased due to the increase of the distance, even the services are interrupted, and the service quality is difficult to guarantee. By means of the existing virtual machine migration or container migration technology, the service instance of the intelligent networked automobile in the roadside edge resource node can be migrated from the source resource node to the target resource node close to the intelligent networked automobile along with the movement of the intelligent networked automobile, the distance between the service instance and the intelligent networked automobile is kept or reduced, low communication delay is guaranteed, and the service quality is improved.
In the actual scene of the intelligent networked automobile, various services (usually provided by various applications) required by the intelligent networked automobile are different, wherein part of the general services only need to process data transmitted by the intelligent networked automobile and then return results, for example, the general target detection service only needs to operate a deep learning target detection example of a roadside edge resource node to detect, classify and mark original data of sensors such as a camera of the automobile and return the detection results to the automobile for subsequent operation, and the service is characterized in that the operation of the current service does not depend on information such as past data results and has instantaneity; the operation of the other part of services requires that the information has forward and backward continuity, for example, in the case of the space prediction service such as the road pedestrian intention prediction service, the pedestrian intention prediction needs certain prior information to effectively predict the subsequent behavior, so that the continuity of the information in the processing process of the service needs to be maintained in the operation of the service, and the service has continuity.
For the continuity service, two options exist because the continuity of information needs to be maintained, namely service instances including information such as a CPU, a memory and the like also need to be consistent before and after migration. The first method is to migrate the service acquired by the intelligent networked automobile from the source roadside edge resource node to the roadside edge resource node closer to the vehicle, which is referred to as a migration mode for short, as shown in fig. 1. The second option is to continue to keep the service operation in the source roadside edge resource node, perform data interaction with the source roadside edge resource node by taking the roadside edge node near the intelligent networked automobile as a data relay node, forward the service request data of the intelligent networked automobile to the service instance of the source roadside edge resource node, and forward the processing result to the intelligent networked automobile, which is referred to as a relay node mode for short, as shown in fig. 2.
For the instant service, the instant service has no requirement on past data information such as a memory and the like, so that the migration scheme does not need to forcibly require that the service instances are the same in the moving process of the intelligent networked automobile.
In order to guarantee user experience, ensure the continuity and stability of the service of the intelligent internet automobile in the driving process, and simultaneously ensure lower migration cost, a service migration strategy which is reasonable and efficient and moves along with the user is very necessary.
Disclosure of Invention
It is an object of the present invention to provide a method, apparatus and system for service migration in a vehicle network that overcomes or mitigates at least one of the above-mentioned disadvantages of the prior art.
In order to achieve the above object, an embodiment of the present invention provides a method for service migration in a vehicle network, where the method is applied to a scene including a vehicle and roadside edge resource nodes, and the method includes:
step S1, defining a vehicle time slotInternal use serviceThe migration scheme of (a) generates a cost of;
For the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between the resource nodes and the serviceThe roadside edge resource nodes are connected with the vehicle;setting adjusting parameters for presetting;for connecting resource nodesTo serveThe amount of network resources provided;to serveLocated vehicle and connection resource nodeThe distance between them;
presentation to serviceAdopting the wired transmission cost generated by a transit node mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of the forwarding data and the result;
presentation to serviceMigration costs generated by adopting a migration mode;presetting adjustment parameters;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count in between;is presetCost of restarting the service instance after migrating to the target node;
wherein the content of the first and second substances,
representing vehicle and resource nodesCosts incurred in connecting and rebuilding instances by applying mirroring;create instance costs for presets;as a resource nodeA set of offered service types;presentation serviceIs of the type of a resource nodeA set of offered service types;setting adjusting parameters for presetting;as a resource nodeAnd resource nodeNetwork hop count in between;as a resource nodeA set of offered service types;,presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein the content of the first and second substances,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction instance mode;
step S2, setting constraint conditions; the method comprises the following steps:
wherein the content of the first and second substances,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run on resource nodesIn (1),presentation serviceIn thatTime slot deployment running on resource nodeIn the step (1), the first step,then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodeThe preparation method comprises the following steps of (1) performing; binary variableIs shown inTime slot serviceWhether the vehicle is in contact with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe vehicle is not connected with the resource nodeConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn time slotThe amount of available computing, storage, and network resources;,represents a collection of all resource nodes;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count in between;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node;
step S3, according to the time slot of vehicleInternal use serviceCost of migration schemeThe calculation formula and the constraint condition of (2), the calculation is in the time slotMigration policy that minimizes the total cost of migration of all services within.
An embodiment of the present invention further provides an apparatus for service migration in a vehicle network, which is applied to a scene including a vehicle and roadside edge resource nodes, and the apparatus includes a processing module, configured to:
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between the resource nodes and the serviceThe roadside edge resource nodes are connected with the vehicle;presetting adjustment parameters;for connecting resource nodesTo serveThe amount of network resources provided;to serveThe vehicle and the connection resourceNode pointThe distance therebetween;
presentation to serviceAdopting the wired transmission cost generated by a transit node mode;presetting adjustment parameters;to serveIn thatDeployment and operation resource node of time slotAnd serviceAnd service inConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of the forwarding data and the result;
presentation to serviceMigration cost generated by adopting a migration mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count in between;after the preset is migrated to the target nodeCost of restarting a service instance;
wherein the content of the first and second substances,
representing vehicle and resource nodesCosts incurred in connecting and rebuilding instances by applying mirroring;creating an instance cost for a preset;as a resource nodeA set of offered service types;presentation serviceIs of the type of a resource nodeA set of offered service types;presetting adjustment parameters;as a resource nodeAnd resource nodeNetwork hop count in between;as a resource nodeA set of offered service types; presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein the content of the first and second substances,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction instance mode;
setting constraint conditions; the method comprises the following steps:
wherein the content of the first and second substances,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run in resource nodeIn the step (1), the first step,presentation serviceIn thatTime slot deployment running on resource nodeIn (1),then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodePerforming the following steps; binary variableIs shown inTime slot serviceWhether the vehicle is in contact with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe located vehicle has no node with the resourceConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn a time slotThe amount of available computing, storage, and network resources;,represents a collection of all resource nodes;to serveIn thatDeploying and operating resource nodes of time slotsAnd serviceIn thatConnection resource node of time slotNetwork hop count in between;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node;
according to time slot of vehicleInternal use serviceCost of migration schemeThe calculation formula and the constraint condition of (2), the calculation is in the time slotMigration policy that minimizes the total cost of migration of all services within.
The embodiment of the invention also provides a system for service migration in a vehicle network, which comprises the vehicle, the roadside edge resource nodes and the equipment.
Due to the adoption of the technical scheme, the invention has the following advantages:
in the embodiment of the invention, different migration schemes are provided for instant services and continuous services, different migration schemes and constraint conditions corresponding to different service types are comprehensively considered, and the lowest migration cost is realized under the condition of ensuring the service quality.
Drawings
Fig. 1 is a schematic diagram of a service migration scheme of a migration mode of a continuation service and an instantaneity service.
Fig. 2 is a schematic diagram of a service migration scheme of a transit node mode of a continuation service and an instantaneity service.
Fig. 3 is a schematic diagram of a service migration scheme in an application image reconstruction instance of a just-in-time service.
Fig. 4 is a flowchart illustrating a method for service migration in a vehicle network according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating a method for service migration in a vehicle network according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of a specific implementation process of step S51 in the flowchart shown in fig. 5.
FIG. 7 is a schematic diagram of chromosomes and gene segments in the method provided by the embodiment of the invention.
FIG. 8 is a schematic diagram of chromosome crossing operations in the method according to the embodiment of the present invention.
FIG. 9 is a schematic diagram of chromosome mutation operations in the method according to the embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an apparatus for service migration in a vehicle network according to an embodiment of the present invention.
Fig. 11 is a schematic diagram of a cost comparison of a solution for service migration in a vehicle network provided by an embodiment of the present invention and a prior art service migration solution.
Fig. 12 is a schematic diagram of another cost comparison of a solution for service migration in a vehicle network provided by an embodiment of the present invention and a prior art service migration solution.
Detailed Description
In the drawings, the same or similar reference numerals are used to designate the same or similar elements or elements having the same or similar functions. Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
In the description of the present invention, the terms "central", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and therefore, should not be construed as limiting the scope of the present invention.
In the present invention, the technical features of the embodiments and implementations may be combined with each other without conflict, and the present invention is not limited to the embodiments or implementations in which the technical features are located.
The present invention will be further described with reference to the accompanying drawings and specific embodiments, it should be noted that the technical solutions and design principles of the present invention are described in detail in the following only by way of an optimized technical solution, but the scope of the present invention is not limited thereto.
The following terms are referred to herein, and their meanings are explained below for ease of understanding. It will be understood by those skilled in the art that the following terms may have other names, but any other names should be considered consistent with the terms set forth herein without departing from their meaning.
For the instant service, there is an alternative to the continuation service, that is, a service instance is created again in a roadside edge resource node near the intelligent networked automobile through a service application mirror image to obtain a service, which is referred to as a rebuilt instance for short, as shown in fig. 3. In the process, if the resource node does not have the corresponding service application image, the application image file can be acquired from the surrounding resource nodes.
The embodiment of the invention provides a method for service migration in a vehicle network, which is applied to a scene comprising vehicles and roadside edge resource nodes, and as shown in fig. 4, the method comprises the following steps:
step S1, establishing a service migration problem model considering service characteristics, defining a vehicle time slotInternal use serviceThe migration scheme of (a) generates a cost of。
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between the resource nodes and the serviceThe roadside edge resource node is connected with the vehicle;setting adjusting parameters for presetting;for connecting resource nodesTo serveThe amount of network resources provided;to serveLocated vehicle and connection resource nodeThe distance between them;
presentation to serviceAdopting the wired transmission cost generated by the transit node mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of forwarding data and results back and forth;
representation pair serviceMigration cost generated by adopting a migration mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count in between;cost for restarting the service instance after the preset migration to the target node;
wherein the content of the first and second substances,
representing vehicle and resource nodesCosts incurred in connecting and rebuilding instances by applying mirroring;creating an instance cost for a preset;as a resource nodeA set of offered service types;presentation serviceIs of the type of a resource nodeA set of offered service types;presetting adjustment parameters;as a resource nodeAnd resource nodeNetwork hop count in between;as a resource nodeA set of offered service types;,presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein, the first and the second end of the pipe are connected with each other,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application image reconstruction instance mode.
Step S2, setting constraint conditions; the method comprises the following steps:
wherein, the first and the second end of the pipe are connected with each other,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run in resource nodeIn the step (1), the first step,presentation serviceIn thatTime slot deployment is operated on resource nodesIn the step (1), the first step,then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodePerforming the following steps; binary system transformerMeasurement ofIs shown inTime slot serviceWhether the located vehicle is connected with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe vehicle is not connected with the resource nodeConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn time slotThe amount of available computing, storage, and network resources;,represents a collection of all resource nodes;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count in between;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node.
Step S3, according to the time slot of vehicleInternal use serviceCost of migration schemeThe calculation formula and the constraint condition of (2), the calculation is in the time slotMigration policy that minimizes the total cost of all services within.
Wherein, step S3 includes:
according to time slotCalculating candidate connection resource nodes of each service according to the position of each vehicle and the coverage range of each resource node and constructing a candidate connection resource node set;
determining a candidate migration scheme of each service according to the candidate connection resource node set;
and obtaining a plurality of candidate migration strategies according to the candidate migration scheme of each service, wherein each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the candidate migration strategies.
The method for obtaining a plurality of candidate migration strategies according to the candidate migration scheme of each service and the correlation among different services, wherein each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the plurality of candidate migration strategies, and comprises the following steps:
setting chromosomes, each chromosome corresponding to one migration strategy and each chromosome comprisingThe gene segments of the gene are divided into a plurality of gene segments,for the total number of all services, each gene fragment corresponds to one migration scheme of one service; each gene segment comprises a first part and a second part, wherein the first part represents the sequence of the connection resource node of the service in the candidate connection resource node set, and the second part represents whether the deployment operation resource node of the service is consistent with the connection resource node of the service;
setting a fitness function related to the cost, wherein if the fitness function value is larger, the cost is smaller, and if the fitness function value is smaller, the cost is larger;
initializing a preset number of chromosomes to form a population, continuously carrying out iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population as a migration strategy with the minimum total migration cost of all services.
Wherein setting the fitness function comprises:
setting a penalty function: penalty function when constraint condition is satisfiedAndthe function value of (1) is 0, and when the constraint condition is illegal, the penalty function value is set to beIn whichA fixed constant greater than 0;
Wherein the content of the first and second substances,to be a predetermined constant, it is generally necessary to be large enough,presentation serviceIn a time slotThe migration cost of (2).
Initializing a preset number of chromosomes to form a population, continuously performing iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population, wherein the migration strategy with the minimum total migration cost of all services comprises the following steps:
calculating the fitness of each chromosome;
selecting at least two chromosomes from the population of all chromosomes according to fitness to perform cross operation and mutation operation of gene segments to obtain updated chromosomes;
calculating the fitness of the updated chromosome;
if the difference value between the maximum fitness of the chromosome after updating and the maximum fitness of the chromosome before updating is within a preset range, determining the time slot according to the chromosome after updating corresponding to the maximum fitnessA migration strategy which minimizes the total migration cost of all the services;
and if the difference value between the maximum fitness of the updated chromosome and the maximum fitness of the chromosome before updating is not in the preset range, replacing the chromosome before updating with the updated chromosome, selecting the chromosome again to perform the crossover operation and mutation operation of the gene segments, and calculating the fitness of the chromosome again until the difference value between the maximum fitness of the chromosome and the last maximum fitness is in the preset range.
The following describes a method for service migration in a vehicle network according to an embodiment of the present invention, as shown in fig. 5, including:
step S51, a service migration problem model is established that takes into account the service characteristics.
Step S52, determine the candidate connection resource node set and the associated cost in each timeslot.
And step S53, carrying out binary gene coding on the total migration strategy of all services, initializing chromosomes and forming a population.
And step S54, setting a fitness function and a penalty function.
In step S55, a chromosome fitness function value is calculated.
Step S56, selecting, crossing and mutating chromosomes in the population;
and step S57, repeating the steps S55 and S56 until the end condition is met, and determining the migration scheme of each service according to the final chromosome.
It will be readily appreciated that after step 51, a migration policy may be calculated from the model that minimizes the total cost of all services. Steps S52-S57 provide an alternative but not limiting scheme to other migration policies that can compute the minimum total cost of all services.
In this example, the migration policy with the minimum total cost of all services is obtained through steps S52-S57.
As shown in fig. 6, step S51 includes:
step S51.1, modeling of vehicle services.
In this example, the time slotThe interior vehicles correspond to the services one to one. The following parameters are definedIndicating that the vehicle is in the time slotTake over its serviceThe state of (c). The services of the vehicles in different time slots may be the same or different. Wherein the content of the first and second substances,to serveIs of a type such that,the method comprises the steps of representing a service type set, and being divided into instantaneity service and continuity;indicating that the vehicle is in the time slotConnected roadside edge resource nodes, e.g. of a buildingIs indicated in a time slotEdge resource node for vehicle and road sideConnecting;
presentation serviceIn a time slotAt deploying operational roadside edge resource nodes, e.g.Is indicated in a time slotOffice serviceDeploying and operating on roadside edge resource nodesA roadside edge resource node of a service deployment operation is called a deployment node for convenience of expression;andrepresenting the coordinate position of the vehicle in a two-dimensional space, the moving position of which changes with time;andrespectively representing servicesThe amount of required computing, storage and network resources, in this example using blocks of computing resource elements, blocks of storage resource elements, radio resource blocks representing the basic units of computing, storage and network resources, respectively, such asPresentation serviceThe number of required computing resource unit blocks is. Assume that before and after service migration, the serviceThe required computing, storage and network resources do not change. In thatTime slot, usingRepresenting the set of all services.
And S51.2, modeling the resource nodes.
In a time slotA resource nodeIs particularly shown asWherein, in the step (A),representing resource nodesThe type of service provided (including the continuity service and the instantaneity service) and corresponding service application image (each resource node only deploys the type of intelligent networked automobile service which is running or possibly running, and in the example, all the servers are defaulted to have image files of all the types of services which are possibly running);andas a resource nodeA coordinate position in two-dimensional space;andrespectively representing resource nodesIn a time slotThe amount of available computing, storage and network resources, in units consistent with the basic units in the vehicle service model, respectively. The resource nodes are connected by wired channels such as optical fibers. By usingRepresenting a topology of a wired channel connection between resource nodes, whereinIs a set of resource nodes that are,for the network topological distance set between nodes, the nodes can be represented by an undirected graph due to bidirectional communication between the nodes, and the topological distance is represented by the network hop count between the nodes in the exampleAnd nodeNumber of network hops in betweenIs a nodeAnd nodeTopological distance between. In thatTime slot, usingRepresenting a set of all resource nodes.
And step S51.3, modeling the service migration problem. The method comprises the following specific steps:
at step S51.3.1, a wireless transmission cost is calculated.
Since the amount of processing result data returned is small compared to the data to be processed that is transmitted, the cost of downlink transmission of results from the resource nodes back to the vehicle is negligible compared to the cost of uplink transmission of data from the vehicle to the resource nodes. In this example, it is assumed that the wireless transmission cost between the vehicle and the roadside edge resource node is proportional to the distance between the vehicle and the roadside edge resource node, so the service on the vehicle isAnd the road side edge resource nodes connected with the sameWireless transmission cost of transmission service data generationThe definition is as follows:
wherein, the first and the second end of the pipe are connected with each other,to adjust the parameters;serving resource nodesThe amount of network resources provided;roadside edge resource node for vehicle and connection thereofThe distance between the two can be calculated according to the coordinates of the two as follows:
wherein, the first and the second end of the pipe are connected with each other,andtime slots for vehiclesA coordinate position in two-dimensional space;andas a resource nodeA coordinate position in two-dimensional space.
At step S51.3.2, a cost of the cable transmission is calculated.
In this example, it is assumed that the cost of wired transmission between resource nodes is proportional to the topological distance thereof, i.e., proportional to the number of network hops between the nodes. To the serviceIn other words, if the resource node near the vehicle is selected not to be migrated and is used as the transfer node to continue the communication with the source resource node, the related data and results are transmitted between the transfer node and the source resource node, which results in a wired transmission cost. Assume vehicle serviceIn a time slotTime and road side edge resource nodeConnect and deploy services to the node, i.e.In time slotsEdge resource node entering roadAnd select and nodeThe connection serves as a transit node for transmitting relevant data and results, and the service is continuously maintained at the resource nodeIn the middle run, thenAt this time, the cable transmission cost generated by adopting the transit node mode without transferring the service is not neededComprises the following steps:
wherein the content of the first and second substances,setting adjusting parameters for presetting;to serveIn thatResource node where time slot deployment is locatedAnd serviceIn thatResource node of time slot connectionThe number of network hops between; coefficient 2 represents forwardingData and results are transmitted back and forth.
At step S51.3.3, a migration instance cost is calculated.
In this example, the migration cost generated in the migration process is considered to be proportional to the network hop count from the source deployment resource node to the target deployment resource node, that is:
wherein the content of the first and second substances,setting adjusting parameters for presetting;to serveIn thatSource deployment resource node of time slotAnd serviceIn thatTime slot deployment resource nodeThe number of network hops between;the cost for restarting the service instance after migrating to the target node is a preset value.
At step S51.3.4, a transfer mirroring cost is calculated. When vehicle and resource nodeWhen connecting and choosing to rebuild an instance by applying mirroring, the cost incurred by the process is defined as follows:
wherein the content of the first and second substances,as a resource nodeA set of offered service types;as a resource nodeA set of offered service types;as a resource nodeAnd resource nodeNetwork hop count therebetween;creating an instance cost for a preset;
at step S51.3.5, a problem model is built.
In this example, variables are usedPresentation serviceIn thatSelection of time slots, and. Wherein the content of the first and second substances,presentation serviceIn thatThe time slot adopts a service migration mode to migrate the service instance to a resource node connected nearby the current position;presentation serviceIn thatThe time slot adopts a transfer node mode, the service is not migrated, the service is continuously kept to operate at a source deployment resource node, and the resource node connected at the current position is used as a transfer node to receive the service;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction example mode, the service of the resource node deployed by the source is suspended, and the resource node connected at the current position utilizes the local application mirror image or transmits the application mirror image through the nearby resource node to create a new resource nodeThe service instance provides a service.
According to the above discussion, defining at a time slotService management systemThe total cost of migration decision generation is,
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
during service migration, the computation, storage and network resources of each resource node are limited, and binary variables are definedIs shown inTime slot serviceWhether to deploy and run in resource nodeIn the step (1), the first step,presentation serviceIn thatTime slot deployment running on resource nodeIn (1),then it means none; defining binary variablesIs shown inTime slot intelligent networking automobileWhether to communicate with a resource nodeThe connection is carried out by connecting the two parts,intelligent network-connected automobileIn thatTime slot and resource nodeThe connection is carried out by connecting the two parts,it means no. The resource node running the service instance will provide the computing and storage resources needed for the service, the resource node connected to the vehicle to transmit data and results will provide the network resources needed, the resource node providesCannot exceed its available resource capacity, to the resource nodeIn other words, the capacity constraints are as follows:
in addition, since the resource node connected to the vehicle and the resource node operated by service deployment may be different, and the excessive network hop count between the two may seriously affect the service quality, the maximum network hop count limit of the two also needs to be considered in the service migration decision process, and the maximum connection distance is set in this exampleAnd when the network hop count between the resource node connected with the vehicle and the resource node operated by service deployment is greater than the maximum connection distance, service migration is forcibly selected.
Wherein the content of the first and second substances,is composed ofResource node for time slot vehicle connectionAnd serviceDeploying a running resource nodeThe connection distance between them, i.e. the number of network hops.
Based on the above discussion, a service migration optimization problem model is established with the system total cost minimization as the optimization target and with the factors of service characteristics, resource capacity, maximum connection distance and the like taken into consideration, and the time slot is calculatedMigration policy that minimizes the total cost of all services within, i.e.
Step S52 specifically includes: calculating connectable candidate nodes according to the position of each vehicle and the coverage range of the resource nodes in each time slot and constructing a node setAnd judging the service type of each service in each time slot, and calculating the cost of all migration schemes of all services.
Step S53 specifically includes: chromosomes are used to represent migration protocols.
The chromosomes and the gene segments in this example are common concepts in genetic algorithms, and the meaning and the like thereof are not described herein again. In this example, as shown in FIG. 7, a complete chromosome is composed ofIndividual gene fragment composition, number of gene fragmentsFor total number of services in a service migration scenario, a gene fragment pairShould be a migration scheme for a service. A complete chromosome corresponds to one migration strategy for all services.
In this example, joint binary coding is performed on two optimization variables, namely a connection resource node and a deployment node in the service migration optimization problem. Setting the order of the connection resource node of each gene segment in the candidate connection resource node set, wherein the first part of each gene segment represents the order of the connection resource node of the service, and the second part of each gene segment represents whether the deployment resource node of the service is consistent with the connection resource node of the service.
Each gene fragment may represent a migration scenario for a service. As shown in fig. 7, the first partCandidate connected resource node representing selected vehicleAnd connecting the candidate nodes. For example, if the total number of resource nodes to which a vehicle can be connected at a certain location is 4, thenThe binary digit number of (2) is enough; the second partThen a binary variable is usedIndicating whether a service deployment resource node is consistent with a service connection resource node, e.g.The connection resource node representing the service is consistent with the service deployment operation resource node, the corresponding decision at this time may be a migration service, the cost is the migration cost, for the instantaneity service, the instance may be created again on the connection resource node, because the calculation, storage and network resources occupied by the migration service and the instance created again are the same resource nodeThe two modes occupy the same amount of resources, so that the corresponding cost is the minimum value of the migration cost and the reconstruction cost;then, it means that the connection resource node of the vehicle is inconsistent with the service deployment operation resource node, and the corresponding decision is to regard the node as a transit node and keep the service operating in the source resource node, and the cost is the transit cost.
Step S54 specifically includes:
(1) and setting a penalty function.
Penalty function when constraint condition is satisfiedAndis set to 0, and when the constraint condition is violated, the function value of the penalty function is set toWhereinIs a preset fixed constant greater than 0.
(2) Introduction of constantsAnd setting a fitness function according to the migration cost and the penalty function, wherein the larger the fitness function is, the more the target is met.
Wherein the content of the first and second substances,a constant is introduced for the purpose of presetting the time,presentation serviceIn a time slotThe migration cost of (2).
Step S55 specifically includes:
reducing a chromosome toIndividual gene fragment, representativeThe intelligent network connects the requested service of the automobile. For each gene fragment, step S53, take its last binary digitThe current migration scheme of the service is confirmed, and the remaining first few binary digits are converted into decimal numbers to confirm the current connected resource node of the service.
After the migration scheme of each service is obtained, the cost of the corresponding migration scheme is respectively calculated, and the total cost of all vehicle services in the current time slot is obtained.
And (3) applying the formulas (11) to (14) to judge whether the total decision violates the constraint, confirming the penalty function value, and finally calculating by the formula (15) to obtain the fitness function of the chromosome.
In the same way, fitness functions for the remaining chromosomes are obtained.
Step S56 specifically includes:
selecting operation: a roulette method was used to select two individuals (chromosomes) from a population (all chromosomes) for crossover operations. In rouletteIn the method, the selection probability of each individual is proportional to its fitness value. To the fitness ofOf (2)In other words, the probability of being selected isI.e. the ratio of its fitness to the sum of the fitness of all individuals, the higher the fitness, the higher the probability of being selected.
And (3) cross operation: as shown in fig. 8, two intersections are randomly generated using a double-dot intersection pattern, and gene segments between intersections of two parents (chromosomes) are exchanged to generate new offspring, i.e., two new chromosomes, and the offspring is used instead of the parents.
Mutation operation: the operation simulates the gene mutation phenomenon in nature, the diversity of individuals in the population is increased, and only few genes of few individuals are changed. In the example, a multi-point mutation mode is adopted, for each individual, whether the individual has mutation or not is determined according to a preset mode (such as mutation probability), and if the individual has mutation, the number of gene mutations within the maximum number of the mutation is randomly generatedThen randomly generated for the whole chromosomeAnd (4) complementing the mutation sites, namely changing from 0 to 1 or changing from 1 to 0. As shown in FIG. 9, the individual had variation, and the number of variation sites was 2.
After the above operation, a new chromosome is obtained.
Step S57 specifically includes: steps S55 and S56 are repeated until the end condition is satisfied.
The ending condition set in this example is that the fitness function reaches the maximum value, that is, as the number of iterations increases, the fitness function does not increase any more, and at this time, the corresponding migration total cost reaches the minimum value, and the migration scheme of each service is obtained according to each gene fragment according to the final chromosome and step S55.
The embodiment of the invention also provides equipment for service migration in the vehicle network, which is applied to a scene comprising vehicles and roadside edge resource nodes. The equipment can be located in the cloud, and can also be located on a vehicle, and the specific setting position of the equipment is not limited as long as the scheme of the text can be realized. As shown in fig. 10, the apparatus comprises a processing module 101 for:
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between the resource nodes and the serviceThe roadside edge resource nodes are connected with the vehicle;setting adjusting parameters for presetting;for connecting resource nodesTo serveThe amount of network resources provided;to serveLocated vehicle and connection resource nodeThe distance between them;
presentation to serviceAdopting the wired transmission cost generated by a transit node mode;setting adjusting parameters for presetting;to serveIn thatDeploying and operating resource nodes of time slotsAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of the forwarding data and the result;
presentation to serviceMigration cost generated by adopting a migration mode;presetting adjustment parameters;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count therebetween;cost for restarting the service instance after the preset migration to the target node;
representing vehicle and resource nodesCosts incurred in connecting and rebuilding instances by applying mirroring;creating an instance cost for a preset;as a resource nodeThe set of service types that are provided,presentation serviceIs of the type of a resource nodeA set of offered service types;setting adjusting parameters for presetting;as a resource nodeAnd resource nodeNetwork hop count in between;as a resource nodeA set of offered service types;presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein the content of the first and second substances,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction instance mode;
setting constraint conditions; the method comprises the following steps:
wherein, the first and the second end of the pipe are connected with each other,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run on resource nodesIn (1),presentation serviceIn thatTime slot deployment running on resource nodeIn the step (1), the first step,then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodePerforming the following steps; binary variableIs shown inTime slot serviceWhether the vehicle is in contact with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe located vehicle has no node with the resourceConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn a time slotThe amount of available computing, storage, and network resources;,represents a collection of all resource nodes;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count in between;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node;
according to time slot of vehicleInternal use serviceCost of migration schemeThe calculation formula and the constraint condition of (2), the calculation is in the time slotMigration policy that minimizes the total cost of migration of all services within.
Wherein the processing module 101 is further configured to:
according to time slotCalculating candidate connection resource nodes of each service according to the position of each vehicle and the coverage range of each resource node and constructing a candidate connection resource node set;
obtaining a candidate migration scheme of each service according to the candidate connection resource node set;
and obtaining a plurality of candidate migration strategies according to the candidate migration scheme of each service, wherein each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the candidate migration strategies.
Wherein the processing module 101 is further configured to:
setting chromosomes, each chromosome corresponding to one migration strategy and each chromosome comprisingThe gene segments of the gene are divided into a plurality of gene segments,for the total number of all services, each gene fragment corresponds to one migration scheme of one service; each gene segment comprises a first part and a second part, wherein the first part represents the sequence of the connection resource node of the service in the candidate connection resource node set, and the second part represents whether the deployment operation resource node of the service is consistent with the connection resource node of the service;
setting a fitness function related to the cost, wherein the cost is smaller if the fitness function value is larger, and the cost is larger if the fitness function value is smaller;
initializing a preset number of chromosomes to form a population, continuously carrying out iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population as the migration strategy with the minimum total migration cost of all services.
Initializing a preset number of chromosomes to form a population, continuously performing iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population, wherein the migration strategy with the minimum total migration cost of all services comprises the following steps:
calculating the fitness of each chromosome;
selecting at least two chromosomes from the population of all chromosomes according to fitness to perform cross operation and mutation operation of gene segments to obtain updated chromosomes;
calculating the fitness of the updated chromosome;
if the difference value between the maximum fitness of the chromosome after updating and the maximum fitness of the chromosome before updating is within a preset range, determining the time slot according to the chromosome after updating corresponding to the maximum fitnessA migration strategy which minimizes the total migration cost of all the services;
and if the difference value between the maximum fitness of the updated chromosome and the maximum fitness of the chromosome before updating is not in the preset range, replacing the chromosome before updating with the updated chromosome, selecting the chromosome again to perform the crossover operation and mutation operation of the gene segments, and calculating the fitness of the chromosome again until the difference value between the maximum fitness of the chromosome and the last maximum fitness is in the preset range.
Wherein the processing module 101 is further configured to:
setting a penalty function: penalty function when constraint condition is satisfiedAndhas a function value of 0, violatesPenalty function when beam condition is metAndhas a function value ofWhereinA fixed constant greater than 0;
Wherein the content of the first and second substances,is a constant value which is preset by the user,presentation serviceIn a time slotThe migration cost of (2).
The embodiment of the invention also provides a system for service migration in the vehicle network, which comprises a vehicle, roadside edge resource nodes and the equipment for service migration in the vehicle network.
In the device and the system provided by the embodiment of the invention, different migration schemes are provided for the instant service and the continuous service, different migration schemes and constraint conditions corresponding to different service types are comprehensively considered, and the lowest migration cost is realized under the condition of ensuring the service quality.
To illustrate the superiority of the scheme provided in the embodiment of the present invention, the following describes a cost comparison between Migration-first (MF) mode priority and Transit-first (TF) mode priority in the prior art and the scheme (represented by SMSC) provided in the embodiment of the present invention.
As shown in fig. 11, for each timeslot, the system cost generated by the service migration method SMSC according to the present invention, which determines the service migration policy, is always less than the system cost generated by the two existing methods, i.e., the migration mode priority MF and the transit node mode priority TF, because the reason is that compared with the prior selection of migration or transit, the method according to the present invention finely divides the service according to the service characteristics, comprehensively considers all the selections to reduce the cost, and finally selects the global optimal scheme, and the experimental result proves the effectiveness and the practicability of the method according to the present invention.
As shown in fig. 12, as the number of services increases, the average system cost obtained by the three methods gradually increases, and the system cost of the SMSC method provided by the present invention is significantly lower than that of the other two existing methods, which is reduced by about 40% of the system cost compared to the migration-priority MF method and reduced by about 50% of the system cost compared to the transition-priority TF method, and it is proved that the service migration method considering the service characteristics can significantly and effectively reduce the system cost.
Finally, it should be pointed out that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Those of ordinary skill in the art will understand that: modifications can be made to the technical solutions described in the foregoing embodiments, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for service migration in a vehicle network, applied to a scene comprising vehicles and roadside edge resource nodes, the method comprising:
step S1, defining a vehicle time slotInternal use serviceThe migration scheme of (2) generates a cost of;
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between, wherein the resource node is connected with the clothesAffairsThe roadside edge resource nodes are connected with the vehicle;setting adjusting parameters for presetting;for connecting resource nodesTo serveThe amount of network resources provided;to serveLocated vehicle and connection resource nodeThe distance between them;
presentation to serviceAdopting the wired transmission cost generated by a transit node mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of the forwarding data and the result;
presentation to serviceMigration cost generated by adopting a migration mode;presetting adjustment parameters;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count in between;cost for restarting the service instance after the preset migration to the target node;
wherein the content of the first and second substances,
representing vehicle and resource nodesConnection ofAnd rebuild the cost generated when the example through the application mirror image;creating an instance cost for a preset;as a resource nodeA set of offered service types;presentation serviceIs of the type of a resource nodeA set of offered service types;setting adjusting parameters for presetting;as a resource nodeAnd resource nodeNetwork hop count therebetween;as a resource nodeA set of offered service types;presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein the content of the first and second substances,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction instance mode;
step S2, setting constraint conditions; the method comprises the following steps:
wherein, the first and the second end of the pipe are connected with each other,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run in resource nodeIn (1),presentation serviceIn thatTime slot deployment running on resource nodeIn (1),then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodeThe preparation method comprises the following steps of (1) performing; binary variableIs shown inTime slot serviceWhether the located vehicle is connected with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe vehicle is not connected with the resource nodeConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn time slotThe amount of available computing, storage, and network resources;
,represents a collection of all resource nodes;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count in between;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node;
2. The method for service migration in a vehicle network according to claim 1, wherein step S3 includes:
according to time slotCalculating candidate connection resource nodes of each service according to the position of each vehicle and the coverage range of each resource node and constructing a candidate connection resource node set;
determining a candidate migration scheme of each service according to the candidate connection resource node set;
and obtaining a plurality of candidate migration strategies according to the candidate migration scheme of each service, wherein each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the candidate migration strategies.
3. The method for service migration in a vehicle network according to claim 2, wherein a plurality of candidate migration strategies are obtained according to the candidate migration scheme of each service and the correlation between different services, each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the plurality of candidate migration strategies, and comprises:
setting chromosomes, each chromosome corresponding to one migration strategy and each chromosome comprisingThe gene segments of the gene are divided into a plurality of gene segments,for the total number of all services, each gene fragment corresponds to one migration scheme of one service; each gene segment comprises a first part and a second part, wherein the first part represents the sequence of the connection resource nodes of the service in the candidate connection resource node set, and the second part represents whether the deployment operation resource nodes of the service are consistent with the connection resource nodes of the service;
setting a fitness function related to the cost, wherein the cost is smaller if the fitness function value is larger, and the cost is larger if the fitness function value is smaller;
initializing a preset number of chromosomes to form a population, continuously carrying out iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population as a migration strategy with the minimum total migration cost of all services.
4. The method for service migration in a vehicle network of claim 3, wherein said setting a fitness function comprises:
setting a penalty function: penalty function when constraint condition is satisfiedAndthe function value of (1) is 0, and when the constraint condition is violated, the penalty function is givenAndhas a function value ofWhereinA fixed constant greater than 0;
5. The method for service migration in a vehicular network according to claim 4, wherein initializing a preset number of chromosomes to form a population, continuously performing iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to an optimal chromosome in the population as a migration strategy with a minimum total migration cost of all services comprises:
calculating the fitness of each chromosome;
selecting at least two chromosomes from the population of all chromosomes according to fitness to perform cross operation and mutation operation of gene segments to obtain updated chromosomes;
calculating the fitness of the updated chromosome;
if the difference value between the maximum fitness of the chromosome after updating and the maximum fitness of the chromosome before updating is within a preset range, determining the time slot according to the chromosome after updating corresponding to the maximum fitnessA migration strategy with the minimum total migration cost of all the services;
and if the difference value between the maximum fitness of the updated chromosome and the maximum fitness of the chromosome before updating is not in the preset range, replacing the chromosome before updating with the updated chromosome, selecting the chromosome again to perform the crossover operation and mutation operation of the gene segments, and calculating the fitness of the chromosome again until the difference value between the maximum fitness of the chromosome and the last maximum fitness is in the preset range.
6. An apparatus for service migration in a vehicle network, applied to a scenario including a vehicle and roadside edge resource nodes, the apparatus comprising a processing module configured to:
defining a vehicle time slotInternally used servicesThe migration scheme of (2) generates a cost of;
For the continuity service, the calculation formula is as follows:
for the instant service, the calculation formula is as follows:
representing services on a vehicleAnd connecting resource nodesA wireless transmission cost generated by transmitting service data between the resource nodes and the serviceThe roadside edge resource nodes are connected with the vehicle;setting adjusting parameters for presetting;for connecting resource nodesTo serveThe amount of network resources provided;to serveLocated vehicle and connection resource nodeThe distance between them;
presentation to serviceAdopting the wired transmission cost generated by a transit node mode;presetting adjustment parameters;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween, wherein the deployment run resource node is a deployment run serviceRoadside edge resource nodes of (1); the coefficient 2 represents the transmission process of the forwarding data and the result;
presentation to serviceMigration cost generated by adopting a migration mode;setting adjusting parameters for presetting;to serveIn thatDeployment and operation resource node of time slotAnd serviceIn thatDeployment and operation resource node of time slotNetwork hop count in between;cost for restarting the service instance after the preset migration to the target node;
wherein the content of the first and second substances,
representing vehicle and resource nodesCosts incurred in connecting and rebuilding instances by applying mirroring;creating an instance cost for a preset;as a resource nodeA set of offered service types;presentation serviceIs of the type of a resource nodeA set of offered service types;setting adjusting parameters for presetting;as a resource nodeAnd resource nodeNetwork hop count in between;as a resource nodeA set of offered service types;presentation serviceIs not of a resource node typeSet of offered service types, but belonging to resource nodesA set of offered service types;
wherein the content of the first and second substances,presentation serviceIn thatThe mode selection of the time slot is performed,presentation serviceIn thatThe time slot adopts a migration mode;presentation serviceIn thatThe time slot adopts a transit node mode;presentation serviceIn thatThe time slot adopts an application mirror image reconstruction instance mode;
setting constraint conditions; the method comprises the following steps:
wherein the content of the first and second substances,represents a collection of all services; binary variableIs shown inTime slot serviceWhether to deploy and run in resource nodeIn (1),presentation serviceIn thatTime slot deployment running on resource nodeIn (1),then represents the serviceIn thatThe time slot is not deployed and operated on the resource nodePerforming the following steps; binary variableIs shown inTime slot serviceWhether the vehicle is in contact with the resource nodeThe connection is carried out by connecting the two parts,is shown inTime slot serviceVehicle and resource nodeThe connection is carried out by connecting the two parts,then it is indicated atTime slot serviceThe vehicle is not connected with the resource nodeConnecting;andrespectively representing servicesThe amount of computing, storage, and network resources required;andrespectively representing resource nodesIn a time slotThe amount of available computing, storage, and network resources;,represents a collection of all resource nodes;to serveIn thatDeploying and operating resource nodes of time slotsAnd serviceIn thatConnection resource node of time slotNetwork hop count therebetween;to serveThe preset maximum connection distance between the connection resource node and the deployment operation resource node;
7. The apparatus for service migration in a vehicle network of claim 6, wherein the processing module is further configured to:
according to time slotCalculating candidate connection resource nodes of each service according to the position of each vehicle and the coverage range of each resource node and constructing a candidate connection resource node set;
obtaining a candidate migration scheme of each service according to the candidate connection resource node set;
and obtaining a plurality of candidate migration strategies according to the candidate migration scheme of each service, wherein each candidate migration strategy comprises one migration scheme of each service, and the migration strategy with the minimum total migration cost of all the services is selected from the candidate migration strategies.
8. The apparatus for service migration in a vehicle network of claim 7, wherein the processing module is further configured to:
setting chromosomes, each chromosome corresponding to one migration strategy and each chromosome comprisingThe gene segments of the gene are divided into a plurality of gene segments,for the total number of all services, each gene fragment corresponds to one migration scheme of one service; each gene segment comprises a first part and a second part, wherein the first part represents the sequence of the connection resource node of the service in the candidate connection resource node set, and the second part represents whether the deployment operation resource node of the service is consistent with the connection resource node of the service;
setting a fitness function related to the cost, wherein the cost is smaller if the fitness function value is larger, and the cost is larger if the fitness function value is smaller;
initializing a preset number of chromosomes to form a population, continuously carrying out iterative evolution on the population by using a genetic algorithm, and finally determining a migration strategy corresponding to the optimal chromosomes in the population as the migration strategy with the minimum total migration cost of all services.
9. The apparatus for service migration in a vehicle network of claim 8, wherein the processing module is further configured to:
setting a penalty function: penalty function when constraint condition is metAndthe function value of (1) is 0, and when the constraint condition is violated, the penalty function is givenAndhas a function value ofWhereinA fixed constant greater than 0;
10. A system for service migration in a vehicle network, comprising vehicles, roadside edge resource nodes, and the apparatus of any of claims 6-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210961471.3A CN115033371B (en) | 2022-08-11 | 2022-08-11 | Method, equipment and system for service migration in vehicle network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210961471.3A CN115033371B (en) | 2022-08-11 | 2022-08-11 | Method, equipment and system for service migration in vehicle network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115033371A true CN115033371A (en) | 2022-09-09 |
CN115033371B CN115033371B (en) | 2022-11-25 |
Family
ID=83130749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210961471.3A Active CN115033371B (en) | 2022-08-11 | 2022-08-11 | Method, equipment and system for service migration in vehicle network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115033371B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9380107B2 (en) * | 2013-09-18 | 2016-06-28 | Sap Se | Migration event scheduling management |
CN110933609A (en) * | 2019-11-26 | 2020-03-27 | 航天科工网络信息发展有限公司 | Service migration method and device based on dynamic environment perception |
CN111132253A (en) * | 2019-12-31 | 2020-05-08 | 北京邮电大学 | Joint mobility management method for communication switching and service migration |
WO2021093535A1 (en) * | 2019-11-11 | 2021-05-20 | 中国移动通信有限公司研究院 | Mobile edge computing application data migration method, device, and core network node |
CN113115256A (en) * | 2021-04-14 | 2021-07-13 | 重庆邮电大学 | Online VMEC service network selection migration method |
CN113986370A (en) * | 2021-09-28 | 2022-01-28 | 湖南大学 | Base station selection and task offloading method, apparatus, device and medium for mobile edge computing system |
CN114357680A (en) * | 2022-01-06 | 2022-04-15 | 内蒙古大学 | Internet of vehicles edge computing road domain division service migration method and system |
-
2022
- 2022-08-11 CN CN202210961471.3A patent/CN115033371B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9380107B2 (en) * | 2013-09-18 | 2016-06-28 | Sap Se | Migration event scheduling management |
WO2021093535A1 (en) * | 2019-11-11 | 2021-05-20 | 中国移动通信有限公司研究院 | Mobile edge computing application data migration method, device, and core network node |
CN110933609A (en) * | 2019-11-26 | 2020-03-27 | 航天科工网络信息发展有限公司 | Service migration method and device based on dynamic environment perception |
CN111132253A (en) * | 2019-12-31 | 2020-05-08 | 北京邮电大学 | Joint mobility management method for communication switching and service migration |
CN113115256A (en) * | 2021-04-14 | 2021-07-13 | 重庆邮电大学 | Online VMEC service network selection migration method |
CN113986370A (en) * | 2021-09-28 | 2022-01-28 | 湖南大学 | Base station selection and task offloading method, apparatus, device and medium for mobile edge computing system |
CN114357680A (en) * | 2022-01-06 | 2022-04-15 | 内蒙古大学 | Internet of vehicles edge computing road domain division service migration method and system |
Non-Patent Citations (1)
Title |
---|
张海波等: "车联网中整合移动边缘计算与内容分发网络的移动性管理策略", 《电子与信息学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN115033371B (en) | 2022-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chen et al. | A multihop task offloading decision model in mec-enabled internet of vehicles | |
CN110035410B (en) | Method for joint resource allocation and computational offloading in software-defined vehicle-mounted edge network | |
Bao et al. | Edge computing-based joint client selection and networking scheme for federated learning in vehicular IoT | |
Ahmed et al. | Minimizing transmission delays in vehicular ad hoc networks by optimized placement of road-side unit | |
CN111148116B (en) | WMN gateway deployment and channel allocation joint optimization method facing emergency communication | |
Hossain et al. | Multi-objective Harris hawks optimization algorithm based 2-Hop routing algorithm for CR-VANET | |
WO2023024219A1 (en) | Joint optimization method and system for delay and spectrum occupancy in cloud-edge collaborative network | |
CN111641891A (en) | Task peer-to-peer unloading method and device in multi-access edge computing system | |
CN113114721B (en) | Software defined Internet of vehicles service migration method based on MEC | |
CN111768654A (en) | Multi-unmanned aerial vehicle cooperative relay assisted vehicle-mounted ad hoc network data transmission method | |
Guerna et al. | AC-RDV: A novel ant colony system for roadside units deployment in vehicular ad hoc networks | |
CN116261119A (en) | Intelligent collaborative task calculation and on-demand resource allocation method in vehicle-mounted environment | |
Sun et al. | A two-tier collection and processing scheme for fog-based mobile crowdsensing in the internet of vehicles | |
CN116541106A (en) | Computing task unloading method, computing device and storage medium | |
Guo et al. | An adaptive V2R communication strategy based on data delivery delay estimation in VANETs | |
CN113179296B (en) | Task unloading method for vehicle-mounted edge computing system | |
CN115033371B (en) | Method, equipment and system for service migration in vehicle network | |
Sangeetha et al. | Genetic optimization of hybrid clustering algorithm in mobile wireless sensor networks | |
CN105493602A (en) | Dynamic clustering for radio coordination in a virtual network | |
CN113993168A (en) | Multi-agent reinforcement learning-based cooperative caching method in fog wireless access network | |
Mittal et al. | A distributed task orchestration scheme in collaborative vehicular cloud edge networks | |
Duan et al. | A cross-layer design for data dissemination in vehicular ad hoc networks | |
CN116634504A (en) | Unmanned aerial vehicle networking topology relation and bandwidth allocation optimization strategy based on improved NSGA-II algorithm | |
CN114915940B (en) | Vehicle-road communication link matching method, system, equipment and medium | |
Rawlley et al. | Artificial intelligence‐empowered vision‐based self driver assistance system for internet of autonomous vehicles |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |