Vehicle Lane-Changing Safety Pre-Warning Model under the Environment of the Vehicle Networking

: Lane-changing behavior is one of the most common driving behaviors while driving. Due to the complexity of its operation, vehicle collision accidents are prone to occur when changing lanes. Under the environment of vehicle networking, drivers can obtain more accurate trafﬁc information in time, which can be of great help in terms of improving lane-changing safety. This paper analyzes the core factors that affect the safety of vehicles changing lanes, establishes the weight model of inﬂuencing factors of lane-changing behavior using the analytic hierarchy process (AHP), and obtains the calculation method of lane-changing behavior factors (LCBFs). Based on the fuzzy reasoning theory, the headway between the lane-changing vehicle and adjacent vehicles in the target lane was examined, and fuzzy logic lane-changing models were established for both situations (i.e., change to the left and change to the right lane). The fuzzy logic lane-changing models were tested via simulation experiments, and the test results showed that the models have a better warning effect on lane changing (LCBF = 1.5), with an accuracy of more than 90%. Thus, the established model in this paper can provide theoretical support for safety warnings when changing lanes and theoretical support for the sustainable development of transportation safety.


Introduction
Lane changing is one of the most common operations while driving, and it is a behavior that is caused by various factors linked to the traffic environment around the vehicle. Owing to the complexity of lane-changing operations, if a driver misjudges a situation or mishandles their vehicle, traffic accidents are likely to occur [1][2][3]. Numerous studies have analyzed the factors affecting the safety of changing lanes to develop a prewarning model or system to effectively assist drivers in changing lanes safely [4,5]. For example, Huang [6] analyzed driver and road environment factors comprehensively and determined behavioral characteristics in the lane-changing process. Mao [7] established a lane-changing model based on a given driver's driving style using a fuzzy mathematicalstatistical method and achieved different styles of lane-change warning functions. However, the data sample was very small, thereby generating some system errors. Wang [8] analyzed different vehicle collisions that may have been caused by lane changes and created a minimum safe lane-changing model based on various lane-changing situations, which can provide a reference basis for the in-depth investigation of pre-warning safety when changing lanes.
With the development and application of Internet of Vehicles technology, the sharing and exchange of information can be realized through vehicle-to-vehicle and vehicle-toroad communications. Therefore, a driver can accurately identify the traffic environment and traffic conditions around a vehicle while driving [9][10][11][12]. Wu [9] presents a temporal and spatial risk estimation (TSRE) to recognize lane-changing risk in real time. Depending on the driving environment, driving behavior will change substantially. Based on Sustainability 2021, 13, 5146 2 of 16 vehicle-to-vehicle traffic information exchange, Wang [13] optimized the safety and comfort of changing lanes during acceleration and then developed a vehicle lane-changing decision model to improve the safety of lane changing. Zhang [14] proposed a dynamic lane-changing path planning method and established a multisimulation platform based on different tracking control algorithms. The simulation results show that under conditions set by the Internet of Vehicles, drivers can improve the way they change lanes by adjusting their driving strategies and driving paths based on changes in the surrounding vehicles' running states for the purpose of security. Tajeddin [15] designed a multilane adaptive cruise controller which solves lane-specific optimization problems to compute an instantaneous trip cost for each lane and selects the lane that represents the lowest risk. Zhou [16] proposed a driver lane-changing intention recognition method based on principal component analysis (PCA) and a Gaussian mixture model-hidden Markov model (GMM-HMM) and then obtained an early warning model of vehicle lane-changing collision, which determined different collision risk levels to ensure the safety of lane changing. PCA is a statistical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of linearly uncorrelated variables called principal components. GMM is a Gaussian mixture model in which each component has its own weight, mean, and covariance matrix. HMM is a statistical model, which is used to describe a Markov process with hidden unknown parameters. Yang [17] analyzed the relationship between the target vehicle and the front and rear vehicles in the target lane by considering influencing factors, such as longitudinal distance, transverse distance, and speed of the front and rear vehicles in the target lane. Farooq [18] analyzed the effect of significant traffic parameters that can influence traffic safety on lane-change frequency using the studied calibrated values for driving in a logical, "conscious" manner in VISSIM. Huang [19] studied numerical relationships between traffic flow state and model parameters through field investigations in Beijing. Based on the results, it was found that smart lane management can be implemented by optimizing lane-changing spacing intervals and lane-changing behaviors to improve traffic capacity.
Since lane-changing safety is the result of the combined influence of people, vehicles, roads, and the environment, the polymorphism of these factors cannot be ignored [20,21]. Most of the existing literature does not fully examine the influencing factors and rarely considers the combined impact of these four factors [22][23][24][25]. Thus, lane-changing prewarning models are not adaptable and demonstrate poor accuracy. With the development of the Internet of Vehicles, vehicle-to-vehicle and vehicle-to-road communications and the sharing and exchange of traffic information can be realized to comprehensively consider the multiple factors that can affect vehicle lane-changing safety. Therefore, in this study, based on the exchange and sharing of traffic information among vehicles under the Internet of Vehicles, the key factors affecting lane-changing safety are comprehensively analyzed. Moreover, a vehicle lane-changing safety pre-warning model based on fuzzy reasoning control is established using the fuzzy reasoning method, which effectively guides drivers on how to change lanes safely to improve vehicle lane-changing safety and road traffic safety under the Internet of Vehicles. This study can effectively promote the sustainable operation of traffic flow and protection of the traffic environment by reducing the traffic accident rate and promote the development of smart cities [26][27][28].

