CN109754638B - Parking space allocation method based on distributed technology - Google Patents

Parking space allocation method based on distributed technology Download PDF

Info

Publication number
CN109754638B
CN109754638B CN201910124113.5A CN201910124113A CN109754638B CN 109754638 B CN109754638 B CN 109754638B CN 201910124113 A CN201910124113 A CN 201910124113A CN 109754638 B CN109754638 B CN 109754638B
Authority
CN
China
Prior art keywords
user
individual
parking space
information
algorithm
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
CN201910124113.5A
Other languages
Chinese (zh)
Other versions
CN109754638A (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.)
Zhejiang University City College ZUCC
Original Assignee
Zhejiang University City College ZUCC
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 Zhejiang University City College ZUCC filed Critical Zhejiang University City College ZUCC
Priority to CN201910124113.5A priority Critical patent/CN109754638B/en
Publication of CN109754638A publication Critical patent/CN109754638A/en
Application granted granted Critical
Publication of CN109754638B publication Critical patent/CN109754638B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Traffic Control Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a parking space allocation method based on a distributed technology, which comprises the steps of constructing a database, collecting user requirements, preprocessing data, operating an on-line algorithm, sending an allocation result and navigating a terminal; constructing a database: storing user data by adopting a table structure based on Mysql and HBase databases and the database thereof; user requirement acquisition: collecting parking requests of users in the normalized time slot, wherein the users use intelligent terminals to select destinations in a searching and clicking mode; data preprocessing: and at the stage that the server receives the user requirements, collecting each data information required by the user in the normalized time slot and numbering the user and the related parking space. The invention has the beneficial effects that: the parking space system can provide an available parking space close to the target point for the vehicle owner, can reduce parking searching time of the vehicle owner to a great extent, reduces parking searching cost, and has certain benefits in the aspects of optimizing large urban traffic environment and parking benefits.

Description

