The internet-of-vehicle traffic condition system developed by artificial intelligence of things

An Internet-of-Vehicle (IoV) system primary transmits traffic information and various kinds of emergency notices through Vehicle-to-Vehicle (V2V) or Vehicle-to-Infrastructure (V2I); however, the transmission of multimedia enables drivers to control route conditions better, such as road obstacles and the range of a construction site. Additionally, car accidents usually require relevant video records of the scene for investigation; surrounding cars could transfer the accident scene videos to help the police restore the detailed situation. Meanwhile, the multimedia messages of IoV need to go through security verification and privacy protection for the system to deliver push notifications and multimedia messages to social groups instantly. The study aims to construct an IoV traffic condition system developed by Artificial Intelligence of Things (AIoT); the data transmitting method of this research is via the 6th Generation Network (6G Network), which has advantages of high transmission speed and Quality of Service (QoS) guarantee. Furthermore, the suggested system employs federated learning to ensure message security and privacy. The features of the researched system are: 1. Use Faster Region-based Convolutional Neural Networks (R-CNN) to recognize the objects in cameras and judge if there are road obstacles and any constructions; 2. Capture car accident videos through federated learning, and send the encrypted evidence to relevant legal units; 3. Use push notifications to send multimedia messages to social groups instantly, marking the locations and the road conditions to help drivers control the conditions with the surroundings. This study expects to delivering videos and Global Positioning System (GPS) data for road condition recognition, improving driving safety. The features of the approach developed in this article are different from those IoV alarms presented in past research that requires drivers to enter messages for notifying nearby cars. Instead, this research utilizes Faster R-CNN to recognize road conditions and transmit information to base stations, and the base stations will pass the information to other vehicles. The federated learning technique in this article can enhance the Faster R-CNN model’s accuracy in each car.


Introduction
In recent years, the concepts of Smart City and Internet of Vehicle (IoV) have gradually become a part of the Internet of Things (IoT) development in the new generation.Intelligent transport systems have been developing for years, aiming to smoothen traffic and help drivers control road conditions through IoV.Currently, traffic messages are mainly texts; yet, words sometimes might be difficult for drivers to understand actual road conditions and the range of influence.Additionally, although there are surveillance cameras at several important junctions and roads to monitor traffic congestion, the equipment is not universal.Meanwhile, many road conditions require videos to record relevant conditions, support responsible units to handle situations, such as accidents and the ranges of obstacles; if there are more cars to provide relevant videos, they could help clarify road conditions and offer evidence.Drivers cannot operate on-board devices to send messages or observe road conditions constantly while driving; therefore, it is essential for on-board devices to be more intelligent in judging road conditions, sending abnormal situations to the sever and legal units, and providing only essential road information to drivers instead of offering other unnecessary messages to distract users.
There are two types of data communication in IoV, Vehicle-to-Vehicle (V2V) and Vehicle-to-Infrastructure (V2I).The government needs to install massive wireless equipment to be the repeater stations for V2I communication, which may have higher installation cost; while in V2V communication, data packets may be lost when vehicles move at high speeds, failing to deliver the data to assigned destinations.Moreover, both V2V and V2I transmit over IEEE 802.11p that only deliver between short distances, causing relevant issues like handoff or packet delivery.If a malicious car attempted to implement a broadcast storm attack, it would paralyze the entire network; hence, a network management mechanism to control the data transmission is critical.Because the fixed equipment of IoV requires the government to install massively, and the drivers need to operate the system to transmit messages, which may cause safety issues.If we expect to construct the universal devices for constituting IoV, such as dashboard cameras, these devices should judge real-time road conditions intelligently and share the data to third parties or nearby cars based on drivers' privacy agreement.Regarding the networks, the system will need stable and high coverage of mobile communication to increase the stability of packet delivery, which also ensures vehicle privacy and data security through effective identity authentication.
Today, many cars have installed dashboard cameras, and many of those have equipped with a network communication function.Thus, it is possible to judge road conditions by recognizing objects in the videos of dashboard cameras and sharing the conditions with legal third parties, such as the department of transportation or police stations.This article utilizes two types of records in dashboard cameras to judge road conditions.Firstly, identify the objects from the videos to confirm road 1 3 The internet-of-vehicle traffic condition system developed… conditions, such as any roadworks signs in the videos.Secondly, pinpoint car locations, driving speeds, and directions by the built-in Global Positioning System (GPS) in the cameras; the speeds from the GPS information help the system to judge if there is any traffic congestion.This study identifies the dashboard camera data by Artificial Intelligent (AI) technology and delivers road conditions automatically instead of requiring drivers to enter relevant information personally, which makes IoV more intelligent.As many cars have installed dashboard cameras, this will significantly reduce the IoV hardware installation cost.Furthermore, employing federated learning, the system enables cameras to update parameters.For achieving an optimal solution in federated learning, the system conducts gradient descent to enhance recognition accuracy.For identifying the objects in videos, the study utilizes Faster Region-based Convolutional Neural Networks (R-CNN) to check if there are roadworks signs or other obstacles on the road.Afterward, adding GPS information to confirm the driving speed and direction for judging the level of traffic congestion.Finally, the system will use machine learning to segment road conditions and then implement the push notification system to share road conditions and relevant videos, helping to notify other cars about the situation.It protects drivers' privacy via federated learning to avoid tapping and stealing video data.The suggested system in this article fulfills the safety requirement of IoV, ensuring data transmission security.

