A method for identifying street perception safety and its moderating effect on traffic accidents

The perceived safety scores of urban streets are evaluated through deep learning algorithms and convolutional neural network models, and the traffic accident data is analyzed in combination with negative binomial regression model, and the regulation effect of perceived safety on traffic accident risks is identified, solving the problems of neglecting subjective perceived safety and insufficient correlation in the existing technology, and achieving a more comprehensive traffic accident risk identification and analysis.

CN118967999BActive Publication Date: 2025-06-20WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411048156.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2025-06-20
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

When identifying urban traffic accident risks, the prior art focuses on objective factors, ignores subjective perceived safety, and has shortcomings in revealing the correlation between traveler subjective perception and traffic accident risk.

Method used

A deep learning algorithm is used to construct an end-to-end convolutional neural network model, and perceived safety scores are evaluated through street scene images, and a negative binomial regression model is established to identify the regulation effect of perceived safety on traffic accidents.

Benefits of technology

It overcomes the limitations of the time-consuming and labor-intensive traditional methods, realizes a rapid and accurate assessment of perceived safety in urban streets, reveals the regulating effect of perceived safety on traffic accident risks, and improves the full-factor identification and analysis system for traffic accident risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967999B_ABST
    Figure CN118967999B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying the perceived safety of streets and their moderating effects on traffic accidents. The method includes: taking road segments as evaluation units, obtaining urban street view images through API interfaces, constructing and training an end-to-end convolutional neural network model to evaluate the perceived safety level of street views, and establishing a dataset of urban street perceived safety at the subjective level; combining the objective risk factors of traffic accidents and historical traffic accident data to establish a comprehensive dataset; then constructing a negative binomial regression model based on the comprehensive dataset, and identifying the relationships among subjective perceived safety, objective risk factors, and traffic accidents according to the results of variable significance tests and coefficient tests of the model; finally, adding interaction term variables to the original model, and exploring the moderating effects of street perceived safety on objective accident risk factors based on the results of the interaction term variables. The technical method of the present invention is mature, the operation is simple and clear, and the operability is relatively strong.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic safety, and particularly relates to a method for identifying street perceived safety and its regulatory effect on traffic accidents. Background Art

[0002] In recent years, with the rapid development of motorized transportation in China, the number of motor vehicles in possession, the frequency of trips and the mileage of trips have shown a continuous growth trend, resulting in an increase in traffic accidents. Traffic accidents are the result of the combined action of subjective and objective factors. Perceived safety at the subjective level can affect travel behavior and play a regulatory role in the objective risk factors of traffic accidents, thus affecting traffic accident risk. To reduce the risk of urban traffic accidents and improve the level of travel safety, it is of great significance to identify street perceived safety and its regulatory effect on traffic accidents, improve the all-factor identification and analysis system of traffic accident risk from the subjective perception level, and propose an urban traffic safety optimization strategy combining subjective and objective factors for realizing the regulation of urban traffic accident risk and improving the level of urban traffic environment construction.

[0003] With the increasingly serious traffic safety situation in China, the identification, analysis and prediction of urban traffic accident risk factors have received more and more attention. The maturity of machine learning methods has also provided technical support for in-depth exploration of the complex causes of traffic accidents. At present, certain research results have been achieved in existing inventions, but there are still the following problems in current research:

[0004] (1) Existing inventions focus on constructing an urban traffic accident risk identification and analysis system from objective factors such as built environment, natural environment, individual conditions, and social and economic characteristics, ignoring the influencing factors at the subjective level, and there are also certain deficiencies in revealing the correlation between travelers' subjective perceptions and the objective risk elements of urban traffic accidents.

[0005] (2) Although a large number of inventions have applied advanced roadside and in-vehicle devices and other equipment, combined with deep learning algorithms, to identify and measure the perception level of the urban road environment, and are widely used in multiple fields such as road surface condition perception, fault real-time monitoring, and target recognition and analysis, the application of the "subjective perception + machine learning" mode in the field of traffic safety, especially in the identification and prediction of traffic accident risk factors, is insufficient.

[0006] Based on this, there is an urgent need for a method for identifying street perceived safety and its regulatory effect on traffic accidents. Summary of the Invention

[0007] The objective of the present invention is to propose a method for identifying street perceived safety and its moderating effect on traffic accidents based on deep learning algorithms. In terms of measuring and identifying perceived safety, the present invention overcomes the limitations of traditional methods, such as being time-consuming, laborious, and having a small scale. Furthermore, the relationship between street perceived safety and traffic accident risks, as well as its moderating effect on other objective risk factors, is further explored, providing decision-making basis and support for improving the full-risk factor identification and analysis system of urban traffic accident risks from the subjective perception level and proposing a combination of subjective and objective urban traffic safety planning strategies.

[0008] The technical solution of the present invention is as follows:

[0009] A method for identifying street perceived safety and its moderating effect on traffic accidents, the method comprising:

[0010] S1 Divide road segments along the road network within the research scope, set sampling points, and obtain street view images corresponding to the sampling points;

[0011] S2 Randomly select some street view images, invite volunteers to evaluate their perceived safety scores, construct a sample data set, and preprocess the sample data set;

[0012] S3 Construct an end-to-end convolutional neural network and train it with the preprocessed sample data set;

