Method and system for dynamically adjusting service deployment in road network based on Agent self-organizationTechnical Field
The invention relates to the technical field of intelligent transportation, in particular to a method and a system for dynamically adjusting service deployment in a road network based on Agent self-organization.
Background
The vehicle-road cooperation V2X is an intelligent traffic system which utilizes road side units and a vehicle-mounted system as a basis to collect information, performs information transmission through a wireless communication technology, realizes data storage and decision making through a cloud control technology, and finally realizes information interaction and sharing of people, vehicles and roads. In edge computing mode, roadway collaboration requires deployment of various services to roadside units, such as overspeed detection in off-site law enforcement, no-pedestrian detection, and the like. Each service requires a certain consumption of resources (CPU, memory, etc.) and has specific functions, with different time delay constraints on the handling of the corresponding request. At present, various algorithms can realize the optimal deployment of services in a static environment (a certain number of vehicles and a certain speed).
Patent document CN105847326A (application number: CN 201610144035.1) discloses a dynamic deployment system of vehicle-mounted cloud resources, which comprises a resource integration module, a resource management module and a resource maintenance module, wherein the resource integration module is used for completing discovery, classification and encapsulation of VC resources, the resource management module is used for carrying out unified scheduling on a resource pool so as to realize information sharing and service collaboration, the resource integration module and the resource management module are constructed through a four-level node mechanism, the four-level node mechanism is sequentially a VC resource management center, a road side unit, agent nodes and users from top to bottom, the expansibility and the robustness of the system are improved through the four-level node mechanism, meanwhile, the complexity and the dependence of the whole system are reduced, and the influence of downtime of a single node on other nodes is avoided.
In real life, a static environment does not exist, the number of vehicles and the speed of the vehicles are dynamically changed, so that the number of service requests is changed, and the deployment of the service obviously needs to be adjusted to a certain degree. Therefore, providing a service dynamic adjustment method based on Agent self-organization according to the request information of each service on the road side unit is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method and a system for dynamically adjusting service deployment in a road network based on Agent self-organization.
According to the method for dynamically adjusting service deployment in the Agent self-organizing road network, each service on each road side unit RSU on the road network is subjected to decision adjustment according to the preset decision sequence and the self information and the neighbor information, the decision adjustment basis comprises the steps of carrying out simulation execution of a request under the opposite state of the current state of a target service, calculating a decision factor, adjusting the state according to the magnitude of the decision factor value, and carrying out additional judgment on the death decision by utilizing the quantity of the same type of deployed service, the timeout rate and the normal processing rate of the service.
Preferably, the target service is set in an undeployed state, all requests received in a period are simulated and processed once, and the simulated timeout request number noResponse _new, the normal processing request number processed_new, the average request processing time delay AVERAGEDELAY _new and the utilization rate useRatio _new of the target service are obtained;
Calculating the data obtained by simulation and the data obtained by the real execution request, further obtaining an influence value score_self of the data, obtaining an influence value score_neighbor of the neighbor by simulation, and finally obtaining a decision factor alpha by adding the score_self and the score_neighbor;
score_self calculation formula is:
wherein processed, noReponse, averageDelay, useRatio represents the number of normal processing requests, the number of timeout requests, the average request processing delay and the service utilization rate obtained by the target service processing the request in the real state, and total represents the total number of requests received by the target service in the period.
Preferably, if the target service is originally in the undeployed state, the decision factors of all neighbors are obtained in the same way, whether the decision factor value of the target service is larger than the decision factor value of all other neighbors is judged, if so, cloning of the target service is carried out, and if not, the undeployed state is maintained;
if the target service is originally in the deployed state, firstly judging whether the number of the same type of service on the current road network is larger than 1, if not, keeping the deployed state, if so, continuously acquiring the timeout rate noResponse _R and the normal processing rate processed_R of the target service in one period, wherein the expression is as follows:
If noReponse _R is more than or equal to 0.5 or processed_R is less than or equal to 0.5, the deployed state is maintained, otherwise, decision factor alpha is used for judging, if alpha is less than 1.0, target service is eliminated, and otherwise, the deployed state is maintained.
Preferably, the deployment of the service is evaluated after decision adjustment every T time, and the calculation mode is as follows:
Wherein serviceCount is total number of services, processedRatio is average service normal response rate, noResponseRatio is average service response timeout rate, AVERAGEDELAY is average service normal processing time delay, averageUseRatio is average service utilization rate, RSUS is set of all RSUs on a road network, service is set of all service types, len is size of an acquisition object, process_queue and noResponse _queue are respectively used for normal processing queue and timeout queue, total is total request number in T time on a single RSU, count is number of RSUs on the road network, total_process_time is total time delay spent by processing requests in one period of service s on the single RSU, total_process_count is total number of processing requests in one period of service s on the single RSU, total_time is time delay of a single RSU actually used for calculating processing in one period, CHECKINTERVAL is used for adjusting period T.
Preferably, the decision factor alpha of the target service is calculated as follows:
The method comprises the steps of setting a target service decision, wherein the score_self is an influence value of the target service decision on the target service decision when the target service decision is deployed, N represents an RSU set influenced in RSU neighbors, r is an RSU influenced in the RSU neighbors, score_neighbor is an influence value of the decision on the neighbors, and when the decision factor value of the target service is maximum in the neighbors, the decision is adjusted to be in an opposite state, namely cloning is performed, otherwise, the undeployed state is maintained.
According to the system for dynamically adjusting service deployment in the Agent self-organizing road network, each service on each road side unit RSU on the road network is subjected to decision adjustment according to the preset decision sequence and the self information and the neighbor information, the decision adjustment basis comprises the steps of carrying out simulation execution of a request under the opposite state of the current state of a target service, calculating a decision factor, adjusting the state according to the magnitude of the decision factor value, and carrying out additional judgment on the death decision by utilizing the quantity of the same type of deployed service, the timeout rate and the normal processing rate of the service.
Preferably, the target service is set in an undeployed state, all requests received in a period are simulated and processed once, and the simulated timeout request number noResponse _new, the normal processing request number processed_new, the average request processing time delay AVERAGEDELAY _new and the utilization rate useRatio _new of the target service are obtained;
Calculating the data obtained by simulation and the data obtained by the real execution request, further obtaining an influence value score_self of the data, obtaining an influence value score_neighbor of the neighbor by simulation, and finally obtaining a decision factor alpha by adding the score_self and the score_neighbor;
score_self calculation formula is:
wherein processed, noReponse, averageDelay, useRatio represents the number of normal processing requests, the number of timeout requests, the average request processing delay and the service utilization rate obtained by the target service processing the request in the real state, and total represents the total number of requests received by the target service in the period.
Preferably, if the target service is originally in the undeployed state, the decision factors of all neighbors are obtained in the same way, whether the decision factor value of the target service is larger than the decision factor value of all other neighbors is judged, if so, cloning of the target service is carried out, and if not, the undeployed state is maintained;
if the target service is originally in the deployed state, firstly judging whether the number of the same type of service on the current road network is larger than 1, if not, keeping the deployed state, if so, continuously acquiring the timeout rate noResponse _R and the normal processing rate processed_R of the target service in one period, wherein the expression is as follows:
If noReponse _R is more than or equal to 0.5 or processed_R is less than or equal to 0.5, the deployed state is maintained, otherwise, decision factor alpha is used for judging, if alpha is less than 1.0, target service is eliminated, and otherwise, the deployed state is maintained.
Preferably, the deployment of the service is evaluated after decision adjustment every T time, and the calculation mode is as follows:
Wherein serviceCount is total number of services, processedRatio is average service normal response rate, noResponseRatio is average service response timeout rate, AVERAGEDELAY is average service normal processing time delay, averageUseRatio is average service utilization rate, RSUS is set of all RSUs on a road network, service is set of all service types, len is size of an acquisition object, process_queue and noResponse _queue are respectively used for normal processing queue and timeout queue, total is total request number in T time on a single RSU, count is number of RSUs on the road network, total_process_time is total time delay spent by processing requests in one period of service s on the single RSU, total_process_count is total number of processing requests in one period of service s on the single RSU, total_time is time delay of a single RSU actually used for calculating processing in one period, CHECKINTERVAL is used for adjusting period T.
Preferably, the decision factor alpha of the target service is calculated as follows:
The method comprises the steps of setting a target service decision, wherein the score_self is an influence value of the target service decision on the target service decision when the target service decision is deployed, N represents an RSU set influenced in RSU neighbors, r is an RSU influenced in the RSU neighbors, score_neighbor is an influence value of the decision on the neighbors, and when the decision factor value of the target service is maximum in the neighbors, the decision is adjusted to be in an opposite state, namely cloning is performed, otherwise, the undeployed state is maintained.
Compared with the prior art, the invention has the following beneficial effects:
The invention focuses on the self-organizing dynamic adjustment of the service, aims at automatically adjusting the cloning and the extinction of the service by utilizing local information such as self information, neighbor information and the like, reduces manual operation and realizes the self-organizing dynamic optimization deployment of the service.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a schematic diagram of a cloning decision for a service in the present invention;
FIG. 2 is a schematic diagram of an extinction decision for a service according to the present invention;
Fig. 3 is a schematic diagram of decision making for all services in a road network according to the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
Examples:
the invention provides a dynamic adjustment method for service deployment in a road network based on Agent self-organization, which comprises the steps of automatically carrying out decision adjustment on the state of each service (such as overspeed detection service, no-gift pedestrian detection service and the like in the field of non-on-site law enforcement) on each RSU on the road network according to a pre-determined decision sequence, and realizing service optimization deployment of traffic density distribution on the self-adaptive road network according to self information and neighbor information.
The indexes for evaluating the service deployment comprise:
| nouns (noun) | Meaning of |
| serviceCount | Total number of services |
| processedRatio | Average service normal response rate |
| noResponseRatio | Average service response timeout rate |
| averageDelay | Average service normal processing delay |
| averageUseRatio | Average service utilization |
And evaluating the deployment of the service after decision adjustment every T time. The specific calculation mode is as follows (the number serviceCount of services is directly counted to determine whether all the services on each RSU on the road network are deployed or not):
Wherein RSUS denotes a set of all RSUs on the road network, service denotes a set of all service types, len denotes a size of an acquisition object, process_queue and noResponse _queue denote a normal processing queue and a timeout queue, respectively, total denotes a total number of requests in T time on a single RSU, count denotes a number of RSUs on the road network where service is deployed, total_process_time denotes a total delay spent processing requests in one period of service s on the single RSU, total_process_count denotes a total number of requests processed in one period of service s on the single RSU, use_time denotes a delay actually used for calculation processing in one period of the single RSU, and CHECKINTERVAL denotes an adjustment period T.
The experimental scene of the invention is that a vehicle sends a service request of a certain type to an adjacent RSU_A, after the request is received by the RSU_A, whether the service is deployed or not is judged, if so, the request is put into a Request Queue (RQ) of the service on the RSU_A to wait for processing, if not, the request is forwarded to the RSU_B where the service is deployed, and after the processing, the result is returned to the RSU_A. The processing results of the request include two types, one is timeout and failure to respond normally to the request, the request of the result is placed in a timeout queue (NQ) of the service on rau_a, and the other is normal response and the processing result is returned to the vehicle, and the request of the result is placed in a normal Processing Queue (PQ) of the service on rsu_a. And carrying out decision adjustment on all services in the road network every T time so as to adapt to traffic flow density distribution and realize optimal deployment.
When the decision is adjusted, each service on each RSU is decided according to a pre-determined decision sequence (taking a road network as a graph, RSUs as nodes and any node as a starting point, performing depth-first traversal to obtain the decision sequence).
When deciding on an a service on rsu_a, there are two cases where the a service is deployed on rsu_a and the a service is not deployed on rsu_a. The decision method of the two cases is different, if the A service is not deployed, the decision result is cloning or the undeployed state is kept unchanged, otherwise, the decision result is extinction or the deployed state is kept unchanged.
If the A service is in an undeployed state, the method of decision making adjustment is shown in FIG. 1. First, the decision factor value alpha of the a service is obtained, and assuming that the a service is in its opposite state (deployed), it will have an effect on the a service on its own and on part of the neighbors of rsu_a. For the self, the request received by the A service on the RSU_A is forwarded to the RSU nearby with the service for processing, and if the A service on the RSU_A is in a deployed state, the forwarding delay is not existed, so that the timeout rate is reduced. Therefore, the request processing of one T period is re-simulated by using the request information received by the a service on rsu_a in the T time, and the key is that there is no forwarding delay in processing the request, so as to obtain the simulated timeout request number (noResponse _new), the normal processing request number (processed_new), the average request processing delay of the a service (AVERAGEDELAY _new), and the utilization rate of the a service (useRatio _new). And calculating an influence factor value score_self of a decision on the data by using the data obtained by real execution and the data obtained by simulation, wherein the calculation formula is as follows:
Wherein processed, noReponse, averageDelay, useRatio represents the number of normal processing requests, the number of overtime requests, the average request processing time delay and the service utilization rate obtained by the processing request of the A service in the real state, and total represents the total number of requests received by the A service in the period.
After calculating the influence value score_self of the A service decision on the RSU_A when the A service decision is deployed, considering the influence of the decision on the A service on partial neighbors of the RSU_A, the neighbors have a common point that the A service is not deployed by themselves and the A service is not deployed in the neighbors, so that if the A service is deployed by the RSU_A, for the neighbors, the forwarding distance is reduced to the distance from the RSU_A when the A service type request is received, the forwarding time delay is reduced, and evaluation indexes such as the overtime rate are correspondingly improved. Thus, the neighbors are simulated and all requests they receive within this period are re-simulated for one period, the key being that among these requests, the request forwarding latency for the type a service is reduced. And calculating an influence value score_neighbor of the decision on the neighbor by using the acquired simulation data and the real execution data.
The calculation formula of the decision factor alpha of the A service on RSU_A is as follows:
Where N represents the set of RSUs affected in the rsu_a neighbor. In the same way, the decision factor values of all neighbor a services of rsu_a are calculated. When the decision factor value of the a service on rsu_a is maximum in its neighbors, its decision is adjusted to the opposite state (deployed), i.e. cloning is performed, otherwise the undeployed state is maintained.
If the A service is in a deployed state, the method of decision making adjustment is shown in FIG. 2. Firstly, judging whether the number of the A services deployed on the whole road network is larger than 1, if not, indicating that the A services on the RSU_A are the last A type services at present, and not allowing extinction. Secondly, because a decision is made by utilizing the relation between the decision factor and the threshold value, certain misjudgment is caused (for example, the service A is excessively loaded, even if the service A is eliminated, the effect is not too bad, the decision factor is too small, and the error is eliminated), therefore, the overtime rate and the normal processing rate of the service A are obtained by utilizing the extra load judgment through the overtime request number (noResponse), the normal processing request number (processed) and the total request number (total) which are obtained by processing the request in one period by the service A, and the formula is as follows:
when noResponse _r > =0.5 or processed_r < =0.5, it is stated that the a service is too busy for this period to allow extinction. And finally, utilizing the decision factor alpha of the A service and the threshold value to carry out decision adjustment. As in fig. 3, assuming that the a service is in its opposite state (undeployed), it will have an impact on itself and some neighbors. For the neighbors, there are partial neighbors that have a common point that they do not deploy A services themselves and that have no other RSU that deploy A services except RSU_A, for which if A services on RSU_A are lost, the A service requests they receive will be forwarded to RSU that are farther forward with greater delay, and the simulation execution is utilized to obtain the impact value score_neighbor for these neighbors. The decision factor alpha of the A service on RSU_A is obtained through score_self and score_neighbor, when alpha <1.0, the service decision is adjusted to be in the opposite state (undeployed), namely, death, otherwise, the existing deployed state is maintained.
Those skilled in the art will appreciate that the systems, apparatus, and their respective modules provided herein may be implemented entirely by logic programming of method steps such that the systems, apparatus, and their respective modules are implemented as logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc., in addition to the systems, apparatus, and their respective modules being implemented as pure computer readable program code. Therefore, the system, the device and the respective modules thereof provided by the invention can be regarded as a hardware component, and the modules for realizing various programs included therein can be regarded as a structure in the hardware component, and the modules for realizing various functions can be regarded as a structure in the hardware component as well as a software program for realizing the method.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.