Related works
The research primarily focuses on IoV intelligent identification system.Reference [15] presents a novel elliptic-curve encryption technique.Due to the fixed curve length of the elliptic curve, the system will encounter hardware compatibility in the on-board platform; hence, the technology utilizes dynamic curve lengths and random keys to ensure data transmission security for both sides.Reference [14] offers an approach for vehicles to produce anonymity for k times because IoV requires private and conditional tracking; therefore, cars need to be anonymous.As each anonymity will cause workload to the centralized server, the study approach sets cars and servers to produce anonymity from random keys for k times.In Reference [6], the research demonstrates that drones carry radar to support IoV and industrial sensors to transmit messages, avoiding data packet lost in short-distance delivery.Reference [10] proposes a self-driving application in IoV, which requires each car to send messages intensively to ensure the movement conditions.IEEE 802.11p is mainly for short-distance transmission for GPS to locate cars in general conditions; nonetheless, in complicated road situations, one-dimensional positioning may cause safety concerns.Thus, the research creates a two-dimensional positioning method for the system to locate cars.In Reference [2], the study points out that drones can build base stations in the cloud, regularly collecting the data from IoT sensors; equally, IoV can use the same theory, which benefits packet collection.
With the popularity of AI, to implement real-time applications requires stable and fast network communication.The applications combined with the 6th Generation Network (6G Network) in Reference [18] are AI, blockchain, and big data; the one terahertz (THz) transmission speed of 6G Network enables these applications to achieve real-time functions.Reference [3] reveals that the 5th Generation Network is primarily for supporting IoT functions, while the 6G Network provides the features of low latency and high Quality of Service (QoS).The 6G Network offers applications in AI, quantum computing, and relevant technologies, and it can attain realtime connections, such as Augmented Reality (AR) and Virtual Reality (VR).Reference [13] proposes a method to obtain 6G Network's real-time feedback in machine learning; moreover, the article discusses that applications in smart healthcare help obtain synchronous surgery and remote control because of the 6G Network's high transmission speed.In Reference [1], the article utilizes dynamic bandwidth in part of the network communication, regularly recycling unused bandwidth for other devices to use; by using Multiple-Input and Multiple-Output (MIMO) technique to achieve low latency and low loss rate.
This research adopts federated learning to ensure driving safety.In previous studies, Reference [16] suggests distributing data in various places and sharing relevant parameters in machine learning.To obtain an optimal solution, Reference [16] uses gradient descent to reach optimal solutions continuously and shares part of the parameters in different devices, optimizing the machine learning.Reference [11] improves the efficiency of edge computing through federated learning.IoT conducts intelligent computing when receiving data, but sending data to the centralized server will cause calculation loads.Therefore, the study conducts the calculation in IoT equipment, allowing the smart calculation to reach optimal solutions; each IoT equipment can further update relevant AI parameters, reaching higher accuracy.The federated learning application suggested in Reference [19] can provide privacy protection on personal devices.The system will consume massive data transmission and power to update all models; hence, it is necessary to optimize all models and only deliver those different parameters to reduce communication cost.Reference [8] points out that all of the data in an intelligent factory are confidential; thus, federated learning can help update and optimize machine parameters without leaking sensitive data.Meanwhile, Reference [12] mentions that every massive equipment update will cause communication workload; hence, apart from conducting partial updates, it is also necessary to do data compression.Reference [12] compares the accuracy and communication costs of the three experiments.The first method is to update all models, the second one is partial updates with data compression, and the third one is to conduct device self-training.The results prove that the second method indeed lowers communication costs and still obtains excellent accuracy.Reference [9] shows that there are many data transmission in IoV; yet, IoV usually has a higher packet loss rate; hence, the study employs blockchain to save and verify messages, protecting cars' privacy and message security verification.Finally, Reference [4] suggests that if each car in IoV uses federated learning techniques, the approach will allow cars to judge IoT conditions and reduce IoV communication cost.In Reference [5], the study discusses that the federated learning technique requires many devices to provide model parameters to improve recognition accuracy, and the incentive scheme offered in Reference [5] can support parameters for the model training.[7] demonstrates the network security mechanism for the federated learning model, helping increase security and privacy.The federated learning model in Reference 1 3 The internet-of-vehicle traffic condition system developed… [17] primary learns network usage conditions to enrich the network dormancy and optimize the network.Our research employs the communication between dashboard cameras and base stations to judge road conditions.The research also presents a network security mechanism based on bilinear pairing technology, ensuring the security and privacy of federated learning.Additionally, our model uses the 6G Network to improve the transmission speed of videos and signals.
This article utilizes Faster R-CNN to identify objects, judge road conditions, and share messages and videos by push notifications with drivers in the social group.Additionally, with the federated learning technique, the study improves the model parameters of dashboard cameras in cars to enhance recognition accuracy.