Schematic Overview
Lane-changing behavior is a complex driving operation, and its safety is affected by driving behavior characteristics, traffic environment, and vehicle characteristics. In the environment of the Internet of Vehicles, drivers can obtain information in a timely manner from both adjacent vehicles and the surrounding environment while in the process of lane changing, which can improve lane-changing safety and traffic safety.
According to the nature of the problem and the general goal to be achieved, the analytic hierarchy process (AHP) decomposes the problem into different components. The factors are aggregated and combined according to different levels to form a multilevel analysis structure model. Thus, the problem is finally attributed to the determination of or relative merits of the relatively important weights of the lowest level relative to the highest level. AHP is more suitable for decision-making problems with hierarchical and staggered evaluation indexes, and the objective value is difficult to describe quantitatively. However, if the division of subobjectives is not accurate or the distribution of weight value is not accurate, the final decision result will be affected. After a comprehensive analysis of the factors that influence lane changing, we introduce the AHP method to establish the weight model of influencing factors and obtain the calculation method of lane-changing behavior factors (LCBFs), which can characterize the combined effect of different influencing factors. Then, the fuzzy reasoning method is employed to fuzzify subjective lane-changing behaviors and establish the lane-changing fuzzy logic models. The flowchart for the proposed framework is shown in Figure 1.
ner from both adjacent vehicles and the surrounding environment while in the process o lane changing, which can improve lane-changing safety and traffic safety.
According to the nature of the problem and the general goal to be achieved, the an alytic hierarchy process (AHP) decomposes the problem into different components. Th factors are aggregated and combined according to different levels to form a multileve analysis structure model. Thus, the problem is finally attributed to the determination o or relative merits of the relatively important weights of the lowest level relative to th highest level. AHP is more suitable for decision-making problems with hierarchical an staggered evaluation indexes, and the objective value is difficult to describe quantita tively. However, if the division of subobjectives is not accurate or the distribution o weight value is not accurate, the final decision result will be affected. After a compre hensive analysis of the factors that influence lane changing, we introduce the AH method to establish the weight model of influencing factors and obtain the calculatio method of lane-changing behavior factors (LCBFs), which can characterize the combine effect of different influencing factors. Then, the fuzzy reasoning method is employed t fuzzify subjective lane-changing behaviors and establish the lane-changing fuzzy logi models. The flowchart for the proposed framework is shown in Figure 1.

