Method and system for generating urban traffic planning scheme based on generative neural network
By applying a generative neural network in urban traffic planning, training CGAN models to generate and evaluate traffic planning schemes, the problems of strong subjectivity, low efficiency and insufficient comprehensiveness in the existing methods are solved, and efficient and scientific traffic planning scheme generation is achieved.
Patent Information
- Application Number
- CN202410418275.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-04-08
AI Technical Summary
The existing urban transportation planning methods have problems such as strong subjectivity, low efficiency and insufficient comprehensiveness, and it is difficult to effectively solve the planning and design needs of complex transportation systems.
Using a generative neural network-based method, by cleaning and feature processing of traffic system data, training conditions to generate an adversarial network (CGAN) model, generating and evaluating traffic planning schemes, and optimizing models to improve the quality of solution generation.
It realizes learning the characteristics of urban traffic environment from a large amount of data, accurately simulates the traffic conditions under different basic conditions, quickly generates multiple planning schemes, and screens out the optimal scheme through simulation and comparison, improving the efficiency and quality of planning.
Smart Images

Figure CN118396279B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of urban transportation technology, and in particular to a method and system for generating an urban transportation planning scheme based on a generative neural network. Background Art
[0002] Urban transportation planning refers to the comprehensive planning and design of urban transportation systems, including the planning and layout of transportation infrastructure such as urban roads, public transportation, parking facilities, as well as the planning and design of traffic management, traffic organization, traffic safety and other aspects.
[0003] The first problem faced by transportation plan design is site selection (line selection), followed by traffic investigation and analysis, planning and design, evaluation and optimization, etc. Among them, site selection and line selection is an important foundation for subsequent work, providing a clear direction and goal for subsequent work, and the quality of its work will directly affect the planning and design of subsequent infrastructure.
[0004] In the implementation of specific site selection projects, this work often faces problems such as complex basic conditions, incomplete data, complex requirements, and difficult scheme evaluation. Traditional transportation planning scheme generation methods are usually based on rules and experience, lacking in-depth understanding and accurate modeling of complex transportation systems, and have the following defects:
[0005] 1. Traditional methods are easily influenced by planners’ experience and subjective opinions, and lack objectivity and scientificity.
[0006] 2. Traffic simulation models and data-driven methods require a lot of computing resources and data support, and are not suitable for situations with limited resources.
[0007] 3. Existing methods can often only plan for a single traffic mode or a single aspect, and it is difficult to comprehensively consider the needs and impacts of different traffic modes and different aspects.
[0008] Therefore, there is an urgent need for a method to generate a traffic planning scheme to solve the problems of strong subjectivity, low efficiency, and lack of comprehensiveness in existing urban traffic planning methods, so as to improve the efficiency and quality of traffic planning. Summary of the invention
[0009] The purpose of the present disclosure is to provide a method and system for generating urban traffic planning schemes based on a generative neural network, which can learn the characteristics of the urban traffic environment from a large amount of data, accurately simulate the traffic conditions under different basic conditions and generate a variety of planning schemes for screening and optimization.
[0010] To achieve the above objectives, the present disclosure provides a method for generating an urban traffic planning scheme based on a generative neural network, comprising:
[0011] Perform data cleaning and feature processing on traffic system data to obtain processed traffic system data;
[0012] Using the processed traffic system data to train the CGAN model, generating a traffic planning scheme through the generator in the CGAN model, and using the discriminator in the CGAN model to evaluate the effect of the traffic planning scheme;
[0013] The CGAN model is optimized based on the evaluation results to improve the quality of traffic planning scheme generation.
[0014] Furthermore, the traffic system data is cleaned and feature processed to obtain processed traffic system data, including:
[0015] Clean the traffic system data to obtain cleaned traffic system data;
[0016] Extract features from the cleaned traffic system data to obtain static data and urban traffic planning schemes;
[0017] Performing data enhancement on the urban traffic planning scheme by combining spatial transformation and sample splitting, and encoding the urban traffic planning scheme to obtain an urban traffic scheme code;
[0018] The static data is encoded in a regional rasterization manner to obtain the city basic information code.
[0019] Furthermore, the urban traffic planning scheme is data enhanced by combining spatial transformation and sample splitting, and the urban traffic planning scheme is encoded to obtain the urban traffic scheme code, including:
[0020] Perform random spatial transformation on the urban spatial distribution in the urban transportation planning scheme to generate new spatial distribution samples;
[0021] The basic line network plan in the urban transportation planning plan is disassembled to generate single lines at different stages, and the single lines are combined according to the construction order to obtain the corresponding sample data;
[0022] Based on the sample data, a single line is decomposed into sections, and the sections of the same or similar stages are randomly combined to obtain the basic line network of each stage;
[0023] Among them, the basic line network of each stage includes the basic line network of the current stage and the pre-planned line sections.
[0024] Furthermore, the processed traffic system data is used to train the CGAN model, a traffic planning scheme is generated by the generator in the CGAN model, and the effect of the traffic planning scheme is evaluated by the discriminator in the CGAN model, including:
[0025] Use convolutional neural networks or fully connected neural networks to build the generator and discriminator in the CGAN model;
[0026] Using the city basic information code and the basic line network of each stage as basic condition data, inputting the random noise vector and the basic line network of each stage of the basic condition data into the generator, so that the generator learns to generate a false traffic planning scheme that meets the set requirements;
[0027] Taking the pre-planned route section as the real traffic planning scheme, the basic line network at each stage respectively inputs the basic condition data, the false traffic planning scheme and the real traffic planning scheme into the discriminator;
[0028] The discriminator distinguishes and discriminates the false traffic planning scheme and the real traffic planning scheme based on the basic condition data, and obtains a discrimination result, that is, the authenticity probability of the false traffic planning scheme.
[0029] Furthermore, during the training of the CGAN model, the loss function of the CGAN model is set, including:
[0030] The loss function of the CGAN model includes a generator loss function and a discriminator loss function;
[0031] The generator loss function is defined as the negative log-likelihood of the discriminator's discrimination result on the fake traffic planning scheme data generated by the generator, and the geographic information constraint is added to the generator loss function;
[0032] The generator loss function is:
[0033]
[0034] Where, L G represents the generator loss function, G represents the generator, D represents the discriminator, and z represents the loss from the known distribution p z The random noise vector sampled in, G(z) represents the traffic planning data generated by the generator G based on the random noise vector z, and D(G(z)) represents the discriminant D's discriminant result on the traffic planning data G(z) generated by the generator G;
[0035] The geographic information constraints are:
[0036] Loss geo =λ geo·MSE(generated_geo_data, real_geo_data),
[0037] In the formula, Loss geo represents geographic information constraints, λ geo represents the weight of geographic information constraint, MSE represents mean square error loss function, generated_geo_data represents generated false geographic information data, and real_geo_data represents real geographic information data;
[0038] The discriminator loss function is defined as the sum of the differences between the discriminator's discrimination results of the false traffic planning scheme and the real traffic planning scheme and the real traffic planning scheme;
[0039] The discriminator loss function is:
[0040]
[0041] Where, L D represents the discriminator loss function, x represents the real traffic planning scheme data, p data is the distribution of the real traffic planning scheme data, and D(x) represents the discriminant result of the discriminator D on the real traffic planning scheme data x.
[0042] Furthermore, when setting the loss function of the CGAN model, the loss function is adjusted and optimized in combination with the actual needs of the urban traffic planning business, and the design goals of the urban traffic planning scheme and the corresponding loss function are added, including:
[0043] The transportation planning and design objectives include improving relevant travel utility, increasing facility service coverage, reducing engineering construction costs, and reducing non-geographic spatial continuity losses;
[0044] Among them, improving the relevant travel utility means: after the implementation of the urban transportation planning scheme, part of the original traffic flow is transferred to the new transportation mode, and this part of the traffic flow should be lower in cost than the original transportation mode;
[0045] Improving the coverage of facility services means: serving as many urban areas and populations as possible;
[0046] Reducing construction costs means that urban transportation infrastructure cannot be planned without limit. On the basis of meeting relevant travel utility and facility service coverage, construction costs should be comprehensively considered.
[0047] Set the loss functions of relevant travel utility, facility service coverage, engineering construction cost, and geographic space continuity loss respectively, and comprehensively constitute the optimization objective function of the CGAN model;
[0048] Among them, the loss function of the relevant travel utility is:
[0049]
[0050] Where, L commute represents the loss function of the relevant travel utility, n represents the total amount of transferred traffic, i represents the number of transferred traffic; e i represents the comprehensive cost of reducing the i-th transferred traffic volume;
[0051] The loss function of setting facility service coverage is:
[0052]
[0053] Where, L coverage represents the loss function of facility service coverage, P covered represents the total number of people covered by the planning scheme of urban transportation infrastructure, P total represents the total population of the city;
[0054] The loss function of engineering construction cost is:
[0055]
[0056] Where, L cost represents the loss function of the construction cost, m represents the total number of lines or roads, j represents the number of lines or roads, c j represents the construction cost of the jth line or road in the current urban transportation planning scheme;
[0057] The endpoints or stations of the basic line network scheme in the urban transportation planning scheme are set as nodes, and the node set is {V}, and the geographical distance between node m and node n is d mn , then the loss function of the geographical space continuity loss of the urban transportation planning scheme is:
[0058]
[0059] Where, L spatial The loss function representing the loss of geospatial continuity, d mn represents the actual geographical distance between node m and node n in the urban traffic planning scheme, Represents the distance between node m and node n in the false urban planning scheme line generated by the model;
[0060] Based on the loss function of the CGAN model, the optimization objective function of the CGAN model is obtained by combining the loss function of related travel utility, the loss function of facility service coverage, the loss function of engineering construction cost, and the loss function of geographic space continuity loss.
[0061] The loss function of the CGAN model is:
[0062]
[0063] Where, L CGAN represents the loss function of the CGAN model, x represents the real traffic planning scheme data, and p data is the distribution of real traffic planning scheme data, z represents the distribution from the known distribution p z The random noise vector sampled in, D(x) represents the discriminant D’s discriminant result on the real traffic planning scheme data x, and D(G(z)) represents the discriminant D’s discriminant result on the traffic planning data G(z) generated by the generator G;
[0064] The optimization objective function of the CGAN model is:
[0065] L total =L CGAN +λ1L commute +λ2L cost +λ3L coverage +λ4L spatial ,
[0066] Where, L total represents the optimization objective function of the CGAN model, and λ1, λ2, λ3, and λ4 represent the weights of each loss function respectively.
[0067] Furthermore, the CGAN model is optimized based on the evaluation results to improve the quality of traffic planning scheme generation, including:
[0068] After obtaining the evaluation results, the optimization objective function of the CGAN model is used as the optimization target, and the generator and the discriminator are alternately trained to minimize each loss function in the optimization objective function of the CGAN model.
[0069] In the alternating training optimization process, each iteration includes:
[0070] Fixed the discriminator, taking the basic information coding of the city and the basic network of each stage as the basic condition data, adjusted the parameters of the generator to optimize the generator, so that the probability of the authenticity of the false traffic planning scheme generated by the generator being judged by the discriminator is as high as possible;
[0071] The generator is fixed, and the parameters of the discriminator are adjusted to optimize the discriminator, thereby improving the accuracy of the discriminator in distinguishing and discriminating between real traffic planning schemes and false traffic planning schemes.
[0072] Based on the same inventive concept, the embodiment of the present disclosure also provides a system for generating an urban traffic planning scheme based on a generative neural network, including:
[0073] A data processing unit, used for performing data cleaning and feature processing on the traffic system data to obtain processed traffic system data;
[0074] A model processing unit, used to train a CGAN model using the processed traffic system data, generate a traffic planning scheme using a generator in the CGAN model, and evaluate the effect of the traffic planning scheme using a discriminator in the CGAN model;
[0075] The optimization unit is used to optimize the CGAN model according to the evaluation results to improve the quality of traffic planning scheme generation.
[0076] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device, including: a memory and a processor; the processor is used to read and execute a computer program stored in the memory to implement the aforementioned method for generating an urban traffic planning scheme based on a generative neural network.
[0077] Based on the same inventive concept, an embodiment of the present disclosure also provides a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are executed, the aforementioned method for generating urban traffic planning schemes based on generative neural networks is implemented.
[0078] The technical effects and advantages of the present invention are as follows: the present invention utilizes CGAN to generate a model, which can learn the characteristics of the urban traffic environment from a large amount of data, accurately simulate the traffic conditions under different basic conditions, quickly generate a variety of planning schemes, and screen out the optimal scheme through simulation and comparison, thereby greatly improving the efficiency and quality of planning; and by utilizing machine learning technology, it can objectively evaluate the pros and cons of various schemes based on a large amount of historical data and simulation, provide a scientific basis for decision-making, overcome the problems of strong subjectivity, low efficiency, and lack of comprehensiveness existing in traditional methods, and improve the scientificity, accuracy, and practicality of planning.
[0079] In the urban traffic planning of the present disclosure, the generator can learn to generate the features of different traffic planning schemes, such as road network layout, bus route settings, etc. The discriminator can learn to distinguish whether the generated false traffic planning schemes meet the requirements of traffic planning, thereby helping the generator to generate more reasonable traffic planning schemes.
[0080] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by implementing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0082] Figure 1 A flowchart of a method for generating an urban traffic planning scheme based on a generative neural network according to an embodiment of the present disclosure;
[0083] Figure 2 It is a schematic diagram of splitting and combining a mature wire network in an embodiment of the present disclosure;
[0084] Figure 3 A schematic diagram of the process of CGAN model input in the embodiment of the present disclosure;
[0085] Figure 4 A schematic diagram of the process of CGAN model training in the embodiment of the present disclosure;
[0086] Figure 5 A schematic diagram of the structure of a system for generating a city traffic planning scheme based on a generative neural network according to an embodiment of the present disclosure;
[0087] Figure 6 The present invention is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0088] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0089] To address the deficiencies of the prior art, the present disclosure discloses a method for generating an urban traffic planning scheme based on a generative neural network. Figure 1 As shown, the following steps are included:
[0090] Step S1: performing data cleaning, feature processing, and data enhancement on the traffic system data to obtain processed traffic system data; including:
[0091] Step S11: Cleaning the traffic system data to obtain cleaned traffic system data, including the following stages:
[0092] Network division: The city's transportation system data is divided according to the construction and opening order of lines (railway transit network, bus network, etc.). The new network obtained in each stage is regarded as a basic network.
[0093] Define samples: The newly added lines of each basic network are regarded as real data samples to guide the CGAN model to plan the next stage of network;
[0094] Remove missing data: Remove missing key information in the traffic system data to ensure data completeness and accuracy;
[0095] Processing abnormal data: Identify and process abnormal data in traffic system data to prevent abnormal data from having adverse effects on subsequent CGAN model training and results.
[0096] Step S12: extracting features from the cleaned traffic system data to obtain static data and urban traffic planning schemes;
[0097] Among them, static data includes: city population, city jobs, city POIs, and city buildings;
[0098] The urban transportation planning scheme includes: urban road network GIS data, urban rail transit network GIS data and urban public transportation network GIS data, etc.
[0099] Step S13: data enhancement is performed on the urban traffic planning scheme by combining spatial transformation and sample splitting, and the urban traffic planning scheme is encoded to obtain an urban traffic scheme code, including:
[0100] Perform random spatial transformation (such as translation, rotation and scaling) on the urban spatial distribution in the urban transportation planning scheme to generate new spatial distribution samples;
[0101] The basic network scheme (such as rail transit network and bus network) in the urban transportation planning scheme is disassembled to generate single lines in different stages, and the lines are combined according to the construction order to obtain the sample data shown below, taking rail transit as an example:
[0102] Line 1 Phase 1
[0103] Line 1 Phase 1, Line 2
[0104] Line 1 Phase 1, Line 2, Line 3 Phase 1
[0105] Line 1 Phase 1, Line 2, Line 3 Phase 1, Line 1 Phase 2…
[0106] Through the method of sample combination, the number of samples of a line network solution is expanded; as shown below, a single line is further decomposed into intervals based on the sample data:
[0107] Station A - Station B
[0108] Station A - Station B - Station C
[0109] Station A - Station B - Station C - Station D...
[0110] Then, the interval lines of the same stage or similar stages are randomly combined to obtain the basic line network of each stage; wherein, the basic line network of each stage includes the basic line network of the current stage and the pre-planned line intervals.
[0111] like Figure 2 As shown in the figure, by splitting and combining an existing mature transportation planning network of a city as mentioned above, a large number of new training samples are formed, thereby increasing the number and diversity of samples.
[0112] Encode the new rail transit network, bus network and road network in the urban transportation planning scheme, mainly involving the information of line direction, line location and station location;
[0113] The routes are represented as a series of coordinate points (usually in geojson format), and the stations are represented as coordinate points. This encoding method makes it easier to input the basic condition data and traffic planning scheme data (i.e., urban traffic planning scheme) required for CGAN model training into the CGAN model.
[0114] Step S14: Encoding the static data by regional rasterization to obtain the city basic information code, including:
[0115] The city is divided into regional grids of predetermined sizes, and the regional grids are characterized by the total characteristic data corresponding to the regional grids (the total characteristic data includes the total population of the grid, the total number of grid posts, the total number of various OPIs of the grid, the various types of buildings of the grid, and the total development intensity of the grid), as shown in Tables 1 to 3:
[0116] Table 1 Population distribution at city grid level
[0117] Serial number Grid Number Center point longitude Center point latitude Resident population 1 1174645_434568 117.4645 43.4568 241 … … … … …
[0118] Table 2 Job distribution at city grid level
[0119] Serial number Grid Number Center point longitude Center point latitude Jobs 1 1174645_434568 117.4645 43.4568 56 … … … … …
[0120] Table 3 Distribution of POIs at city grid level
[0121]
[0122] It should be noted that in the embodiments of the present disclosure, other necessary data preprocessing may be performed according to actual conditions, such as removing duplicate data, balancing data sets, etc.
[0123] Step S2: training the CGAN model using the processed traffic system data, generating a traffic planning scheme using the generator in the CGAN model, and evaluating the effect of the traffic planning scheme using the discriminator in the CGAN model, including:
[0124] Step S21: training the CGAN model, including:
[0125] The CGAN model mainly consists of two parts: the generator and the discriminator. The generator is mainly responsible for generating realistic fake traffic planning schemes, while the discriminator is mainly responsible for trying to distinguish between fake traffic planning schemes and real traffic planning schemes.
[0126] The city's basic information coding and urban traffic planning scheme (specifically the basic line network at each stage) are used as basic condition data to train and generate the CGAN model, in which a convolutional neural network (CNN) or a fully connected neural network (DNN) is used to construct the generator and discriminator in the CGAN model.
[0127] Step S22: Generate a traffic planning scheme by using the generator in the CGAN model, and use the discriminator in the CGAN model to evaluate the effect of the traffic planning scheme, including:
[0128] (1) Figure 3 As shown, the basic information of the city and the basic line network in each stage of the urban traffic planning scheme are encoded as basic condition data, and a random noise vector (noise data of the simulated line) and the basic condition data are input into the generator, so that the generator learns to generate a false traffic planning scheme that meets the set requirements.
[0129] Description of the generator process: The generator receives a random noise vector as input. The random noise vector is sampled from a known distribution (such as uniform distribution or Gaussian distribution). Its purpose is to guide the generator to generate a variety of false traffic planning schemes.
[0130] The generator maps the random noise vector to the spatial distribution information of the traffic planning scheme through a neural network. This process can be regarded as a mapping from the latent space to the planning scheme space.
[0131] The data format generated by the generator is as follows:
[0132] "type": "LineString",
[0133] "coordinates": [[118.170451,31.172571],[118.169737,31.175438],[118.169706,31.175547],[118.169706,31.175548]……
[0134] Among them, "type" indicates the type, "LineString" indicates the line format, and "coordinates" indicates the continuous coordinates of the line plan.
[0135] (2) The pre-planned route sections in the basic line network of each stage are taken as the real traffic planning scheme (i.e., real sample data), and the basic condition data, false traffic planning scheme, and real traffic planning scheme are respectively input into the discriminator, so that the discriminator can distinguish and discriminate the false traffic planning scheme and the real traffic planning scheme based on the basic condition data, and obtain the discrimination result, i.e., the authenticity probability of the false traffic planning scheme.
[0136] Description of the discriminator process: Asynchronously input the real urban traffic planning scheme and the fake urban traffic planning scheme generated by the generator G to the discriminator D. At this time, the purpose of the discriminator D is to distinguish the fake urban traffic planning scheme as a false sample (false) and the real urban traffic planning scheme as a real sample (real). If the generated fake traffic planning scheme is realistic enough, the discriminator D will regard it as a real traffic planning scheme (real).
[0137] That is Figure 3 As shown in the figure, the input data of the CGAN model during the training process is divided into three parts, namely: ① conditional input of urban basic information encoding and basic line networks at each stage, ② random noise data input to the generator, and ③ real traffic planning schemes or real sample data (pre-planned route sections in the basic line networks at each stage) input to the discriminator.
[0138] Step S23: During the training of the CGAN model, the loss function of the CGAN model is set, including:
[0139] The loss function of the CGAN model includes a generator loss function and a discriminator loss function.
[0140] The generator loss function is defined as the negative log-likelihood of the discriminator's discrimination result on the fake traffic planning scheme data generated by the generator, and the geographic information constraint is added to the generator loss function.
[0141] The generator loss function is:
[0142]
[0143] Where, LG represents the generator loss function, E represents the expectation, G represents the generator, D represents the discriminator, and z represents the distribution from the known distribution p z G(z) represents the random noise vector sampled in , G(z) represents the traffic planning data generated by the generator G based on the random noise vector z, and D(G(z)) represents the discrimination result of the discriminator D on the traffic planning data G(z) generated by the generator G.
[0144] The geographic information constraints are:
[0145] Loss geo =λ geo ·MSE(generated_geo_data, real_geo_data),
[0146] In the formula, Loss geo represents geographic information constraints, λ geo represents the weight of geographic information constraint, MSE represents the mean square error loss function, generated_geo_data represents the generated false geographic information data, and real_geo_data represents the real geographic information data.
[0147] The discriminator loss function is defined as the sum of the differences between the discriminator's discrimination results of the false traffic planning scheme and the real traffic planning scheme and the real traffic planning scheme.
[0148] The discriminator loss function is:
[0149]
[0150] Where, L D represents the discriminator loss function, x represents the real traffic planning scheme data, p data is the distribution of the real traffic planning scheme data, and D(x) represents the discriminant result of the discriminator D on the real traffic planning scheme data x.
[0151] Step S24: When setting the loss function of the CGAN model, the loss function is adjusted and optimized in combination with the actual needs of the urban traffic planning business, and the design goals of the urban traffic planning scheme and the corresponding loss function are added, including:
[0152] The transportation planning and design objectives include improving relevant travel utility, increasing facility service coverage, reducing engineering construction costs, and reducing non-geographic spatial continuity losses;
[0153] Among them, improving the relevant travel utility means: after the implementation of the urban transportation planning scheme, part of the original traffic flow is transferred to the new transportation mode, and this part of the traffic flow should be lower in cost than the original transportation mode;
[0154] Improving the coverage of facilities and services means that one of the important functions of designing urban transportation infrastructure planning is to serve as many urban areas and people as possible;
[0155] Reducing construction costs means that urban transportation infrastructure cannot be planned without limit. On the basis of meeting relevant travel utility and facility service coverage, construction costs should be comprehensively considered.
[0156] Set the loss functions of relevant travel utility, facility service coverage, engineering construction cost, and geographic space continuity loss respectively, and comprehensively constitute the optimization objective function of the CGAN model;
[0157] Among them, the loss function of the relevant travel utility is:
[0158]
[0159] Where, L commute represents the loss function of the relevant travel utility, n represents the total amount of transferred traffic, i represents the number of transferred traffic; e i It represents the comprehensive cost of reducing the traffic volume of the i-th transfer, which is generally expressed as the comprehensive cost of residents' time, expenses, and comfort;
[0160] The loss function of setting facility service coverage is:
[0161]
[0162] Where, L coverage represents the loss function of facility service coverage, P covered represents the total number of people covered by the planning scheme of urban transportation infrastructure, P total represents the total population of the city;
[0163] The loss function of engineering construction cost is:
[0164]
[0165] Where, L cost represents the loss function of the construction cost, m represents the total number of lines or roads, j represents the number of lines or roads, c j represents the construction cost of the jth line or road in the current urban transportation planning scheme, among which the conventional bus lines mainly consider the operating cost;
[0166] The endpoints or stations of the basic line network scheme in the urban transportation planning scheme are set as nodes, and the node set is {V}, and the geographical distance between node m and node n is d mn , then the loss function of the geographical space continuity loss of the urban transportation planning scheme is:
[0167]
[0168] Where, L spatial The loss function representing the loss of geospatial continuity, d mn represents the actual geographical distance between node m and node n in the urban traffic planning scheme, Represents the distance between node m and node n in the false urban planning scheme line generated by the model.
[0169] Based on the loss function of the CGAN model, the optimization objective function of the CGAN model is obtained by combining the loss function of related travel utility, the loss function of facility service coverage, the loss function of engineering construction cost, and the loss function of geographic space continuity loss.
[0170] The loss function of the CGAN model is:
[0171]
[0172] Where, L CGAN represents the loss function of the CGAN model, x represents the real traffic planning scheme data, and p data is the distribution of real traffic planning scheme data, z represents the distribution from the known distribution p z The random noise vector sampled in, D(x) represents the discriminant D’s discriminant result on the real traffic planning scheme data x, and D(G(z)) represents the discriminant D’s discriminant result on the traffic planning data G(z) generated by the generator G;
[0173] The optimization objective function of the CGAN model is:
[0174] L total =L CGAN +λ1L commute +λ2L cost +λ3L coverage +λ4L spatial ,
[0175] Where, L total represents the optimization objective function of the CGAN model, and λ1, λ2, λ3, and λ4 represent the weights of each loss function respectively.
[0176] Step S3: Optimize the CGAN model according to the evaluation results to improve the quality of traffic planning scheme generation.
[0177] After obtaining the evaluation results, the optimization objective function of the CGAN model is used as the optimization target, and the generator and the discriminator are alternately trained to minimize each loss function in the optimization objective function of the CGAN model.
[0178] These loss functions are minimized by alternately training the generator and the discriminator, which are trained in an alternating optimization manner. The goal of the generator is to generate sufficiently realistic traffic plans to deceive the discriminator, while the goal of the discriminator is to distinguish between fake traffic plans and real traffic plans as accurately as possible. This enables the generator to generate more and more realistic data, and the discriminator to distinguish between real and fake data more and more accurately.
[0179] Among them, during the CGAN model training process, the basic information encoding of the city and the basic line network at each stage are used as basic condition data to guide the generator to generate traffic planning solutions that meet actual needs.
[0180] The alternating optimization method adopted during training, each iteration is divided into two steps, including:
[0181] (1) Fix the discriminator and optimize the generator: Based on the basic information coding of the city and the basic network of each stage as the basic condition data, adjust the parameters of the generator to optimize the generator so that the probability of the fake traffic planning scheme generated by the generator being judged as the real scheme by the discriminator is as high as possible.
[0182] (2) Fix the generator and optimize the discriminator: Adjust the parameters of the discriminator to optimize the discriminator and improve the accuracy of the discriminator in distinguishing and distinguishing between real traffic planning schemes and false traffic planning schemes.
[0183] like Figure 4 As shown in the figure, during the incremental training process, the CGAN model is first trained using basic condition data (city basic information coding and basic line networks at each stage). At this time, the samples generated by the generator may be disordered, messy, and illogical traffic planning schemes. As the training progresses, more existing line information is gradually introduced and the CGAN model is retrained. As the CGAN model gradually masters the basic line network and traffic planning requirements, the difference between the samples generated by the generator and the real samples gradually decreases, and the false traffic planning scheme finally generated will be more reasonable and practical.
[0184] Based on the same inventive concept, the disclosed embodiment also provides a system for generating a city traffic planning scheme, such as Figure 5 As shown, including:
[0185] A data processing unit, used for performing data cleaning, feature processing, and data enhancement on the traffic system data to obtain processed traffic system data;
[0186] A model processing unit, used to train a CGAN model using the processed traffic system data, generate a traffic planning scheme using a generator in the CGAN model, and evaluate the effect of the traffic planning scheme using a discriminator in the CGAN model;
[0187] The optimization unit is used to optimize the CGAN model according to the evaluation results to improve the quality of traffic planning scheme generation.
[0188] Regarding the system in the above embodiment, the specific manner in which each unit module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0189] Based on the same inventive concept, the present disclosure also provides an electronic device, the structure of which is as follows: Figure 6 As shown, it includes: a memory and a processor, and the processor is used to read and execute the computer program stored in the memory to implement the aforementioned method for generating urban traffic planning schemes based on generative neural networks.
[0190] Based on the same inventive concept, an embodiment of the present disclosure also provides a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are executed, the aforementioned method for generating urban traffic planning schemes based on generative neural networks is implemented.
[0191] The present disclosure utilizes CGAN to generate a model, which can learn the characteristics of the urban traffic environment from a large amount of data, accurately simulate traffic conditions under different basic conditions, quickly generate a variety of planning schemes, and screen out the optimal scheme through simulation and comparison, thereby greatly improving the efficiency and quality of planning; and by utilizing machine learning technology, it can objectively evaluate the pros and cons of various schemes based on a large amount of historical data and simulation, provide a scientific basis for decision-making, overcome the problems of strong subjectivity, low efficiency, and lack of comprehensiveness existing in traditional methods, and improve the scientificity, accuracy, and practicality of planning.
[0192] In the urban traffic planning of the present disclosure, the generator can learn to generate the features of different traffic planning schemes, such as road network layout, bus route settings, etc. The discriminator can learn to distinguish whether the generated false traffic planning schemes meet the requirements of traffic planning, thereby helping the generator to generate more reasonable traffic planning schemes.
[0193] Finally, it should be noted that the above is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating urban traffic planning schemes based on generative neural networks, characterized in that: include: Perform data cleaning and feature processing on traffic system data to obtain processed traffic system data; Using the processed traffic system data to train the CGAN model, generating a traffic planning scheme through the generator in the CGAN model, and using the discriminator in the CGAN model to evaluate the effect of the traffic planning scheme; Optimize the CGAN model based on the evaluation results to improve the quality of traffic planning scheme generation; Among them, in the process of training the CGAN model, the loss function of the CGAN model is set, including: The loss function of the CGAN model includes a generator loss function and a discriminator loss function; The generator loss function is defined as the negative log-likelihood of the discriminator's discrimination result on the fake traffic planning scheme data generated by the generator, and the geographic information constraint is added to the generator loss function; The generator loss function is: In the formula, L G represents the generator loss function, G represents the generator, D represents the discriminator, and z represents the loss from the known distribution p z The random noise vector sampled in, G(z) represents the traffic planning data generated by the generator G based on the random noise vector z, and D(G(z)) represents the discriminant D's discrimination result on the traffic planning data G(z) generated by the generator G; The geographic information constraints are: Loss geo =λ geo ·MSE(generated_geo_data,real_geo_data), In the formula, Loss geo represents geographic information constraints, λ geo represents the weight of geographic information constraint, MSE represents mean square error loss function, generated_geo_data represents generated false geographic information data, and real_geo_data represents real geographic information data; The discriminator loss function is defined as the sum of the differences between the discriminator's discrimination results of the false traffic planning scheme and the real traffic planning scheme and the real traffic planning scheme; The discriminator loss function is: Where, L D represents the discriminator loss function, x represents the real traffic planning scheme data, p data is the distribution of the real traffic planning scheme data, and D(x) represents the discriminant result of the discriminator D on the real traffic planning scheme data x.
2. The method for generating urban traffic planning scheme based on generative neural network according to claim 1 is characterized in that: Perform data cleaning and feature processing on the traffic system data to obtain processed traffic system data, including: Clean the traffic system data to obtain cleaned traffic system data; Extract features from the cleaned traffic system data to obtain static data and urban traffic planning schemes; Performing data enhancement on the urban traffic planning scheme by combining spatial transformation and sample splitting, and encoding the urban traffic planning scheme to obtain an urban traffic scheme code; The static data is encoded in a regional rasterization manner to obtain the city basic information code.
3. The method for generating urban traffic planning scheme based on generative neural network according to claim 2 is characterized in that: The urban traffic planning scheme is data enhanced by combining spatial transformation and sample splitting, and the urban traffic planning scheme is encoded to obtain an urban traffic scheme code, including: Perform random spatial transformation on the urban spatial distribution in the urban transportation planning scheme to generate new spatial distribution samples; The basic line network plan in the urban transportation planning plan is disassembled to generate single lines at different stages, and the single lines are combined according to the construction order to obtain the corresponding sample data; Based on the sample data, a single line is decomposed into sections, and the sections of the same or similar stages are randomly combined to obtain the basic line network of each stage; Among them, the basic line network of each stage includes the basic line network of the current stage and the pre-planned line sections.
4. The method for generating urban traffic planning scheme based on generative neural network according to claim 3 is characterized in that: The processed traffic system data is used to train the CGAN model, a traffic planning scheme is generated by the generator in the CGAN model, and the discriminator in the CGAN model is used to evaluate the effect of the traffic planning scheme, including: Use convolutional neural networks or fully connected neural networks to build the generator and discriminator in the CGAN model; Using the city basic information code and the basic line network of each stage as basic condition data, inputting the random noise vector and the basic line network of each stage of the basic condition data into the generator, so that the generator learns to generate a false traffic planning scheme that meets the set requirements; Taking the pre-planned route section as the real traffic planning scheme, the basic line network at each stage respectively inputs the basic condition data, the false traffic planning scheme and the real traffic planning scheme into the discriminator; The discriminator distinguishes and discriminates the false traffic planning scheme and the real traffic planning scheme based on the basic condition data, and obtains a discrimination result, that is, the authenticity probability of the false traffic planning scheme.
5. The method for generating urban traffic planning scheme based on generative neural network according to claim 1 is characterized in that: When setting the loss function of the CGAN model, the loss function is adjusted and optimized in combination with the actual needs of the urban traffic planning business, and the design goals of the urban traffic planning scheme and the corresponding loss function are added, including: The transportation planning and design objectives include improving relevant travel utility, increasing facility service coverage, reducing engineering construction costs, and reducing non-geographic spatial continuity losses; Among them, improving the relevant travel utility means: after the implementation of the urban transportation planning scheme, part of the original traffic flow is transferred to the new transportation mode, and this part of the traffic flow should be lower in cost than the original transportation mode; Improving the coverage of facility services means: serving as many urban areas and populations as possible; Reducing construction costs means that urban transportation infrastructure cannot be planned without limit. On the basis of meeting relevant travel utility and facility service coverage, construction costs should be comprehensively considered. Set the loss functions of relevant travel utility, facility service coverage, engineering construction cost, and geographic space continuity loss respectively, and comprehensively constitute the optimization objective function of the CGAN model; Among them, the loss function of the relevant travel utility is: Where, L commute represents the loss function of the relevant travel utility, n represents the total amount of transferred traffic, i represents the number of transferred traffic; e i represents the comprehensive cost of reducing the i-th transferred traffic volume; The loss function of setting facility service coverage is: Where, L coverage represents the loss function of facility service coverage, P covered represents the total number of people covered by the planning scheme of urban transportation infrastructure, P total represents the total population of the city; The loss function of engineering construction cost is: Where, L cost represents the loss function of the construction cost, m represents the total number of lines or roads, j represents the number of lines or roads, c j represents the construction cost of the jth line or road in the current urban transportation planning scheme; The endpoints or stations of the basic line network scheme in the urban transportation planning scheme are set as nodes, and the node set is {V}, and the geographical distance between node m and node n is d mn , then the loss function of the geographical space continuity loss of the urban transportation planning scheme is: Where, L spatial The loss function representing the loss of geospatial continuity, d mn represents the actual geographical distance between node m and node n in the urban traffic planning scheme, Represents the distance between node m and node n in the false urban planning scheme line generated by the model; Based on the loss function of the CGAN model, the optimization objective function of the CGAN model is obtained by combining the loss function of related travel utility, the loss function of facility service coverage, the loss function of engineering construction cost, and the loss function of geographic space continuity loss; The loss function of the CGAN model is: Where, L CGAN represents the loss function of the CGAN model, x represents the real traffic planning scheme data, and p data is the distribution of real traffic planning scheme data, z represents the distribution from the known distribution p z The random noise vector sampled in, D(x) represents the discriminant D’s discriminant result on the real traffic planning scheme data x, and D(G(z)) represents the discriminant D’s discriminant result on the traffic planning data G(z) generated by the generator G; The optimization objective function of the CGAN model is: L total =L CGAN +λ1L commute +λ2L cost +λ3L coverage +λ4L spatial , Where, L total represents the optimization objective function of the CGAN model, and λ1, λ2, λ3, and λ4 represent the weights of each loss function respectively.
6. The method for generating urban traffic planning scheme based on generative neural network according to claim 1 is characterized in that: Based on the evaluation results, the CGAN model is optimized to improve the quality of traffic planning scheme generation, including: After obtaining the evaluation results, the optimization objective function of the CGAN model is used as the optimization target, and the generator and the discriminator are alternately trained to minimize each loss function in the optimization objective function of the CGAN model. In the alternating training optimization process, each iteration includes: Fixed the discriminator, taking the basic information coding of the city and the basic network of each stage as the basic condition data, adjusted the parameters of the generator to optimize the generator, so that the probability of the authenticity of the false traffic planning scheme generated by the generator being judged by the discriminator is as high as possible; The generator is fixed, and the parameters of the discriminator are adjusted to optimize the discriminator, thereby improving the accuracy of the discriminator in distinguishing and discriminating between real traffic planning schemes and false traffic planning schemes.
7. The urban traffic planning scheme generation system based on generative neural network is characterized by: include: A data processing unit, used for performing data cleaning and feature processing on the traffic system data to obtain processed traffic system data; A model processing unit, used to train a CGAN model using the processed traffic system data, generate a traffic planning scheme using a generator in the CGAN model, and evaluate the effect of the traffic planning scheme using a discriminator in the CGAN model; An optimization unit, used to optimize the CGAN model according to the evaluation results to improve the quality of traffic planning scheme generation; Among them, in the process of training the CGAN model, the loss function of the CGAN model is set, including: The loss function of the CGAN model includes a generator loss function and a discriminator loss function; The generator loss function is defined as the negative log-likelihood of the discriminator's discrimination result on the fake traffic planning scheme data generated by the generator, and the geographic information constraint is added to the generator loss function; The generator loss function is: Where, L G represents the generator loss function, G represents the generator, D represents the discriminator, and z represents the loss from the known distribution p z The random noise vector sampled in, G(z) represents the traffic planning data generated by the generator G based on the random noise vector z, and D(G(z)) represents the discriminant D's discrimination result on the traffic planning data G(z) generated by the generator G; The geographic information constraints are: Loss geo =λ geo ·MSE(generated_geo_data,real_geo_data), In the formula, Loss geo represents geographic information constraints, λ geo represents the weight of geographic information constraint, MSE represents mean square error loss function, generated_geo_data represents generated false geographic information data, and real_geo_data represents real geographic information data; The discriminator loss function is defined as the sum of the differences between the discriminator's discrimination results of the false traffic planning scheme and the real traffic planning scheme and the real traffic planning scheme; The discriminator loss function is: Where, L D represents the discriminator loss function, x represents the real traffic planning scheme data, p data is the distribution of the real traffic planning scheme data, and D(x) represents the discriminant result of the discriminator D on the real traffic planning scheme data x.
8. An electronic device, characterized in that: include: Memory, processor; The processor is used to read and execute the computer program stored in the memory to implement the method for generating an urban traffic planning scheme based on a generative neural network as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed, implement the method for generating an urban traffic planning scheme based on a generative neural network as described in any one of claims 1-6.
Citation Information
Patent Citations
Multi-modal data driven urban road layout design automation method
CN115544613A