Shared bicycle monitoring equipment deployment method, device, electronic equipment and storage medium
By building the target model and using position exchange algorithms and genetic algorithms, the deployment plan of shared bicycle monitoring equipment is determined, which solves the problem that a single device cannot cover a large range and achieves the monitoring effect of maximizing the coverage range.
Patent Information
- Application Number
- CN202311254484.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-09-26
AI Technical Summary
In the prior art, a single shared bicycle monitoring device cannot cover a large area (block scale, about tens of thousands of square meters), resulting in insufficient monitoring coverage.
By obtaining the monitoring area data of shared bicycles, data processing is carried out to obtain a set of candidate points covering different grids, a target model is built to maximize coverage, and a location exchange algorithm and genetic algorithm are used to solve the target model to determine the pre-pre- Set up a deployment plan for deploying a number of shared bicycle monitoring equipment.
The joint deployment of multiple shared bicycle monitoring equipment has been realized, maximizing the coverage of the monitoring area, and solving the problem of insufficient coverage of a single device.
Smart Images

Figure CN117354815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device and storage medium for deploying shared bicycle monitoring equipment. Background Art
[0002] In recent years, shared bicycles have become a major mode of travel for urban residents, especially in solving the "last mile" commuting problem. The total number of shared bicycles in my country has already exceeded 100 million. Near major transportation stations such as subway stations and bus stations, shared bicycles show obvious tidal characteristics related to commuting patterns, which has created an imbalance between supply and demand. At the same time, the data of shared bicycles is in the hands of various operating companies, and the data of each company is not the same. Therefore, from the perspective of urban management, it is necessary to monitor the number of shared bicycles around key transportation stations in real time, and combine the monitoring results with the management of shared bicycles, so as to better meet the requirements of urban management and people's travel.
[0003] Shared bicycle monitoring equipment (such as Bluetooth monitoring equipment) can be effectively used for monitoring shared bicycles. This device obtains the unique Bluetooth MAC address of the shared bicycle by exchanging Bluetooth signals with the shared bicycle. Since the Bluetooth signal transmission range of this device is usually less than 100 meters, it can effectively monitor the number of shared bicycles nearby. However, for larger areas (block scale, about tens of thousands of square meters), a single device cannot cover the entire area, so multiple shared bicycle monitoring devices are needed to be used together to cover a larger or entire monitoring area. Summary of the invention
[0004] The present invention provides a method, device, electronic device and storage medium for deploying shared bicycle monitoring equipment, which are used to solve the defect in the prior art that a single device cannot cover the entire area of a larger range (block scale, about tens of thousands of square meters), and achieve the purpose of maximizing the coverage of the monitoring area by combining multiple shared bicycle monitoring devices.
[0005] The present invention provides a method for deploying a shared bicycle monitoring device, comprising:
[0006] Obtain monitoring area data of shared bicycles;
[0007] Processing the monitoring area data to obtain a set of candidate points covering different grids;
[0008] Constructing a target model, wherein the target model is used to maximize the coverage based on a preset number of deployments of shared bicycle monitoring devices;
[0009] Inputting the candidate point set covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively;
[0010] The deployment plan of the preset number of shared bicycle monitoring devices is determined based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0011] According to a shared bicycle monitoring device deployment method provided by the present invention, the shared bicycle monitoring area data includes: monitoring area location, monitoring area spatial range and monitoring area information point data;
[0012] The obtaining of the monitoring area data of the shared bicycle includes:
[0013] Obtain the location of the monitoring area from geographic information system software and online map software;
[0014] Marking the spatial scope of the monitoring area on the geographic information system software;
[0015] At least one of street shops, communication signal towers, street lamps and traffic camera brackets is obtained as the information point data of the monitoring area.
[0016] According to a shared bicycle monitoring device deployment method provided by the present invention, the data of the monitoring area is processed to obtain a set of candidate points covering different grids, including:
[0017] Discretize the spatial range of the monitoring area into a plurality of grids, save each of the grids as a surface feature file, and save the center point of each of the grids as a first point feature file;
[0018] Selecting a plurality of candidate points of the monitoring area based on the monitoring area position and the monitoring area information point data, and saving each of the candidate points as a second point element file;
[0019] Calculating the distance between any point in the first point feature file and any point in the second point feature file;
[0020] Based on each of the distances and the coverage radius of the service range of the shared bicycle monitoring device, a set of candidate points for each of the grids is calculated.
[0021] According to a shared bicycle monitoring device deployment method provided by the present invention, the target model includes: an objective function, a first constraint condition, a second constraint condition and a third constraint condition; wherein:
[0022] The objective function is a function that maximizes the cumulative sum of the first variables of each grid; the first variable of the grid is used to indicate whether the grid is covered by the service range of the shared bicycle monitoring device;
[0023] The first constraint condition is that the cumulative sum of the second variables of each candidate point in the candidate point set of each grid is greater than or equal to the first variable of the grid; the second variable is used to characterize whether the candidate point is selected as the location for deploying the shared bicycle monitoring device;
[0024] The second constraint condition is that the cumulative sum of the second variables of all the candidate points is equal to the preset deployment quantity;
[0025] The third constraint condition is that the first variable and the second variable belong to a first set respectively, and the first set includes 0 and 1.
[0026] According to a shared bicycle monitoring device deployment method provided by the present invention, the target model is solved by using a position exchange algorithm, including:
[0027] Randomly generate an initial solution of the target model, calculate the initial coverage area, and set the iteration count variable to 0, the exchange position pointer to 1, and the non-exchange round counter to 1; the initial solution is a first candidate point set composed of the preset number of different candidate points;
[0028] Iterate the following steps until the number of unswitched rounds counter is greater than the preset deployment number:
[0029] constructing all target candidate points as a second candidate point set, wherein the target candidate points do not belong to the first candidate point set corresponding to the iteration count variable;
[0030] For each of the target candidate points, remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add the target candidate point, and construct a third candidate point set;
[0031] Calculating the coverage area of each of the third candidate point sets respectively;
[0032] Remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add any one of the target candidate points, and construct a fourth candidate point set;
[0033] If there exists any one of the third candidate point sets whose coverage area is smaller than the coverage area of the first candidate point set corresponding to the iteration count variable, and smaller than or equal to the coverage area of the fourth candidate point set, then the current solution is updated, and the first candidate point set corresponding to the next iteration count variable is set as the third candidate point set, the coverage area of the first candidate point set corresponding to the next iteration count variable is set as the coverage area of the third candidate point set, the count of the iteration count variable is increased by 1, and the count variable of the number of exchange rounds that have not occurred is updated to 0; otherwise, the current solution is not updated;
[0034] Add 1 to the value of the exchange position pointer, and if the exchange position pointer is greater than the preset deployment quantity, reset the exchange position pointer to 1;
[0035] Each time iterates, the count of the non-exchange round counter is increased by 1;
[0036] After the iteration is finished, the first candidate point set corresponding to the current iteration count variable is determined as the solution result corresponding to the position exchange algorithm.
[0037] According to a shared bicycle monitoring device deployment method provided by the present invention, the target model is solved by using a genetic algorithm, including:
[0038] Setting the fitness function, population size, crossover rate, mutation rate, maximum number of generations and chromosome encoding method in the genetic algorithm;
[0039] Randomly generate multiple feasible solutions of the target model, form the multiple feasible solutions into an initial population, set an algebraic counter to 1; the size of the initial population is the population size;
[0040] Iterate through the following steps:
[0041] Calculating the fitness of each individual in the initial population;
[0042] If the count of the algebraic counter reaches the maximum algebra, the individual with the largest fitness is extracted from the initial population as the solution result corresponding to the genetic algorithm;
[0043] If the count of the algebraic counter does not reach the maximum algebra, the selection probability is calculated based on the fitness function, and one individual is randomly selected from the initial population each time according to the selection chance determined by the selection probability, and the chromosomes are replicated, and the replicated multiple chromosomes are formed into a first population;
[0044] According to the number of chromosomes participating in the crossover determined by the crossover rate, a first number of chromosomes are randomly selected from the first population, paired for a crossover operation, and the first number of chromosomes are replaced with the generated new chromosomes to obtain a second population;
[0045] randomly selecting a second number of chromosomes from the second population according to the number of mutations determined by the mutation rate, performing mutation operations on the second number of chromosomes respectively, and replacing the second number of chromosomes with the generated new chromosomes to obtain a third population;
[0046] The third population is used as the new initial population, and the count of the algebraic counter is set to be plus 1.
[0047] According to a shared bicycle monitoring device deployment method provided by the present invention, the deployment scheme of the preset number of shared bicycle monitoring devices is determined based on the solution result corresponding to the position exchange algorithm and the solution result corresponding to the genetic algorithm, including:
[0048] From the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm, select the solution result corresponding to the maximized coverage range as the deployment plan for the preset number of shared bicycle monitoring devices.
[0049] The present invention also provides a shared bicycle monitoring device deployment device, comprising:
[0050] The acquisition module is used to obtain the monitoring area data of the shared bicycles;
[0051] A processing module, used for processing the monitoring area data to obtain a set of candidate points covering different grids;
[0052] A construction module, used to construct a target model, wherein the target model is used to maximize the coverage based on a preset number of deployments of shared bicycle monitoring devices;
[0053] A solution module, used for inputting the candidate point set covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively;
[0054] A deployment module is used to determine the deployment plan of the preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0055] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for deploying a shared bicycle monitoring device as described in any one of the above is implemented.
[0056] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the shared bicycle monitoring device deployment method as described in any one of the above is implemented.
[0057] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-described methods for deploying shared bicycle monitoring equipment.
[0058] The present invention provides a method, device, electronic device and storage medium for deploying shared bicycle monitoring equipment. First, the monitoring area data of the shared bicycle is obtained; the monitoring area data is processed to obtain a set of candidate points covering different grids; then, a target model is constructed, and the target model is used to maximize the coverage based on the preset deployment number of shared bicycle monitoring equipment; the candidate point sets covering different grids are input into the target model, and the target model is solved using a position exchange algorithm and a genetic algorithm respectively; finally, based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm, a deployment scheme for the preset deployment number of shared bicycle monitoring equipment is determined, and the maximum coverage of the monitoring area can be achieved based on the preset deployment number of shared bicycle monitoring equipment. Therefore, the present invention can combine multiple shared bicycle monitoring equipment to achieve the maximum coverage of the monitoring area. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0060] Figure 1 It is a flow chart of a method for deploying a shared bicycle monitoring device provided by an embodiment of the present invention;
[0061] Figure 2 is a schematic diagram of a monitoring area provided by an embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of a gridded monitoring area and a grid center point provided by an embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of multiple candidate points in a monitoring area provided by an embodiment of the present invention;
[0064] Figure 5 is a flow chart of a position exchange algorithm provided by an embodiment of the present invention;
[0065] Figure 6 is a schematic diagram of a flow chart of a genetic algorithm provided by an embodiment of the present invention;
[0066] Figure 7 is a schematic diagram of maximizing coverage when the preset deployment number is 5 provided in an embodiment of the present invention;
[0067] Figure 8 is a schematic diagram of maximizing coverage when the preset deployment number is 10 provided in an embodiment of the present invention;
[0068] Fig. 9 is a schematic diagram of maximizing coverage when the preset deployment number is 15 provided in an embodiment of the present invention;
[0069] Fig.10 It is a schematic diagram of covering the entire monitoring range when the preset deployment number is 22 provided by an embodiment of the present invention;
[0070] Fig.11 is a schematic diagram of a curve between a preset deployment quantity and a coverage rate provided in an embodiment of the present invention;
[0071] Fig.12 It is a structural schematic diagram of a shared bicycle monitoring device deployment device provided by an embodiment of the present invention;
[0072] Fig.13 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] Combine the following Figure 1-Figure 11 The shared bicycle monitoring device deployment method of the present invention is described.
[0075] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for deploying a shared bicycle monitoring device according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0076] Step 101: Obtain monitoring area data of shared bicycles;
[0077] Step 102: Process the monitoring area data to obtain a set of candidate points covering different grids;
[0078] Step 103: construct a target model, where the target model is used to maximize coverage based on a preset number of deployments of shared bicycle monitoring devices;
[0079] Step 104: input the candidate point sets covering different grids into the target model, and solve the target model using the position exchange algorithm and the genetic algorithm respectively;
[0080] Step 105: Determine a deployment plan for a preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0081] In step 101, the monitoring area of the shared bicycle is generally around key transportation stations, such as subway stations and bus stations. The monitoring area data of the shared bicycle is the location information of the monitoring area of the shared bicycle, such as the location of the monitoring area, the spatial range of the monitoring area, and the information point data of the monitoring area.
[0082] In step 102, the monitoring area can be discretized into multiple grids, and the monitoring area data is processed to obtain a set of candidate points covering each grid. The candidate points in the candidate point set are candidate locations for deploying shared bicycle monitoring equipment.
[0083] In step 103, the preset deployment quantity is the quantity of shared bicycle monitoring devices that need to be deployed. The shared bicycle monitoring devices may be Bluetooth monitoring devices.
[0084] Construct a target model for maximizing coverage with a preset number of deployments of shared bicycle monitoring devices.
[0085] In step 104, the target model can be solved using the branch and bound-cutting plane algorithm. In addition, many mature solver software, such as CPLEX, Gurobi, etc., have implemented this algorithm. However, directly solving the linear optimization model often consumes more computing resources (such as computing time, CPU, memory, etc.), which cannot meet the requirements of real-time decision-making. Therefore, this step proposes to use the position exchange algorithm and the genetic algorithm to solve the target model at the same time.
[0086] Specifically, the candidate point set covering different grids obtained in step 102 is input into the target model constructed in step 103, and the target model is solved using a position exchange algorithm and a genetic algorithm respectively.
[0087] In step 105, the best deployment scheme for the preset number of shared bicycle monitoring devices is selected from the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0088] The present embodiment provides a shared bicycle monitoring device deployment, first, obtain the monitoring area data of the shared bicycle; perform data processing on the monitoring area data to obtain a set of candidate points covering different grids; then, construct a target model, the target model is used to achieve maximum coverage based on the preset deployment number of shared bicycle monitoring devices; input the candidate point set covering different grids into the target model, and solve the target model using the position exchange algorithm and the genetic algorithm respectively; finally, determine the deployment plan of the preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm, and achieve maximum coverage of the monitoring area based on the preset number of shared bicycle monitoring devices. Therefore, the present embodiment can combine multiple shared bicycle monitoring devices to achieve maximum coverage of the monitoring area.
[0089] In an exemplary embodiment, the monitoring area data of a shared bicycle includes: the location of the monitoring area, the spatial range of the monitoring area, and the information point data of the monitoring area; step 101 includes: obtaining the location of the monitoring area from the geographic information system software and the online map software; marking the spatial range of the monitoring area on the geographic information system software; obtaining at least one of street shops, communication signal towers, street lights, and traffic camera brackets as the information point data of the monitoring area.
[0090] Specifically, the monitoring area data of shared bicycles include:
[0091] 1) Monitoring area location
[0092] The approximate location of the monitoring area and major landmark buildings (such as subway stations, etc.) are obtained from Geographic Information System (GIS) software and online map software.
[0093] 2) Spatial scope of monitoring area
[0094] Accurately mark the spatial scope of the monitoring area on the geographic information system software.
[0095] 3) Monitoring area information point data
[0096] The information point of interest (POI) data of the monitoring area is obtained, for example, at least one of street shops, communication signal towers, street lights and traffic camera brackets.
[0097] Optionally, the monitoring area data of shared bicycles also includes: high-resolution remote sensing images and vector map data of the monitoring area. Download high-resolution remote sensing images (such as WorldView, GeoEye, high-resolution satellite, etc.) and vector map data (including roads, green spaces, building bases, etc.) of the monitoring area for mapping.
[0098] In this embodiment, the location of the monitoring area, the spatial range of the monitoring area, and the information point data of the monitoring area can be obtained in different ways.
[0099] Based on the above embodiment, in an exemplary embodiment, step 102 may include the following sub-steps:
[0100] Step 1021, discretize the spatial range of the monitoring area into multiple grids, save each grid as a surface feature file, and save the center point of each grid as a first point feature file;
[0101] Step 1022: Select multiple candidate points of the monitoring area based on the monitoring area location and the monitoring area information point data, and save each candidate point as a second point feature file;
[0102] Step 1023, calculating the distance between any point in the first point feature file and any point in the second point feature file;
[0103] Step 1024: Calculate the candidate point set of each grid based on the distances and the coverage radius of the service range of the shared bicycle monitoring device.
[0104] In step 1021, illustratively, Figure 2 The spatial range of the monitoring area shown is discretized as Figure 3 The grids are composed of squares with a side length of 25 meters. Figure 3 The grids shown in the figure are saved as surface feature files. Figure 3 The center points of each grid shown are saved as the first point feature file.
[0105] In step 1022, for example, locations such as shops along the street, communication signal towers, street lights, and traffic camera brackets that can house shared bicycle monitoring equipment and provide stable power supply are selected as monitoring areas. Figure 4 Multiple candidate points of the monitoring area shown in the figure are selected, and the position of each candidate point is saved as a second point feature file.
[0106] In step 1023, illustratively, the Euclidean distance between any point j in the first point feature file and any point i in the second point feature file can be calculated by the following expression (1):
[0107]
[0108] Among them, (x i ,y i ) is the map coordinate of candidate point i, (x j ,y j ) are the map coordinates of the grid center point j, both in meters.
[0109] In step 1024, due to the different models of shared bicycle monitoring devices, the coverage radius of the service range of the shared bicycle monitoring device varies from 10 meters to 100 meters. Assuming that the service range of a single shared bicycle monitoring device is a circular area with a coverage radius of D, the candidate point set N covering the grid j can be calculated by the following expression (2): j :
[0110] N j ={i|d ij ≤D} (2)
[0111] In this embodiment, candidate point sets of different grids may be calculated according to the location of the monitoring area, the spatial range of the monitoring area, and the information point data of the monitoring area.
[0112] Based on the above embodiments, in an exemplary embodiment, the target model includes: an objective function, a first constraint condition, a second constraint condition and a third constraint condition; wherein:
[0113] The objective function is a function that maximizes the cumulative sum of the first variables of each grid; the first variable of the grid is used to characterize whether the grid is covered by the service range of the shared bicycle monitoring device.
[0114] Specifically, the objective function can be expressed by expression (3):
[0115]
[0116] Among them, y j The first variable represents the grid j, and m represents the total number of grids to be covered.
[0117] The first constraint condition is that the cumulative sum of the second variables of each candidate point in the candidate point set of each grid is greater than or equal to the first variable of the grid; the second variable is used to characterize whether the candidate point is selected as the location for deploying the shared bicycle monitoring device.
[0118] Specifically, the first constraint can be expressed by expression (4):
[0119]
[0120] Among them, x i The second variable representing the candidate point i, which belongs to the candidate point set N of grid j j .
[0121] The second constraint condition is that the cumulative sum of the second variables of all candidate points is equal to the preset deployment quantity.
[0122] Specifically, the second constraint can be expressed by expression (5):
[0123]
[0124] Where n represents the total number of candidate points, and p represents the preset deployment number.
[0125] The third constraint condition is that the first variable and the second variable belong to a first set respectively, and the first set includes 0 and 1.
[0126] Specifically, the second constraint can be expressed by expression (6):
[0127] x i ,y j ∈{0,1}(6)
[0128] Among them, {0,1} represents the first set.
[0129] By running the target model once, the maximum coverage can be solved when the preset deployment number is p. Through iteration, p is gradually increased from 1, and each time it is increased by 1, until all grids are within the coverage of the shared bicycle monitoring equipment. At this time, the p value is the minimum number of equipment to fully cover the entire monitoring area.
[0130] In this embodiment, a target model is constructed by using an objective function and three constraints, and the maximum coverage range under a preset deployment quantity can be solved through the target model.
[0131] Based on the above embodiments, in an exemplary embodiment, Figure 5 As shown, the target model is solved using the position exchange algorithm, including:
[0132] Step 501, randomly generate an initial solution of the target model, calculate the initial coverage area, and set the iteration count variable to 0, the exchange position pointer to 1, and the non-exchange round counter to 1; the initial solution is a first candidate point set consisting of a preset number of different candidate points.
[0133] Specifically, the initial solution of the target model is randomly generated, that is, a first candidate point set V0={v1, v2, ..., v p},v i Indicates the serial number of candidate point i, which is different for each candidate point in the first candidate point set V0. Calculate the initial coverage area S0, set the iteration count variable t=0, the exchange position pointer k=1, and the no exchange round counter r=1.
[0134] Step 502, determine whether the counter of the number of exchange rounds that have not occurred is greater than the preset deployment number, if so, proceed to step 514, if not, proceed to step 503.
[0135] Step 503: construct all target candidate points into a second candidate point set, where the target candidate points do not belong to the first candidate point set corresponding to the iteration count variable.
[0136] Specifically, if r>p, then all t The target candidate points are constructed as the second candidate point set Q t . V t Represents the first candidate point set corresponding to the iteration count variable t
[0137] Step 504: For each target candidate point, remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add the target candidate point, and construct a third candidate point set.
[0138] Specifically, for Q t Each target candidate point v q , from V t Remove v k , increase v q , construct the third candidate point set V t (q) .v k Indicates removing the candidate point corresponding to the exchange position pointer k.
[0139] Step 505: Calculate the coverage area of each third candidate point set respectively.
[0140] Specifically, calculate V t (q) Coverage area
[0141] Step 506: Remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add any target candidate point, and construct a fourth candidate point set.
[0142] Specifically, from V t Remove v k , increase v q′ , construct the fourth candidate point set V t (q′) .v q′ Indicates Q t Any target candidate point in .
[0143] Step 507, determine whether there is any third candidate point set whose coverage area is smaller than the coverage area of the first candidate point set corresponding to the iteration count variable, and smaller than or equal to the coverage area of the fourth candidate point set. If so, proceed to step 508; if not, proceed to step 509.
[0144] Step 508, update the current solution, and set the first candidate point set corresponding to the next iteration count variable to the third candidate point set, the coverage area of the first candidate point set corresponding to the next iteration count variable is the coverage area of the third candidate point set, the count of the iteration count variable is increased by 1, the count variable of the number of exchange rounds that has not occurred is updated to 0, and proceed to step 510.
[0145] Specifically, if there is any Also meets (1) (2) Then update the current optimal solution: let V t+1 =V t (q) ; t=t+1;r=0. Among them, Represents the third candidate point set V t (q) Coverage area, S t Indicates V t The coverage area, Represents the fourth candidate point set V t (q′) Coverage area, V t+1 represents the first candidate point set corresponding to the next iteration count variable, S t+1 Indicates V t+1 coverage area.
[0146] Step 509: Do not update the current solution, and go to step 510.
[0147] Specifically, if there is no Also meets (1) (2) Then no operation is performed on the current solution, and the process goes directly to step 510 .
[0148] Step 510: Add 1 to the value of the exchange position pointer; that is, set k=k+1.
[0149] Step 511, determine whether the exchange position pointer is greater than the preset deployment quantity, if so, proceed to step 512, if not, proceed to step 513.
[0150] Step 512, reset the exchange position pointer to 1, and go to step 513.
[0151] Specifically, if k>p, k=1 is reset. Otherwise, no operation is performed on k, and the process directly goes to step 513 .
[0152] Step 513: increase the count of the non-exchange round counter by 1; that is, for each iteration, set r=r+1 and return to step 502.
[0153] Step 514: After the iteration is completed, the first candidate point set corresponding to the current iteration count variable is determined as the solution result corresponding to the position exchange algorithm.
[0154] Specifically, after the iteration, V t The serial number of the candidate point in is the serial number of the candidate point that can maximize the coverage, which is the solution result corresponding to the position exchange algorithm.
[0155] In this embodiment, the position exchange algorithm is used to solve the target model, which can save computing resources and meet the requirements of real-time decision-making.
[0156] Based on the above embodiments, in an exemplary embodiment, Figure 6 As shown, the target model is solved by using genetic algorithm, including:
[0157] Step 601: Set the fitness function, population size, crossover rate, mutation rate, maximum number of generations and chromosome encoding method in the genetic algorithm.
[0158] Exemplarily, the parameters in the genetic algorithm are set as follows: a fitness function f(V)=S is defined. v / S max , S v represents the area covered by the deployment solution v, S max represents the total area of the monitoring area; given the population size N = 10n, the crossover rate P c =0.8 and mutation rate P m = 0.02, the maximum number of generations T = 2n, and the encoding method of chromosomes in the genetic algorithm is defined as V = v1, v2, ..., v p , v i represents the sequence number of the candidate point, and p represents the preset deployment number of shared bicycle monitoring devices.
[0159] Step 602: randomly generate multiple feasible solutions of the target model, group the multiple feasible solutions into an initial population, set the algebraic counter to 1; the size of the initial population is the population size.
[0160] Specifically, N feasible solutions of the target model are randomly generated: V1, V2, ..., V N , forming the initial population Set the algebraic counter t=1.
[0161] Step 603: Calculate the fitness of each individual in the initial population.
[0162] Specifically, calculate the initial population The fitness f(V) of each individual in .
[0163] Step 604, determine whether the count of the algebraic counter reaches the maximum algebra, if so, go to step 605, if not, go to step 606.
[0164] Step 605: extract the individual with the largest fitness from the initial population as the corresponding solution result of the genetic algorithm, and the process of the genetic algorithm ends.
[0165] Specifically, if the count of the algebraic counter reaches the maximum algebra t = T, then from the initial population The individual with the largest fitness f(V) is extracted as the corresponding solution of the genetic algorithm, and the process of the genetic algorithm ends.
[0166] Step 606: Calculate the selection probability based on the fitness function, and randomly select one individual from the initial population each time and replicate the chromosome according to the chance of selection determined by the selection probability, and form the first population with the replicated multiple chromosomes.
[0167] Specifically, the selection probability is calculated by expression (7):
[0168]
[0169] Among them, P(V i ) represents individual V i The probability of selection, f(V i ) represents individual V i The fitness of .
[0170] According to the selection probability P(V i ) is determined by the chance of selection, each time from the initial population Randomly select an individual and replicate its chromosomes N times, and then form the first population with the N replicated chromosomes.
[0171] Step 607: According to the number of chromosomes participating in the crossover determined by the crossover rate, a first number of chromosomes are randomly selected from the first population, paired for the crossover operation, and the first number of chromosomes are replaced with the generated new chromosomes to obtain a second population.
[0172] Specifically, according to the crossover rate P c The number of chromosomes participating in the crossover is determined by c = P c N, c represents the first number, and then from the first population Randomly determine c chromosomes, pair them up for crossover, and replace the original chromosomes with the new chromosomes to get the second population
[0173] Step 608: randomly select a second number of chromosomes from the second population according to the number of mutations determined by the mutation rate, perform mutation operations on the second number of chromosomes respectively, and replace the second number of chromosomes with the generated new chromosomes to obtain a third population.
[0174] Specifically, according to the mutation rate P m The determined number of mutations m = P m N, from the second population Randomly determine m chromosomes, perform mutation operations on them, m represents the second number, and replace the original chromosomes with the generated new chromosomes to obtain the third population
[0175] Step 609 , taking the third population as the new initial population, setting the count of the algebraic counter to be plus 1, and returning to step 603 .
[0176] Specifically, using the third population Replace the initial population Set the algebraic counter t=t+1, and return to step 603 to perform the next round of iteration.
[0177] In this embodiment, a genetic algorithm is used to imitate the process of species evolution in nature, starting from a set of random feasible solutions, and the solutions are gradually improved through repeated iterations. In each iteration, the genetic algorithm will evaluate the quality of the solution, calculate the fitness value, and select the solution based on the fitness value and generate a new solution through crossover and mutation to enter the next round of iteration. Through multiple rounds of iterations, the quality of the solution can be greatly improved.
[0178] Based on the above embodiments, in an exemplary embodiment, step 105 includes: selecting the solution result corresponding to the maximized coverage range from the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm as the deployment plan for a preset number of shared bicycle monitoring devices.
[0179] For example, Figure 7-10 The deployment schemes of shared bicycle monitoring devices with preset deployment numbers p of 5, 10, 15 and 22 are shown respectively. Fig.11 The variation curve between p and coverage is shown.
[0180] It can be seen that when p=22, the entire monitoring range can be covered just right, so at least 22 shared bicycle monitoring devices are required.
[0181] In this embodiment, the solution result corresponding to the maximized coverage range can be selected from the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm as the deployment plan for the preset number of shared bicycle monitoring devices.
[0182] The shared bicycle monitoring device deployment device provided by the present invention is described below. The shared bicycle monitoring device deployment device described below and the shared bicycle monitoring device deployment method described above can be referenced to each other.
[0183] Please refer to Fig.12 , Fig.12 Schematic diagram of the structure of the shared bicycle monitoring equipment deployment device provided by the embodiment of the present invention. Fig.12 As shown, the device may include:
[0184] An acquisition module 10 is used to acquire monitoring area data of a shared bicycle;
[0185] The processing module 20 is used to process the monitoring area data to obtain a set of candidate points covering different grids;
[0186] A construction module 30 is used to construct a target model, where the target model is used to maximize the coverage based on a preset number of deployments of shared bicycle monitoring devices;
[0187] A solution module 40, for inputting a set of candidate points covering different grids into a target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively;
[0188] The deployment module 50 is used to determine a deployment plan for a preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0189] In an exemplary embodiment, the monitoring area data of a shared bicycle includes: monitoring area location, monitoring area spatial range, and monitoring area information point data;
[0190] The acquisition module 10 is specifically used for:
[0191] Obtain the location of the monitoring area from geographic information system software and online mapping software;
[0192] Mark the spatial extent of the monitoring area on the geographic information system software;
[0193] At least one of the shops along the street, communication signal towers, street lamps and traffic camera brackets is obtained as the information point data of the monitoring area.
[0194] In an exemplary embodiment, the processing module 20 is specifically configured to:
[0195] Discretize the spatial range of the monitoring area into multiple grids, save each grid as a surface feature file, and save the center point of each grid as the first point feature file;
[0196] Selecting multiple candidate points of the monitoring area based on the monitoring area location and the monitoring area information point data, and saving each candidate point as a second point feature file;
[0197] Calculate the distance between any point in the first point feature file and any point in the second point feature file;
[0198] Based on the distances and the coverage radius of the service range of the shared bicycle monitoring device, the candidate point set of each grid is calculated.
[0199] In an exemplary embodiment, the target model includes: a target function, a first constraint, a second constraint, and a third constraint; wherein:
[0200] The objective function is a function that maximizes the cumulative sum of the first variables of each grid; the first variable of the grid is used to indicate whether the grid is covered by the service range of the shared bicycle monitoring device;
[0201] The first constraint condition is that the cumulative sum of the second variables of each candidate point in the candidate point set of each grid is greater than or equal to the first variable of the grid; the second variable is used to characterize whether the candidate point is selected as the location for deploying the shared bicycle monitoring device;
[0202] The second constraint condition is that the cumulative sum of the second variables of all candidate points is equal to the preset deployment quantity;
[0203] The third constraint condition is that the first variable and the second variable belong to a first set respectively, and the first set includes 0 and 1.
[0204] In an exemplary embodiment, the solution module 40 is specifically configured to:
[0205] Randomly generate the initial solution of the target model, calculate the initial coverage area, and set the iteration count variable to 0, the exchange position pointer to 1, and the number of rounds without exchange to 1; the initial solution is the first candidate point set composed of a preset number of different candidate points;
[0206] Iterate the following steps until the exchange round counter does not exceed the preset deployment number:
[0207] All target candidate points are constructed as a second candidate point set, and the target candidate points do not belong to the first candidate point set corresponding to the iteration count variable;
[0208] For each target candidate point, remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add the target candidate point, and construct a third candidate point set;
[0209] Calculate the coverage area of each third candidate point set respectively;
[0210] Remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add any target candidate point, and construct a fourth candidate point set;
[0211] If there is any third candidate point set whose coverage area is smaller than the coverage area of the first candidate point set corresponding to the iteration count variable, and smaller than or equal to the coverage area of the fourth candidate point set, then the current solution is updated, and the first candidate point set corresponding to the next iteration count variable is set as the third candidate point set, the coverage area of the first candidate point set corresponding to the next iteration count variable is set as the coverage area of the third candidate point set, the count of the iteration count variable is increased by 1, and the count variable of the number of exchange rounds that has not occurred is updated to 0; otherwise, the current solution is not updated;
[0212] Add 1 to the value of the exchange position pointer. If the exchange position pointer is greater than the preset deployment quantity, reset the exchange position pointer to 1.
[0213] Each time iterates, the counter of the number of rounds without exchange is incremented by 1;
[0214] After the iteration is completed, the first candidate point set corresponding to the current iteration count variable is determined as the solution result corresponding to the position exchange algorithm.
[0215] In an exemplary embodiment, the solution module 40 is specifically configured to:
[0216] Set the fitness function, population size, crossover rate, mutation rate, maximum number of generations and chromosome encoding method in the genetic algorithm;
[0217] Randomly generate multiple feasible solutions of the target model, form the multiple feasible solutions into an initial population, set the algebraic counter to 1; the size of the initial population is the population size;
[0218] Iterate through the following steps:
[0219] Calculate the fitness of each individual in the initial population;
[0220] If the count of the algebraic counter reaches the maximum algebra, the individual with the largest fitness is extracted from the initial population as the corresponding solution of the genetic algorithm;
[0221] If the count of the algebraic counter has not reached the maximum algebra, the selection probability is calculated based on the fitness function. According to the chance of selection determined by the selection probability, one individual is randomly selected from the initial population each time and the chromosome is replicated. The replicated chromosomes form the first population.
[0222] According to the number of chromosomes participating in the crossover determined by the crossover rate, a first number of chromosomes are randomly selected from the first population, paired for the crossover operation, and the first number of chromosomes are replaced by the generated new chromosomes to obtain a second population;
[0223] According to the number of mutations determined by the mutation rate, a second number of chromosomes are randomly selected from the second population, mutation operations are performed on the second number of chromosomes respectively, and the second number of chromosomes are replaced with the generated new chromosomes to obtain a third population;
[0224] The third population is used as the new initial population, and the count of the algebraic counter is set to increase by 1.
[0225] In an exemplary embodiment, the deployment module 50 is specifically used to select a solution result corresponding to the maximized coverage range from the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm as a deployment plan for a preset number of shared bicycle monitoring devices.
[0226] Please refer to Fig.13 , Fig.13 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.13 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the shared bicycle monitoring device deployment method, which includes: obtaining the monitoring area data of the shared bicycle; performing data processing on the monitoring area data to obtain a candidate point set covering different grids; constructing a target model, the target model is used to maximize the coverage based on the preset deployment number of the shared bicycle monitoring device; inputting the candidate point set covering different grids into the target model, and solving the target model using the position exchange algorithm and the genetic algorithm respectively; determining the deployment scheme of the preset deployment number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0227] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0228] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the shared bicycle monitoring device deployment method provided by the above methods, which method includes: obtaining the monitoring area data of the shared bicycle; performing data processing on the monitoring area data to obtain a set of candidate points covering different grids; constructing a target model, which is used to maximize the coverage range based on a preset deployment number of shared bicycle monitoring devices; inputting the set of candidate points covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively; determining the deployment plan of a preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0229] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the shared bicycle monitoring device deployment method provided by the above-mentioned methods, the method comprising: obtaining monitoring area data of shared bicycles; performing data processing on the monitoring area data to obtain a set of candidate points covering different grids; constructing a target model, the target model being used to maximize the coverage range based on a preset deployment number of shared bicycle monitoring devices; inputting the set of candidate points covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively; and determining a deployment plan for a preset number of shared bicycle monitoring devices based on the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm.
[0230] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0231] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0232] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for deploying shared bicycle monitoring equipment, characterized in that: include: Obtain monitoring area data of shared bicycles; Processing the monitoring area data to obtain a set of candidate points covering different grids; Constructing a target model, wherein the target model is used to maximize the coverage based on a preset number of deployments of shared bicycle monitoring devices; Inputting the candidate point set covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively; Determine a deployment plan for the preset number of shared bicycle monitoring devices based on the solution result corresponding to the position exchange algorithm and the solution result corresponding to the genetic algorithm; The target model includes: an objective function, a first constraint condition, a second constraint condition and a third constraint condition; wherein: The objective function is a function that maximizes the cumulative sum of the first variables of each grid; the first variable of the grid is used to indicate whether the grid is covered by the service range of the shared bicycle monitoring device; The first constraint condition is that the cumulative sum of the second variables of each candidate point in the candidate point set of each grid is greater than or equal to the first variable of the grid; the second variable is used to characterize whether the candidate point is selected as the location for deploying the shared bicycle monitoring device; The second constraint condition is that the cumulative sum of the second variables of all the candidate points is equal to the preset deployment quantity; The third constraint condition is that the first variable and the second variable belong to a first set respectively, and the first set includes 0 and 1; Solving the target model using a position exchange algorithm includes: Randomly generate an initial solution of the target model, calculate the initial coverage area, and set the iteration count variable to 0, the exchange position pointer to 1, and the non-exchange round counter to 1; the initial solution is a first candidate point set composed of the preset number of different candidate points; Iterate the following steps until the number of unswitched rounds counter is greater than the preset deployment number: constructing all target candidate points as a second candidate point set, wherein the target candidate points do not belong to the first candidate point set corresponding to the iteration count variable; For each of the target candidate points, remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add the target candidate point, and construct a third candidate point set; Calculating the coverage area of each of the third candidate point sets respectively; Remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add any one of the target candidate points, and construct a fourth candidate point set; If there exists any one of the third candidate point sets whose coverage area is smaller than the coverage area of the first candidate point set corresponding to the iteration count variable, and smaller than or equal to the coverage area of the fourth candidate point set, then the current solution is updated, and the first candidate point set corresponding to the next iteration count variable is set as the third candidate point set, the coverage area of the first candidate point set corresponding to the next iteration count variable is set as the coverage area of the third candidate point set, the count of the iteration count variable is increased by 1, and the count variable of the number of exchange rounds that have not occurred is updated to 0; otherwise, the current solution is not updated; Add 1 to the value of the exchange position pointer, and if the exchange position pointer is greater than the preset deployment quantity, reset the exchange position pointer to 1; Each time iterates, the count of the non-exchange round counter is increased by 1; After the iteration is finished, the first candidate point set corresponding to the current iteration count variable is determined as the solution result corresponding to the position exchange algorithm.
2. The method for deploying shared bicycle monitoring equipment according to claim 1, characterized in that: The monitoring area data of the shared bicycle includes: monitoring area location, monitoring area spatial range and monitoring area information point data; The obtaining of the monitoring area data of the shared bicycle includes: Obtain the location of the monitoring area from geographic information system software and online map software; Marking the spatial scope of the monitoring area on the geographic information system software; At least one of street shops, communication signal towers, street lamps and traffic camera brackets is obtained as the information point data of the monitoring area.
3. The method for deploying shared bicycle monitoring equipment according to claim 2, characterized in that: The data processing of the monitoring area data to obtain a set of candidate points covering different grids includes: Discretize the spatial range of the monitoring area into a plurality of grids, save each of the grids as a surface feature file, and save the center point of each of the grids as a first point feature file; Selecting a plurality of candidate points of the monitoring area based on the monitoring area position and the monitoring area information point data, and saving each of the candidate points as a second point element file; Calculating the distance between any point in the first point feature file and any point in the second point feature file; Based on each of the distances and the coverage radius of the service range of the shared bicycle monitoring device, a set of candidate points for each of the grids is calculated.
4. The method for deploying shared bicycle monitoring equipment according to any one of claims 1 to 3, characterized in that: Solving the target model using a genetic algorithm includes: Setting the fitness function, population size, crossover rate, mutation rate, maximum number of generations and chromosome encoding method in the genetic algorithm; Randomly generate multiple feasible solutions of the target model, form the multiple feasible solutions into an initial population, set an algebraic counter to 1; the size of the initial population is the population size; Iterate through the following steps: Calculating the fitness of each individual in the initial population; If the count of the algebraic counter reaches the maximum algebra, the individual with the largest fitness is extracted from the initial population as the solution result corresponding to the genetic algorithm; If the count of the algebraic counter does not reach the maximum algebra, the selection probability is calculated based on the fitness function, and one individual is randomly selected from the initial population each time according to the selection chance determined by the selection probability, and the chromosomes are replicated, and the replicated multiple chromosomes are formed into a first population; According to the number of chromosomes participating in the crossover determined by the crossover rate, a first number of chromosomes are randomly selected from the first population, paired for a crossover operation, and the first number of chromosomes are replaced with the generated new chromosomes to obtain a second population; randomly selecting a second number of chromosomes from the second population according to the number of mutations determined by the mutation rate, performing mutation operations on the second number of chromosomes respectively, and replacing the second number of chromosomes with the generated new chromosomes to obtain a third population; The third population is used as the new initial population, and the count of the algebraic counter is set to be plus 1.
5. The method for deploying shared bicycle monitoring equipment according to any one of claims 1 to 3, characterized in that: The method of determining the deployment scheme of the preset number of shared bicycle monitoring devices based on the solution result corresponding to the position exchange algorithm and the solution result corresponding to the genetic algorithm includes: From the solution results corresponding to the position exchange algorithm and the solution results corresponding to the genetic algorithm, select the solution result corresponding to the maximized coverage range as the deployment plan for the preset number of shared bicycle monitoring devices.
6. A shared bicycle monitoring device deployment device, characterized in that: include: The acquisition module is used to obtain the monitoring area data of the shared bicycles; A processing module, used for processing the monitoring area data to obtain a set of candidate points covering different grids; A construction module, used to construct a target model, wherein the target model is used to maximize the coverage based on a preset number of deployments of shared bicycle monitoring devices; A solution module, used for inputting the candidate point set covering different grids into the target model, and solving the target model using a position exchange algorithm and a genetic algorithm respectively; A deployment module, used to determine a deployment plan for the preset number of shared bicycle monitoring devices based on a solution result corresponding to the position exchange algorithm and a solution result corresponding to the genetic algorithm; The target model includes: an objective function, a first constraint condition, a second constraint condition and a third constraint condition; wherein: The objective function is a function that maximizes the cumulative sum of the first variables of each grid; the first variable of the grid is used to indicate whether the grid is covered by the service range of the shared bicycle monitoring device; The first constraint condition is that the cumulative sum of the second variables of each candidate point in the candidate point set of each grid is greater than or equal to the first variable of the grid; the second variable is used to characterize whether the candidate point is selected as the location for deploying the shared bicycle monitoring device; The second constraint condition is that the cumulative sum of the second variables of all the candidate points is equal to the preset deployment quantity; The third constraint condition is that the first variable and the second variable belong to a first set respectively, and the first set includes 0 and 1; The solution module is specifically used for: Randomly generate an initial solution of the target model, calculate the initial coverage area, and set the iteration count variable to 0, the exchange position pointer to 1, and the non-exchange round counter to 1; the initial solution is a first candidate point set composed of the preset number of different candidate points; Iterate the following steps until the number of unswitched rounds counter is greater than the preset deployment number: constructing all target candidate points as a second candidate point set, wherein the target candidate points do not belong to the first candidate point set corresponding to the iteration count variable; For each of the target candidate points, remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add the target candidate point, and construct a third candidate point set; Calculating the coverage area of each of the third candidate point sets respectively; Remove the candidate point corresponding to the exchange position pointer from the first candidate point set corresponding to the iteration count variable, add any one of the target candidate points, and construct a fourth candidate point set; If there exists any one of the third candidate point sets whose coverage area is smaller than the coverage area of the first candidate point set corresponding to the iteration count variable, and smaller than or equal to the coverage area of the fourth candidate point set, then the current solution is updated, and the first candidate point set corresponding to the next iteration count variable is set as the third candidate point set, the coverage area of the first candidate point set corresponding to the next iteration count variable is set as the coverage area of the third candidate point set, the count of the iteration count variable is increased by 1, and the count variable of the number of exchange rounds that have not occurred is updated to 0; otherwise, the current solution is not updated; Add 1 to the value of the exchange position pointer, and if the exchange position pointer is greater than the preset deployment quantity, reset the exchange position pointer to 1; Each time iterates, the count of the non-exchange round counter is increased by 1; After the iteration is finished, the first candidate point set corresponding to the current iteration count variable is determined as the solution result corresponding to the position exchange algorithm.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the shared bicycle monitoring device deployment method as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for deploying shared bicycle monitoring equipment as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Monitoring equipment arrangement information determination method and device, equipment and medium
CN115529437A