Parking space allocation method based on distributed technology
Technical Field
The present invention relates to a parking space allocation method, and more particularly, to a parking space allocation method based on a distributed technology.
Background
Currently, parking spaces are difficult to find and become common diseases in large cities, and disputes caused by parking problems are frequent. The problem of difficult parking in super-large cities such as Beijing, Shanghai and the like, or super-large cities such as Chongqing, Chengdu and the like, even counties and towns with tens of thousands or hundreds of thousands of people brings much trouble to the life of the masses and the government traffic management. And the parking problem also brings various complications, such as traffic jam and the like, the parking problem directly affects the increase of the parking cruising time and the increase of the traffic expense and the living cost of the car owners, and indirectly affects the reduction of the life happiness index of people, causes contradiction among the car owners and the like.
In addition, with the increasing living standard of residents in the city of China, people's leisure activities such as daily activities such as holiday travel, activity shopping, watching shows, movies, etc., a great number of concentrated domestic car travelers select the nearest place to park according to the destination information, and the consistent parking targets of the travelers result in that the established parking targets cannot be realized, which may cause the confusion of regional traffic and bring serious traffic problems.
Under the condition that urban parking spaces cannot be planned for a long time and large parking lots cannot be expanded in a short time in China, urban traffic pressure can be relieved to a great extent by designing a feasible and effective parking mechanism, and meanwhile, due to the rapid increase of the automobile holding capacity, the design of the parking mechanism is an indispensable link for future intelligent traffic systems. For the existing traffic conditions, researchers have assumed many possible traffic jam situations, and under the situation, an efficient and feasible parking mechanism is designed, which is beneficial to directly reducing parking searching flow and reducing unnecessary traffic problem conditions, and has the same importance as methods for expanding parking lots and performing traffic control and the like. The solution to the parking allocation problem grows as the problem combination and worst case optimal complexity scale grows. The existing parking space allocation in the market mostly adopts a greedy algorithm, a nearest parking space is allocated to a vehicle, and how to allocate the parking space to optimize and solve the problem of uneven parking space allocation and optimize social benefits is not researched. Under the large background of building an intelligent traffic and big data era, how to effectively improve the existing parking space allocation method by using big data technology is a topic worthy of research.
The patent 201810235965.7 "parking space distribution system based on big data" provides a parking space distribution system based on big data, this method has deployed hardware facilities such as bottom sensor and on-line management's server for parking navigation, has realized real time monitoring and physical navigation of parking stall usability, has realized the management to the different functions of parking stall, helps the inside management in parking area and use, helps reducing the work load and the work degree of difficulty of parking area managers, is the huge breakthrough of intelligent control and big data technology combination, is the important innovation of parking service in the urban traffic. The invention is suitable for parking management, recording and charging work of the parking lot. The patent 201810852256.3 entitled "parking space allocation method and apparatus" provides a parking space allocation method and apparatus, which allocates an available parking space in a corresponding time period to a user by obtaining user information, vehicle type, and preset position, thereby realizing real-time management and prediction of the parking space, improving utilization rate of the parking space, realizing ordered management of the parking space in different time periods and disclosure of the parking space information, well combining parking space management with computer algorithm technology, and having important meaning for the traditional parking field in computer technology fusion. The two methods mainly adopt sensor-based parking space sensing and an on-line distribution system based on user requirements and real-time parking space availability, and realize parking space distribution of user parking requirements. However, these methods only achieve real-time allocation of parking space availability, and do not perform overall parking space planning and allocation by an online algorithm, and cannot plan a parking route with low cost for a user in the first time, and further cannot optimize matching information by the online algorithm, thereby achieving the purpose of optimizing public parking resources, and therefore, the parking space allocation efficiency is not fundamentally improved.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provides a parking space allocation method based on a distributed technology.
The parking space allocation method based on the distributed technology comprises the steps of constructing a database, collecting user requirements, preprocessing data, operating an on-line algorithm, sending an allocation result and navigating a terminal;
constructing a database: the design of a database table structure has a decisive influence on the storage and the query of user information, and further influences whether the whole system can successfully operate; the user data is stored by adopting a table structure based on Mysql and HBase databases and the database thereof.
User requirement acquisition: the method comprises the steps that parking requests of users in a normalized time slot are collected, the users use intelligent terminals to select destinations through searching and clicking, then destination coordinate information and current user coordinate information are returned to a server in a BD09II (hundred-degree longitude and latitude coordinate) mode, the server calculates cost of the users to parking spaces near the destinations, the users and the parking spaces are numbered, and data information of each user is stored in a user information table.
Data preprocessing: at the stage that the server receives the user requirements, the data information required by the user needs to be collected in the normalized time slot, the user and the related parking spaces are numbered, the collected information comprises the current coordinate data of the user, the coordinate data of the destination of the user and the coordinate data of the parking spaces adjacent to the destination of the user, and the distance cost value of the user reaching each parking space is calculated through the data information.
Running the on-line algorithm: in the algorithm operation stage, the system assembles the preprocessed data in the normalized time slot into a cost matrix, inputs the cost matrix into an on-line algorithm, operates to obtain a distribution matrix containing distribution information, and decodes according to the distribution matrix and the number in the user information table to obtain the distribution result of each user.
Sending an allocation result: and sending each distribution result to the intelligent terminal of the corresponding user according to the distribution result obtained by the algorithm operation.
Terminal navigation: and the intelligent terminal carries out real-time navigation on the user according to the received distribution result and guides the user to the parking space distributed by the algorithm.
The system modular structure of the method is shown in fig. 1, and the specific implementation steps are as follows:
step 1, constructing a database
The data that needs according to the algorithm carries out table structural design, adopts the table structure that includes user number, user current coordinate data, user destination coordinate data and can reach the parking stall serial number to be used for storing user information, is used for storing parking stall information with the table structure that includes parking stall serial number, parking stall coordinate, the available situation of parking stall and can reach the user number, is used for storing the intermediate quantity of online algorithm with the table structure that includes user number, parking stall serial number, driving distance.
Step 2, collecting user requirements
In the normalized time slot, the system collects information through the intelligent terminal, a user selects a destination through searching and clicking by using the intelligent terminal, then destination coordinate information and current user coordinate information are returned to the server in a BD09II mode, the server numbers the received user information and stores the user information into a user information table, and the server retrieves available surrounding parking spaces according to the user destination information and stores the parking space information numbers into a parking space table.
Step 3, data preprocessing
And (3) calculating the reachable parking space and the corresponding driving distance of each user through the user information table and the parking space information table in the step (2), and storing the user number, the parking space number and the corresponding driving distance into the algorithm intermediate table.
Step 4, running an on-line algorithm
Step 4.1, algorithm principle
The method adopts an improved algorithm based on the genetic algorithm to carry out online operation, the genetic algorithm has good distributability, and the algorithm flow can be mainly divided into individual generation, fitness calculation, parent screening, cross inheritance and output condition judgment. A flow chart of the algorithm is shown in fig. 2.
Step 4.2, distributed implementation of the Algorithm
And (3) Map stage: and in the Map stage, the individual matrix information stored in the HDFS is input into the thread, the non-dominated sorting operation is carried out on the population on the node, the current parent is selected by a roulette screening method, and the generated parent is subjected to a shuffle operation and is transmitted into the reduce. The input of the stage is a plurality of individual information distributed to the node, and the output is < id, (i, des (i), d (i)) >, wherein the id as the key value is an integer value obtained by dividing the number of the individual by 10 and then rounding down, namely the current key value is set as the number of the node in the reduce stage, so that the number of individuals needing to be processed by each thread in the reduce stage is not more than ten, and the value consists of the individual number, the individual fitness and the matrix information of the individual.
A Reduce stage: the input of the Reduce stage is a key value pair with the same id node number as a key value, namely < id, (i, des (i), d (i)), and (i) >, the Reduce stage allocates corresponding individuals to the same Reduce node through the same key value id, and the data of the individuals in the Reduce stage is individual matrix information and individual fitness acquired from the value. And generating new individuals by judging whether the nodes have individuals or populations meeting the output condition, if so, combining the outputs, and if not, performing cross inheritance and mutation operation on the populations on the nodes to generate new individuals, wherein the new individual ids reserve parent ids, the numbers i inherit the parent numbers in sequence, and the generated child individuals are stored in a new individual information matrix to be used as the input value of the Map of the next stage.
Step 5, sending the distribution result
And (4) finding the individual with the maximum fitness in the solution set obtained by the algorithm in the step (4), and if a plurality of optimal individuals exist, taking one of the optimal individuals, and finding each vehicle number i and the corresponding parking space number j by decoding. And the decoding process is to traverse the matching matrix and find the column number j of 1 in the ith row, so that the parking space number distributed by the user number i is j. And sending each matching result to a corresponding user intelligent terminal through a server. The matching result comprises a user number, a parking space number, a driving distance and parking space coordinate information.
Step 6, terminal navigation
And (5) after receiving the matching result sent in the step (5), the intelligent user terminal performs driving navigation by taking the parking space shown by the matching result as a destination through a driving navigation function.
Preferably, the method comprises the following steps: said step 4.1 comprises the steps of:
step 4.1.1 Individual Generation
By dijRepresenting the driving distance from the user number i to the parking space number j, and generating all the matching information in the current time slot in the server algorithm intermediate table according to the number sequence to include all the information dijDistance matrix D ofij
Defining a binary decision variable xij,i∈Nt,j∈MtTo express the occupancy status of the allocated parking space, see formula (1):
Figure GDA0002602524930000041
variable x in equation (1)ijFormed matrix XijThe constraint condition that only one value in each row and column is not 0 at most is satisfied, and a value of 1 in the matrix represents that the corresponding vehicle i is matched with the corresponding parking space j, and the physical meaning is as follows: a vehicle may be assigned to a parking space, and at most only one vehicle may be assigned to a parking space.
According to the generated matrix DijAnd XijAnd the constraint conditions thereof, and obtaining a system model according to the target of the algorithm, see formula (2):
Minimize
Figure GDA0002602524930000042
constraint conditions
Figure GDA0002602524930000043
Figure GDA0002602524930000051
xij∈{0,1},i∈Nt,j∈Mt
The genetic algorithm gene codes are commonly used in decimal and binary systems, the binary codes are generally fast in operation, accord with the principle of minimum character set and are convenient to analyze by using the pattern theorem, but simultaneously have the defects that the Hamming distance is large, and the mapping error is easy to fall into local optimum when a continuous function is discretized; the decimal coding is also called as real number coding, and the real number coding is a coding mode commonly used in a genetic algorithm for solving the problem of continuous parameter optimization, has higher precision, has advantages in representing the problem of continuous gradual change, but has the defects of unstable variation and the like. This patent adopts the form of binary matrix coding, and every position only has one bit binary number in the matrix, with 1 representing the corresponding vehicle i and distributing to parking stall j, with 0 representing the parking stall that the vehicle did not match, generates the matching matrix that satisfies the constraint condition as shown below:
Figure GDA0002602524930000052
according to data in the algorithm intermediate scale, driving distance information between the user and the parking space in the normalized time slot is read, and a distance matrix D is generatedijAccording to the matrix dimension, matching matrices containing different matching information are randomly generated, the matching matrices are individuals, and in the subsequent iterative operation, the total number of the individuals is kept unchanged, and the individuals are as follows:
Figure GDA0002602524930000053
step 4.1.2, fitness calculation
The fitness calculation comprises linear calibration, dynamic linear calibration, power law calibration, logarithm calibration, index calibration and the like, the data characteristics corresponding to various calculation modes are different, the data characteristics of the algorithm have large individual values and large differences among individuals, and the algorithm is more suitable for dynamic linear calibration, so the algorithm adopts dynamic linear calibration.
After generating individuals, each individual is a group of matching matrixes which store matching information of vehicles and parking spaces, and the following matrix multiplication operation is carried out on the individual distribution matrixes and the individual cost matrixes:
Figure GDA0002602524930000054
obtaining an individual cost matrix which only contains the distance information between the vehicle and the corresponding parking space as shown in the specification:
Figure GDA0002602524930000061
all the numerical values in the individual cost matrix are traversed and summed to obtain the cost sum des (i) required after being distributed according to the individual, the maximum individual cost value in the population is subtracted by the current individual cost value through a line type planning method, then a minimum number xi is added to the k power, k represents the iteration number, and the result is recorded as the fitness of the individual, which is shown in a formula (3):
f′=fmax-f+ξk(3)
step 4.1.3, screening parent generations
After the individual cost and the fitness are obtained, parent individual selection is carried out according to a random roulette mode: the random roulette is to divide each individual into different value ranges according to the current fitness value of the individual, then generate a random number in the total range, select the individual in the value range of the random number, and repeat the operation until the number of parent individuals reaches the total capacity, for example, see table 1.
TABLE 1
Individual numbering 1 2 3 4 5 6 7 8 9 10
Sum of costs 30 60 45 28 35 50 55 40 33 32
Degree of adaptability 30 0 15 32 25 10 5 20 27 28
If the sum of the fitness in the table is 192, a random integer is taken from 1 to 192, if the integer is taken to be [1,30], an individual No. 1 is added to the parent group, if the integer is taken to be [31,45], an individual No. 3 is added to the parent group, if the integer is taken to be [46,77], an individual No. 4 is added to the parent group, and the like. In the table, the fitness of the individual No. 2 is 0, so that the individual does not occupy the interval when being selected, namely, the worst individual is eliminated by phase-change elimination. By using the method for parent selection, excellent individuals can be selected into parents more easily, non-excellent individuals are guaranteed to have the opportunity to be selected into parents, and the selection probability of the worst individual in the current population can be reduced.
Step 4.1.4, Cross-inheritance
After the parent individuals are selected, cross genetic operation is performed. And during cross operation, if two parent individuals are selected from the same individual, no cross operation is performed between every two parents. Selecting parent individuals with two different individual numbers, selecting each line of each individual as genetic information of filial generations with a probability of 50%, and generating filial generation individuals until the number of the filial generation individuals reaches the number of the parent individuals.
After the child generation individuals are generated, if the matching information rows which do not accord with the distribution matrix constraint condition exist in the individuals, the cost matrix information corresponding to the conflict rows is searched, and the matching information which is superior to the current matching information or has relatively lower added cost is searched for substitution.
Repeating the operation in case of conflict, for example, as follows:
Figure GDA0002602524930000071
when the generated child individuals are as shown above, the first row and the fourth row generate conflict, when the constraint condition of the matching matrix is not satisfied, the corresponding cost matrix row is searched, and on the premise of not generating new conflict, matching superior to the current cost is searched or matching with relatively small added cost is searched.
Step 4.1.5, output Condition determination
And according to the user request in the time slot, obtaining the minimum cost and Des (min) under the unconstrained condition through a greedy algorithm, and if the current optimal individual reaches the minimum cost and the level of Des (min), outputting the optimal individual as an optimal solution.
And when the fitness of the individual reaches the expectation or is unchanged, outputting the individual with the highest fitness to obtain a Pareto dominant solution set.
The invention has the beneficial effects that: the invention provides a parking space allocation method based on a distributed technology, which can provide an available parking space close to a target point for a vehicle owner, can reduce parking searching time of the vehicle owner to a great extent, reduces parking searching cost, and has certain benefits in the aspects of optimizing urban traffic large environment and parking benefits. Aiming at the problems of high data instantaneity and large calculated amount in peak hours, the patent innovatively provides an improved distributed algorithm based on a genetic algorithm, a MapReduce framework can be used for distributed operation of the algorithm, and the compression resistance of the system and the accuracy of a matching result are improved to a great extent. Meanwhile, the distributed computing technology also reduces the workload of background managers, does not need to adjust and control parameters according to road conditions and real-time information, improves the efficiency of urban traffic management to a certain extent, and accelerates the construction of smart cities.
Drawings
FIG. 1 is a block diagram of a parking distribution system;
FIG. 2 is a flow chart of a genetic algorithm;
FIG. 3 is a MapReduce framework diagram of the genetic algorithm;
FIG. 4 is a diagram of a user information collection terminal;
fig. 5 is a navigation diagram of the intelligent terminal.
Detailed Description
The present invention will be further described with reference to the following examples. The following examples are set forth merely to aid in the understanding of the invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The parking space allocation method based on the distributed technology comprises the following concrete implementation steps:
step one, constructing a database
In the database table related by the invention, three table structures are designed in Mysql: users, Parkingslot, Matchdistance, where the table structure corresponds one-to-one to the fields in fig. 2. The Users table comprises a user number, user current coordinate data, user destination coordinate data and reachable parking space numbers, the Parkingslot table comprises parking space numbers, parking space coordinates, available parking space conditions and reachable user numbers, and the Matchdistance table comprises the user number, the parking space numbers and corresponding driving distances.
Step two, user requirement acquisition
Assuming that a vehicle owner needs to find a parking position near a destination, firstly, the destination is found through a map search interface of fig. 4, and the destination is selected, then a client returns the current coordinates and destination coordinates of a user to a server in a BD09II data format after the destination is selected, the server numbers the user according to the request sequence received in a time slot, stores the user and user information with corresponding numbers into a Users table, and numbers the parking position which the user can reach according to the sequence in the time slot and stores the parking position into a Parkingslot table.
Step three, data preprocessing
And calculating the driving distance of the user to each parking space through the distance calculation interface according to the reachable and coordinate information stored in the Users table and the Parkingslot table in the step two, and storing the corresponding user number, the corresponding parking space number and the corresponding driving distance into the Matchdistance table. And generating a distance matrix through the total number of the user number and the parking space number. And generating an individual matrix containing different matching information through the distance matrix and storing the individual matrix into an Hbase temporary table.
Step four, running the on-line algorithm
The improved genetic algorithm based on the MapReduce is realized in a MapReduce distributed computing model, and the key is the design of a map function, a reduce function and a jobCreate function. The Map function is mainly responsible for searching the individual matching matrix of the HBase sublist. The Reduce function is mainly responsible for summarizing output results of the map function and generating a final optimal solution set which meets output conditions. The jobCreate () function is used to complete the user's custom configuration for job execution and submission to the cluster for execution.
The input data of the algorithm is stored in HBase, so that the InputFormat of Mapreduce operation is set to TableInputFormat. Since the generated child individuals are also stored in the temporary table of HBase, the OutputFormat of the Mapreduce job is set to TableOutputFormat. When the HBase table is input by Hadoop, splitting Split according to Region data of the HBase table, namely, each Region corresponds to one Split and thus corresponds to one Mapper. By setting the InputFormat as TableInputFormat, the Mapper divides each Region into < key, value > pairs according to rowKey, key corresponds to each rowKey of the sub-table, and value corresponds to the data contained in the row. MatchMapper inherits from TableMapper < Text, DoubleWritable >, so that data in the HBase table can be directly processed. MatchReducer inherits from TableReducer < Text, Doublewritable >, so that the output result of the reduce function can be written into the HBase table. The Matchdriver is responsible for configuring the distributed operation cluster environment, generating Mapreduce jobs and submitting execution.
The main function of Mapper is to input several individual matrixes and sort and filter the matrixes according to the fitness size, and then transmit the matrixes to Reducer for processing. The key code to implement the map function is as follows:
Figure GDA0002602524930000091
Figure GDA0002602524930000101
the Reducer has the main function of summarizing the output results of each Mapper, and sorting the output results according to the fitness and outputting the sorted results. The Reducer in the system judges whether the output condition is met or not by comparing the fitness of the individual and the cost value of the individual. The key code of the reduce function is as follows:
Figure GDA0002602524930000102
Figure GDA0002602524930000111
after the map function and the reduce function are realized, the running information of the map operation and the call of the map and the reduce function are required to be set. The key codes comprise the following implementation class names of Mapper, the implementation class name of Reducer, the InputFormat format, the OutputFormat format, the positions of input data and output data of operation and the like:
Figure GDA0002602524930000112
after the user-defined operation is configured, the operation of the algorithm can be carried out, and the key codes are as follows:
Job job=jobCreate();
flag=job.waitForCompletion(true);
step five, sending the distribution result
And in the fourth step, the distribution matrix obtained by the operation result is decomposed line by line, each user number and the corresponding parking space number are stored in the Matchdistance table, and the matching information of the corresponding user number in the table is sent to the intelligent terminal of the user.
Step six, terminal navigation
The user navigates in real time according to the received parking space matching information and the current position of the user, and the navigation function is implemented based on a navigation module in the Baidu map developer tool, as shown in fig. 5.
According to the parking space allocation method based on the distributed technology, the MySql database for information storage and the Hbase database for storing the algorithm initial matrix are established when the parking space allocation method based on the distributed technology is realized. The system uses 4 PCs, three types are Dell Optiplex7050MT, one type is Dell Inspiron 7557, intel core i7-6700CPU, 8G memory, GTX 960GPU, 1T HDD and 256G SSD. One of the windows 10 operating system is installed as a development host, and the other 3 operating systems are installed with Linux CentOS6.4 operating systems as working clusters.