Analysis of Factors Affecting Lane Changing
The drivers are susceptible to external environmental factors and their driving ex perience. Thus, they often judge driving conditions and choose a better driving env ronment. However, if the driver misjudges the safety of a lane-changing situation, it ma cause collisions in changing lanes. From the perspective of people-car-road environment, a comprehensive analysis of the factors affecting lane changing can hel effectively identify adverse factors and improve lane-changing safety.
Drivers' characteristics can be analyzed from the aspect of age, gender, drivin skills, and personality, which can affect a drivers' desire of changing lanes, the correc ness of lane-changing maneuver, the lane-changing safety of, etc. [29,30]. The vehicl types can be divided by size: small vehicles, medium-sized vehicles, and large vehicle In general, the performance of small vehicles is the best and has superior flexibility in th lane changing process [31]. If a small car drives behind a large vehicle, it usually change lanes to improve the driving situation. In terms of road conditions, the road line shape the number of lanes, etc. will have an impact on lane-changing safety. If a driver change

Analysis of Factors Affecting Lane Changing
The drivers are susceptible to external environmental factors and their driving experience. Thus, they often judge driving conditions and choose a better driving environment. However, if the driver misjudges the safety of a lane-changing situation, it may cause collisions in changing lanes. From the perspective of people-car-road-environment, a comprehensive analysis of the factors affecting lane changing can help effectively identify adverse factors and improve lane-changing safety.
Drivers' characteristics can be analyzed from the aspect of age, gender, driving skills, and personality, which can affect a drivers' desire of changing lanes, the correctness of lane-changing maneuver, the lane-changing safety of, etc. [29,30]. The vehicle types can be divided by size: small vehicles, medium-sized vehicles, and large vehicles. In general, the performance of small vehicles is the best and has superior flexibility in the lane changing process [31]. If a small car drives behind a large vehicle, it usually changes lanes to improve the driving situation. In terms of road conditions, the road line shape, the number of lanes, etc. will have an impact on lane-changing safety. If a driver changes lanes incorrectly, he/she can easily cause accidents. The driver typically changes lanes to the left frequently to achieve better driving conditions. Regarding the traffic flow environment, because the distance between vehicles under the condition of low-density traffic flow is large, the drivers can drive freely. However, as traffic flow density increases, the distance between vehicles decreases, and the lane-changing difficulty increases, and thereby the driving freedom will be reduced. In this situation, drivers may carefully decide to change lanes based on the safe spacing on the lanes [32,33].
Combined with the above factors, the values of lane-changing influencing factors are illustrated in Figure 2. The values of "Driving personality" are "Impulsive style, Ordinary and Cautions type." The values of "Driving skills" are "Less than half a year, 6 months to 3 years, and More than three years." The values of "Age" are "Elderly, Middle-aged, and Youth." The values of "Gender" are "Male and Female." The values of "Weather" are "Good and Poor." The values of "Traffic conditions" are "Free flow, Emergency vehicles following, and Emergency vehicles following." The values of "Number of lanes" are "Two lanes and More than three lanes." The values of "Vehicle types" are "Big, Middle, and Small." The values of "Vehicle performance" are "Good and Poor." changes lanes to the left frequently to achieve better driving conditions. Regarding the traffic flow environment, because the distance between vehicles under the condition of low-density traffic flow is large, the drivers can drive freely. However, as traffic flow density increases, the distance between vehicles decreases, and the lane-changing difficulty increases, and thereby the driving freedom will be reduced. In this situation, drivers may carefully decide to change lanes based on the safe spacing on the lanes [32,33].
Combined with the above factors, the values of lane-changing influencing factors are illustrated in Figure 2. The values of "Driving personality" are "Impulsive style, Ordinary and Cautions type." The values of "Driving skills" are "Less than half a year, 6 months to 3 years, and More than three years." The values of "Age" are "Elderly, Middle-aged, and Youth." The values of "Gender" are "Male and Female." The values of "Weather" are "Good and Poor." The values of "Traffic conditions" are "Free flow, Emergency vehicles following, and Emergency vehicles following." The values of "Number of lanes" are "Two lanes and More than three lanes." The values of "Vehicle types" are "Big, Middle, and Small." The values of "Vehicle performance" are "Good and Poor." Under the environment of the Internet of Vehicles, the sharing and exchange of information can be realized through vehicle-to-vehicle and vehicle-to-road communications. Therefore, a driver can accurately identify the traffic environment and traffic conditions around the vehicle when driving. Compared with the traditional driving environment, the drivers' driving behavior will be substantially changed.