[0013] S4 Input the street view images into the trained convolutional neural network model for evaluation, and output the perceived safety scores corresponding to each street view image;

[0014] S5 Obtain historical traffic accident data, perceived safety data, and objective traffic accident risk factors, and process them to establish a comprehensive data set containing historical traffic accident data, perceived safety data, and objective risk factor data;

[0015] S6 According to the comprehensive data set, construct a negative binomial regression model and conduct analysis. According to the model results, identify the correlation between urban street perceived safety and traffic accidents, as well as other objective risk factors correlated with traffic accidents;

[0016] S7 Calculate the interaction term results of the objective risk factor variables and perceived safety variables of traffic accidents, add them to the negative binomial regression model in turn as interaction term variables, and analyze the model results to identify the moderating effect of perceived safety on traffic accidents.

[0017] Furthermore, the specific content of S1 is as follows:

[0018] First, the homogeneous section division method is used to divide the road network file to obtain the sections within the research scope, and sampling points are obtained at intervals of 50m (for sections less than 50m in length, the midpoint of the section is taken); subsequently, based on the street view image API interface, the horizontal field of view is set to 60°, and the pitch reference angle is set to 0° to simulate the visual perception experience of travelers. Street view images of 1024*1024 pixels are obtained sequentially from different directions. For each sampling point where an image can be obtained, a total of 6 street view images can be collected (0°, 60°, 120°, 180°, 240°, 300°).

[0019] Further, the specific content of S2 is as follows:

[0020] First, randomly select 10% of the images from the obtained street view images, invite 100 volunteers and conduct training to let them give a perceived safety score to the selected street view images. Among them, 0 points is the lowest representing very unsafe, and 100 points is the highest representing very safe. Through multiple group scoring, ensure that each street view image is scored by different volunteers more than 3 times, and take the average score as the perceived safety score of the street view image to construct a sample data set;

[0021] Subsequently, preprocess the sample data set, read all images and convert them into data arrays of floating-point type, and store them in the format of channel first; randomly shuffle the order of the data set, use 80% of the sample data as the training set, and the remaining 20% as the test set; perform normalization processing on the image data of the training set and the test set, and scale the pixel values to the range of [0,1].

[0022] Subsequently, construct a convolutional neural network model, use the mean square error as the loss function, and the mean absolute error as the evaluation index to evaluate the model performance and determine the hyperparameters of the model.

[0023] The hyperparameters are: the number of filters, the filter size, the activation function of the convolutional layer, the stride size, the pooling window size, the position of the batch normalization layer, the number of units in the fully connected layer, the loss function, the training batch size, the number of training epochs, etc.

[0024] Further, the specific structure of the convolutional neural network is as follows:

[0025] (1) The input layer is the street view image data;

[0026] (2) The first convolutional layer contains 32 3x3 filters and uses the ReLU activation function;

[0027] (3) The second convolutional layer also contains 32 3x3 filters and uses the ReLU activation function;

[0028] (4) The first pooling layer uses a 2x2 pooling window;

[0029] (5) The first batch normalization layer is located after the first pooling layer;

[0030] (6) The third convolutional layer contains 64 3x3 filters and uses the ReLU activation function;

[0031] (7) The fourth convolutional layer also contains 64 3x3 filters and uses the ReLU activation function;

[0032] (8) The second pooling layer uses a 2x2 pooling window;

[0033] (9) The second batch normalization layer is located after the second pooling layer;

[0034] (10) The fifth convolutional layer contains 128 3x3 filters and uses the ReLU activation function;

[0035] (11) The sixth convolutional layer also contains 128 3x3 filters and uses the ReLU activation function;

[0036] (12) The third pooling layer uses a 2x2 pooling window;

[0037] (13) The third batch normalization layer is located after the third pooling layer;

[0038] (14) The flatten layer flattens the multi-dimensional data into a one-dimensional vector;

[0039] (15) The fully connected layer contains 1 unit for outputting the perceived safety score.

[0040] Further, the traffic accident data, the historical traffic accident data includes accident geographical coordinates and accident occurrence time;

[0041] The perceived safety data includes street view image numbers, street view image geographical coordinates, and the perceived safety scores corresponding to the street view image pictures;

[0042] The objective risk factors of traffic accidents include four aspects: street network characteristics, development pattern characteristics, socio-economic characteristics, and traffic flow characteristics.

[0043] Further, the S5 is specifically:

[0044] The processing of historical traffic accident data specifically includes: processing the traffic accident points according to the geographical coordinates of the traffic accident occurrence, classifying them into the road section closest to the accident occurrence location, and representing the traffic accident risk of the road section by the ratio of the number of traffic accidents in the road section to the road section length. The mathematical formula is:

[0045]

[0046] Among them, R i represents the traffic accident risk of the i-th road section, and R i represents the number of traffic accidents in the i-th road section, and l i represents the road length of the i-th road section;

[0047] The processing of perceived safety data specifically includes: for each sampling point, taking the average value of the perceived safety scores of the 6-direction street view images obtained at this sampling point as the perceived safety level of this sampling point; for each road section, taking the average value of the perceived safety scores of all sampling points on this road section as the perceived safety level of this road section, and the mathematical formula is:

[0048]

[0049] Among them, y i represents the average perceived safety score of the i-th road section, and y mj represents the perceived safety score corresponding to the j-th street view image of the m-th sampling point on road section i;

[0050] The processing of objective risk factors of traffic accidents specifically includes: taking the road section as the basic unit, and calculating the indexes of street network characteristics, development pattern characteristics, socio-economic characteristics and traffic flow characteristics around the road section by setting specific search radius and buffer radius.

[0051] Furthermore, the street network characteristics include topological characteristics and geometric characteristics. Among them, the topological characteristics include betweenness centrality, detour rate, average geodesic distance and link ratio, and the geometric characteristics include road length and road width;

[0052] The development pattern characteristics include building density and land use mix;

[0053] The socio-economic characteristics include population density and employment density;

[0054] The traffic flow characteristics include traffic speed and traffic flow.

[0055] Furthermore, the mathematical formula for the betweenness centrality of the street network is:

[0056]

[0057] Among them, is the betweenness centrality of node i, and g jk(i) is the number of the shortest paths from node j to node k passing through node i, represents the probability that point i randomly falls on the shortest path between node j and node k.

[0058] The mathematical formula for the detour rate of the street network is:

[0059]

[0060] Among them, Div(x) is the detour property of node x, CFD(x, y) is the straight-line distance between the centers of x and y, dM(x, y) is the path distance between the centers of x and y, W(y) is the weight of polyline y, and P(y) is the proportion of any polyline;

[0061] The mathematical formula for the average geodesic distance of the street network is:

[0062]

[0063] Among them, GD avg is the average geodesic distance of the street network, n is the number of nodes in the street network, g jk is the number of geodesics connecting points j and k, and [n(n - 1) / 2] is the total number of node pairs.

[0064] The mathematical formula for the link ratio of the street network is:

[0065]

[0066] Among them, A is the link ratio of node i, e i is the number of edges adjacent to node i, and N is the number of nodes.

[0067] The land use mix represents the level of land use type mix within the buffer range of the road segment, calculated through the Shannon diversity index, and the mathematical formula is:

[0068]

[0069] Among them, H represents land use diversity, n represents the number of different land use types, and p i represents the area proportion of the i-th land use type.

[0070] The building density represents the building density level within the buffer range of the road segment, and the mathematical formula is:

[0071]

[0072] Among them, ρ buiding represents the building density, A building represents the sum of all building areas within the buffer, and A buffer represents the buffer area.

[0073] The population density represents the population density level within the buffer range of the road segment, and the mathematical formula is:

[0074]

[0075] Among them, ρpop represents population density, A pop represents the number of all populations in the buffer zone, A buffer represents the buffer zone area.

[0076] Employment density represents the employment density level within the buffer zone of the road section, and the mathematical formula is:

[0077]

[0078] where ρ work represents employment density, A work represents the number of employed populations in the buffer zone, A buffer represents the buffer zone area.

[0079] Traffic speed represents the average driving speed of motor vehicles on this road section, and traffic flow represents the average motor vehicle flow on this road section.

[0080] Furthermore, the specific content of S6 is as follows:

[0081] Based on the comprehensive dataset, taking the road section as the basic unit, using the number of traffic accidents as the dependent variable, the perceived safety score as the explanatory variable, and the objective risk factors as the control variables, establish a negative binomial regression model;

[0082] Conduct a significance test on the variables of the model results. If the p - value corresponding to the variable is lower than 0.05, it indicates that the correlation between this variable and the interaction term is significant; conversely, if the p - value corresponding to the variable is not lower than 0.05, it indicates that the correlation between this variable and the interaction term is not significant;

[0083] For the variables that have passed the significance test, conduct a coefficient test on the results of this variable. If the coefficient result corresponding to the variable is positive, it indicates that there is a positive correlation between this variable and the number of traffic accidents; conversely, if the coefficient result corresponding to the variable is negative, it indicates that there is a negative correlation between this variable and the number of traffic accidents; Based on the significance test results of the variables, identify the variable types that have a significant correlation with traffic accidents, and based on the coefficient test results of the variables, identify their influence effects on traffic accidents.

[0084] Furthermore, the specific content of S7 is as follows:

[0085] First, for each objective traffic risk factor, calculate its interaction term with perceived safety;

[0086] Subsequently, various objective traffic risk factors and the interaction terms with perceived safety were successively added to the negative binomial regression model, and analysis was carried out based on the variable results and interaction term results in the basic model: If the results of the variables in the basic model and the results of the interaction terms are both significant, and the coefficient sign of the variable in the original model is the same as the sign of the interaction term variable, it indicates that for the impact of this type of objective traffic risk factor on traffic accidents, perceived safety has an enhanced positive moderating effect; conversely, if the results of the variables in the basic model and the results of the interaction terms are both significant, and the coefficient sign of the variable in the original model is opposite to the sign of the interaction term variable, it indicates that for the impact of this type of objective traffic risk factor on traffic accidents, perceived safety has a weakened negative moderating effect; if the results of the variables in the original model are significant while the results of the interaction terms are not significant, it indicates that for the impact effect of this type of objective traffic risk factor on traffic accidents, perceived safety does not have a significant moderating effect.

[0087] Compared with the prior art, the present invention has the following advantages:

[0088] (1) The present invention takes sections with relatively microscopic scales as the evaluation units, simultaneously considers the impacts of both subjective and objective factors on traffic accidents, and identifies the moderating effect of perceived safety on traffic accidents through interaction term analysis, thereby constructing a traffic accident risk identification and analysis system under the all-elements of both subjective and objective dimensions.

[0089] (2) Compared with the traditional subjective perceived safety measurement and statistical methods such as scales and questionnaires applied in previous inventions, the present invention obtains urban street view images based on API interfaces, adopts advanced deep learning algorithms, constructs and trains an end-to-end convolutional neural network model, and batch obtains the perceived safety data of urban residents for streets on a large scale, having advantages such as time-saving, labor-saving, large applicable range, and not being easily affected by evaluation individuals.

[0090] (3) The technical method of the present invention can be directly applied to urban traffic system planning. Based on the perceived safety dimension at the subjective level of travelers, it can propose a traffic accident risk planning and control strategy combining subjectivity and objectivity, thereby improving travel safety. The idea is clear, the operation is simple, the model is mature and reliable, the calculation is fast, the result is highly analyzable, and it has strong operability. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] The drawings generally illustrate various embodiments by way of example and not limitation, and are used together with the description of the invention and the claims to explain the embodiments of the invention. Where appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be an exhaustive or exclusive embodiment of the apparatus or method.

[0092] Figure 1Shows the schematic flow chart of the method of the present invention;

[0093] Figure 2 Shows the schematic diagram of the training of the volunteer perception safety score rating standard;

[0094] Figure 3 Shows the schematic diagram of the structure of the end-to-end convolutional neural network (CNN) model;

[0095] Figure 4 Shows the schematic diagram of the identification of the subjective and objective risk factors of traffic accidents;

[0096] Figure 5 Shows the schematic diagram of identifying the moderating effect of perceived safety on the objective risk factors of traffic accidents. Specific implementation manners

[0097] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0098] In the embodiments of the present invention, the road section is used as the evaluation unit, and the urban street view images are obtained through the API interface, and an end-to-end convolutional neural network model is constructed and trained to evaluate the perceived safety level of the street view images, and a subjective-level urban street perceived safety data set is established; and combined with the objective risk factors of traffic accidents and historical traffic accident data, a comprehensive data set is established; then a negative binomial regression model is constructed based on the comprehensive data set, and according to the variable significance test and coefficient test results of the model, the relationship between subjective perceived safety, objective risk factors and traffic accidents is identified; finally, an interaction term variable is added to the original model, and based on the results of the interaction term variable, the moderating effect of street perceived safety on objective accident risk factors is explored. The present invention uses an advanced deep learning algorithm model to realize the batch acquisition of subjective perception data at the urban scale, and constructs a negative binomial regression model to identify the subjective and objective influencing factors of traffic accidents and the moderating effect of perceived safety on traffic accidents.

[0099] See Figure 1 , which specifically includes the following steps:

[0100] Step 1: Divide the road sections along the road network within the research scope, set sampling points, and use the API interface to obtain the street view images corresponding to the sampling points.

[0101] The specific steps of Step 1 are as follows: First, obtain the shp file of the road network within the research scope through the OpenStreetMap website, and use the homogeneous section division method to process the road network file in ArcGIS to obtain sections as basic units; Subsequently, apply the ArcGIS software, use "generate points along the line" in ArcGIS at intervals of 50m (for sections with a length less than 50m, take the midpoint of the section) to obtain road network sampling points, and based on the street view image API interface, set the horizontal field of view to 60° and the pitch reference angle to 0° to simulate the visual perception experience of travelers, and sequentially obtain street view images of size 1024*1024 pixels from different directions (0°, 60°, 120°, 180°, 240°, 300°), with each sampling point corresponding to 6 street view images. It should be noted that in this method, not every sampling point can obtain the corresponding street view image.

[0102] Step 2: Randomly select some street view images and invite volunteers to evaluate their perceived safety scores to construct a sample data set.

[0103] The specific steps of Step 2 are as follows: First, randomly select 10% of the images from the obtained street view images, invite 100 volunteers and conduct training (the scoring criteria and examples are Figure 2 as shown), and let the volunteers conduct perceived safety scoring on this part of the street view images, where 0 points is the lowest (very unsafe) and 100 points is the highest (very safe). Through multiple group scoring, ensure that each street view image is scored by different volunteers more than 3 times, and take the average score as the perceived safety score of the street view image to construct a sample data set.

[0104] Subsequently, preprocess the sample data set, read and convert all images into data arrays of floating-point type, and store them in the format of channel first; randomly shuffle the order of the data set, use 80% of the sample data as the training set, and the remaining 20% as the test set; perform normalization processing on the image data of the training set and the test set, and scale the pixel values to the range of [0,1]. Subsequently, construct a convolutional neural network model, use the mean squared error as the loss function, and the mean absolute error as the evaluation index to evaluate the model performance and determine the hyperparameters of the model.

[0105] Step 3: Construct an end-to-end convolutional neural network and train it with the preprocessed sample data set.

[0106] The specific steps of Step 3 are as follows: Construct a convolutional neural network model, use the sample data set constructed in Step 2 as the training data set to train the model, and the specific structure of the convolutional neural network model is as follows:

[0107] (1) The input layer is street view image data;

[0108] (2) The first convolutional layer contains 32 3x3 filters and uses the ReLU activation function;

[0109] (3) The second convolutional layer also contains 32 3x3 filters and uses the ReLU activation function;

[0110] (4) The first pooling layer uses a 2x2 pooling window;

[0111] (5) The first batch normalization layer is located after the first pooling layer;

[0112] (6) The third convolutional layer contains 64 3x3 filters and uses the ReLU activation function;

[0113] (7) The fourth convolutional layer also contains 64 3x3 filters and uses the ReLU activation function;

[0114] (8) The second pooling layer uses a 2x2 pooling window;

[0115] (9) The second batch normalization layer is located after the second pooling layer;

[0116] (10) The fifth convolutional layer contains 128 3x3 filters and uses the ReLU activation function;

[0117] (11) The sixth convolutional layer also contains 128 3x3 filters and uses the ReLU activation function;

[0118] (12) The third pooling layer uses a 2x2 pooling window;

[0119] (13) The third batch normalization layer is located after the third pooling layer;

[0120] (14) The flatten layer flattens the multi-dimensional data into a one-dimensional vector;

[0121] (15) The fully connected layer contains 1 unit for outputting the perceived safety score.

[0122] Step 4: Input the street view images into the trained convolutional neural network model for evaluation, and output the perceived safety score corresponding to each street view image.

[0123] The specific process of Step 4 is as follows: Input all the street view images into the trained end-to-end convolutional neural network model for evaluation in sequence. Each street view image can obtain a corresponding label, and store its corresponding perceived safety score.

[0124] Step 5: Obtain traffic accident data, perceived safety data, and objective risk factor data of traffic accidents, perform data cleaning, index calculation, and data integration to establish a comprehensive dataset containing traffic accident data, perceived safety data, and objective risk factor data:

[0125] Among them, the historical traffic accident data of traffic accident data includes accident geographical coordinates and accident occurrence time; the perceived safety data includes street view image numbers, street view image geographical coordinates, and perceived safety scores corresponding to street view images; the objective risk factors of traffic accidents include four aspects: street network characteristics, development pattern characteristics, socio-economic characteristics, and traffic flow characteristics. Among them, the street network characteristics include topological characteristics and geometric characteristics: the topological characteristics include betweenness centrality, detour rate, average geodesic distance, and link ratio, and the geometric characteristics include road section length and road section width; the development pattern characteristics include building density and land use mix; the socio-economic characteristics include population density and employment density; the traffic flow characteristics include traffic speed and traffic flow. After collecting the above data, use the spatial join method in ArcGIS to perform aggregation statistics in units of road sections. One of the key points of the embodiment of the present invention lies in the method for identifying subjective and objective risk factors of traffic accidents. The risk factors can be appropriately increased or decreased based on data availability. The present invention only gives some influencing factors as examples to illustrate the risk factor identification method proposed by the present invention.

[0126] Among them, the processing of traffic accident data specifically includes:

[0127] Process the traffic accident points according to the geographical coordinates where the traffic accidents occur, and classify them into the road section closest to the accident location. The traffic accident risk of the road section is expressed by the ratio of the number of traffic accidents in the road section to the road section length. The mathematical formula is:

[0128]

[0129] Among them, R i represents the traffic accident risk of the i-th road section, R i represents the number of traffic accidents in the i-th road section, and l i represents the road section length of the i-th road section.

[0130] Apply the "Join" function of ArcGIS software to store the traffic accident risks of each road section in the road section file.

[0131] Among them, the processing of perceived safety score data specifically includes:

[0132] For each sampling point, the average of the perceived safety scores of the six-direction street view images obtained at this sampling point is taken as the perceived safety level of this sampling point; for each road section, the average of the perceived safety scores of all sampling points on this road section is taken as the perceived safety level of this road section. The mathematical formula is as follows:

[0133]

[0134] where y i represents the average perceived safety score of the i-th road section, and y mj represents the perceived safety score corresponding to the j-th street view image of the m-th sampling point on road section i.

[0135] Apply the "Join" function of ArcGIS software to store the perceived safety scores of each road section in the road section file;

[0136] Among them, the processing of objective risk factor data specifically includes:

[0137] Process the road network data file in ArcGIS software, create a topology and perform corresponding topology processing. Taking the road section as the basic unit, based on ArcGIS software and the sDNA plug-in, by setting specific search radii and buffer radii, calculate the street network characteristics, development pattern characteristics, socio-economic characteristics, and traffic flow characteristic indicators around the road section;

[0138] (1) The centrality of the street network is represented by betweenness centrality. The mathematical formula of betweenness centrality is as follows:

[0139]

[0140] where is the betweenness centrality of node i, g jk(i) is the number of the shortest paths from node j to node k passing through node i, represents the probability that point i randomly falls on the shortest path between node j and node k.

[0141] Apply the sDNA plug-in of ArcGIS software to calculate the betweenness centrality of road sections under different search radii and store the corresponding data in the road section file.

[0142] (2) The detourability of the street network is represented by the detour ratio. The mathematical formula of the detour ratio is as follows:

[0143]

[0144] where Div(x) is the detourability of node x, CFD(x,y) is the straight-line distance between the centers of x and y, dM(x,y) is the path distance between the centers of x and y, W(y) is the weight of polyline y, and P(y) is the proportion of any polyline.

[0145] Use the sDNA plug-in of ArcGIS software to calculate the road section detour rate under different search radii, and store the corresponding data in the road section file.

[0146] (3) The accessibility of the street network is represented by the average geodesic distance, and the mathematical formula for the average geodesic distance is:

[0147]

[0148] Among them, GD avg is the average geodesic distance of the street network, n is the number of nodes in the street network, and g jk is the number of geodesics connecting point j and k, and [n(n - 1) / 2] is the total number of node pairs.

[0149] Use the sDNA plug-in of ArcGIS software to calculate the average geodesic distance of the road section under different search radii, and store the corresponding data in the road section file.

[0150] (4) The connectivity of the street network is represented by the link ratio, and the mathematical formula for the link ratio is:

[0151]

[0152] Among them, A is the link ratio of node i, and e i is the number of edges adjacent to node i, and N is the number of nodes.

[0153] Use the sDNA plug-in of ArcGIS software to calculate the connectivity of the road section under different search radii, and store the corresponding data in the road section file.

[0154] (5) The land use mix represents the level of land use type mix within the road section buffer area, and is calculated through the Shannon diversity index. The mathematical formula is:

[0155]

[0156] Among them, H represents land use diversity, n represents the number of different land use types, and p i represents the area proportion of the i-th land use type.

[0157] Use ArcGIS software to calculate the land use mix within the road section buffer area, and store the corresponding data in the road section file.

[0158] (6) The building density represents the building density level within the road section buffer area, and the mathematical formula is:

[0159]

[0160] Among them, ρbuiding Denotes the building density, A building Denotes the sum of the building areas within the buffer zone, A buffer Denotes the buffer zone area.

[0161] Use the ArcGIS software to calculate the building density within the buffer zone of the road section and store the corresponding data in the road section file.

[0162] (7) The population density represents the population density level within the buffer zone of the road section, and the mathematical formula is:

[0163]

[0164] Among them, ρ pop Denotes the population density, A pop Denotes the number of all populations within the buffer zone, A buffer Denotes the buffer zone area.

[0165] Use the ArcGIS software to calculate the population density within the buffer zone of the road section and store the corresponding data in the road section file.

[0166] (8) The employment density represents the employment density level within the buffer zone of the road section, and the mathematical formula is:

[0167]

[0168] Among them, ρ work Denotes the employment density, A work Denotes the number of employed populations within the buffer zone, A buffer Denotes the buffer zone area.

[0169] Use the ArcGIS software to calculate the employment density within the buffer zone of the road section and store the corresponding data in the road section file.

[0170] (9) The traffic speed represents the average driving speed of motor vehicles on this road section, and the traffic flow represents the average motor vehicle flow on this road section.

[0171] Use the "Join" function of the ArcGIS software to store data such as traffic flow and traffic speed of each road section in the road section file.

[0172] Step 6: Based on the comprehensive dataset, taking the road section as the basic unit, using the number of traffic accidents as the dependent variable, the perceived safety score as the explanatory variable, and the objective risk factors as the control variables, establish a negative binomial regression model, and analyze the model results through significance tests and coefficient tests.

[0173] The specific content of the said Step 6 includes: using the "glm.nb" function in the "MASS" package in R4.0.2 to build a negative binomial regression model;

[0174] As shown in Table 1, a significance test of variables is performed on the model results. If the p-value corresponding to a variable is lower than 0.05, it indicates that the correlation between the variable and the interaction term is significant; conversely, if the p-value corresponding to a variable is not lower than 0.05, it indicates that the correlation between the variable and the interaction term is not significant.

[0175] For variables that have passed the significance test, a coefficient test is performed on the results of the variable. If the coefficient result corresponding to the variable is positive, it indicates that there is a positive correlation between the variable and the number of traffic accidents; conversely, if the coefficient result corresponding to the variable is negative, it indicates that there is a negative correlation between the variable and the number of traffic accidents. Based on the significance test results of the variables, identify the types of variables that have a significant correlation with traffic accidents, and based on the coefficient test results of the variables, identify their impact effects on traffic accidents.

[0176] Table 1 Identification of Risk Factors for Traffic Accidents

[0177]

[0178] Step 7: Calculate the interaction term of the objective risk factor variable of traffic accidents and the perceived safety variable, and sequentially add it as an interaction term variable to the negative binomial regression model. By analyzing the interaction term in the model results, identify the moderating effect of perceived safety on the objective risk factors of traffic accidents.

[0179] The specific content of Step 7 is as follows: First, for each objective traffic risk factor, calculate its interaction term with perceived safety;

[0180] Subsequently, sequentially add the interaction terms of various objective traffic risk factors and perceived safety to the negative binomial regression model, and analyze based on the variable results and interaction term results in the original model: If both the variable results and the interaction term results in the original model are significant, and the coefficient sign of the variable in the original model result is the same as the sign of the interaction term variable, it indicates that for the impact of this type of objective traffic risk factor on traffic accidents, perceived safety has an enhanced positive moderating effect; conversely, if both the variable results and the interaction term results in the original model are significant, and the coefficient sign of the variable in the original model result is opposite to the sign of the interaction term variable, it indicates that for the impact of this type of objective traffic risk factor on traffic accidents, perceived safety has a weakened negative moderating effect; if the variable result in the original model is significant while the interaction term result is not significant, it indicates that for the impact effect of this type of objective traffic risk factor on traffic accidents, perceived safety does not have a significant moderating effect, as shown in Table 2.

[0181] Table 2 Moderating Effect of Perceived Safety on Objective Risk Factors of Traffic Accidents

[0182]

[0183] The present invention obtains urban street view images through an API interface, constructs and trains an end-to-end convolutional neural network model to evaluate the perceived safety level of street view images, and establishes a subjective urban street perceived safety dataset. Compared with traditional subjective perceived safety measurement and statistical methods, the advanced machine learning method applied in the present invention has the advantages of time-saving, labor-saving, large applicable range, and being less affected by individual differences, thereby realizing large-scale batch acquisition of perceived safety data at the urban scale.

[0184] The present invention constructs a negative binomial regression model, and based on the model variables and the results of their interaction terms, identifies the subjective and objective influencing factors of traffic accidents and the moderating effect of perceived safety on traffic accidents. The technical method is mature, the operation is simple and clear, and the operability is relatively strong.

[0185] The above is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered within the protection scope of the present invention.

Claims

1. A method for identifying street perceived safety and its effect on traffic accident regulation, characterized in that: The method comprises: S1 divides the road network within the research scope into sections, sets sampling points, and obtains street view images corresponding to the sampling points; S2 randomly selects some street view images, invites volunteers to evaluate their perceived safety scores, constructs a sample data set, and preprocesses the sample data set; S3 builds an end-to-end convolutional neural network and trains it using the preprocessed sample dataset; S4 inputs the street view images into the trained convolutional neural network model for evaluation and outputs the perceived safety score corresponding to each street view image; S5 obtains historical traffic accident data, perceived safety data, and objective risk factors of traffic accidents, and processes them to establish a comprehensive data set including historical traffic accident data, perceived safety data, and objective risk factor data; S6 constructs and analyzes a negative binomial regression model based on the comprehensive data set, and identifies the correlation between perceived safety of urban streets and traffic accidents, as well as other objective risk factors that are correlated with traffic accidents based on the model results; S7 calculates the result of the interaction between the objective risk factor variables of traffic accidents and the perceived safety variable, adds them into the negative binomial regression model as interaction variables, and analyzes the model results to identify the moderating effect of perceived safety on traffic accidents; The historical traffic accident data includes the geographical coordinates of the accident and the time of the accident; The perceived safety data includes a street view image number, a street view image geographic coordinate, and a perceived safety score corresponding to the street view image; The objective risk factors of traffic accidents include street network characteristics, development pattern characteristics, socio-economic characteristics and traffic flow characteristics; The S5 is specifically: The processing of historical traffic accident data specifically includes: processing the traffic accident points according to the geographical coordinates of the traffic accident, assigning them to the road section closest to the accident location, and expressing the traffic accident risk of the road section by the ratio of the number of traffic accidents in the road section to the length of the road section. The mathematical formula is: Among them, R i represents the traffic accident risk of the i-th road section, C i represents the number of traffic accidents on the i-th road section, l i represents the length of the i-th road segment; The specific processing of perceived safety data includes: for each sampling point, taking the average of the perceived safety scores of the street view images in the six directions obtained at the sampling point as the perceived safety level of the sampling point; for each road section, taking the average of the perceived safety scores of all sampling points on the road section as the perceived safety level of the road section. The mathematical formula is: Among them, y i represents the average perceived safety score of the ith road segment, y mg represents the perceived safety score corresponding to the g-th street view image of the m-th sampling point on road segment i; n represents the number of sampling points; The specific processing of objective risk factors of traffic accidents includes: taking the road section as the basic unit, by setting a specific search radius and buffer radius, calculating the street network characteristics, development pattern characteristics, socio-economic characteristics and traffic flow characteristics indicators around the road section; The street network features include topological features and geometric features, wherein the topological features include betweenness centrality, detour rate, average geodesic distance and link ratio, and the geometric features include road segment length and road segment width; The characteristics of the development pattern include building density and land use mix; Said socioeconomic characteristics include population density and employment density; The traffic flow characteristics include traffic speed and traffic volume; The mathematical formula for betweenness centrality of a street network is: in, is the betweenness centrality of node u, g vk(u) is the number of shortest paths between nodes v and k that pass through node u, Represents the probability that point u randomly falls on the shortest path between nodes v and k; The mathematical formula for the detour rate of a street network is: Where Div(x) is the circumvention of node x, CFD(x,y) is the straight-line distance between the centers of x and y, dM(x,y) is the path distance between the centers of x and y, W(y) is the weight of polyline y, and P(y) is the proportion of any polyline; The mathematical formula for the average geodesic distance of a street network is: Among them, GD avg is the average geodesic distance of the street network, N is the number of nodes in the street network, and g vk is the geodesic number of nodes v and k, [N(N-1) / 2] is the total number of node pairs; The mathematical formula for the chain-link ratio of a street network is: Where A is the link ratio of node u, e u is the number of edges adjacent to node u, and N is the number of nodes; The land use mixture degree indicates the mixing degree level of land use types within the road section buffer zone, which is calculated by the Shannon diversity index. The mathematical formula is: Among them, H represents land use diversity, s represents the number of different land use types, and p t represents the area proportion of the tth land use type; Building density refers to the building density level within the road section buffer zone. The mathematical formula is: Among them, ρ buiding represents the building density, A building represents the sum of all building areas within the buffer zone, A buffer represents the buffer area; Population density refers to the population density level within the road segment buffer range. The mathematical formula is: Among them, ρ pop represents population density, A pop represents the total population in the buffer zone, A buffer represents the buffer area; Employment density refers to the employment density level within the road segment buffer zone. The mathematical formula is: Among them, ρ work represents employment density, A work represents the number of employed people in the buffer zone, A buffer represents the buffer area; Traffic speed refers to the average speed of motor vehicles on the road section, and traffic flow refers to the average flow of motor vehicles on the road section; The S6 is specifically: Based on the comprehensive data set, a negative binomial regression model was established with the road section as the basic unit, the number of traffic accidents as the dependent variable, the perceived safety score as the explanatory variable, and the objective risk factors as the control variables; The significance test of the variables was performed on the model results. If the significance test value corresponding to the variable was lower than 0.05, it indicated that the correlation between the variable and the interaction term was significant. On the contrary, if the significance test value corresponding to the variable was not lower than 0.05, it indicated that the correlation between the variable and the interaction term was not significant. For variables that have passed the significance test, the results of the variables are tested for coefficients. If the coefficient result corresponding to the variable is positive, it means that there is a positive correlation between the variable and the number of traffic accidents; conversely, if the coefficient result corresponding to the variable is negative, it means that there is a negative correlation between the variable and the number of traffic accidents. Based on the significance test results of the variables, the types of variables that have a significant correlation with traffic accidents are identified, and based on the coefficient test results of the variables, their impact on traffic accidents is identified; The S7 is specifically: First, for each objective traffic risk factor, its interaction with perceived safety is calculated; Subsequently, the multiplication terms of various objective traffic risk factors and perceived safety were added to the negative binomial regression model in turn, and the analysis was performed based on the variable results and interaction term results in the basic model: if the results of the variables in the basic model and the interaction term results are both significant, and the sign of the coefficient of the variable in the original model results is the same as the sign of the interaction term variable, it indicates that perceived safety has an enhanced positive moderating effect on the impact of this type of objective traffic risk factor on traffic accidents; conversely, if the results of the variables in the basic model and the interaction term results are both significant, and the sign of the coefficient of the variable in the original model results is opposite to the sign of the interaction term variable, it indicates that perceived safety has a weakened negative moderating effect on the impact of this type of objective traffic risk factor on traffic accidents; if the results of the variables in the original model are significant, but the results of the interaction term are not significant, it indicates that perceived safety does not have a significant moderating effect on the impact of this type of objective traffic risk factor on traffic accidents.

2. The method for identifying street perceived safety and its effect on traffic accident regulation according to claim 1, characterized in that: The S1 is specifically: Firstly, the homogeneous road segmentation method was used to divide the road network file, and the road segments within the research scope were obtained. Sampling points were obtained at intervals of 50m, and the midpoint of the road segment less than 50m was taken. Then, based on the street view image API interface, the horizontal field of view was set to 60° and the elevation reference angle of view was set to 0°. Street view images with a size of 1024*1024 pixels were obtained from different directions in turn. For each sampling point where an image could be obtained, 6 street view images were collected.

3. The method for identifying street perceived safety and its effect on traffic accident regulation according to claim 1, characterized in that: The S2 is specifically: First, 10% of the images were randomly selected from the acquired street view images, and 100 volunteers were invited and trained to rate the perceived safety of the selected street view images, where 0 represents the lowest score, which is very unsafe, and 100 represents the highest score, which is very safe. Multiple group ratings were performed to ensure that each street view image was rated more than 3 times by different volunteers, and the average score was taken as the perceived safety score of the street view image to construct a sample data set. The sample data set is then preprocessed, all images are read and converted into data arrays of floating-point type, and stored in a channel-first format; the order of the data set is randomly disrupted, 80% of the sample data is used as a training set, and the remaining 20% ​​is used as a test set; the image data of the training set and the test set are normalized, and the pixel values ​​are scaled to the range of [0,1].

4. The method for identifying street perceived safety and its effect on traffic accident regulation according to claim 1, characterized in that: The specific structure of the convolutional neural network is: (1) The input layer is street view image data; (2) The first convolutional layer contains 32 3x3 filters and uses the ReLU activation function; (3) The second convolutional layer also contains 32 3x3 filters and uses the ReLU activation function; (4) The first pooling layer uses a 2x2 pooling window; (5) The first batch normalization layer is located after the first pooling layer; (6) The third convolutional layer contains 64 3x3 filters and uses the ReLU activation function; (7) The fourth convolutional layer also contains 64 3x3 filters and uses the ReLU activation function; (8) The second pooling layer uses a 2x2 pooling window; (9) The second batch normalization layer is located after the second pooling layer; (10) The fifth convolutional layer contains 128 3x3 filters and uses the ReLU activation function; (11) The sixth convolutional layer also contains 128 3x3 filters and uses the ReLU activation function; (12) The third pooling layer uses a 2x2 pooling window; (13) The third batch normalization layer is located after the third pooling layer; (14) The flattening layer flattens the multidimensional data into a one-dimensional vector; (15) The fully connected layer contains 1 unit, which is used to output the perceived safety score.

Citation Information

Patent Citations

  • Method for discriminating roads with multiple accidents at medium level

    CN108922168A

  • Urban street design quality evaluation method based on user perception-oriented experience

    CN115204686A