Claims (2)

1. A parking space allocation method based on a distributed technology is characterized by comprising the steps of constructing a database, collecting user requirements, preprocessing data, operating an on-line algorithm, sending an allocation result and navigating a terminal;
constructing a database: storing user data by adopting a table structure based on Mysql and HBase databases and the database thereof;
user requirement acquisition: collecting parking requests of users in the normalized time slot, selecting destinations by searching and clicking by using an intelligent terminal by the users, then returning destination coordinate information and current user coordinate information to a server in a BD09II mode, calculating the cost of the users to parking spaces near the destinations by the server, numbering the users and the parking spaces, and storing data information of each user into a user information table;
data preprocessing: at the stage that a server receives user requirements, collecting data information of the user requirements in a normalization time slot, numbering the user and related parking spaces, wherein the collected information comprises current coordinate data of the user, coordinate data of a destination of the user and coordinate data of the parking spaces adjacent to the destination of the user, and calculating distance cost values of the user reaching the parking spaces through the data information;
running the on-line algorithm: in the algorithm operation stage, the system assembles the preprocessed data in the normalized time slot into a cost matrix, inputs the cost matrix into an on-line algorithm, operates to obtain a distribution matrix containing distribution information, and decodes according to the distribution matrix and the number in the user information table to obtain the distribution result of each user;
sending an allocation result: sending each distribution result to the intelligent terminal of the corresponding user according to the distribution result obtained by the algorithm operation;
terminal navigation: the intelligent terminal carries out real-time navigation on the user according to the received distribution result and guides the user to the parking space distributed by the algorithm;
the method comprises the following implementation steps:
step 1, constructing a database
Carrying out table structure design according to data required by the algorithm, wherein a table structure comprising a user number, user current coordinate data, user destination coordinate data and a reachable parking space number is adopted for storing user information, a table structure comprising a parking space number, a parking space coordinate, a parking space available condition and a reachable user number is used for storing parking space information, and a table structure comprising a user number, a parking space number and a driving distance is used for storing intermediate quantity of the online algorithm;
step 2, collecting user requirements
In the normalized time slot, the system collects information through an intelligent terminal, a user selects a destination through searching and clicking by using the intelligent terminal, then destination coordinate information and current user coordinate information are returned to a server in a BD09II mode, the server numbers the received user information and stores the received user information into a user information table, and the server retrieves available surrounding parking spaces according to the user destination information and stores the parking space information numbers into a parking space table;
step 3, data preprocessing
Calculating the reachable parking space and the corresponding driving distance of each user through the user information table and the parking space information table in the step 2, and storing the user number, the parking space number and the corresponding driving distance into an algorithm intermediate table;
step 4, running an on-line algorithm
Step 4.1, algorithm principle
An improved algorithm based on a genetic algorithm is adopted for online operation, the genetic algorithm has good distributability, and the algorithm flow comprises individual generation, fitness calculation, parent screening, cross inheritance and output condition judgment;
step 4.2, distributed implementation of the Algorithm
And (3) Map stage: in the Map stage, individual matrix information stored in an HDFS (Hadoop distributed File System) is input into a thread, non-dominated sorting operation is carried out on the population on the node, the current parent is selected by a roulette screening method, and the generated parent is subjected to Shuffling Shuffling operation and introduced into reduce; the input of the stage is a plurality of individual information distributed to the node, and the output is < id, (i, des (i), d (i)) >, wherein the id serving as the key value is an integer value obtained by dividing the number of the individual by 10 and then rounding downwards, namely the current key value is set as the number of the node in the reduce stage, so that the number of individuals needing to be processed by each thread in the reduce stage is not more than ten, and the value consists of the individual number, the individual fitness and the matrix information of the individual;
a Reduce stage: the input of the Reduce stage is a key value pair with the same id node number as a key value, namely < id, (i, des (i), d (i) >, the corresponding individuals are distributed to the same Reduce node through the same key value id in the Reduce stage, and the data of the individuals in the Reduce stage are individual matrix information and individual fitness acquired from the value; judging whether an individual or a population meeting the output condition exists on the node, if so, combining the output, and if not, performing cross inheritance and variation operation on the population on the node to generate a new individual, wherein the new individual id reserves a parent id, the number i inherits the parent number in sequence, and the generated child individual is stored in a new individual information matrix to be used as an input value of the Map of the next stage;
step 5, sending the distribution result
The individual with the maximum fitness is concentrated by searching the solution obtained by the algorithm in the step 4, if a plurality of optimal individuals exist, one of the optimal individuals is selected, and each vehicle number i and the corresponding parking space number j are found by decoding; the decoding process is to traverse the matching matrix, find the column number j of 1 in the ith row, and then the number j of the parking space allocated by the user number i is j; each matching result is sent to a corresponding user intelligent terminal through a server; the matching result comprises a user number, a parking space number, a driving distance and parking space coordinate information;
step 6, terminal navigation
And (5) after receiving the matching result sent in the step (5), the intelligent user terminal performs driving navigation by taking the parking space shown by the matching result as a destination through a driving navigation function.
2. The distributed technology based parking space allocation method according to claim 1, wherein said step 4.1 comprises the steps of:
step 4.1.1 Individual Generation
By dijRepresenting the driving distance from the user number i to the parking space number j, and generating all the matching information in the current time slot in the server algorithm intermediate table according to the number sequence to include all the information dijDistance matrix D ofij
Defining a binary decision variable xij,i∈Nt,j∈MtTo express the occupancy status of the allocated parking space, see formula (1):
Figure FDA0002602524920000031
variable x in equation (1)ijFormed matrix XijSatisfying the constraint condition that each row and each column only have one value not 0 at most, the value of 1 in the matrix represents that the corresponding vehicle i is matched with the corresponding parking space j, which indicates that one vehicle can be allocated to one parking space, and at most, only one vehicle can be allocated to one parking space;
according to the generated matrix DijAnd XijAnd the constraint conditions thereof, and obtaining a system model according to the target of the algorithm, see formula (2):
Minimize
Figure FDA0002602524920000032
constraint conditions
Figure FDA0002602524920000033
Figure FDA0002602524920000034
xij∈{0,1},i∈Nt,j∈Mt
The method adopts a binary matrix coding form, each position in the matrix has only one binary number, 1 represents that a corresponding vehicle i is distributed to a parking space j, 0 represents that the vehicle is not matched with the parking space j, and a matching matrix meeting constraint conditions is generated as follows:
Figure FDA0002602524920000035
according to data in the algorithm intermediate scale, driving distance information between the user and the parking space in the normalized time slot is read, and a distance matrix D is generatedijRandomly generating matching matrixes containing different matching information according to the matrix dimension, wherein the matching matrixes are individuals, and in the subsequent iterative operation, the total number of the individuals is kept unchanged;
step 4.1.2, fitness calculation
The fitness calculation comprises linear calibration, dynamic linear calibration, power law calibration, logarithmic calibration and exponential calibration, and the algorithm adopts dynamic linear calibration;
after generating individuals, each individual is a group of matching matrixes which store matching information of vehicles and parking spaces, and the following matrix multiplication operation is carried out on the individual distribution matrixes and the individual cost matrixes:
Figure FDA0002602524920000041
obtaining an individual cost matrix which only contains the distance information between the vehicle and the corresponding parking space as shown in the specification:
Figure FDA0002602524920000042
all the numerical values in the individual cost matrix are traversed and summed to obtain the cost sum des (i) required after being distributed according to the individual, the maximum individual cost value in the population is subtracted by the current individual cost value through a line type planning method, then a minimum number xi is added to the k power, k represents the iteration number, and the result is recorded as the fitness of the individual, which is shown in a formula (3):
f′=fmax-f+ξk(3)
step 4.1.3, screening parent generations
After the individual cost and the fitness are obtained, parent individual selection is carried out according to a random roulette mode: the random roulette comprises the steps of dividing each individual into different value ranges according to the current fitness value of the individual, generating a random number in the total range, selecting the individual in the value range of the random number, and repeating the operation until the number of parent individuals reaches the total capacity;
step 4.1.4, Cross-inheritance
After the father individuals are selected, performing cross genetic operation; during cross operation, if two parent individuals are selected from the same individual, no cross operation is performed between every two parents; selecting parent individuals with different individual numbers, selecting each line of each individual as genetic information of filial generations with a probability of 50%, and generating filial generation individuals until the number of the filial generation individuals reaches the number of the parent individuals;
after the generation of the child generation individuals, if matching information rows which do not accord with the distribution matrix constraint condition exist in the individuals, searching cost matrix information corresponding to the conflict rows, and searching matching information which is superior to the current matching information or has relatively low added cost for substitution;
step 4.1.5, output Condition determination
According to a user request in a time slot, solving the minimum cost and Des (min) under an unconstrained condition through a greedy algorithm, and if the current optimal individual reaches the minimum cost and the level of Des (min), outputting the optimal individual as an optimal solution;
and when the fitness of the individual reaches the expectation or is unchanged, outputting the individual with the highest fitness to obtain a Pareto dominant solution set.
CN201910124113.5A 2019-02-19 2019-02-19 Parking space allocation method based on distributed technology Active CN109754638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910124113.5A CN109754638B (en) 2019-02-19 2019-02-19 Parking space allocation method based on distributed technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910124113.5A CN109754638B (en) 2019-02-19 2019-02-19 Parking space allocation method based on distributed technology

Publications (2)

Publication Number Publication Date
CN109754638A CN109754638A (en) 2019-05-14
CN109754638B true CN109754638B (en) 2020-09-22

Family

ID=66406548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910124113.5A Active CN109754638B (en) 2019-02-19 2019-02-19 Parking space allocation method based on distributed technology

Country Status (1)

Country Link
CN (1) CN109754638B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111627246B (en) * 2020-06-12 2022-02-11 桂林电子科技大学 Intelligent parking space recommendation method based on image recognition and user preference
CN113593289B (en) * 2021-06-25 2023-02-28 桂林电子科技大学 Method and system for sensing in-road parking conflict avoidance scheduling based on available parking position state
CN114664112B (en) * 2022-03-16 2023-09-12 广州小鹏汽车科技有限公司 Garage-oriented parking space recommendation method, server and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831785A (en) * 2012-09-14 2012-12-19 成都宇凡科技有限责任公司 Parking space inquiry booking system and inquiry booking method thereof
CN103400251A (en) * 2013-08-02 2013-11-20 天津港中煤华能煤码头有限公司 Bulk cargo wharf berth fast allocation system and method based on genetic algorithm
CN104281894A (en) * 2014-10-30 2015-01-14 大连海事大学 Ship dispatch optimization method based on channel and berth resources
CN106200577A (en) * 2016-07-08 2016-12-07 青岛华通能源投资有限责任公司 A kind of multi-storied garage dispatch control method
CN107464005A (en) * 2017-08-21 2017-12-12 中国人民解放军国防科技大学 Expanded path planning method for vehicle reservation
CN108877286A (en) * 2018-07-09 2018-11-23 胡佂宇 A kind of parking stall based on block chain
CN108921353A (en) * 2018-07-06 2018-11-30 上海大学 A kind of optimization method, device and the electronic equipment of parking lot dispatching
CN109191906A (en) * 2018-11-12 2019-01-11 广西民族师范学院 A kind of parking lot distributed intelligence guidance system and method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713642B2 (en) * 2016-08-05 2020-07-14 Denso International America, Inc. System and method for selecting a parking space using a mobile device
US10482766B2 (en) * 2017-02-01 2019-11-19 Microsoft Technology Licensing, Llc Automated parking lot space assignment
CN107274713B (en) * 2017-07-11 2020-06-30 东华大学 Cluster-based parking guidance method
CN107633701A (en) * 2017-10-27 2018-01-26 谢金伟 A kind of parking space intelligent match control method
CN107680402A (en) * 2017-10-27 2018-02-09 深圳市小猫信息技术有限公司 A kind of information acquisition method, device, system, terminal device and storage medium
CN107680403A (en) * 2017-10-30 2018-02-09 中国联合网络通信集团有限公司 Vehicle, which is led, stops method and system
CN108182823B (en) * 2017-12-14 2019-04-12 特斯联(北京)科技有限公司 A kind of blocking wisdom management in garden parking stall and guide service system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831785A (en) * 2012-09-14 2012-12-19 成都宇凡科技有限责任公司 Parking space inquiry booking system and inquiry booking method thereof
CN103400251A (en) * 2013-08-02 2013-11-20 天津港中煤华能煤码头有限公司 Bulk cargo wharf berth fast allocation system and method based on genetic algorithm
CN104281894A (en) * 2014-10-30 2015-01-14 大连海事大学 Ship dispatch optimization method based on channel and berth resources
CN106200577A (en) * 2016-07-08 2016-12-07 青岛华通能源投资有限责任公司 A kind of multi-storied garage dispatch control method
CN107464005A (en) * 2017-08-21 2017-12-12 中国人民解放军国防科技大学 Expanded path planning method for vehicle reservation
CN108921353A (en) * 2018-07-06 2018-11-30 上海大学 A kind of optimization method, device and the electronic equipment of parking lot dispatching
CN108877286A (en) * 2018-07-09 2018-11-23 胡佂宇 A kind of parking stall based on block chain
CN109191906A (en) * 2018-11-12 2019-01-11 广西民族师范学院 A kind of parking lot distributed intelligence guidance system and method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
A Semi Distributed Approach for Min-Max Fair;E. Alfonsetti;《arXiv》;20140123;全文 *
停车总成本最小的停车位动态分配与诱导模型;卢凯 等;《华南理工大学学报(自然科学版)》;20180930;第46卷(第9期);全文 *
基于分布式技术的停车场管理系统的研究;纪加木;《中国优秀硕士学位论文全文数据库 信息科技辑》;20070915(第3期);I138-319、全文 *
基于分布式架构的智慧停车管理服务系统;王彬;《基于分布式架构的智慧停车管理服务系统》;20170630(第12期);全文 *
基于分布式架构资源动态分配系统的设计与实现;李东萍;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170115(第1期);I138-289、全文 *

Also Published As

Publication number Publication date
CN109754638A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109754638B (en) Parking space allocation method based on distributed technology
JP3952518B2 (en) Multidimensional data processing method
CN108764555B (en) Shared bicycle parking point site selection method based on Hadoop
CN102521386B (en) Method for grouping space metadata based on cluster storage
CN102737126B (en) Classification rule mining method under cloud computing environment
CN103412897A (en) Parallel data processing method based on distributed structure
CN111582552B (en) Shared bicycle parking point distribution method based on multi-target genetic algorithm
CN108009265B (en) Spatial data indexing method in cloud computing environment
CN111460508A (en) Track data protection method based on differential privacy technology
CN111190942A (en) Urban road parking spot overall analysis method based on data mining technology
CN111126799A (en) Shared network driver and crew matching method based on bipartite graph
CN106775705A (en) A kind of software module division methods
CN116775661A (en) Big space data storage and management method based on Beidou grid technology
CN105550825A (en) Flexible factory work scheduling method based on MapReduce parallelization in cloud computing environment
US10482085B2 (en) Methods and systems for estimating the number of points in two-dimensional data
Hu et al. Approximation with error bounds in spark
CN117354330A (en) Improved edge computing IoT big data analysis architecture
CN113407542A (en) Retrieval method and system for travel tracks of vehicles in urban road network
CN109889573B (en) NGSA multi-target-based copy placement method in hybrid cloud
CN115545543A (en) Multi-disaster integrated natural disaster risk assessment and analysis system
CN115687517A (en) Method and device for storing spatio-temporal data, database engine and storage medium
CN114691327A (en) Multi-objective group intelligent optimization method and system for two-stage task scheduling
CN113139032A (en) Geographic position searching method and device, electronic equipment and storage medium
CN112418535A (en) School bus scheduling planning method based on binary tree
Bulut et al. Optimizing bus lines using genetic algorithm for public transportation

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