The proposed scheme
This Section will introduce the system model (3.1), 6G Network Transmission Setting and Privacy Protection (3.2), Faster R-CNN (3.3), Federated Learning (3.4), and Congestion detection and Machine Learning (3.5).

System model
The system model of this study is shown in Figure 1; it assumes that every vehicle has installed a dashboard camera with 6G Network functions and a GPS sensor, and both metropolitan and rural areas have built 6G Network base stations for sufficient Internet services.When an accident happened between Car V p,3 and Car V p,2 , cars passed the scene can share the videos and GPS information from their dashboard cameras for judging the details and point out the location for third-party legal units to implement the standard operating procedure.On the other hand, when the camera on Car V p,6 captures a roadworks sign, the camera will identify objects from the videos and send the video clip with relevant information as a push notification.Furthermore, the system will judge traffic jams from the videos on dashboard cameras and deliver notifications to responsible units.The cryptography between cars and base stations will conduct identification authentication and produce anonymous IDs to avoid malicious tracking.All videos and messages will only send between base stations and cars, avoiding hackers amend the messages maliciously or forge identities.The 6G Network's SIM card can do authentication at base stations, evading the situations of forged base station sites to steal car information Figs. 1, 2, 3, 4, 5, 6, 7, 8.The information security in base stations can ensure drivers' identification and data privacy.The study assumes that the 6G network has covered each road, and every vehicle's dashboard camera has downloaded the updated model parameter regularly from a base station to improve the recognition accuracy of Faster R-CNN.Afterward, the dashboard camera will take videos and judge road conditions, as well as delivering the results to a base station.There will be data protection and authentication mechanisms between the base station and the car.Because messages need to be transmitted between dashboard cameras and base stations to ensure the connection quality, cameras will send GPS signals to base stations regularly for the station to check if there are traffic jams.Whenever an identification error occurs in a dashboard camera, the system will send the model parameter to a base station to implement training and improve the recognition accuracy of Faster R-CNN.The internet-of-vehicle traffic condition system developed…

6G network transmission setting and privacy protection
This article uses the 6G Network for IoV transmission, and the speed can be up to 1 THz; it assumes that the 6G Network supports MIMO technology and possesses the priority processing mechanism for data packets.Meanwhile, the IoV of this study will need to implement privacy protection by identifying drivers' authentication from the serial number on SIM cards.The system employs bilinear pairings to process identification authentication, private communication, and develop anonymous IDs.Firstly, using the public key PR ID t,B i and private key PR ID t,B i from a base station to proceed with private communication, and car ID t,V i will send encrypted SIM card information and the private key to the base station through the public key, which is , where SIM ID t,V i Fig. 5 Faster R-CNN experiment results