Analysis on the Importance of Lane-Changing Influencing Factors
From the above analysis, it can be determined that lane changing is affected mainly by driver characteristics, vehicle characteristics, traffic conditions, etc. [34,35]. Since various factors have different influence degrees on lane changing, this paper mainly studied the value of factor k, which affects the lane-changing behavior. By querying the data and conducting a questionnaire survey on 100 drivers, relevant driver characteristic data are analyzed statistically. The factors affecting lane changing are analyzed at the hierarchical level using the AHP [36]. Thus, the influencing factors of lane changing can be structured according to the basic principles of the AHP. The first layer is set as the target layer A, the second layer B is set as the constraint layer, and the third layer C is set as the sub constraint layer. The first layer is "Influencing factors of lane changing." The second layer B includes three factors: Driving characteristics (B1), Road traffic environment (B2), and Vehicle features (B3). The B1 layer includes Driving personality (C1), Driving skills (C2), Age (C3), and Gender (C4). The B2 layer includes Weather (C5), Traffic conditions (C6), and Number of lanes (C7). The B3 layer includes Vehicle types (C8) and Vehicle performance (C9). Under the environment of the Internet of Vehicles, the sharing and exchange of information can be realized through vehicle-to-vehicle and vehicle-to-road communications. Therefore, a driver can accurately identify the traffic environment and traffic conditions around the vehicle when driving. Compared with the traditional driving environment, the drivers' driving behavior will be substantially changed.

Analysis on the Importance of Lane-Changing Influencing Factors
From the above analysis, it can be determined that lane changing is affected mainly by driver characteristics, vehicle characteristics, traffic conditions, etc. [34,35]. Since various factors have different influence degrees on lane changing, this paper mainly studied the value of factor k, which affects the lane-changing behavior. By querying the data and conducting a questionnaire survey on 100 drivers, relevant driver characteristic data are analyzed statistically. The factors affecting lane changing are analyzed at the hierarchical level using the AHP [36]. Thus, the influencing factors of lane changing can be structured according to the basic principles of the AHP. The first layer is set as the target layer A, the second layer B is set as the constraint layer, and the third layer C is set as the sub constraint layer. The first layer is "Influencing factors of lane changing." The second layer B includes three factors: Driving characteristics (B1), Road traffic environment (B2), and Vehicle features (B3). The B1 layer includes Driving personality (C1), Driving skills (C2), Age (C3), and Gender (C4). The B2 layer includes Weather (C5), Traffic conditions (C6), and Number of lanes (C7). The B3 layer includes Vehicle types (C8) and Vehicle performance (C9).
Three layers are analyzed in this study. The hierarchy of the influencing factors determines the structure of the matrix. A comparative analysis of the importance of each influencer affecting lane-changing safety is conducted, with the degree of importance defined as the greater the relative weight, the greater the importance of its impact. The results of the judgments on important factors are standardized, as shown in Table 1 [37,38]. According to the hierarchy in Figure 3, the characteristics of lane changing are analyzed using the AHP. The construction of the judgment matrix and calculation of the relative weights areas are shown in Tables 2-7. A consistency test is conducted on the combined weight, and the value of CR (less than 0.10). The results show that the combined weight meets the consist quirements. The combined weight value in Table 7 can be very intuitive for dete the influence degree of different driver characteristics on changing lanes.
The LCBF is used to characterize the combined effect of different influencing (C1-C9). Based on the combined weight Aω of the above nine factors, the value lane-changing behavior factor (LCBF) can be calculated by the following Equatio

Lane-Changing Rules
To establish an accurate lane change model under the environment of the In Vehicles, accurate classification of driving behaviors and processing data of driv tion when changing lanes are necessary. The target vehicle can obtain the drivin of other vehicles during lane changing, such as acceleration, speed, and space [39 same time, it can send its driving information and intentions to the surrounding v    The calculation results of the matrix and relative weights are assessed by using the data in Table 2. The variable A stands for the contrast matrix. The variable w stands for the relative weight. These values of w constitute the weight vector. A consistency test is conducted, and the following is obtained:

Fuzziness of Lane-Changing Behavior
(1) Determine the maximum characteristic root λ max of the matrix, the calculation is as follows: (2) Consistency check, where CI stands for the consistency index. The ranking weights in this layer demonstrate complete consistency when CI = 0. When CI increases, the ranking weights in this layer  Table 3 [35]. Owing to different standards, the value of RI will be biased. Thus, the consistency check coefficient CR is defined with the ratio of CI and RI, as follows: According to the principle of consistency test, when CR < 0.10, the matrix exhibits satisfactory consistency [35]. Otherwise, there is no satisfactory consistency, and the matrix must be readjusted.
The values of CI and CR can be obtained by substituting the data: CI = 0.05, CR = 0.09 < 0.10. The results show that the judgment matrix is consistent with the consistency test. Table 4. Relative weights of the constraint layer and subconstraint layer.   Only two contrast factors meet the consistency requirements. The combined weight of the subconstraint and target layers can be obtained by combining the results in the tables, as shown in Table 7. A consistency test is conducted on the combined weight, and the value of CR is 0.005 (less than 0.10). The results show that the combined weight meets the consistency requirements. The combined weight value in Table 7 can be very intuitive for determining the influence degree of different driver characteristics on changing lanes.
The LCBF is used to characterize the combined effect of different influencing factors (C1-C9). Based on the combined weight Aω of the above nine factors, the value k of the lane-changing behavior factor (LCBF) can be calculated by the following Equation (5):

Lane-Changing Rules
To establish an accurate lane change model under the environment of the Internet of Vehicles, accurate classification of driving behaviors and processing data of driver's motion when changing lanes are necessary. The target vehicle can obtain the driving status of other vehicles during lane changing, such as acceleration, speed, and space [39]. At the same time, it can send its driving information and intentions to the surrounding vehicles.

Fuzziness of Lane-Changing Behavior
Fuzzy control is a computer control method composed of fuzzy collection, fuzzy language knowledge expression, and fuzzy logic reasoning [40][41][42]. Owing to the complexity of changing lanes and the different driving characteristics of drivers, it is difficult for reproducing the lane-changing process with precise mathematical models. Fuzzy control theory can fuzzify subjective lane-changing behaviors and define the parameter variation with language logic, which can restore the change mechanism in driving behaviors. Combined with the lane-changing rules, the flowchart in Figure 4 can be used to develop lane-changing fuzzy reasoning according to the fuzzy logic principle.
for reproducing the lane-changing process with precise mathematical models. Fuzzy control theory can fuzzify subjective lane-changing behaviors and define the parameter variation with language logic, which can restore the change mechanism in driving behaviors. Combined with the lane-changing rules, the flowchart in Figure 4 can be used to develop lane-changing fuzzy reasoning according to the fuzzy logic principle.

Leftward Lane-Changing Model
Before the target vehicle A changes lanes to the left, vehicle-to-vehicle communica-  Changing lanes largely depends on the subjective characteristics of drivers. To obtain a comfortable driving condition, drivers will choose to change lanes to the left or right on a nondirectional basis. The specific lane-changing conditions are described as follows: when D 3 < D 0 , that is, the head gap between the target vehicle and front vehicle on the same lane is less than the safe head gap threshold, and when the driver is dissatisfied with the driving conditions in the current lane, he/she will choose to change lanes to achieve the desired driving environment. Under the environment of the Internet of Vehicles, lane-changing factors and conditions can be monitored in real time, and vehicle sensors can determine the lane-changing safety S according to the head gap between the target vehicle and front vehicle on the adjacent lane. When the lane-changing safety S L or S R is greater than the minimum safety S K , the drivers can achieve a safe lane changing to the left or right.

Leftward Lane-Changing Model
Before the target vehicle A changes lanes to the left, vehicle-to-vehicle communication was used to collect the data on the head gap of front vehicle B on the current lane D 3 , the head gap of vehicles C and D on the left lanes D 1 , D 2 , and feedback to vehicle A. The onboard system determines the safety of lane-changing S L , judges whether the target vehicle meets the requirements of changing lanes to the left, and sends a safety pre-warning to the driver. The model is shown in Figure 5.

Model Parameters
In the fuzzy logic model, three input variables and one outpu and output variable is L S . The dimensions of input and output variab

Model Parameters
In the fuzzy logic model, three input variables and one output variable are set, where variable is S L . The dimensions of input and output variables directly affect the realtime performance of the fuzzy reasoning model. The original input variables need to be corrected to input variable 1 (D 2 (t) − D 3 (t)) and input variable 2 (D 1 (t)) to enhance the real-time performance of the models and the authenticity of the simulation results. Thus, this processing can realistically and accurately reflect the characteristics of behavior for changing lanes to the left.

Fuzzification
The input of the fuzzy controller must be fuzzified before it can be used to control the solution of the output. The domains of the input variable and the output variable can be converted into a standard fuzzy subset on the basis of the summary of the driver's experience. The domain relationships of the three controls are as follows: (1) Input variable 1: With selecting the membership function of variables, the different shapes of membership function represent different control meanings. The sharp shape reflects that the fuzzy collection has high resolution and control sensitivity. The wide shape is the opposite. Combined with the actual control requirements of this study, the sharper the shape of the membership function of the safe lane change, the higher the resolution of the system, and the higher the control sensitivity. Thus, a triangular membership function was used to convert the domain of the variable to the corresponding fuzzy subset, as shown in the following Figure 6, Figure 7, Figure 8.

Fuzzification Rules
In accordance with the rules for fuzzification designed by the expert's op experience, the fuzzy control for changing lanes to the left is standardized as foll smaller the distance difference of the head gap between vehicle D and vehicle B, smaller the time interval between the head gap of the vehicle A and vehicle C, t dangerous for changing lanes. The language rules of fuzziness used are as fo 2 3 ( ) ( ) D t D t  is NB and 1 ( ) D t is NB, then L S is NB. Therefore, 25 rules for cation are listed, as shown in Table 8.

Fuzzification Rules
In accordance with the rules for fuzzification designed by the expert's op experience, the fuzzy control for changing lanes to the left is standardized as follo smaller the distance difference of the head gap between vehicle D and vehicle B, smaller the time interval between the head gap of the vehicle A and vehicle C, th dangerous for changing lanes. The language rules of fuzziness used are as fol 2 3 ( ) ( ) D t D t  is NB and 1 ( ) D t is NB, then L S is NB. Therefore, 25 rules for cation are listed, as shown in Table 8.

Fuzzification Rules
In accordance with the rules for fuzzification designed by the expert's operating experience, the fuzzy control for changing lanes to the left is standardized as follows: the smaller the distance difference of the head gap between vehicle D and vehicle B, and the smaller the time interval between the head gap of the vehicle A and vehicle C, the more dangerous for changing lanes. The language rules of fuzziness used are as follows: If D 2 (t) − D 3 (t) is NB and D 1 (t) is NB, then S L is NB. Therefore, 25 rules for fuzzification are listed, as shown in Table 8.

Antifuzzification Processing
In accordance with the fuzzy decision, the output of the controller is a fuzzy vector. In accordance with the precise input, output variables, membership function, and the 25 fuzzy rules in Table 8, antifuzzy processing is performed on the fuzzy logic with changing lanes to the left on MATLAB/fuzzy module. A clear value is obtained, that is, the safety S L of changing lane to the left. A fuzzy logic model for changing lanes to the left is obtained through the simulation, as shown in Figure 9.

Antifuzzification Processing
In accordance with the fuzzy decision, the output of the controller is a fu In accordance with the precise input, output variables, membership function, fuzzy rules in Table 8, antifuzzy processing is performed on the fuzzy logic w  ing lanes to the left on MATLAB/fuzzy module. A clear value is obtained,  safety of changing lane to the left. A fuzzy logic model for changing lane is obtained through the simulation, as shown in Figure 9. As shown in the simulation model 3D diagram, when the vehicle chang the left, the safe range of headway between vehicle A and vehicle C is (2, range of headway difference between vehicle A and D and between vehicle A 2). In general, the greater the head gap is, the higher the lane-changing safet versa. Thus, the gap range between vehicles A and C should be greater than th the two vehicles. The headway of vehicles A and D should be the length of greater than the headway of vehicles A and C. The simulation results show th warning model can provide real-time security for changing lanes, which assi to change lanes safely.

Rightward Lane-Changing Model
The model for changing lanes to the right and the model for changing l left are symmetrical. The safety relationship between the target vehicle and a hicles is similar, and the treatment process of influencing factors is similar modeling process is not repeated, and only the final simulation results are g section. The fuzzy logic model for lane changing to the right through MAT control simulation is shown in the following Figures 10-13. As shown in the simulation model 3D diagram, when the vehicle changes lanes to the left, the safe range of headway between vehicle A and vehicle C is (2,3), the safe range of headway difference between vehicle A and D and between vehicle A and B is (1,2). In general, the greater the head gap is, the higher the lane-changing safety, and vice versa. Thus, the gap range between vehicles A and C should be greater than the length of the two vehicles. The headway of vehicles A and D should be the length of one vehicle greater than the headway of vehicles A and C. The simulation results show that the early warning model can provide real-time security for changing lanes, which assists vehicles to change lanes safely.

Rightward Lane-Changing Model
The model for changing lanes to the right and the model for changing lanes to the left are symmetrical. The safety relationship between the target vehicle and adjacent vehicles is similar, and the treatment process of influencing factors is similar. Thus, the modeling process is not repeated, and only the final simulation results are given in this section. The fuzzy logic model for lane changing to the right through MATLAB fuzzy control simulation is shown in the following Figures 10-13.
As shown in the simulation model 3D diagram, when the vehicle changes lanes to the right, the safe range of headway between vehicles A and C is (2,3), the safe range of headway difference between vehicles A and D and between vehicles A and B is (0.5, 2). In theory, the greater the head gap, the higher the safety of the vehicle for lane changing, and vice versa. Thus, the gap range between the target vehicles A and C should be greater than the length of the two vehicles. The headway of vehicles A and D should be half of a vehicle's length greater than the headway of vehicles A and C.          As shown in the simulation model 3D diagram, when the vehicle ch the right, the safe range of headway between vehicles A and C is (2, 3), the headway difference between vehicles A and D and between vehicles A and theory, the greater the head gap, the higher the safety of the vehicle for l and vice versa. Thus, the gap range between the target vehicles A and greater than the length of the two vehicles. The headway of vehicles A an half of a vehicle's length greater than the headway of vehicles A and C.

Experimental Text and Discussion
Through a large number of literature searches, it is found that the test test methods (such as simulation test, or test in actual driving environmen ferent vehicle lane-changing warning models, and the test parameter setti ent, which may cause some differences in test results. Therefore, this stud rectly compare with other existing models but uses a simulation experimen effectiveness of the models. This is also one of the methods used to verify ness of the models in many research studies in the literature.

Experimental Text and Discussion
Through a large number of literature searches, it is found that the test environment, test methods (such as simulation test, or test in actual driving environment, etc.) of different vehicle lane-changing warning models, and the test parameter settings are different, which may cause some differences in test results. Therefore, this study does not directly compare with other existing models but uses a simulation experiment to verify the effectiveness of the models. This is also one of the methods used to verify the effectiveness of the models in many research studies in the literature.
Through It is the comprehensive evaluation value of nine influencing factors. The smaller the LCBF is, the poorer the comprehensive lane-changing condition is. The models will give different safety degrees for different LCBFs. After the above calculation and analysis, the range of LCBF value is (0.5, 1.5). Thus, the new expression of a lane-changing safety degree is defined as follows: Thus, we set up three lane-changing scenarios, in which the value (k) corresponding to the LBCF is 0.5, 1.0, and 1.5, respectively. The models will give different the safety degree of lane changing.
All the 150 lane-changing behaviors collected are safely completed lane-changing behaviors. The test results of the model are shown in Tables 9 and 10. From the data of Table 9, when LCBF = 1.5, the fuzzy logic model gives 2 times within the value of safety degree is (0, 0.6), 7 times within the value of safety degree is (0.6, 1.0), and 91 times when the value of safety degree is 1.0.
As all the 100 leftward lane-changing behaviors collected are the safely completed lane-changing behaviors, and thus, the fuzzy logic model should give more times with the safety degree of 1. From the data of the rightmost column in Table 9 (the value of the safety degree is 1.0), it can be inferred that the fuzzy logic models have the best test results when LCBF = 1.5, and the worst test results when LCBF = 0.5. It shows that the models have a better warning effect on lane changing (LCBF = 1.5), and a worse warning effect (LCBF = 0.5). Under three different values of the LCBF, the number of times the model gives a safety degree value of 1.0 is 91, 83, and 72; thus, the percentage is 91%, 83%, and 72%, respectively.  From the data of the rightmost column in Table 10 (the safety degree is 1.0), it can be inferred that the fuzzy logic models also have the best test results when LCBF = 1.5, and the worst test results when LCBF = 0.5. It still shows that the models have a better warning effect on lane changing (LCBF = 1.5). Under three different values of the LCBF, the number of times the model gives a safety degree value of 1.0 is 46, 42, and 36; thus, the percentage is 92%, 84%, and 72%, respectively.

Conclusions
The environment of the Internet of Vehicles creates a good communication environment and driving environment for changing lanes, which improves the safety of lane changing. In this study, the lane-changing behavior and the factors affecting lane-changing safety were analyzed systematically in the environment of Internet of vehicles. The importance of the factors was explored by using AHP method. Then, the headway between the lane-changing vehicle and adjacent vehicles is reasoned based on fuzzy reasoning, and then the safety pre-warning models for changing lanes are established. Finally, some conclusions are obtained as follows via simulation experiments: (1) The lane-changing behavior is caused by the combined effects of many influencing factors. After the importance analysis of safety influencing factors by using the AHP method, it is obtained that the important factors are driver characteristics, vehicle types, and road conditions when changing lanes, and then the combined weights are weighted to obtain the calculation method of lane-changing behavior factors. (2) Since it is difficult to analyze lane-changing behavior with accurate mathematical models, it can better restore lane-changing driving behavior by using fuzzy control theory to fuzzify the subjective lane-changing behavior. Thus, the headway between the lane-changing vehicle and adjacent vehicles is reasoned based on fuzzy reasoning, and the fuzzy logic models for changing lanes are obtained. The models can give a certain safety degree for changing lanes, which can provide safety instructions for drivers to change lanes safely. Informed Consent Statement: "Not applicable" for studies not involving humans.

Data Availability Statement:
All data used to support the findings of this study are included within the article.