# ARNS: Adaptive Relay-Node Selection Method for Message Broadcasting in the Internet of Vehicles
## 4 Method Design
### EPBP-Based Relay-Node Selection Method Suitable for Curved Road Scenarios with Obstacles  
Based on the analysis in Section 3, we first define Optimal Position and Vacant to facilitate the description of the relay-node selection method in curved road scenarios with obstacles. **Definition 1**. : _Optimal Position \(P_{opt}\in\{\text{Node}_{1}\}\cup\{\text{Node}_{2}\}\) is the point that is closest to the terminal point of the curved road in the direction of message broadcasting, where \(\{\text{Node}_{1}\}\) is the set of the intersections of the sender's communication boundary and the curved roads that are not blocked by obstacles; \(\{\text{Node}_{2}\}\) is the set of the intersections of the curved road and the tangents to the profile of the obstacles from the sender._  
**Definition 2**. : _Vacant is the segment of the curved road that is not covered by the communication ranges of the sender and the relay-node because of the high curving rate of the curved road and the blocking by the obstacles._  
Taking Figure 1 as an example, road section 1 and 2 are both vacant, because road section 1 is not covered by the signal of Node S\({}_{4}\) due to the obstruction of Obstacle O\({}_{1}\), and road section 2 is not within the communication range of Node S\({}_{3}\) and S\({}_{4}\). Next, we improved the reverse selection [25] to solve the problem of vacant-caused reduction of broadcast coverage. When a sender finds that there is a vacant between itself and the sender in the previous hop, it enters the reverse selection. At this time, it serves as an initial sender of the reverse selection and broadcasts an RTB packet to start the normal selection and the reverse selection simultaneously. The reverse selection chooses the nearest corner to the initial sender in the reverse direction as the optimal position, and the endpoint of the vacant closest to the previous sender as the termination of the reverse selection. In the reverse direction, only the reverse selection continues until it completely covers the vacant. To distinguish three states of relay-node selection--only the normal selection, only the reverse selection, and the concurrence of the normal selection and the reverse selection, we added a mode flag into the RTB packet. Moreover, we assigned black-bursts with different frequencies to avoid interfering with each other between nodes in different states. Based on the above definitions and descriptions, we propose an EPBP-based relay-node selection method suitable for curved road scenarios with obstacles. The pseudo code is as follows in Algorithm 1. Next, we take Nodes S\({}_{3}\) and S\({}_{4}\) in Figure 1 as an example to illustrate our proposed method, and assume that Node S\({}_{3}\) is used as a sender to start message broadcasting. According to Definition 1, Node S\({}_{3}\) determines Point E as the \(P_{\text{opt\_norm}}\). Then, we made a circle with Point E as the center and the distance between Node S\({}_{3}\) and Point E as the radius, EPBP was performed on the circle as shown in Figure 1, and Node S\({}_{4}\) was selected as the relay-node. After Node S\({}_{4}\) receives the message from Node S\({}_{3}\), as a new sender it determines that road section 1 and 2 are both vacant according to Definition 2. Then, it starts both the normal selection and the reverse selection:  
The initial sender S\({}_{4}\) of the reverse selection chooses Point A as the terminal point of the reverse selection, chooses the corner (Point B) as the optimal position for the reverse selection, and selects Point G as the optimal position for the normal selection according to Definition 1. Then an RTB packet was broadcasted by Node S\({}_{4}\) to inform nodes within its communication range that both the reverse selection and the normal selection were started at the same time. Finally, Node S\({}_{7}\) was selected as the relay-node in reverse selection and Node S\({}_{8}\) was selected as the relay-node in the normal selection.