3
The internet-of-vehicle traffic condition system developed… is the SIM card serial number of the car, CK ID t,V i is the key from symmetric encryption between the base station and the car, and h ID t,V i is the vehicle's anonymous ID.When the base station receives an encrypted message from a car, it will decrypt the data with a private key and build the symmetric encryption by CK ID t,V i .
The calculation for the car's anonymous ID is the base station will transmit the encrypted message back to the car, , where H represents the Hash function.Consequently, other cars or hackers cannot derive h ID t,V i and ID t,V i from ID p,V i .If a car sent a malicious message or attempted to conduct a hacker attack, we could find out the actual identity of the car from h ID t,V i and ID t,V i .

Faster R-CNN
Our study recognizes objects by Faster R-CNN, as Figure 2 demonstrates.The selective search theory is similar to image segmentation, applying a hierarchical grouping algorithm to generate object proposal.Because of the hierarchical relationship between objects, the sizes of the objects will become uncertain in images; thus, the selective search will consider every large or small area altogether.The system utilizes similarities to proceed with image segmentation, merging alike blocks if the similarities are high by the formula, d Afterward, the process will calcu- late eigenvalues by the input image I and filter F after segmenting the image.The formula of convolutional layers is: The internet-of-vehicle traffic condition system developed… Next, output the convolutional layers on RGB images: The pooling layer calculation is: Finally, the eigenvalue formula is: Afterward, define the loss function of Region Proposal Network (RPN) as: With the RPN calculation, we can find some Region of Interests (ROIs) to match the image features.By inputting the values into ROIHead to sort ROIs and divide them into various categories and refine the locations of those ROIs.
The CNN model will correct the parameters and further amend the weights W for the parameters in the loss function as W ← W − ΔW , generating a partial differen- tial equation for the loss function as: Assuming the learning rate as ∈ (0, 1] , and amended the parameter as b ← b − Δb , the inverse function of the corrected weights in the pooling layer becomes ΔP(i, j) = F −1 (Δf ) .The corrected value of convolutional layers can be derived from amplifying the pooling layer.Therefore, the corrected value of the convolutional layers is: Set the learning rate as ∈ (0, 1] , and we can obtain the corrected parameter from b i ← b i − Δb i .

Federated learning
The research identifies road conditions from dashboard cameras.Set the dataset D i in videos as D i = d 1 ∩ d 2 ∩ ... ∩ d n , and the dashboard camera will extract images chronologically to identify objects.When encountering a failure in recognition, the model will calculate the loss function and weight values based on the formulas in Sect.3.3.This study applies horizontal federated learning, enabling bilinear pairing techniques to build identity-based encryption between the dashboard cameras and the server.All cameras and servers have public keys PK ID t,B i and private keys , where PK ID t,B i = ID t,B i ⋅ P .The model utilizes the public key generated by the camera ID and produces a private key from the secret key s, where only the server knows the secret key s that the camera or other units cannot obtain.The formula of the private key is PR ID t,B i = ID t,B i ⋅ s ⋅ P .When dashboard A and server B are processing private communication, they only need to attain each other's ID to generate a common session key, which allows them to implement symmetric encryption.The calculation of the common session is ; even if other vehicles attained A and B's IDs, they could not have the secret key s, ensuring communication privacy and security.
When server B attains the dataset x A i from dashboard A, it will initiate the model training with the formula below: where med B i represents the videos that encountered recognition failure, Γ is the model of the training evaluation board, and represents the normalization parameter.Set To obtain the optimal solution of the loss function, we apply gradient descent to create below calculation: , the system can transmit relevant loss function information to other dashboard cameras, allowing them to update data.

Congestion detection and machine learning
Every dashboard camera in our research will regularly connect with a base station, ensuring the vehicle is within the range of the base station.The camera will deliver GPS signals to base stations for judging whether a car requires to conduct handoff.The dashboard camera will also utilize a common session key to transmit encrypted GPS information to a base station, CS ID t,B A ↔ID t,B B GPS ID t,B A ; the base station will use the common session key to decrypt the message and judge the road conditions.During the transmission process, the dashboard camera will only provide the SIM card serial number instead of revealing drivers' identities, which can enhance (8) min The internet-of-vehicle traffic condition system developed… drivers' privacy.Employing the driving speeds, directions, and positions from GPS information, this research can detect traffic jams.The definition of congestion sets to be at half of the maximum speed limit SP half .Firstly, the system will judge if the average driving speed is lower than SP half ; if yes, it means the car is experiencing congestion.The formula is: where RS reveals the congestion condition and SP avg shows the average driving speed.
The system in this article selects messages for drivers based on the GPS information, as dashboard cameras will have the current GPS data for the system to calculate distances and eliminate those position data that are too far away.Next, the model will sort the data by Support Vector Machine (SVM) in machine learning, such as putting road maintenance and road construction signs into the category of roadworks.Sorting messages by SVM into n categories, the formula is as below: Afterward, the result is as below: where x i represents the information after Fast R-CNN and y i shows the message after running SVM.

