CN113255989B - Sustainable service resource allocation method based on limited service range in road network environment - Google Patents

Sustainable service resource allocation method based on limited service range in road network environment Download PDF

Info

Publication number
CN113255989B
CN113255989B CN202110556378.XA CN202110556378A CN113255989B CN 113255989 B CN113255989 B CN 113255989B CN 202110556378 A CN202110556378 A CN 202110556378A CN 113255989 B CN113255989 B CN 113255989B
Authority
CN
China
Prior art keywords
client
edge
range
current
server
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.)
Active
Application number
CN202110556378.XA
Other languages
Chinese (zh)
Other versions
CN113255989A (en
Inventor
韩文军
张亚平
李国文
陈红
王波
陈丹
吉根林
赵斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Normal University
Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd
State Grid Economic and Technological Research Institute
Economic and Technological Research Institute of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office
Nanjing Normal University
Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd
Economic and Technological Research Institute of State Grid Jiangsu Electric Power Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office, Nanjing Normal University, Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd, Economic and Technological Research Institute of State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office
Priority to CN202110556378.XA priority Critical patent/CN113255989B/en
Publication of CN113255989A publication Critical patent/CN113255989A/en
Application granted granted Critical
Publication of CN113255989B publication Critical patent/CN113255989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a sustainable service resource allocation method based on a limited service range in a road network environment, which comprises the following steps: initial allocation is carried out on the initial position of the client; judging the movement direction of the client according to the position data at the last moment; predicting the movement range of the client according to the movement direction and the speed; combining a service range of a server and a motion range of a client to obtain a bipartite graph for prediction; checking and adjusting the capacity of the server according to the two graphs, so that all the capacities of the server meet the capacity limit; according to the two graphs, checking and adjusting the connection condition of the client and the server, so that one client is correspondingly connected with one server only; and (3) adjusting the prediction result by using the bipartite graph updated in the step S6 to obtain a final distribution relation. The invention utilizes the pre-calculation of the motion characteristics of the client, reduces the calculation time of the allocation update, and can meet the requirement of persistent service resource allocation in a rapid update scene.

Description

Sustainable service resource allocation method based on limited service range in road network environment
Technical Field
The invention relates to a method for realizing service resource allocation, in particular to a method for continuously allocating service resources based on a limited service range in a road network environment.
Background
With the development and maturity of the general computing technology, the positioning technology and the wireless communication technology, the resource allocation problem in the mobile computing scene becomes a new research hot spot, and is widely applied to the fields of communication resource scheduling, emergency event response, public resource planning and the like. The allocation problem is an optimization problem of allocating resource providers (servers) to resource users (clients), and common problems are facility site selection, task allocation, resource scheduling, and the like. In the service resource allocation problem, distance is an important factor affecting the quality of service between the client and the service. For example, when a mobile phone is used to connect to WIFI, the closer the mobile phone is to the WIFI transmitter, the better the signal, and the higher the quality of service that the mobile phone receives, so the allocation problem is actually an optimization problem for optimizing the overall quality of service.
The existing allocation method converts the relationship between the server and the client into a two-part graph, and if there is a possible allocation relationship between the server and the client, there is an edge between nodes representing the server and the client in the two-part graph. Then, the optimal allocation relation is obtained by executing Derigs the continuous shortest path algorithm in the bipartite graph. The input to the continuous shortest path algorithm is a flow graph, then γ iterations are performed on the flow graph, outputting all the opposite edges. The shortest path from source point p to sink point q is calculated once per iteration and then this path is inverted for amplification. After the last iteration, each reverse edge on the flowsheet from the point in U to the point in S represents one of the best matches.
In urban geographic space, a large number of clients in a mobile computing environment continue to move in a road network and remain in communication with a server. The server needs to quickly make adjustment according to the change condition of the client position to calculate the optimal allocation relation according with the current condition. However, the conventional service resource allocation method for the static scene is not suitable for the problem of persistent computation in the dynamic scene, and is mainly characterized in the following three aspects:
real-time performance: because the location of the client is frequently updated, the current allocation relation needs to be quickly obtained according to the distribution situation of the whole user. Most of the current static algorithms have high time complexity and cannot realize quick response.
Universality: from a city perspective, the number and distribution of users in different areas are severely heterogeneous over different time periods. The existing allocation algorithm cannot effectively allocate resources according to different client distribution conditions, and unbalance of the resource allocation is easy to cause.
Updating the distribution relation: user movement is limited by the road network so that there are links between adjacent moments that can be used to help update the allocation relationships, and existing algorithms ignore the links between these adjacent moments, making a number of repeated and unnecessary calculations, and are inefficient.
Due to the development of mobile terminals, new mobile scenarios are continuously presented, and a rapid calculation of an allocation result according to the relationship between the mobile client and the server is required, which clearly presents a great challenge to the current service resource allocation technology.
Disclosure of Invention
The invention aims to: in order to overcome the defects in the prior art, the persistent service resource allocation method based on the limited service range in the road network environment is provided, the pre-calculation of the motion characteristics of the client is utilized, the calculation time for allocation update is reduced, and the persistent service resource allocation requirement in a rapid update scene can be met.
The technical scheme is as follows: in order to achieve the above object, the present invention provides a persistent service resource allocation method based on a limited service range in a road network environment, including the following steps:
S1: initial allocation is carried out on the initial position of the client;
s2: judging the movement direction of the client according to the position data at the last moment;
s3: predicting the movement range of the client according to the movement direction and the speed of the client;
S4: combining a service range of a server and a motion range of a client to obtain a bipartite graph for prediction;
s5: checking and adjusting the capacity of the server according to the two graphs, so that all the capacities of the server meet the capacity limit;
S6: according to the two graphs, checking and adjusting the connection condition of the client and the server, so that one client is correspondingly connected with one server only;
s7: and (3) adjusting the prediction result by using the bipartite graph updated in the step S6 to obtain a final distribution relation.
Further, the method for determining the motion direction of the client in step S2 is to obtain the current motion direction by using the difference between the positions of the two moments.
Further, the calculation of the current movement direction of the client in step S2 includes two cases, which are respectively as follows:
Case 1: the two points at adjacent moments are positioned on the same side, the offset is directly differenced, if the difference is greater than 0, the movement direction is the direction along the side, otherwise, the movement direction is the reverse direction;
Case 2: two points at adjacent moments are positioned on different edges, the intersection point of the current edge and the edge at the last moment is calculated, and whether the intersection point is the starting point or the end point of the current edge is judged to obtain the current movement direction of the current edge.
Further, the method for predicting the motion range of the client in step S3 is as follows:
A1: calculating a moving distance: subtracting the offset d of the previous moment from the offset d' of the current moment to obtain the moving distance delta d of the previous moment, and then, assuming that the moving distance of the next moment ranges from 0.5 delta d to 1.5 delta d, namely the moving furthest distance is 1.5 delta d, the nearest distance is 0.5 delta d, and adding the moving range to the current offset along the moving direction can obtain the client position range of the next moment, namely US i.l=USi-1. L+delta d;
a2: and predicting the movement range of the client by combining the movement direction and the movement distance of the client.
Further, the client location range at the next moment in the step A1 includes two cases, which are respectively as follows:
Case 1: adding the current offset and the moving range to obtain a client position range at the next moment when the current offset and the moving range are smaller than or equal to the length of the current edge;
case 2: and if the current offset and the moving range are greater than the length of the current edge, subtracting the edge length from the added result of the current offset and the moving range to obtain an overflow value, and finding adjacent edges according to the end points of the edges, wherein the range of each adjacent edge from the starting point is the client position range of the next moment.
Further, the method for obtaining the bipartite graph in step S4 includes: because the position of the service end is fixed, an index is built for each side in the road network in the preprocessing process, the elements in the index list of each side are the service ends positioned on the side, the elements are ordered from small to large according to the offset of the elements on the current side, the index on the right side is the index of each side in a left broken line frame, then an empty bipartite graph is newly built, a client list is traversed, the ID of the side where the client is positioned is searched for each client, the inverted list is searched for, the corresponding service end set is searched for according to the range, and the edges between the service end set and the corresponding client are added into the bipartite graph, so that the predicted bipartite graph is obtained.
Further, in the step S5, the adjustment method for the server beyond the capacity limit is as follows: maintaining the connection of the service end by adopting a maximum heap, checking whether the edge is the minimum cost edge or the only edge of the corresponding client end every time when the edge at the top of the heap is fetched, if not, deleting the edge until the number of the remaining edges meets the upper limit of capacity or the connection of the whole service end is traversed, and if the edge is the only connection edge of the corresponding client end or the minimum cost edge, otherwise, continuing to pop the edge from the top of the heap; and adopting a second traversal by using a heuristic algorithm, wherein the traversal deletes the connection side as long as the connection side is not the only connection side of the corresponding client, and all the servers meet the capacity limit after two traversals.
Further, in the step S6, the connection adjustment method between the client and the server includes: and ordering the connected edges of more than one service end for the conflict of the client connection, wherein only the connected edge with the minimum cost is reserved for each client because the service end has met the capacity limit, and the conflict of the clients is solved at the moment, namely the allocation with the minimum cost is realized.
Further, the method for obtaining the final allocation relationship in step S7 includes: after the snapshot of the client at the current moment is updated, the relation between the client and the server in the snapshot at the current moment is converted into a bipartite graph; the bipartite graph at the current moment is still a many-to-many bipartite graph, but the conflict existing in the bipartite graph is not solved one by one, because a predicted allocation is already existing in the previous step, next, the predicted allocation is traversed, whether each allocation edge exists in the bipartite graph representing the relationship between the client and the server at the current moment is checked, if the predicted result is reasonable for the moment, the edge is deleted from the bipartite graph at the current moment, meanwhile, the client connected with the edge is deleted from the bipartite graph at the current moment, the capacity of the corresponding server is reduced by 1, the predicted correct result is obtained after traversing the predicted allocation, only the part which is not predicted correctly remains in the bipartite graph scale at the moment, the corresponding client number is subtracted from the corresponding server capacity when the predicted correct edge is deleted, and the allocation of the rest is calculated by adopting a classical continuous shortest path algorithm for the rest part.
The invention adopts a method of firstly predicting and then correcting, firstly adopts a classical continuous shortest path algorithm to initially allocate the initial position of the client, then predicts the possible range of the client in the next snapshot according to the movement direction of the client on a road network, analyzes all possible allocation relations in the range, then adopts a heuristic algorithm to obtain a predicted optimal allocation, and then checks the predicted correct rate according to the updated position of the client and the relation between the updated position and a server after the snapshot of the client is updated at the next moment, and directly prunes the predicted correct allocation, and the rest of the continuous shortest path algorithm is executed to obtain the final allocation.
The beneficial effects are that: compared with the prior art, the invention has the following advantages:
1. And pre-calculating by utilizing the road network information and the motion information of the client to obtain the predicted distribution condition, thereby reducing the calculation cost after data updating.
2. The new heuristic method is adopted to replace the iterative computation augmentation path solving of the existing method, the relation between adjacent moments is applied to distribution, the time consumption of a conflict solving stage is greatly saved, and the distribution efficiency is improved.
3. The method is suitable for all scenes needing to distribute service resources, such as WIFI (wireless fidelity) resource distribution, electric automobile charging pile distribution, base station signal distribution and the like, has wide application range, and solves the problems that the existing distribution algorithm cannot effectively distribute resources according to different client distribution conditions and is easy to cause unbalance of resource distribution.
4. The method can meet the requirement of continuously distributing low delay in a frequent updating scene at a higher updating speed, solves the problem that the current static algorithm is high in time complexity and cannot realize quick response, and has good market application value.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention;
FIG. 2 is a schematic diagram of a two-part diagram;
FIG. 3 is a graph showing the comparison of the calculation time consumption of the present method and the classical method (continuous shortest path method) when the capacity of the server varies;
FIG. 4 is a graph of update interval versus runtime;
FIG. 5 is a graph of service scope versus runtime;
FIG. 6 is a graph of the number of clients versus runtime;
FIG. 7 is a graph of server number versus runtime;
FIG. 8 is a graph of data size versus run time for the method of the present invention.
Detailed Description
The present application is further illustrated in the accompanying drawings and detailed description which are to be understood as being merely illustrative of the application and not limiting of its scope, and various modifications of the application, which are equivalent to those skilled in the art upon reading the application, will fall within the scope of the application as defined in the appended claims.
As shown in fig. 1, the present invention provides a persistent service resource allocation method based on a limited service range in a road network environment, which includes the following steps:
S1: initial allocation is carried out on the initial position of the client;
s2: judging the movement direction of the client according to the position data at the last moment;
s3: predicting the movement range of the client according to the movement direction and the speed of the client;
S4: combining a service range of a server and a motion range of a client to obtain a bipartite graph for prediction;
s5: checking and adjusting the capacity of the server according to the two graphs, so that all the capacities of the server meet the capacity limit;
S6: according to the two graphs, checking and adjusting the connection condition of the client and the server, so that one client is correspondingly connected with one server only;
s7: and (3) adjusting the prediction result by using the bipartite graph updated in the step S6 to obtain a final distribution relation.
In step S2 of this embodiment, the method for determining the direction of motion of the client uses the difference between the positions at two times to obtain the current direction of motion. The calculation of the current movement direction of the client includes two cases, respectively as follows:
Case 1: the two points at adjacent moments are positioned on the same side, the offset is directly differenced, if the difference is greater than 0, the movement direction is the direction along the side, otherwise, the movement direction is the reverse direction;
Case 2: two points at adjacent moments are positioned on different edges, the intersection point of the current edge and the edge at the last moment is calculated, and whether the intersection point is the starting point or the end point of the current edge is judged to obtain the current movement direction of the current edge.
The prediction method of the motion range of the client in step S3 of this embodiment is as follows:
A1: calculating a moving distance: subtracting the offset d of the previous moment from the offset d' of the current moment to obtain the moving distance delta d of the previous moment, and then, assuming that the moving distance of the next moment ranges from 0.5 delta d to 1.5 delta d, namely the moving furthest distance is 1.5 delta d, the nearest distance is 0.5 delta d, and adding the moving range to the current offset along the moving direction can obtain the client position range of the next moment, namely US i.l=USi-1. L+delta d;
a2: and predicting the movement range of the client by combining the movement direction and the movement distance of the client.
The client location range at the next moment in step A1 includes two cases, which are respectively as follows:
Case 1: adding the current offset and the moving range to obtain a client position range at the next moment when the current offset and the moving range are smaller than or equal to the length of the current edge;
case 2: and if the current offset and the moving range are greater than the length of the current edge, subtracting the edge length from the added result of the current offset and the moving range to obtain an overflow value, and finding adjacent edges according to the end points of the edges, wherein the range of each adjacent edge from the starting point is the client position range of the next moment.
The method for acquiring the bipartite graph in step S4 in this embodiment is as follows: because the position of the service end is fixed, an index is built for each side in the road network in the preprocessing process, the elements in the index list of each side are the service ends positioned on the side, and are ordered from small to large according to the offset of the elements on the current side, as shown in fig. 2, the index on the right side is the index of each side in a left broken line frame, then an empty bipartite graph is created, a client list is traversed, the ID of the side where the client is positioned is searched for each client, an inverted list is searched for, a corresponding service end set is searched for according to the range, and the sides between the service end set and the corresponding client are added into the bipartite graph, so that a predicted bipartite graph is obtained.
In step S5 of this embodiment, the adjustment method for the server beyond the capacity limit is as follows: maintaining the connection of the service end by adopting a maximum heap, checking whether the edge is the minimum cost edge or the only edge of the corresponding client end every time when the edge at the top of the heap is fetched, if not, deleting the edge until the number of the remaining edges meets the upper limit of capacity or the connection of the whole service end is traversed, and if the edge is the only connection edge of the corresponding client end or the minimum cost edge, otherwise, continuing to pop the edge from the top of the heap; after the first traversal, there is still a possibility that a server with an exceeding capacity exists, for example, all connections of the server are the minimum cost connections of the corresponding clients, and cannot be deleted in the first traversal, and a heuristic algorithm is used to use a second traversal, and in this traversal, as long as the connection is not the only connection edge of the corresponding client, the edge is deleted, and after two traversals, all the servers have met the capacity limit, and the conflict that the server exceeds the capacity limit has been resolved.
In step S6 of this embodiment, the connection condition checking method between the client and the server includes: since a client can only accept services provided by one server, it is also undesirable if one client is connected to more than one server. It is necessary to traverse the client list to check if more than one server is connected to any clients.
In step S6 of this embodiment, the connection adjustment method between the client and the server includes: and ordering the connected edges of more than one service end for the conflict of the client connection, wherein only the connected edge with the minimum cost is reserved for each client because the service end has met the capacity limit, and the conflict of the clients is solved at the moment, namely the allocation with the minimum cost is realized.
The method for obtaining the final allocation relation in step S7 in this embodiment is as follows: after the snapshot of the client at the current moment is updated, the relation between the client and the server in the snapshot at the current moment is converted into a bipartite graph; the bipartite graph at the current moment is still a many-to-many bipartite graph, but the conflict existing in the bipartite graph is not solved one by one, because a predicted allocation is already existing in the previous step, next, the predicted allocation is traversed, whether each allocation edge exists in the bipartite graph representing the relationship between the client and the server at the current moment is checked, if the predicted result is reasonable for the moment, the edge is deleted from the bipartite graph at the current moment, meanwhile, the client connected with the edge is deleted from the bipartite graph at the current moment, the capacity of the corresponding server is reduced by 1, the predicted correct result is obtained after traversing the predicted allocation, only the part which is not predicted correctly remains in the bipartite graph scale at the moment, the corresponding client number is subtracted from the corresponding server capacity when the predicted correct edge is deleted, and the allocation of the rest is calculated by adopting a classical continuous shortest path algorithm for the rest part.
The embodiment also provides a sustainable service resource distribution system based on a limited service range in a road network environment, which comprises a network interface, a memory and a processor; the network interface is used for receiving and transmitting signals in the process of receiving and transmitting information with other external network elements; a memory storing computer program instructions executable on the processor; and a processor for executing the steps of the consensus method as described above when executing the computer program instructions.
The present embodiment also provides a computer storage medium storing a computer program which, when executed by a processor, implements the method described above. The computer-readable medium may be considered tangible and non-transitory. Non-limiting examples of non-transitory tangible computer readable media include non-volatile memory circuits (e.g., flash memory circuits, erasable programmable read-only memory circuits, or masked read-only memory circuits), volatile memory circuits (e.g., static random access memory circuits or dynamic random access memory circuits), magnetic storage media (e.g., analog or digital magnetic tape or hard disk drives), and optical storage media (e.g., CDs, DVDs, or blu-ray discs), among others. The computer program includes processor-executable instructions stored on at least one non-transitory tangible computer-readable medium. The computer program may also include or be dependent on stored data. The computer programs may include a basic input/output system (BIOS) that interacts with the hardware of the special purpose computer, device drivers that interact with particular devices of the special purpose computer, one or more operating systems, user applications, background services, background applications, and so forth.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Based on the technical scheme provided above, in order to verify the effect of the method of the present invention, in this embodiment, the above scheme is applied as an example, and specifically as follows:
In the experimental verification, an experiment is carried out by adopting a real data set, wherein the client data is the GPS track data of the Shanghai taxi, the real GPS track data generated by 13000 taxis in Shanghai city in 2015, 4 month and 1, and the sampling frequency is 10 seconds. The server-side data set extracts the position information of public facilities such as subway stations on an OSM map, and the number of the server-side data sets is 200. The road network information is real road network data of Shanghai city on the OSM map.
The distribution is carried out by using the method and the classical method (continuous shortest path method) respectively, and the specific experimental data integration result is as follows:
As can be seen in fig. 3, the running time of the method of the present invention is much smaller than that of the classical method, and although the server capacity is changing, the total allocation amount is not changing, so there is no impact on the algorithm running time.
As can be seen from fig. 4, in order to study the influence of the update frequency on the algorithm, the present embodiment extracts the original data, sets the time interval of the location update to 10-50 seconds, and samples the location of the client at regular intervals, which can be seen that the method of the present invention is superior to the classical method at different update frequencies.
As can be seen from fig. 5, with the increase of the service scope, the algorithm running time and the allocation cost increase, because with the increase of the service scope, the service end can cover more clients which are not in any service end scope before and are included in the whole allocation, so the number of the remained allocations also increases gradually, and the algorithm running time and the allocation cost increase, but the method of the invention has the increasing amplitude of the running time which is obviously smaller than that of the classical method, and the allocation cost is also smaller than that of the classical method.
As can be seen from fig. 6 and 7, with the increasing number of clients and the increasing number of servers, the method of the present invention increases the operation time far less than the classical method, and is within ten seconds, which is enough to demonstrate that the method of the present invention has higher performance than the classical allocation method.
As shown in fig. 8, which is a comparison of the running times of the various stages of the method of the present invention, it can be seen that the most time-consuming step is the predictive allocation stage, and that the time consumption of the predictive allocation range and the time consumption of the adjustment allocation stage are both much smaller than those of the predictive allocation stage, which cannot be achieved by the classical method.

Claims (4)

1. The persistent service resource allocation method based on the limited service range in the road network environment is characterized by comprising the following steps:
S1: initial allocation is carried out on the initial position of the client;
s2: judging the movement direction of the client according to the position data at the last moment;
s3: predicting the movement range of the client according to the movement direction and the speed of the client;
S4: combining a service range of a server and a motion range of a client to obtain a bipartite graph for prediction;
s5: checking and adjusting the capacity of the server according to the two graphs, so that all the capacities of the server meet the capacity limit;
S6: according to the two graphs, checking and adjusting the connection condition of the client and the server, so that one client is correspondingly connected with one server only;
S7: utilizing the updated bipartite graph in the step S6 to adjust the prediction result to obtain a final distribution relation;
The prediction method of the motion range of the client in the step S3 is as follows:
A1: calculating a moving distance: subtracting the offset d of the previous moment from the offset d' of the current moment to obtain the moving distance delta d of the previous moment, and then, assuming that the moving distance of the next moment ranges from 0.5 delta d to 1.5 delta d, namely the moving furthest distance is 1.5 delta d, the nearest distance is 0.5 delta d, and adding the moving range to the current offset along the moving direction can obtain the client position range of the next moment, namely US i.l=USi-1. L+delta d;
a2: predicting the movement range of the client by combining the movement direction and the movement distance of the client;
the client location range at the next moment in the step A1 includes two cases, which are respectively as follows:
Case 1: adding the current offset and the moving range to obtain a client position range at the next moment when the current offset and the moving range are smaller than or equal to the length of the current edge;
Case 2: the current offset and the moving range are added to be greater than the length of the current edge, the edge length is subtracted from the added result of the current offset and the moving range to obtain an overflow value, then adjacent edges are found according to the end points of the edges, and the range of each adjacent edge from the starting point is the position range of the client end at the next moment;
The method for obtaining the bipartite graph in the step S4 comprises the following steps: establishing an index for each side in a road network in the preprocessing process, wherein the elements in an index list of each side are the service ends positioned on the side, and the index on the right side is the index of each side in a left broken line frame according to the offset of the elements on the current side from small to large, then creating an empty bipartite graph, traversing a client list, searching the ID of the side of each client, searching an inverted list, searching the corresponding service end set according to the range, and adding the service end set and the side between the corresponding client into the bipartite graph to obtain a predicted bipartite graph;
The adjustment method for the server beyond the capacity limit in the step S5 is as follows: maintaining the connection of the service end by adopting a maximum heap, checking whether the edge is the minimum cost edge or the only edge of the corresponding client end every time when the edge at the top of the heap is fetched, if not, deleting the edge until the number of the remaining edges meets the upper limit of capacity or the connection of the whole service end is traversed, and if the edge is the only connection edge of the corresponding client end or the minimum cost edge, otherwise, continuing to pop the edge from the top of the heap; using heuristic algorithm to adopt second traversal, deleting the connection side as long as the connection is not the only connection side of the corresponding client, wherein all the servers meet the capacity limit after two traversals;
The method for obtaining the final allocation relation in the step S7 is as follows: after the snapshot of the client at the current moment is updated, the relation between the client and the server in the snapshot at the current moment is converted into a bipartite graph; traversing predicted allocation, checking whether each allocation edge exists in a bipartite graph representing the relation between a client and a server at the current moment, if the predicted result is reasonable for the moment, deleting the edge from the bipartite graph at the current moment, deleting the client connected with the edge in the bipartite graph at the current moment, reducing the capacity of the corresponding server by 1, obtaining the correct prediction result after traversing the predicted allocation, only leaving a part which is not predicted correctly in the bipartite graph scale at the moment, deleting the correct prediction edge, subtracting the corresponding client number from the corresponding server capacity, and calculating the allocation of the rest part by adopting a classical continuous shortest path algorithm for the rest part.
2. The method for allocating persistent service resources based on a limited service range in a road network environment according to claim 1, wherein the method for determining the motion direction of the client in step S2 is to determine the current motion direction by using the position difference between two moments.
3. The method for persistent service resource allocation based on a limited service range in a road network environment according to claim 2, wherein the calculation of the current movement direction of the client in step S2 includes two cases, respectively:
Case 1: the two points at adjacent moments are positioned on the same side, the offset is directly differenced, if the difference is greater than 0, the movement direction is the direction along the side, otherwise, the movement direction is the reverse direction;
Case 2: two points at adjacent moments are positioned on different edges, the intersection point of the current edge and the edge at the last moment is calculated, and whether the intersection point is the starting point or the end point of the current edge is judged to obtain the current movement direction of the current edge.
4. The method for persistent service resource allocation based on a limited service range in a road network environment according to claim 1, wherein the connection adjustment method between the client and the server in step S6 is as follows: and ordering the connected edges of more than one service end for the conflict of the client connection, wherein only the connected edge with the minimum cost is reserved for each client because the service end has met the capacity limit, and the conflict of the clients is solved at the moment, namely the allocation with the minimum cost is realized.
CN202110556378.XA 2021-05-21 2021-05-21 Sustainable service resource allocation method based on limited service range in road network environment Active CN113255989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110556378.XA CN113255989B (en) 2021-05-21 2021-05-21 Sustainable service resource allocation method based on limited service range in road network environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110556378.XA CN113255989B (en) 2021-05-21 2021-05-21 Sustainable service resource allocation method based on limited service range in road network environment

Publications (2)

Publication Number Publication Date
CN113255989A CN113255989A (en) 2021-08-13
CN113255989B true CN113255989B (en) 2024-05-07

Family

ID=77183582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110556378.XA Active CN113255989B (en) 2021-05-21 2021-05-21 Sustainable service resource allocation method based on limited service range in road network environment

Country Status (1)

Country Link
CN (1) CN113255989B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103874149A (en) * 2012-12-10 2014-06-18 索尼公司 Mobile switching management method, equipment and system in wireless communication network
CN105357637A (en) * 2015-10-28 2016-02-24 同济大学 Location and behavior information prediction system and method
CN107534970A (en) * 2015-06-08 2018-01-02 华为技术有限公司 The method and apparatus that connectivity adjusts in cordless communication network
AU2018100673A4 (en) * 2015-10-28 2018-06-14 Tongji University System and method for location and behavior information prediction
CN110278609A (en) * 2018-03-16 2019-09-24 诺基亚技术有限公司 The method, apparatus and computer storage medium of link adaptation are used in communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103874149A (en) * 2012-12-10 2014-06-18 索尼公司 Mobile switching management method, equipment and system in wireless communication network
CN107534970A (en) * 2015-06-08 2018-01-02 华为技术有限公司 The method and apparatus that connectivity adjusts in cordless communication network
CN105357637A (en) * 2015-10-28 2016-02-24 同济大学 Location and behavior information prediction system and method
AU2018100673A4 (en) * 2015-10-28 2018-06-14 Tongji University System and method for location and behavior information prediction
CN110278609A (en) * 2018-03-16 2019-09-24 诺基亚技术有限公司 The method, apparatus and computer storage medium of link adaptation are used in communication system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于二部图最大匹配的动态负载均衡算法;周磊 等;《高技术通讯》(第08期);第798-804页 *

Also Published As

Publication number Publication date
CN113255989A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US11132608B2 (en) Learning-based service migration in mobile edge computing
US9683852B2 (en) Dispatching map matching tasks by a cluster server
CN110210604B (en) Method and device for predicting movement track of terminal equipment
CN114116198A (en) Asynchronous federal learning method, system, equipment and terminal for mobile vehicle
CN108595268B (en) Data distribution method and device based on MapReduce and computer-readable storage medium
CN107729570B (en) Data migration method and device for server
US20200210844A1 (en) Training and application method of a multi-layer neural network model, apparatus and storage medium
CN109343793B (en) Data migration method and device
US10176711B2 (en) Analyzing big data to manage traffic flow
CN110874702B (en) Model training method and device under logistics sorting scene and electronic equipment
CN105491117A (en) Flow chart data processing system and method for real time data analysis
US9317527B2 (en) Method and apparatus for region sampling and estimation in location based networks
RU2723237C1 (en) Methods and devices for constructing accurate trajectory of object movement
CN107331149B (en) Method and device for predicting vehicle running time
CN113761390B (en) Method and system for analyzing attribute intimacy
CN111459914A (en) Distributed graph database optimization method and device and electronic equipment
CN113255989B (en) Sustainable service resource allocation method based on limited service range in road network environment
KR101414415B1 (en) Data usage forecast of mobile network
CN113285960A (en) Data encryption method and system for service data sharing cloud platform
CN112232401A (en) Data classification method based on differential privacy and random gradient descent
CN112884189A (en) Order quantity prediction model training method, device and equipment
CN106933882B (en) Big data increment calculation method and device
Wang et al. An adaptive deep q-learning service migration decision framework for connected vehicles
US20110238945A1 (en) Apparatus and method for generating code overlay
CN113127438A (en) Method, apparatus, server and medium for storing data

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
TA01 Transfer of patent application right

Effective date of registration: 20220711

Address after: 102209 18 Riverside Avenue, Changping District science and Technology City, Beijing

Applicant after: STATE GRID ECONOMIC AND TECHNOLOGICAL RESEARCH INSTITUTE Co.,Ltd.

Applicant after: STATE GRID JIANGSU ECONOMIC Research Institute

Applicant after: NANJING NORMAL University

Applicant after: STATE GRID ZHEJIANG ECONOMIC Research Institute

Address before: 102209 18 Riverside Avenue, Changping District science and Technology City, Beijing

Applicant before: STATE GRID ECONOMIC AND TECHNOLOGICAL RESEARCH INSTITUTE Co.,Ltd.

Applicant before: STATE GRID JIANGSU ECONOMIC Research Institute

Applicant before: NANJING NORMAL University

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant