Road safety risk assessment decision-making method based on artificial intelligence big model
Through the road safety risk assessment method based on the artificial intelligence large model, vehicle driving trajectory data is collected and analyzed to identify the driver's driving tendency, which solves the problem of difficulty in accurately assessing road traffic accident risks in the existing technology and improves the level of road safety.
Patent Information
- Application Number
- CN202411132586.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Existing technologies are difficult to effectively assess and reduce the incidence of road traffic accidents, making it difficult to accurately predict and identify road traffic safety risks.
A road safety risk assessment and decision-making method based on artificial intelligence large models is adopted to collect and preprocess vehicle driving trajectory data, extract features, conduct driving state analysis, classify driving categories, assess road safety risks based on driving tendencies, and provide risk warnings.
It achieves accurate prediction and identification of road safety risks for different drivers, helping drivers to take preventive measures in advance, reduce the incidence of traffic accidents, and improve the overall safety level of the road.
Smart Images

Figure CN118644093B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of road safety risk assessment, and in particular to a road safety risk assessment decision-making method based on an artificial intelligence large model. Background Art
[0002] As the number of cars in the world continues to increase, the frequent occurrence of road traffic accidents has become a serious social problem. According to statistics from the World Health Organization, about 1.35 million people die in road traffic accidents each year and millions are injured. This not only brings great pain to individuals and families, but also has a significant impact on society and the economy. Therefore, how to effectively assess and reduce road traffic safety risks has become an important issue that needs to be solved urgently. Summary of the invention
[0003] In view of this, the present invention proposes a road safety risk assessment decision-making method based on an artificial intelligence big model. By applying the artificial intelligence big model, the potential road safety risks for different drivers can be more accurately predicted and identified, which helps drivers take preventive measures in advance, reduce the incidence of traffic accidents, and improve the overall road safety level.
[0004] To achieve the above-mentioned purpose, the road safety risk assessment decision-making method based on artificial intelligence big model provided by the present invention comprises the following steps:
[0005] S1: Collecting and preprocessing vehicle driving trajectory data on the road to obtain preprocessed vehicle driving trajectory data.
[0006] S2: Extract features from the preprocessed vehicle driving trajectory data to obtain a road vehicle driving trajectory feature sequence.
[0007] S3: performing driving state analysis on the extracted vehicle driving trajectory feature sequence, and dividing the vehicle driving trajectory feature sequence into different driving categories, wherein cluster analysis is an implementation method of the state analysis.
[0008] S4: Perform driving tendency analysis on the central sequence of each driving category as the driving tendency analysis result of the driving trajectory feature sequence of all vehicles in the corresponding driving category, where the driving tendency analysis result includes aggressive, normal and cautious.
[0009] S5: Evaluate the driver's driving tendency according to the preprocessing method, feature extraction method and driving state analysis method, and determine whether there is a road safety risk at present based on the evaluation result.
[0010] As a further improvement method of the present invention:
[0011] Optionally, collecting and preprocessing the vehicle driving trajectory data on the road in step S1 includes:
[0012] The vehicle driving trajectory data of the road is collected, wherein the collection result of the vehicle driving trajectory data is:
[0013] ;
[0014] .
[0015] in:
[0016] A trajectory data set representing the collected vehicle driving trajectory data;
[0017] represents the nth group of vehicle driving trajectory data collected, and N represents the total number of vehicle driving trajectory data collected;
[0018] Represents the nth group of vehicle driving trajectory data In Track points, Indicates The position coordinates of the trajectory points, Represents the nth group of vehicle driving trajectory data The total number of trajectory points in; the sampling time interval of the position coordinates of adjacent trajectory points is If the position coordinates of the trajectory point are not collected at the position coordinate sampling time, the position coordinates of the trajectory point are marked as NaN.
[0019] The collected vehicle driving trajectory data is preprocessed, wherein the nth group of vehicle driving trajectory data The preprocessing process is:
[0020] S11: Generate the nth set of vehicle driving trajectory data The mask sequence is:
[0021] ;
[0022] .
[0023] in:
[0024] Represents the nth group of vehicle driving trajectory data The mask sequence of
[0025] Indicates location coordinates The mask value of .
[0026] S12: Combined mask sequence Generate vehicle driving trajectory data The vehicle driving trajectory data after completion with the smallest Euclidean distance .
[0027] S13: From the completed vehicle driving trajectory data Extract the mask sequence from The position coordinates of the position where the mask value is 0, for the vehicle driving trajectory data The missing position coordinates of the corresponding positions in are replaced to form the preprocessed vehicle driving trajectory data:
[0028] ;
[0029] .
[0030] in:
[0031] Represents vehicle driving trajectory data The preprocessing results;
[0032] Indicates the vehicle driving trajectory data after completion Middle The position coordinates of the trajectory points;
[0033] Represents the vehicle driving trajectory data after preprocessing Middle The position coordinates of the trajectory points.
[0034] Optionally, the step S12 is combined with a mask sequence Generate vehicle driving trajectory data The vehicle driving trajectory data after completion with the smallest Euclidean distance ,include:
[0035] S121: Setting vehicle driving trajectory data The current iteration number is t, the initial value of t is 0, and the iteration threshold is , then the vehicle driving trajectory data The result of the tth iteration is ,in .
[0036] S122: Vehicle driving trajectory data Iteration is performed, where the iteration formula is:
[0037] ;
[0038] g n t (1)= δ ( W 1 [ L n t , mask n ]+ b 1 ) ;
[0039] g n t (2)= δ ( W 2 [ L n t , mask n ]+ b 2 ) ;
[0040] g n t (3)= exp[ W 3 ( g n t (2)⨀ L n t )]-exp[ -W 3 ( g n t (2)⨀ L n t )] exp[ W 3 ( g n t (2)⨀ L n t )]+exp[ -W 3 ( g n t (2)⨀ L n t )] .
[0041] in:
[0042] Represents element-wise multiplication;
[0043] represents the iterative weight parameter of the vehicle driving trajectory data, represents the iterative bias parameter;
[0044] represents an exponential function with a natural constant as base;
[0045] Represents the activation function, and the selected activation function is the ReLU function;
[0046] Represents vehicle driving trajectory data Update information about missing values in ;
[0047] Represents vehicle driving trajectory data Reset information for missing values in ;
[0048] Represents vehicle driving trajectory data Missing values in hide information.
[0049] S123: If , then calculate the missing value supplementary information of the current t+1th iteration result , otherwise go to step S124:
[0050] .
[0051] in:
[0052] Indicates the current t+1th iteration result Supplementary information on missing values ;
[0053] Represents the iteration result Middle The position coordinates of the trajectory points;
[0054] represents the L2 norm, Represents the iteration result Vehicle driving trajectory data the degree of difference between
[0055] represents the L1 norm, Represents the iteration result The degree of missing value filling, Represents vehicle driving trajectory data The mean position coordinates of .
[0056] If missing values are provided If the value is higher than the preset threshold, the iteration result As the completed vehicle driving trajectory data , otherwise go to step S124.
[0057] S124: Order , return to step S122.
[0058] Optionally, in step S2, feature extraction is performed on the preprocessed vehicle driving trajectory data, including:
[0059] Feature extraction is performed on the preprocessed vehicle driving trajectory data, wherein the preprocessed vehicle driving trajectory data The feature extraction process is:
[0060] S21: Calculate the pre-processed vehicle driving trajectory data Trajectory speed characteristics:
[0061] ;
[0062] .
[0063] in:
[0064] Represents the vehicle driving trajectory data after preprocessing Trajectory velocity characteristics;
[0065] Represents the vehicle driving trajectory data after preprocessing middle The speed characteristics of the trajectory road;
[0066] Represents the vehicle driving trajectory data after preprocessing The speed characteristics of the jth trajectory road in , where the jth trajectory road is the road between the j+1th trajectory point and the jth trajectory point, j ∈[1, num n -1 ] ;
[0067] Represents the vehicle driving trajectory data after preprocessing The coordinates of the mid-track point and The Euclidean distance between
[0068] Represents the vehicle driving trajectory data after preprocessing The speed limit of the j-th trajectory road in .
[0069] S22: Calculate and obtain the pre-processed vehicle driving trajectory data The trajectory and heading characteristics are:
[0070] ;
[0071] r n * (j) = arctan[ L n * (j+1,x)- L n * (j,x) L n * (j+1,y)- L n * (j,y) ] .
[0072] in:
[0073] Represents the vehicle driving trajectory data after preprocessing The trajectory and heading characteristics of
[0074] Represents the vehicle driving trajectory data after preprocessing middle The heading characteristics of the trajectory path;
[0075] Represents the vehicle driving trajectory data after preprocessing The heading characteristics of the j-th trajectory road in;
[0076] , Indicates location coordinates The horizontal coordinates in Indicates location coordinates In the vertical direction coordinate of the N-th group of roads, in the embodiment of the present invention, the horizontal direction is the east-west direction, the vertical direction is the north-south direction, and the coordinate center is the geometric center of the N-th group of roads.
[0077] S23: Construct the pre-processed vehicle driving trajectory data The vehicle driving trajectory feature sequence:
[0078] ;
[0079] F n j = [ v n * (j) , r n * (j) ] T .
[0080] in:
[0081] Represents the vehicle driving trajectory data after preprocessing The vehicle driving trajectory feature sequence;
[0082] Represents the vehicle driving trajectory data after preprocessing The trajectory features of the j-th trajectory road in , T represents the transpose.
[0083] Optionally, in step S3, the driving state analysis of the extracted vehicle driving trajectory feature sequence includes:
[0084] The extracted vehicle driving trajectory feature sequence is subjected to driving state analysis, wherein the driving state analysis process is as follows:
[0085] S31: Obtain vehicle driving trajectory feature sequences of N groups of vehicle driving trajectory data.
[0086] S32: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequences and the driving trajectory feature sequence of the pth group of vehicles The sequence distance between , p ∈ [1,N] .
[0087] S33: Set the number of driving categories to K, randomly select K vehicle driving trajectory feature sequences as the initial center sequences of K driving categories, where the initial center sequence of the kth driving category is , k ∈ [1,K] .
[0088] S34: Set the current iteration number of the center sequence of each driving category to z, and the maximum iteration number to Z. Then the z-th iteration result of the center sequence of the k-th driving category is , where the initial value of z is 0.
[0089] S35: Calculate the non-central sequence belonging degree of K central sequences, where the kth central sequence The degree of non-central sequence belonging to is:
[0090] .
[0091] in:
[0092] Represents the vehicle driving trajectory feature sequence of the vth non-central sequence , for the kth center sequence The degree of non-central sequence belonging to;
[0093] Represents the characteristic sequence of vehicle driving trajectory With the central sequence The sequence distance between
[0094] represents a control parameter; in the embodiment of the present invention, Set to 3.5.
[0095] S36: Iterate the K center sequences, where the iteration formula of the kth center sequence is:
[0096] R k 0 (z + 1) = ∑ v = 1 NK [ U k z (v)] ε R k 0 (z) ∑ v = 1 NK [ U k z (v)] ε .
[0097] S37: Let z=z+1, return to step S35, until the center sequence does not change, and classify the vehicle driving trajectory feature sequences of the non-center sequence into the center sequence with the closest sequence distance, forming K driving categories, where each driving category contains a center sequence and several vehicle driving trajectory feature sequences, and the k-th driving category is:
[0098] R k = { R k e |e∈[0, Sum k ]} .
[0099] in:
[0100] represents the k-th driving category, represents the driving trajectory feature sequence of the e-th vehicle in the k-th driving category, Represents the number of vehicle driving trajectory feature sequences in the kth driving category.
[0101] Optionally, the sequence distance between any two sets of vehicle driving trajectory feature sequences is calculated in step S32, including:
[0102] S321: Calculate the trajectory feature distances of different trajectory sections in any two sets of vehicle driving trajectory feature sequences, where the trajectory feature With trajectory characteristics The trajectory characteristic distance between is:
[0103] .
[0104] in:
[0105] Trajectory characteristics With trajectory characteristics The trajectory characteristic distance between h ∈[1, num p -1 ] .
[0106] S322: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequences and the driving trajectory feature sequence of the pth group of vehicles The sequence distance between :
[0107] ;
[0108] .
[0109] in:
[0110] Represents the combined trajectory features With trajectory characteristics Iteration distance.
[0111] Optionally, the driving tendency analysis of the central sequence of each driving category in step S4 includes:
[0112] A driving tendency analysis is performed on the central sequence of each driving category, and the driving tendency analysis result of the central sequence is used as the driving tendency analysis result of the driving trajectory feature sequence of all vehicles in the corresponding driving category, and the driving tendency analysis result includes aggressive, normal and cautious.
[0113] The center sequence of the k-th driving category The driving tendency analysis process is as follows:
[0114] S41: Center sequence Encoding process:
[0115] .
[0116] in:
[0117] Represents the central sequence The encoding processing result;
[0118] Represents the maximum pooling operation;
[0119] represents the convolution matrix and * represents the convolution operator.
[0120] S42: Process the encoding result Perform attention weighted encoding:
[0121] ;
[0122] att k 0 = exp(- W 2 * G k 0 ) max{exp(- W 2 * G k e )|e∈[0, Sum k ]} .
[0123] in:
[0124] represents the mapping matrix;
[0125] Indicates the result of encoding processing The attention weight of
[0126] max{exp(- W 2 * G k e )|e∈[0, Sum k ]} represents the maximum attention information of all vehicle driving trajectory feature sequences in the kth driving category, represents the encoding processing result of the e-th driving trajectory feature sequence in the k-th driving category;
[0127] Represents the attention weighted encoding result.
[0128] S43: Calculate the attention weighted encoding result Corresponding driving tendency analysis results:
[0129] .
[0130] in:
[0131] Represents the attention weighted encoding result Corresponding driving tendency analysis results;
[0132] These represent aggressive, normal, and cautious driving tendencies, respectively;
[0133] Indicates driving tendency The corresponding mapping matrix;
[0134] will make [ 1 1 + exp(- W label c * A k 0 ) ∑ w=1 3 1 1 + exp(- W label w * A k 0 ) ] Achieving maximum driving tendency as the central sequence The driving tendency analysis results.
[0135] Optionally, in step S5, the driver's driving tendency is evaluated according to a preprocessing method, a feature extraction method, and a driving state analysis method, including:
[0136] The driver's driving tendency is evaluated according to the preprocessing method, feature extraction method and driving state analysis method, wherein the driver's driving tendency evaluation process is as follows:
[0137] S51: Obtain the driver's historical vehicle driving trajectory data and perform preprocessing.
[0138] S52: Extract features from the preprocessed historical vehicle driving trajectory data to obtain a historical vehicle driving trajectory feature sequence of the driver.
[0139] S53: Calculate the sequence distance between the historical vehicle driving trajectory feature sequence and the central sequence of the K driving categories, and use the driving category corresponding to the central sequence with the shortest sequence distance as the driving category of the driver.
[0140] S54: Using the driving tendency analysis result corresponding to the driving category as the driver's driving tendency evaluation result.
[0141] The number of turning points on the road the driver is currently driving on is obtained. If the number of turning points on the road is higher than a preset threshold and the driver's driving tendency is evaluated as aggressive, there is a risk of road safety driving and the driver is given a risk warning.
[0142] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:
[0143] A memory storing at least one instruction;
[0144] Communication interface, enabling electronic equipment to communicate; and
[0145] A processor executes instructions stored in the memory to implement the above-mentioned road safety risk assessment decision-making method based on the artificial intelligence big model.
[0146] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned road safety risk assessment decision-making method based on an artificial intelligence large model.
[0147] Compared with the prior art, the present invention proposes a road safety risk assessment decision-making method based on an artificial intelligence large model, which has the following advantages:
[0148] First, this scheme proposes a missing data completion method, which combines the iterative method of long short-term memory network to extract the update information, reset information and forgotten information of the vehicle driving trajectory data after mask processing, and uses the difference between the iterative data and the original data and the degree of missing value supplementation of the missing data to generate missing value supplementation information of the iterative data. The iterative data that fully supplements the missing values in the vehicle driving trajectory data is selected as the preprocessing result to realize trajectory data completion, and the speed characteristics and heading characteristics of different trajectory roads in the trajectory data are combined to construct the trajectory characteristics of different trajectory roads, so as to realize the extraction of driving trajectory features of different driving methods.
[0149] At the same time, this scheme proposes a driving tendency recognition method, which clusters the collected multiple groups of road vehicle driving trajectory feature sequences to obtain several driving categories that represent different driving habits, and encodes the driving trajectory feature sequence, calculates the attention weight and maps the central sequence of each driving category to obtain the driving tendency analysis results corresponding to each driving category. By extracting the driver's historical vehicle driving trajectory feature sequence, the driver's driving category is determined, the driver's driving tendency is evaluated, and the road safety risk of the road driven by the driver is evaluated in combination with the road complexity, and risk warnings are issued. BRIEF DESCRIPTION OF THE DRAWINGS
[0150] Figure 1 A flowchart of a road safety risk assessment decision-making method based on an artificial intelligence big model provided in one embodiment of the present invention.
[0151] Figure 2 A schematic diagram of the structure of an electronic device for implementing a road safety risk assessment decision-making method based on an artificial intelligence big model provided in one embodiment of the present invention.
[0152] In the figure: 1 electronic device, 10 processor, 11 memory, 12 program, 13 communication interface.
[0153] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0154] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0155] The embodiment of the present application provides a road safety risk assessment decision method based on an artificial intelligence big model. The execution subject of the road safety risk assessment decision method based on the artificial intelligence big model includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the road safety risk assessment decision method based on the artificial intelligence big model can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0156] Embodiment 1:
[0157] S1: Collecting and preprocessing vehicle driving trajectory data on the road to obtain preprocessed vehicle driving trajectory data.
[0158] The step S1 collects the vehicle driving trajectory data on the road and performs preprocessing, including:
[0159] The vehicle driving trajectory data of the road is collected, wherein the collection result of the vehicle driving trajectory data is:
[0160] ;
[0161] .
[0162] in:
[0163] A trajectory data set representing the collected vehicle driving trajectory data;
[0164] represents the nth group of vehicle driving trajectory data collected, and N represents the total number of vehicle driving trajectory data collected;
[0165] Represents the nth group of vehicle driving trajectory data In Track points, Indicates The position coordinates of the trajectory points, Represents the nth group of vehicle driving trajectory data The total number of trajectory points in; the sampling time interval of the position coordinates of adjacent trajectory points is If the position coordinates of the trajectory point are not collected at the position coordinate sampling time, the position coordinates of the trajectory point are marked as NaN.
[0166] The collected vehicle driving trajectory data is preprocessed, wherein the nth group of vehicle driving trajectory data The preprocessing process is:
[0167] S11: Generate the nth set of vehicle driving trajectory data The mask sequence is:
[0168] ;
[0169] .
[0170] in:
[0171] Represents the nth group of vehicle driving trajectory data The mask sequence of
[0172] Indicates location coordinates The mask value of .
[0173] S12: Combined mask sequence Generate vehicle driving trajectory data The vehicle driving trajectory data after completion with the smallest Euclidean distance .
[0174] S13: From the completed vehicle driving trajectory data Extract the mask sequence from The position coordinates of the position where the mask value is 0, for the vehicle driving trajectory data The missing position coordinates of the corresponding positions in are replaced to form the preprocessed vehicle driving trajectory data:
[0175] ;
[0176] .
[0177] in:
[0178] Represents vehicle driving trajectory data The preprocessing results;
[0179] Indicates the vehicle driving trajectory data after completion Middle The position coordinates of the trajectory points;
[0180] Represents the vehicle driving trajectory data after preprocessing Middle The position coordinates of the trajectory points.
[0181] The S12 step combines the mask sequence Generate vehicle driving trajectory data The vehicle driving trajectory data after completion with the smallest Euclidean distance ,include:
[0182] S121: Setting vehicle driving trajectory data The current iteration number is t, the initial value of t is 0, and the iteration threshold is , then the vehicle driving trajectory data The result of the tth iteration is ,in .
[0183] S122: Vehicle driving trajectory data Iteration is performed, where the iteration formula is:
[0184] ;
[0185] g n t (1)= δ ( W 1 [ L n t , mask n ]+ b 1 ) ;
[0186] g n t (2)= δ ( W 2 [ L n t , mask n ]+ b 2 ) ;
[0187] g n t (3)= exp[ W 3 ( g n t (2)⨀ L n t )]-exp[ -W 3 ( g n t (2)⨀ L n t )] exp[ W 3 ( g n t (2)⨀ L n t )]+exp[ -W 3 ( g n t (2)⨀ L n t )] .
[0188] in:
[0189] Represents element-wise multiplication;
[0190] represents the iterative weight parameter of the vehicle driving trajectory data, represents the iterative bias parameter;
[0191] represents an exponential function with a natural constant as base;
[0192] Represents the activation function, and the selected activation function is the ReLU function;
[0193] Represents vehicle driving trajectory data Update information about missing values in ;
[0194] Represents vehicle driving trajectory data Reset information for missing values in ;
[0195] Represents vehicle driving trajectory data Missing values in hide information.
[0196] S123: If , then calculate the missing value supplementary information of the current t+1th iteration result , otherwise go to step S124:
[0197] .
[0198] in:
[0199] Indicates the current t+1th iteration result Supplementary information on missing values ;
[0200] Represents the iteration result Middle The position coordinates of the trajectory points;
[0201] represents the L2 norm, Represents the iteration result Vehicle driving trajectory data the degree of difference between
[0202] represents the L1 norm, Represents the iteration result The degree of missing value filling, Represents vehicle driving trajectory data The mean position coordinates of .
[0203] If missing values are provided If the value is higher than the preset threshold, the iteration result As the completed vehicle driving trajectory data , otherwise go to step S124.
[0204] S124: Order , return to step S122.
[0205] S2: Extract features from the preprocessed vehicle driving trajectory data to obtain a road vehicle driving trajectory feature sequence.
[0206] In the step S2, feature extraction is performed on the preprocessed vehicle driving trajectory data, including:
[0207] Feature extraction is performed on the preprocessed vehicle driving trajectory data, wherein the preprocessed vehicle driving trajectory data The feature extraction process is:
[0208] S21: Calculate the pre-processed vehicle driving trajectory data Trajectory speed characteristics:
[0209] ;
[0210] .
[0211] in:
[0212] Represents the vehicle driving trajectory data after preprocessing Trajectory velocity characteristics;
[0213] Represents the vehicle driving trajectory data after preprocessing middle The speed characteristics of the trajectory road;
[0214] Represents the vehicle driving trajectory data after preprocessing The speed characteristics of the jth trajectory road in , where the jth trajectory road is the road between the j+1th trajectory point and the jth trajectory point, j ∈[1, num n -1 ] ;
[0215] Represents the vehicle driving trajectory data after preprocessing The coordinates of the mid-track point and The Euclidean distance between
[0216] Represents the vehicle driving trajectory data after preprocessing The speed limit of the j-th trajectory road in .
[0217] S22: Calculate and obtain the pre-processed vehicle driving trajectory data The trajectory and heading characteristics are:
[0218] ;
[0219] r n * (j) = arctan[ L n * (j+1,x)- L n * (j,x) L n * (j+1,y)- L n * (j,y) ] .
[0220] in:
[0221] Represents the vehicle driving trajectory data after preprocessing The trajectory and heading characteristics of
[0222] Represents the vehicle driving trajectory data after preprocessing middle The heading characteristics of the trajectory path;
[0223] Represents the vehicle driving trajectory data after preprocessing The heading characteristics of the j-th trajectory road in;
[0224] , Indicates location coordinates The horizontal coordinates in Indicates location coordinates In the vertical direction coordinate of the N-th group of roads, in the embodiment of the present invention, the horizontal direction is the east-west direction, the vertical direction is the north-south direction, and the coordinate center is the geometric center of the N-th group of roads.
[0225] S23: Construct the pre-processed vehicle driving trajectory data The vehicle driving trajectory feature sequence is:
[0226] ;
[0227] F n j = [ v n * (j) , r n * (j) ] T .
[0228] in:
[0229] Represents the vehicle driving trajectory data after preprocessing The vehicle driving trajectory feature sequence;
[0230] Represents the vehicle driving trajectory data after preprocessing The trajectory features of the j-th trajectory road in , T represents the transpose.
[0231] S3: Perform driving state analysis on the extracted vehicle driving trajectory feature sequence, and divide the vehicle driving trajectory feature sequence into different driving categories.
[0232] In step S3, the driving state analysis is performed on the extracted vehicle driving trajectory feature sequence, including:
[0233] The extracted vehicle driving trajectory feature sequence is subjected to driving state analysis, wherein the driving state analysis process is as follows:
[0234] S31: Obtain vehicle driving trajectory feature sequences of N groups of vehicle driving trajectory data.
[0235] S32: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequences and the driving trajectory feature sequence of the pth group of vehicles The sequence distance between , p ∈ [1,N] .
[0236] S33: Set the number of driving categories to K, randomly select K vehicle driving trajectory feature sequences as the initial center sequences of K driving categories, where the initial center sequence of the kth driving category is , k ∈ [1,K] .
[0237] S34: Set the current iteration number of the center sequence of each driving category to z, and the maximum iteration number to Z. Then the z-th iteration result of the center sequence of the k-th driving category is , where the initial value of z is 0.
[0238] S35: Calculate the non-central sequence belonging degree of K central sequences, where the kth central sequence The degree of non-central sequence belonging to is:
[0239] .
[0240] in:
[0241] Represents the vehicle driving trajectory feature sequence of the vth non-central sequence , for the kth center sequence The degree of non-central sequence belonging;
[0242] Represents the characteristic sequence of vehicle driving trajectory With the central sequence The sequence distance between
[0243] represents a control parameter; in the embodiment of the present invention, Set to 3.5.
[0244] S36: Iterate K center sequences, where the iteration formula of the kth center sequence is:
[0245] R k 0 (z + 1) = ∑ v = 1 NK [ U k z (v)] ε R k 0 (z) ∑ v = 1 NK [ U k z (v)] ε .
[0246] S37: Let z=z+1, return to step S35, until the center sequence does not change, and classify the vehicle driving trajectory feature sequences of the non-center sequence into the center sequence with the closest sequence distance, forming K driving categories, where each driving category contains a center sequence and several vehicle driving trajectory feature sequences, and the k-th driving category is:
[0247] R k = { R k e |e∈[0, Sum k ]} .
[0248] in:
[0249] represents the k-th driving category, represents the driving trajectory feature sequence of the e-th vehicle in the k-th driving category, Represents the number of vehicle driving trajectory feature sequences in the kth driving category.
[0250] The sequence distance between any two sets of vehicle driving trajectory feature sequences is calculated in step S32, including:
[0251] S321: Calculate the trajectory feature distances of different trajectory sections in any two sets of vehicle driving trajectory feature sequences, where the trajectory feature With trajectory characteristics The trajectory characteristic distance between is:
[0252] .
[0253] in:
[0254] Trajectory characteristics With trajectory characteristics The trajectory characteristic distance between h ∈[1, num p -1 ] .
[0255] S322: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequences and the driving trajectory feature sequence of the pth group of vehicles The sequence distance between :
[0256] ;
[0257] .
[0258] in:
[0259] Represents the combined trajectory features With trajectory characteristics Iteration distance.
[0260] S4: Perform driving tendency analysis on the central sequence of each driving category as the driving tendency analysis result of the driving trajectory feature sequence of all vehicles in the corresponding driving category, where the driving tendency analysis result includes aggressive, normal and cautious.
[0261] In step S4, the driving tendency analysis is performed on the central sequence of each driving category, including:
[0262] A driving tendency analysis is performed on the central sequence of each driving category, and the driving tendency analysis result of the central sequence is used as the driving tendency analysis result of the driving trajectory feature sequence of all vehicles in the corresponding driving category, and the driving tendency analysis result includes aggressive, normal and cautious.
[0263] The center sequence of the k-th driving category The driving tendency analysis process is as follows:
[0264] S41: Center sequence Encoding process:
[0265] .
[0266] in:
[0267] Represents the central sequence The encoding processing result;
[0268] Represents the maximum pooling operation;
[0269] represents the convolution matrix and * represents the convolution operator.
[0270] S42: Process the encoding result Perform attention weighted encoding:
[0271] ;
[0272] att k 0 = exp(- W 2 * G k 0 ) max{exp(- W 2 * G k e )|e∈[0, Sum k ]} .
[0273] in:
[0274] represents the mapping matrix;
[0275] Indicates the encoding processing result The attention weight of
[0276] max{exp(- W 2 * G k e )|e∈[0, Sum k ]} represents the maximum attention information of all vehicle driving trajectory feature sequences in the kth driving category, represents the encoding processing result of the e-th driving trajectory feature sequence in the k-th driving category;
[0277] Represents the attention weighted encoding result.
[0278] S43: Calculate the attention weighted encoding result Corresponding driving tendency analysis results:
[0279] .
[0280] in:
[0281] Represents the attention weighted encoding result Corresponding driving tendency analysis results;
[0282] These represent aggressive, normal, and cautious driving tendencies, respectively;
[0283] Indicates driving tendency The corresponding mapping matrix;
[0284] will make [ 1 1 + exp(- W label c * A k 0 ) ∑ w=1 3 1 1 + exp(- W label w * A k 0 ) ] Achieving maximum driving tendency as the central sequence The driving tendency analysis results.
[0285] S5: Evaluate the driver's driving tendency according to the preprocessing method, feature extraction method and driving state analysis method, and determine whether there is a road safety risk at present based on the evaluation result.
[0286] In step S5, the driver's driving tendency is evaluated according to the preprocessing method, the feature extraction method and the driving state analysis method, including:
[0287] The driver's driving tendency is evaluated according to the preprocessing method, feature extraction method and driving state analysis method, wherein the driver's driving tendency evaluation process is as follows:
[0288] S51: Obtain the driver's historical vehicle driving trajectory data and perform preprocessing.
[0289] S52: Extract features from the preprocessed historical vehicle driving trajectory data to obtain a historical vehicle driving trajectory feature sequence of the driver.
[0290] S53: Calculate the sequence distance between the historical vehicle driving trajectory feature sequence and the central sequence of the K driving categories, and use the driving category corresponding to the central sequence with the shortest sequence distance as the driving category of the driver.
[0291] S54: Using the driving tendency analysis result corresponding to the driving category as the driver's driving tendency evaluation result.
[0292] The number of turning points on the road the driver is currently driving on is obtained. If the number of turning points on the road is higher than a preset threshold and the driver's driving tendency is evaluated as aggressive, there is a risk of road safety driving and the driver is given a risk warning.
[0293] Embodiment 2:
[0294] like Figure 2 , is a schematic diagram of the structure of an electronic device for implementing a road safety risk assessment decision method based on an artificial intelligence big model provided by an embodiment of the present invention.
[0295] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .
[0296] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also be used to temporarily store data that has been output or is to be output.
[0297] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as the program 12 for implementing road safety risk assessment decisions based on artificial intelligence large models), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0298] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.
[0299] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0300] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0301] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0302] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0303] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0304] The program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0305] The vehicle driving trajectory data of the road is collected and preprocessed to obtain the preprocessed vehicle driving trajectory data.
[0306] The preprocessed vehicle driving trajectory data is subjected to feature extraction to obtain a road vehicle driving trajectory feature sequence.
[0307] The extracted vehicle driving trajectory feature sequence is subjected to driving state analysis, and the vehicle driving trajectory feature sequence is divided into different driving categories.
[0308] The driving tendency analysis is performed on the central sequence of each driving category as the driving tendency analysis result of the characteristic sequence of driving trajectories of all vehicles in the corresponding driving category.
[0309] The driver's driving tendency is evaluated based on the preprocessing method, feature extraction method and driving status analysis method, and it is determined whether there is a road safety risk at present based on the evaluation results.
[0310] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0311] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0312] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0313] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A road safety risk assessment decision-making method based on an artificial intelligence big model, characterized in that: The method comprises: S1: collecting and preprocessing vehicle driving trajectory data on the road to obtain preprocessed vehicle driving trajectory data; S2: extracting features from the preprocessed vehicle driving trajectory data to obtain a road vehicle driving trajectory feature sequence; S3: performing driving state analysis on the extracted vehicle driving trajectory feature sequence, and dividing the vehicle driving trajectory feature sequence into different driving categories; S4: Perform driving tendency analysis on the central sequence of each driving category as the driving tendency analysis result of the characteristic sequence of driving trajectories of all vehicles in the corresponding driving category, where the driving tendency analysis results include aggressive, normal and cautious; S5: Evaluate the driver's driving tendency according to the preprocessing method, feature extraction method and driving state analysis method, and determine whether there is a road safety risk at present according to the evaluation result; In the step S2, feature extraction is performed on the preprocessed vehicle driving trajectory data, including: Feature extraction is performed on the preprocessed vehicle driving trajectory data, wherein the preprocessed vehicle driving trajectory data The feature extraction process is: S21: Calculate the pre-processed vehicle driving trajectory data Trajectory speed characteristics: in: Represents the vehicle driving trajectory data after preprocessing Trajectory velocity characteristics; Represents the vehicle driving trajectory data after preprocessing Medium n - 1 track road speed characteristics; Represents the vehicle driving trajectory data after preprocessing The speed characteristics of the jth trajectory road in , where the jth trajectory road is the road between the j+1th trajectory point and the jth trajectory point, j∈[1,num n -1]; Represents the vehicle driving trajectory data after preprocessing Coordinates of the mid-track point and The Euclidean distance between Represents the vehicle driving trajectory data after preprocessing The speed limit of the jth trajectory road in ; S22: Calculate the pre-processed vehicle driving trajectory data The trajectory and heading characteristics are: in: Represents the vehicle driving trajectory data after preprocessing The trajectory and heading characteristics of Represents the vehicle driving trajectory data after preprocessing Medium n -1 track road heading feature; Represents the vehicle driving trajectory data after preprocessing The heading characteristics of the j-th trajectory road in; Indicates location coordinates The horizontal coordinates in Indicates location coordinates The vertical coordinate in ; S23: Construct the pre-processed vehicle driving trajectory data The vehicle driving trajectory feature sequence: in: F n Represents the vehicle driving trajectory data after preprocessing The vehicle driving trajectory feature sequence; Represents the vehicle driving trajectory data after preprocessing The trajectory features of the j-th trajectory road in , T represents the transposition; In step S3, the driving state analysis is performed on the extracted vehicle driving trajectory feature sequence, including: The extracted vehicle driving trajectory feature sequence is subjected to driving state analysis, wherein the driving state analysis process is as follows: S31: Obtaining a vehicle driving trajectory feature sequence of N groups of vehicle driving trajectory data; S32: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequence F n and the driving trajectory feature sequence F of the pth group of vehicles p The sequence distance between them is Q(F n ,F p ), p∈[1,N]; S33: Set the number of driving categories to K, randomly select K vehicle driving trajectory feature sequences as the initial center sequences of K driving categories, where the initial center sequence of the kth driving category is S34: Set the current iteration number of the center sequence of each driving category to z, and the maximum iteration number to Z. Then the z-th iteration result of the center sequence of the k-th driving category is The initial value of z is 0; S35: Calculate the non-central sequence belonging degree of K central sequences, where the kth central sequence The degree of non-central sequence belonging to is: in: The vehicle driving trajectory feature sequence F(v) represents the vth non-central sequence. For the kth central sequence The degree of non-central sequence belonging to; Represents the vehicle driving trajectory feature sequence F(v) and the center sequence The sequence distance between ε represents the control parameter; S36: Iterate K center sequences, where the iteration formula of the kth center sequence is: S37: Let z=z+1, return to step S35, until the center sequence does not change, and classify the vehicle driving trajectory feature sequences of the non-center sequence into the center sequence with the closest sequence distance, forming K driving categories, where each driving category contains a center sequence and several vehicle driving trajectory feature sequences, and the k-th driving category is: in: R k represents the k-th driving category, represents the driving trajectory feature sequence of the e-th vehicle in the k-th driving category, Sum k represents the number of vehicle driving trajectory feature sequences in the kth driving category; The sequence distance between any two sets of vehicle driving trajectory feature sequences is calculated in step S32, including: S321: Calculate the trajectory feature distances of different trajectory sections in any two sets of vehicle driving trajectory feature sequences, where the trajectory feature With trajectory characteristics The trajectory characteristic distance between is: in: Trajectory characteristics With trajectory characteristics The trajectory feature distance between them, h∈[1,num p -1]; S322: Calculate the sequence distance between any two sets of vehicle driving trajectory feature sequences, where the nth set of vehicle driving trajectory feature sequence F n and the driving trajectory feature sequence F of the pth group of vehicles p The sequence distance between them is Q(F n ,F p ): Q(F n ,F p )=Q(number n -1,number p -1); in: Q(j,h) represents the combined trajectory features With trajectory characteristics Iteration distance.
2. The road safety risk assessment decision-making method based on artificial intelligence big model as claimed in claim 1 is characterized in that: The step S1 collects the vehicle driving trajectory data on the road and performs preprocessing, including: The vehicle driving trajectory data of the road is collected, wherein the collection result of the vehicle driving trajectory data is: L=(L1,L2,...,L n ,...,L N ); L n =(L n (1),L n (2),...,L n (i),...,L n (num n )); in: L represents the trajectory data set of the collected vehicle driving trajectory data; L n represents the nth group of vehicle driving trajectory data collected, and N represents the total number of vehicle driving trajectory data collected; L n (1),L n (2),...,L n (i),...,L n (num n ) represents the nth group of vehicle driving trajectory data L n num n trajectory points, L n (i) represents the position coordinates of the i-th trajectory point, num n Represents the nth group of vehicle driving trajectory data L n The total number of trajectory points in; the time interval for sampling the position coordinates of adjacent trajectory points is Δ. If the position coordinates of a trajectory point are not collected during the position coordinate sampling time, the position coordinates of the trajectory point are marked as NaN; The collected vehicle driving trajectory data is preprocessed, wherein the nth group of vehicle driving trajectory data L n The preprocessing process is: S11: Generate the nth set of vehicle driving trajectory data L n The mask sequence is: mask n =(mask n (1),mask n (2),...,mask n (i),...,mask n (num n )); in: mask n Represents the nth group of vehicle driving trajectory data L n The mask sequence of mask n (i) represents the position coordinate L n (i) the mask value; S12: Combined mask sequence mask n Generate vehicle driving trajectory data L n The completed vehicle driving trajectory data L' with the smallest Euclidean distance n ; S13: From the completed vehicle driving trajectory data L' n Extract the mask sequence mask n The position coordinates of the position where the mask value is 0 are the vehicle driving trajectory data L n The missing position coordinates of the corresponding positions in are replaced to form the preprocessed vehicle driving trajectory data: in: Represents the vehicle driving trajectory data L n The preprocessing results; L' n (i) represents the vehicle driving trajectory data L' after completion n The position coordinates of the i-th trajectory point in ; Represents the vehicle driving trajectory data after preprocessing The position coordinates of the i-th trajectory point in .
3. The road safety risk assessment decision-making method based on artificial intelligence big model as claimed in claim 2 is characterized in that: The step S12 combines the mask sequence mask n Generate vehicle driving trajectory data L n The completed vehicle driving trajectory data L' with the smallest Euclidean distance n ,include: S121: Setting vehicle driving trajectory data L n The current iteration number is t, the initial value of t is 0, and the iteration threshold is T1. Then the vehicle driving trajectory data L n The result of the tth iteration is in S122: Vehicle driving trajectory data Iterate S123: If t+1≥T1, calculate the missing value supplementary information of the current t+1th iteration result Otherwise, go to step S124; If missing values are added If the value is higher than the preset threshold, the iteration result As the completed vehicle driving trajectory data L' n , otherwise go to step S124; S124: Let t=t+1, and return to step S122.
4. The road safety risk assessment decision-making method based on artificial intelligence big model as claimed in claim 1 is characterized in that: In step S4, the driving tendency analysis is performed on the central sequence of each driving category, including: Performing driving tendency analysis on the central sequence of each driving category, and using the driving tendency analysis result of the central sequence as the driving tendency analysis result of the driving trajectory feature sequence of all vehicles in the corresponding driving category, wherein the driving tendency analysis result includes aggressive, normal and cautious; The center sequence of the k-th driving category The driving tendency analysis process is as follows: S41: Center sequence Encoding process: in: Represents the central sequence The encoding processing result; max_pooling(·) represents the maximum pooling operation; W 1 represents the convolution matrix, * represents the convolution operator; S42: Process the encoding result Perform attention weighted encoding: in: W 2 represents the mapping matrix; Indicates the result of encoding processing The attention weight of represents the maximum attention information of all vehicle driving trajectory feature sequences in the kth driving category, represents the encoding processing result of the e-th driving trajectory feature sequence in the k-th driving category; Represents the attention weighted encoding result; S43: Calculate the attention weighted encoding result Corresponding driving tendency analysis results: in: S k Represents the attention weighted encoding result Corresponding driving tendency analysis results; label1, label2, and label3 represent aggressive, normal, and cautious driving tendencies respectively; Indicates driving tendency label c The corresponding mapping matrix; will make Achieving maximum driving tendency as the central sequence The driving tendency analysis results.
5. The road safety risk assessment decision-making method based on artificial intelligence big model as claimed in claim 1 is characterized in that: In step S5, the driver's driving tendency is evaluated according to the preprocessing method, the feature extraction method and the driving state analysis method, including: The driver's driving tendency is evaluated according to the preprocessing method, feature extraction method and driving state analysis method, wherein the driver's driving tendency evaluation process is as follows: S51: Obtain the driver's historical vehicle driving trajectory data and perform preprocessing; S52: extracting features from the preprocessed historical vehicle driving trajectory data to obtain a historical vehicle driving trajectory feature sequence of the driver; S53: Calculate the sequence distance between the historical vehicle driving trajectory feature sequence and the central sequence of K driving categories, and use the driving category corresponding to the central sequence with the closest sequence distance as the driving category of the driver; S54: using the driving tendency analysis result corresponding to the driving category as the driving tendency evaluation result of the driver; The number of turning points on the road the driver is currently driving on is obtained. If the number of turning points on the road is higher than a preset threshold and the driver's driving tendency is evaluated as aggressive, there is a risk of road safety driving and the driver is given a risk warning.