Experimental results
This section discusses the network security analysis in Sect.4.1, and summarizes the system results Sect.4.2.

Network security analysis
The study applies bilinear pairing techniques to implement network security and privacy protection.Encrypt the car's SIM card serial number by the public key of a cell site and building a session key between the car and the base station; the system can conduct private communication.During the process, if any vehicle wants to decrypt the message in the public key, it will need to have the private key from the base station, and it is not possible to obtain the secret key of the base station from the public key.Cars can build a common session key with the server through identity-based encryption, and each of the common session keys between a car and a server is unique because the calculated values by bilinear pairing from car ID, server ID, and the secret key are different.For any cars that attempt to forge the common session key, it will need to attain the secret key; however, from the feature of bilinear pairing technology, even if hackers managed to have the common session key, car ID, and server ID, they cannot derive the secret key from the data.According to the above analysis, the transmission between cars and base stations is safe, ensuring messages' data security and privacy.

Results of the system
The dashboard camera of our research consists of Raspberry Pi, GPS, and a camera lens, as shown in Algorithm 3. The Raspberry Pi supports identifying the objects in videos; when the system detects road issues, it will send a message to the server, and the server will share the road condition by push notifications.Algorithm 4 demonstrates the push notification hardware, and the system can judge road conditions from videos.As shown in Algorithm 5, the system uses Faster R-CNN for recognition and have 3,000 images for training and 1,000 images for testing.Algorithm 6 reveals that the proposed approach can achieve a decent recognition rate.The system amends Faster R-CNN weights by federated learning, as shown in Algorithm 7, obtaining the optimal solution by gradient descent.Our research uses the bilinear pairing technique to construct the system security and employs USRP B210/mini B200, a SIM card, and a mobile device to develop the network communication equipment, as Figure 8(a) demonstrates the hardware diagram.Figure 8(b) illustrates how the system records the SIM card serial numbers into the database of a base station, proving that the research has conducted a practical experiment.

Conclusion
This article aims to develop an IoV traffic condition system by AIoT, identifying road conditions through recognizing video objects in dashboard cameras and sharing with nearby cars to improve traffic safety.In the past, most IoV systems work based on the messages provided by drivers, and this proposed approach automatically sends video clips by push notifications for drivers to be aware of the road conditions.Additionally, to ensure network security and data privacy, our system applies bilinear pairing technology to build the mechanism.The safety analysis section has proven data security and privacy during transmission; moreover, from the experimental results, this system proves the feasibility in practical operation with an adequate recognition rate.By sending push notifications to specific social groups, the drivers in the group can be aware of the road conditions, enhancing traffic safety.In this study, the system utilizes dashboard cameras in cars to detect situations; with the camera and GPS functions, the system can recognize video objects and locate car positions.Furthermore, the suggested method does not require to build massive fixed monitoring equipment for surveillance, which fosters the implementation and penetration of IoV systems.The features of our study primary utilize dashboard cameras and GPS signals to detect road 1 3 The internet-of-vehicle traffic condition system developed… conditions and use federated learning to conduct Faster R-CNN for improving recognition accuracy, which can enrich the accuracy for dashboard cameras to judge more road conditions.

Fig. 8
Fig. 8 System experiment RS = true, SP avg <= SP half false, otherwise , decrypt the message even if they have received the data.Moreover, the anonymous ID will change whenever a car sends a new message, as the calculation allowing the car to decrypt the message by CK ID t,V i after receiving the data.During the message transmission process, only the car and the base station can have CK ID t,V i , blocking other vehicles or hackers to training test Fig. 6 Faster R-CNN recognition rate Fig. 7 Federated Learning experiment results ,B A , PK ID t,B B .When dashboard camera A sends dataset x A i to server B, the private communication calculation between them is SK CS ID t,B A ↔ID t,B B x A i ||ID t,B A .When server B received the encrypted data, it will decrypt the message by CS ID t,B A ↔ID t,B B