A fair transmission method for task offloading based on packet type identification
By adopting a fair transmission method of task offloading based on packet type identification in the Internet of Vehicles, the impact of downlink service flow on task offloading is solved, and the fair transmission of TCP and UDP services is achieved, and the performance of TCP task offloading in the Internet of Vehicles is improved. , and ensures the efficiency of UDP services.
Patent Information
- Application Number
- CN202210259870.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The existing technology fails to effectively consider the impact of downlink service flow on task offloading in the Internet of Vehicles, which leads to the overly idealized research on task offloading, limiting its implementation and promotion in the real Internet of Vehicles.
Using the task offload fair transmission method based on packet type identification, by configuring algorithms and parameters at the base station RSU, identifying and distinguishing TCP-ACK packets and UDP service packets, inserting or placing them at the header or tail of the queue of the sending buffer respectively, and The queue length is counted in bytes to determine whether to discard or retain the grouping. In addition, the MAC layer competition window value is dynamically set, the competition window value of the TCP-ACK packet is appropriately increased to reduce the collision probability, and the competition window value of the UDP packet is appropriately reduced to reduce the transmission delay.
This method can ensure the upstream service of TCP task offloading in a hybrid business scenario, while maintaining UDP downstream service, improving the performance of vehicle TCP task offloading, and achieving the right way without changing the protocol configuration of communication sending and destination ends Transparent transmission of vehicles and edge servers is easy to promote and implement.
Smart Images

Figure CN114615645B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking, and in particular to a task offloading fairness transmission method based on group type identification. Background Art
[0002] The Internet of Vehicles is usually composed of vehicle units OBU (On board Unit) and roadside units RSU (Roadside unit). In-vehicle communication can be independent of RSU and use self-organizing networking to achieve data transmission, but when vehicles visit the Internet, data exchange can be achieved through RSU. With the popularization of the Internet of Vehicles, users and vehicles will generate a large amount of data and computing needs. In the Internet of Vehicles, the vehicle OBU has certain computing and storage capabilities. However, it is difficult for vehicles to support computing-intensive services relying solely on their own limited computing and storage resources. Although cloud computing can solve the problem of insufficient vehicle computing resources, its long-distance deployment will lead to unpredictable delays and increase bandwidth overhead.
[0003] In response to problems such as insufficient vehicle resources and communication delays with cloud servers, vehicular edge computing (VEC) technology deploys servers at the edge of wireless networks to provide computing and storage functions to vehicle users nearby, reduce data transmission delays and reduce the burden on cloud servers. Task vehicles use vehicle-to-vehicle (V2V) or vehicle-to-infrastructure (V2I) communications to transmit data. The edge server deployed on the RSU side has relatively rich computing and caching resources, and is responsible for the collection, distribution and processing of vehicle data, and can also upload data to the cloud server. Therefore, VEC can realize localized, short-distance and distributed deployment of applications, services and content. As a key technology for realizing VEC, task offloading refers to the OBU as the source node transmitting tasks or part of the task to the RSU destination node, and then the edge server calculates and returns the results to the vehicle. The schematic diagram of VEC task offloading is shown in the figure. Figure 8 shown.
[0004] So far, research on task offloading has made a series of progress, but there are also some problems in the research. Task offloading is essentially the uplink data communication from vehicle to base station (V2I). In the real Internet of Vehicles environment, other vehicles may also request data resources from edge servers or external networks, and there is also downlink traffic from base station to vehicle (I2V) in the network. Figure 8In the topology shown, vehicle nodes V1 to V6 offload tasks to the edge server, and the TCP traffic sent reaches the server through the base station RSU. The server returns the TCP-ACK confirmation packet of the transport layer, which is then sent to the vehicle TCP source node through the RSU. The UDP service flow packet actively sent by the server is also sent to the destination vehicle V7 through the RSU.
[0005] Therefore, current task offloading research mainly focuses on the uplink data transmission mechanism and performance, without considering the existence of downlink business flows and their impact on task offloading. This leads to over-idealization of task offloading research and limits the implementation and promotion of task offloading in real vehicle networks.
[0006] The core of the Internet is the IP protocol, which relies on IP packets to transmit data. However, IP packets use a "best effort" transmission mechanism, which does not consider the loss of IP packets or flow control. Therefore, when users want to achieve reliable transmission of task offloading, they need to use the TCP protocol at the transport layer. TCP uses the transport layer confirmation (ACK) mechanism to ensure the integrity and reliability of data communication, while also achieving rate control to prevent network congestion. The TCP protocol stipulates that after the source sends a TCP data packet, if it does not receive the transport layer ACK packet sent by the destination within the specified time, it is considered that the TCP data packet has failed to reach the destination. The source will retransmit the above TCP data packet and determine that the reason for the loss of the TCP data packet is network congestion. The source will reduce its own sending rate to alleviate network congestion. It can be seen that the TCP service increases the transmission delay at the cost of reducing some transmission efficiency in exchange for transmission reliability. Therefore, the characteristics of the TCP service are high reliability, but the amount of data transmitted is affected by the network status.
[0007] The UDP mechanism does not have a packet loss retransmission and flow control mechanism, so UDP services are mainly used in high-speed transmission and high-real-time situations, such as instant messaging and video communication. The above applications can tolerate a certain degree of packet loss, but have high real-time requirements. If confirmation and retransmission mechanisms are used, it will cause a large delay, which is unacceptable for instant messaging and video communication. Therefore, the characteristics of UDP services are high transmission efficiency but poor reliability.
[0008] When the network is congested and TCP packets are lost, if the TCP source fails to receive the transport layer ACK packet within the specified time, the sending rate will be reduced. UDP traffic has no flow control mechanism, so it will quickly fill up the sending buffer queue of the RSU base station, causing packet queuing at the RSU, and ultimately leading to a large number of packet losses (including transport layer ACK packets and UDP packets). However, since UDP does not require transport layer confirmation, it will continue to send data, while the TCP source will reduce the sending rate because it cannot receive the transport layer ACK packet. Therefore, in the hybrid flow service environment of the Internet of Vehicles, the communication bandwidth is easily occupied by the downstream UDP service, the TCP traffic is in a "starved" state, and the vehicle cannot complete the task offloading of the TCP service.
[0009] In order to better illustrate the above problems, we design a task offloading for a hybrid business scenario. The network topology is as follows: Figure 8 As shown. In the Internet of Vehicles, 7 vehicle nodes are set up, and the MAC layer bandwidth of each vehicle is 12Mb / s. Among them, 6 nodes (V1, V2, V3, V4, V5, V6) are task vehicles, responsible for unloading TCP data tasks to the edge server, and 1 node (V7) is a receiving node that does not send application data, responsible for receiving UDP service data sent by the edge server. Set up a base station RSU, which is configured with 802.11p wireless network interface and wired network interface respectively, responsible for forwarding data. The 802.11p protocol of RSU is the default configuration, and the backoff mechanism uses the same contention window CW for all packets min =16. RSU receives and sends all service packets indiscriminately, and the queue algorithm is DropTail, that is, when the RSU sending buffer is full, the packet at the end of the queue is discarded, and the maximum length of the queue is 50 packets. Set up an edge server Server, which is configured as the destination of TCP service and the source of UDP service, and the UDP service sending rate is 10Mb / s. In other words, the edge server receives TCP service data from 6 vehicles (V1, V2, V3, V4, V5, V6) as the destination, and sends UDP service data to the vehicle (V7) as the source. Set the corresponding transmission power to ensure that all vehicles and base station RSU are within each other's transmission range. The experiment lasts for 10 seconds. The length of TCP data and UDP data packets is 1000B, and the length of TCP-ACK packet is 40B.
[0010] The number of received packets and the end-to-end delay of packets under the default algorithm in the mixed business task offloading scenario are shown in Figure 2. Figure 6 , Figure 7 shown.
[0011] Figure 6It can be seen that when there is a downlink UDP service in the Internet of Vehicles, the total number of TCP packets successfully unloaded by the six vehicle nodes is only 945. However, the number of UDP service packets sent by the server to vehicle V7 reached 8834, accounting for 90.3% of the total number of packets received in the entire network. The experimental results show that the vehicle TCP task offloading in the mixed service scenario is significantly suppressed, the bandwidth is occupied by UDP, and it is basically impossible to achieve effective TCP services. Figure 7 It can also be seen that the number of packets transmitted by UDP service flow is indeed much greater than that of TCP service. Since the bandwidth is occupied by the UDP downstream flow, TCP can only send service packets sporadically. The average end-to-end delay of TCP packets is relatively small, only 0.0171 seconds, while the average end-to-end delay of UDP packets is 0.0603 seconds. Figure 6 and Figure 7 ,Since UDP has no flow control, UDP packets can easily occupy the base station RSU sending buffer, resulting in a full buffer queue. Because they cannot enter the queue, the DropTail queue algorithm causes a large number of TCP-ACK packets to be lost. Since the transport layer ACK packets cannot be received, the TCP source cannot continue to send subsequent data, and the TCP traffic drops sharply, resulting in the inability to complete the TCP task offloading in the V2I direction. Therefore, it is necessary to study how to ensure the performance of TCP task offloading in hybrid business scenarios.
[0012] How to solve the above technical problems is the subject faced by the present invention. Summary of the invention
[0013] The purpose of the present invention is to provide a task offloading fairness transmission method based on packet type identification. The present invention can not only guarantee the uplink service of TCP task offloading, but also maintain the downlink service of UDP. In addition, since it does not involve protocol modification and configuration of the communication sending end and the destination end, it only needs to configure the algorithm and parameters at the base station RSU. The present invention is transparent transmission for both vehicles and edge servers, which is easy to promote and implement.
[0014] The present invention is implemented by the following measures: a task offloading fairness transmission method based on packet type identification, comprising the following steps:
[0015] Step 1: Packet type identification: RSU identifies the type of packets sent by the edge server, reads their message headers, and determines whether the packet type is a TCP-ACK packet or a UDP service packet;
[0016] Step 2: Arrange the position of packets entering the queue. The base station RSU inserts the TCP-ACK packet into the head position of the packet queue of the send buffer according to the packet type identification result, and places the UDP service packet at the tail position of the queue. Therefore, the TCP-ACK packet in the queue will not be placed after the UDP service packet, which reduces the waiting time of the TCP-ACK packet queue and also reduces the probability of a large number of TCP-ACK packets being lost at the tail of the queue.
[0017] Step 3: The queue packets with bytes as the statistical unit are discarded. After the new packets are queued, the length of the packets L is counted in bytes. p The original length L of the packet queue in the RSU send buffer old , calculate the current length L of the packet queue in the send buffer new , the maximum length of the buffer queue is specified as q max (in bytes), according to L new With q max Based on the numerical comparison result, the RSU discards a specific packet or retains the packet;
[0018] Step 4: Dynamically set the MAC layer contention window value. For different types of packets, the base station MAC layer uses different contention windows CW. min Numeric value.
[0019] Furthermore, the specific content of the group type identification in step 1 is:
[0020] When the TCP-ACK packet and UDP service packet sent by the edge server reach the base station RSU through the wired channel, the RSU needs to forward the above two types of packets to the vehicle. The ACK packet of the TCP service flow (packet length is 40B) is used to return to the TCP source end to inform the edge server that the TCP packet has been received, so that the vehicle TCP source end can send subsequent TCP data packets; the UDP packet (packet length is 1000B) is used to carry the service data sent by the edge server to the vehicle. It can be seen that the functions and lengths of the above two types of packets are inconsistent, and the RSU needs to treat them differently, otherwise it will cause serious transmission unfairness.
[0021] The RSU identifies the type of packets sent by the edge server, reads their message headers, and determines whether the packet type is a TCP-ACK packet or a UDP service packet.
[0022] (1) RSU receives various packets sent by the edge server;
[0023] (2) RSU reads the "upper layer protocol identifier" field in the header of the received IP message;
[0024] (3) If the value of the "Upper Layer Protocol Identifier" field is "00000110", the received packet is determined to be a TCP service.
[0025] Step 1: Read the "ACK" field in the TCP packet header. The value is 1, indicating that the packet is a TCP-ACK packet.
[0026] Step 2: Read the "ACK" field in the TCP packet header. The value is 0, indicating that the packet is a TCP data packet.
[0027] (4) If the value of the "Upper Layer Protocol Identifier" field is "00010001", the received packet is determined to be a UDP packet.
[0028] Furthermore, the arrangement of the positions of the groups entering the queue in step 2 specifically includes the following contents:
[0029] When the server sends a large number of packets to the RSU, due to the small wireless bandwidth of 802.11p, the RSU cannot forward these data to each vehicle instantly. Therefore, the RSU caches the above packets at the tail of its own sending buffer queue in the order of arrival by default. This creates two problems. First, the length of the TCP-ACK packet is much shorter than the UDP service packet. The ACK packet must wait for all the UDP packets before it can be forwarded in the queue. This brings unnecessary delays and easily causes the TCP source to start the congestion timeout mechanism, unnecessarily reducing the TCP source sending rate. Second, if there are already a large number of UDP service packets in the queue, the later TCP-ACK packets are likely to be truncated and discarded because the queue is full, which will also cause the TCP source to start the congestion timeout mechanism and reduce the sending rate.
[0030] Therefore, in order to ensure the performance of TCP task offloading, the base station RSU inserts the TCP-ACK packet into the head position of the packet queue of the send buffer based on the identification of the packet type, while the UDP service packet is placed at the tail position of the queue. Therefore, the TCP-ACK packet in the queue will not be placed after the UDP service packet, reducing the queuing waiting time of the TCP-ACK packet and also reducing the probability of a large number of TCP-ACK packets being lost at the tail of the queue.
[0031] (1) For TCP-ACK packets, insert them into the header of the packet queue of the RSU send buffer.
[0032] (2) For UDP packets, insert them into the tail position of the packet queue of the RSU send buffer.
[0033] Furthermore, the queue packet discarding in the step 3 with bytes as the statistical unit specifically includes the following contents:
[0034] In the Internet of Vehicles, all data sent from the server to the vehicle needs to pass through the base station RSU, and then use the RSU's 802.11p wireless interface to send to the target vehicle. The bandwidth of the RSU wired interface is much larger than the bandwidth of the wireless interface, so the RSU will become the bottleneck node of the downlink data flow. The packets sent by the server will generally queue in the RSU send buffer, waiting for forwarding by the wireless interface, but the RSU send buffer cannot be infinite. Therefore, when the queued packets exceed the maximum value of the buffer (the maximum queue length allowed by the RSU), the queue will discard the packets that cannot enter the end of the queue. It should be noted that even if the cost is not considered, the send buffer cannot be set too large, because if a long queue is allowed to exist, although the phenomenon of discarding packets will be reduced, it also means that the waiting time of packets in the long queue will increase. The TCP mechanism sets an ACK packet transmission timeout mechanism. If the source does not receive the ACK packet within the specified time, it will also determine that the packet is lost, so the send buffer will set a reasonable maximum queue length.
[0035] Usually, the base station RSU uses the number of packets as a measure of queue length. For example, the maximum queue length of the RSU wireless interface send buffer is set to 100 packets. In a mixed service environment, the RSU needs to cache both UDP and TCP-ACK packets, but the lengths of the two packets are not consistent. The former is usually 1000B, while the latter is usually 40B. This means that the RSU caches 25 TCP-ACK packets and caches 1 UDP packet, and the occupied send buffer capacity is equal. If the base station RSU still measures the packet queue length by the number of packets, it will overestimate the actual buffer capacity occupied by the packet queue. For example, the RSU buffer currently has 75 TCP-ACK packets and 25 UDP packets. Assuming that the maximum queue length of the RSU wireless interface send buffer is 100 packets, the RSU must discard the subsequent packets at this time. But in fact, since the length of 75 TCP-ACK packets is equal to the length of 3 UDP packets, the RSU buffer actually only occupies the capacity of 28 UDP packets, and there is no need to trigger the tail drop mechanism.
[0036] Therefore, the present invention counts the newly arrived packets and queue length in the RSU sending buffer in bytes, and according to the current queue length and the maximum length of the buffer queue, the RSU discards specific packets or retains packets. The specific method is:
[0037] (1) RSU counts the length of the newly received packet L p The original length L of the packet queue in the RSU send buffer old ;
[0038] (2) Calculate the current length L of the packet queue in the send buffer new , there is L new =Lold +L p ;
[0039] (3) Set the maximum length of the buffer queue to q max (Unit: Byte), the queue performs retention or discarding of packets;
[0040] Step 1: If L new Less than q max , then keep the group;
[0041] Step 2: If L new Greater than q max , the packet at the head of the queue is discarded.
[0042] Furthermore, the specific contents of the dynamic setting of the MAC layer contention window value in step 4 are as follows:
[0043] In the mixed service scenario, the RSU forwards two types of packets to the vehicle through the 802.11p wireless interface, which actually participates in the competition for the wireless channel. The 802.11p MAC layer uses the same CW for all packets by default. min The TCP-ACK packet and UDP service belong to the same downlink traffic, but their packet lengths and functions are different. If the MAC layer of the base station cannot distinguish between TCP-ACK traffic and UDP traffic, the performance of the TCP / UDP mixed service is difficult to guarantee, which puts forward new requirements for the MAC layer competition and backoff mechanism of the base station. Therefore, the present invention theoretically improves the 802.11p MAC layer competition window value CW of the base station RSU. min Modeling and experiments were performed to obtain the CW of RSU min Value range.
[0044] The media access control (MAC) of wireless LAN usually uses the distributed coordination function (DCF). According to the MAC mechanism of IEEE 802.11, DCF adopts the backoff mechanism (BackOff) to reduce the possible packet transmission conflicts. The choice of backoff time largely determines the transmission frequency. It works as follows: when the sending node detects that the channel has been idle for a certain period of time (inter frame space, DIFS), it will send a packet to the next frame in [0, CW min -1] interval, and use k idle time slots as the BackOff backoff time, where CW minis the size of the contention window. After waiting for k idle time slots, the sending node attempts to send a frame. It can be seen that the contention window is used to set the waiting time before each sending node attempts to send a data frame, which has a great impact on the fairness of the system.
[0045] Firstly, the influence of contention window value on the number of packets forwarded by RSU is studied.
[0046] The time T required for the wireless MAC layer of the RSU node to successfully send a packet can be written as
[0047] T=t DIFS +t BO +t Data +t SIFS (1)
[0048] Among them, T Data is the time to send a packet, t BO is the BackOff time, t DIFS is the distributed inter-frame gap time, t IFS is the short inter-frame gap time.
[0049] According to T Data The definition of
[0050]
[0051] Where R is the MAC layer bandwidth in Mb / s.
[0052] Substituting formula (2) into formula (1), we have
[0053]
[0054] t BO Only related to the contention window value, generally And slot, t DIFS With t IFS These are all fixed parameters of the MAC layer.
[0055] The number of packets m sent by the base station RSU in the time interval duration
[0056]
[0057] According to formula (4), CW min The smaller it is, the smaller the time T to send a packet is, and the more packets the RSU sends to the network. The UDP service has no error control and flow control, and its packet sending rate is always constant. The number of UDP packets m sent by the base station RSU mainly depends on formula (4).
[0058] All packets injected into the network by TCP services are subject to the specific network status. When network congestion occurs (TCP data packets or TCP-ACK packets are lost), the TCP source node will quickly reduce the sending rate, reduce the number of TCP data packets injected into the network, and the TCP-ACK packets sent by the TCP destination will also be greatly reduced. Therefore, unilaterally reducing the sending time of TCP-ACK packets (i.e. reducing CW) min ), cannot completely determine the number of TCP-ACK packets sent by the base station RSU. In other words, for TCP-ACK packets, in addition to the contention window value CW of the MAC layer backoff mechanism on the RSU side min The source and destination of TCP can also affect the number of TCP-ACK packets in the network. Define the rate at which the TCP destination sends TCP-ACK packets as rate TCP_ACK , then the number of TCP-ACK packets sent by the base station RSU is shown in Formula 5.
[0059]
[0060] Therefore, for UDP services, select a smaller CW min The number of UDP packets sent by RSU can be increased. For TCP services, when network congestion occurs, the number of TCP-ACK packets sent by the TCP destination decreases sharply, even if the contention window value CW of the base station RSU is min The setting is very small, and the number of TCP-ACK packets it sends is also limited, which does not improve TCP performance much.
[0061] Secondly, the impact of contention window value on packet collision conflicts is studied.
[0062] Consider that there are n vehicle nodes around the RSU. Assume that the probability of any vehicle node i sending a data frame in a random time slot is τ, and the probability of the data frame colliding with the data frames sent by other nodes is η. When n is constant, the following relationship exists:
[0063]
[0064] According to Bianchi's modeling using Markov chains, m is the maximum number of retransmissions, CW min is the contention window value,
[0065]
[0066] consider Figure 8 In the network shown, when the base station RSU forwards downlink traffic, it also competes for the channel with the unloading vehicles from V1 to V6, so the number of wireless sending nodes is n = 7. minTake a certain value, the default maximum number of retransmissions in 802.11p is m=7, and by combining equations (6) and (7), we can find the numerical solutions for τ and η. min When changes, the change of frame collision probability η is shown in Figure 2.
[0067] According to the above modeling and Figure 2 The conclusion is that when the number of sending nodes is constant, the packet collision probability η is only related to the contention window CW min It is related to the maximum number of retransmissions m, but has nothing to do with the length of the transmission packet. min The smaller it is, the higher the probability of packet collision.
[0068] In order to better illustrate the impact of group collision on the performance of hybrid business task offloading, the group collision process is as follows Figure 3 shown.
[0069] On the one hand, when the base station forwards the TCP-ACK packet, each vehicle is also sending TCP data packets, and the base station sets a too small CW. min , will increase the collision between TCP-ACK packets and TCP data packets sent by vehicles. Figure 3 As shown in (a), once a collision occurs, it means that both TCP data packets (the current colliding TCP data packet and the TCP data packet that TCP-ACK confirms to the source end) cannot be confirmed. The TCP source end will reduce the sending rate twice in a short period of time, seriously affecting the task offloading performance of TCP services. Therefore, for TCP-ACK packets, the base station CW min The value should not be set too small.
[0070] On the other hand, when the base station forwards UDP traffic to the vehicle, CW min If the value is set to a large value, it will significantly increase the waiting time for sending UDP packets and reduce the transmission performance of UDP services. min Setting a smaller value can increase the chances of base station RSU competing for channels and reduce UDP packet transmission delay, but it is also more likely to collide with TCP data packets, such as Figure 3 (b) shows, but only affects the current colliding TCP data packets. Therefore, if UDP services are to be properly protected, for UDP packets, the base station CW min The value should not be set too large.
[0071] The above modeling and experiments show that the contention window value CW of the MAC layer backoff mechanism min It will affect the packet transmission delay and packet collision probability. min The smaller the value, the shorter the backoff time for packets to wait for transmission, but the higher the probability of collision, which is not conducive to TCP services that focus on reliability. minThe larger the value, the smaller the collision probability, but the longer the backoff time for packets to wait for transmission, which is not good for UDP services that focus on timeliness. It can be seen that for a specific packet, the transmission delay and collision probability cannot achieve the best performance at the same time. When sending, RSU must focus on ensuring the comprehensive performance of the entire network's mixed services.
[0072] Therefore, for different types of packets, the base station MAC layer uses different CW min Specifically, for base station forwarding TCP-ACK packets, a larger contention window value is set to reduce the probability of packet collision, reduce the timeout or loss of TCP packets, and improve the vehicle's TCP task offloading performance. For UDP packets, a smaller contention window value is set to reduce the UDP packet backoff waiting time, improve UDP transmission efficiency, and ensure the latency performance of UDP services.
[0073] Assume that the initial value of the wireless MAC layer contention window of the base station RSU is W0.
[0074] (1) For TCP-ACK packets, the wireless MAC layer of the base station sets a contention window CW min =a*W0, where a≥2;
[0075] (2) For UDP packets, the wireless MAC layer of the base station sets a contention window CW min = b * W0, where 0 <b<1。
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] 1. For TCP / UDP mixed services, the present invention proposes a task offloading fairness transmission method based on packet type identification. First, the Internet of Vehicles base station places the arriving TCP-ACK packet at the head of the queue of its wireless sending buffer, and places the arriving UDP packet at the tail of the queue. Secondly, the actual queue length is calculated in bytes. When the queue length exceeds the queue threshold, the packet at the head of the queue is discarded first. Thirdly, the base station MAC layer uses a larger contention window value for the TCP-ACK packet to reduce TCP packet conflicts; and a smaller contention window value for the UDP packet to reduce UDP packet transmission delay. Experiments show that this scheme can not only guarantee the uplink service of TCP task offloading, but also maintain the downlink service of UDP.
[0078] 2. This solution does not involve protocol modification and configuration at the communication sending and receiving ends. It only requires configuration of algorithms and parameters at the base station. It is transparent transmission for both vehicles and edge servers, which is easy to promote and implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0080] Figure 1 It is a schematic diagram of the overall flow of the task offloading fairness transmission method based on packet type identification in the present invention.
[0081] Figure 2 is the MAC layer contention window CW in the present invention min Schematic diagram of the relationship between the value and the probability of group collision.
[0082] Figure 3 It is a schematic diagram of packet collision in the mixed flow service in the present invention.
[0083] Figure 4 This is a diagram of the packet reception status of TCP and UDP in the task offloading fairness transmission method in an embodiment of the present invention.
[0084] Figure 5 This is a diagram of the end-to-end delay of TCP and UDP packets in the task offloading fairness transmission method in an embodiment of the present invention.
[0085] Figure 6 This is a diagram of TCP and UDP packet reception using the default algorithm in a mixed flow scenario in the present invention.
[0086] Figure 7 This is a diagram of the end-to-end delay of TCP and UDP packets of the default algorithm in the mixed flow scenario of the present invention.
[0087] Figure 8 This is a schematic diagram of task offloading in the hybrid business scenario of vehicle-mounted edge computing in the present invention. DETAILED DESCRIPTION
[0088] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0089] Example 1
[0090] See also Figures 1 to 5 The present invention provides a technical solution, which is a task offloading fairness transmission method based on packet type identification, comprising the following steps:
[0091] Step 1: Packet type identification: For the packets sent by the edge server, the RSU identifies their types, reads their message headers, and determines whether the packet type is a TCP-ACK packet or a UDP service packet;
[0092] Step 2: Arrange the position of packets entering the queue. The base station RSU inserts the TCP-ACK packet into the head position of the packet queue of the send buffer according to the packet type identification result, and places the UDP service packet at the tail position of the queue. Therefore, the TCP-ACK packet in the queue will not be placed after the UDP service packet, which reduces the waiting time of the TCP-ACK packet queue and also reduces the probability of a large number of TCP-ACK packets being lost at the tail of the queue.
[0093] Step 3: The queue packets with bytes as the statistical unit are discarded. After the new packets are queued, the length of the packets L is counted in bytes. p The original length L of the packet queue in the RSU send buffer old , calculate the current length L of the packet queue in the send buffer new , the maximum length of the buffer queue is specified as q max (in bytes), according to L new With q max Based on the numerical comparison result, the RSU discards a specific packet or retains the packet;
[0094] Step 4: Dynamically set the MAC layer contention window value. For different types of packets, the base station MAC layer uses different contention windows CW. min Numeric value.
[0095] Furthermore, the specific content of the group type identification in step 1 is:
[0096] When the TCP-ACK packet and UDP service packet sent by the edge server reach the base station RSU through the wired channel, the RSU needs to forward the above two types of packets to the vehicle. The ACK packet of the TCP service flow (packet length is 40B) is used to return to the TCP source end to inform the edge server that the TCP packet has been received, so that the vehicle TCP source end can send subsequent TCP data packets; the UDP packet (packet length is 1000B) is used to carry the service data sent by the edge server to the vehicle. It can be seen that the functions and lengths of the above two types of packets are inconsistent, and the RSU needs to treat them differently, otherwise it will cause serious transmission unfairness.
[0097] The RSU identifies the type of packets sent by the edge server, reads their message headers, and determines whether the packet type is a TCP-ACK packet or a UDP service packet.
[0098] (1) RSU receives various packets sent by the edge server;
[0099] (2) RSU reads the "upper layer protocol identifier" field in the header of the received IP message;
[0100] (3) If the value of the "Upper Layer Protocol Identifier" field is "00000110", the received packet is determined to be a TCP service.
[0101] Step 1: Read the "ACK" field in the TCP packet header. The value is 1, indicating that the packet is a TCP-ACK packet.
[0102] Step 2: Read the "ACK" field in the TCP packet header. The value is 0, indicating that the packet is a TCP data packet.
[0103] (4) If the value of the "Upper Layer Protocol Identifier" field is "00010001", the received packet is determined to be a UDP packet.
[0104] Furthermore, the arrangement of the positions of the groups entering the queue in step 2 specifically includes the following contents:
[0105] When the server sends a large number of packets to the RSU, due to the small wireless bandwidth of 802.11p, the RSU cannot instantly forward these data to each vehicle, so the RSU caches the above packets at the tail of its own send buffer queue in the order of arrival by default. This creates two problems. First, the length of the TCP-ACK packet is much shorter than the UDP service packet. The ACK packet must wait until all the UDP packets before it is forwarded in the queue are forwarded. This brings unnecessary delays and easily causes the TCP source to start the congestion timeout mechanism, unnecessarily reducing the TCP source sending rate. Second, if there are already a large number of UDP service packets in the queue, the later TCP-ACK packets are likely to be truncated and discarded because the queue is full, which will also cause the TCP source to start the congestion timeout mechanism and reduce the sending rate.
[0106] Therefore, in order to ensure the performance of TCP task offloading, the base station RSU inserts the TCP-ACK packet into the head position of the packet queue of the send buffer based on the identification of the packet type, while the UDP service packet is placed at the tail position of the queue. Therefore, the TCP-ACK packet in the queue will not be placed after the UDP service packet, reducing the waiting time of the TCP-ACK packet queue and the probability of a large number of TCP-ACK packets being lost at the tail of the queue.
[0107] (1) For TCP-ACK packets, insert them into the header of the packet queue of the RSU send buffer.
[0108] (2) For UDP packets, insert them into the tail position of the packet queue of the RSU send buffer
[0109] Furthermore, the queue packet discarding in the step 3 with bytes as the statistical unit specifically includes the following contents:
[0110] All data sent from the server to the vehicle in the Internet of Vehicles needs to pass through the base station RSU, and then use the RSU's 802.11p wireless interface to send it to the target vehicle. The bandwidth of the RSU wired interface is much larger than the wireless interface bandwidth, so the RSU will become the bottleneck node of the downlink data flow. The packets sent by the server will generally queue in the RSU send buffer, waiting for forwarding by the wireless interface. However, the RSU send buffer cannot be infinitely large, so when the queued packets exceed the maximum buffer value (the maximum queue length allowed by the RSU), the queue will discard the packets that cannot enter the end of the queue. It should be noted that even if the cost is not considered, the send buffer cannot be set too large, because if a long queue is allowed to exist, although the phenomenon of discarding packets will be reduced, it also means that the waiting time of packets in the long queue will increase. The TCP mechanism sets an ACK packet transmission timeout mechanism. If the source does not receive the ACK packet within the specified time, it will also determine that the packet is lost, so the send buffer will set a reasonable maximum queue length.
[0111] Usually, the base station RSU uses the number of packets as a measure of the queue length. For example, the maximum queue length of the RSU wireless interface sending buffer is set to 100 packets. In a mixed service environment, the RSU needs to cache UDP and TCP-ACK packets at the same time, but the lengths of the two packets are not consistent. The former is usually 1000B, while the latter is usually 40B. This means that the RSU caches 25 TCP-ACK packets and caches 1 UDP packet, and the occupied sending buffer capacity is equal. If the base station RSU still measures the packet queue length by the number of packets, the actual occupied buffer capacity of the packet queue will be overestimated. For example, the RSU buffer currently has 75 TCP-ACK packets and 25 UDP packets. Assuming that the maximum queue length of the RSU wireless interface sending buffer is 100 packets, the RSU must discard the subsequent arriving packets at this time. However, in fact, since the length of 75 TCP-ACK packets is equal to the length of 3 UDP packets, the RSU buffer actually only occupies the capacity of 28 UDP packets, and there is no need to trigger the tail drop mechanism.
[0112] Therefore, the present invention counts the newly arrived packets and queue length in the RSU sending buffer in bytes, and according to the existing queue length and the maximum length value of the buffer queue, the RSU discards specific packets or retains packets. The specific method is as follows:
[0113] (1) RSU counts the length of the newly received packet L p The original length L of the packet queue in the RSU send buffer old ;
[0114] (2) Calculate the current length L of the packet queue in the send buffer new , there is L new =Lold +L p ;
[0115] (3) Set the maximum length of the buffer queue to q max (Unit: Byte), the queue performs retention or discarding of packets;
[0116] Step 1: If L new Less than q max , then keep the group;
[0117] Step 2: If L new Greater than q max , the packet at the head of the queue is discarded.
[0118] Furthermore, the specific contents of the dynamic setting of the MAC layer contention window value in step 4 are as follows:
[0119] In the mixed service scenario, the RSU forwards two types of packets to the vehicle through the 802.11p wireless interface, which actually participates in the competition for the wireless channel. The 802.11p MAC layer uses the same CW for all packets by default. min The TCP-ACK packet and UDP service belong to the same downlink traffic, but their packet lengths and functions are different. If the MAC layer of the base station cannot distinguish between TCP-ACK traffic and UDP traffic, the performance of the TCP / UDP mixed service is difficult to guarantee, which puts forward new requirements for the MAC layer competition and backoff mechanism of the base station. Therefore, the present invention theoretically improves the 802.11p MAC layer competition window value CW of the base station RSU. min Modeling and experiments were performed to obtain the CW of RSU min Value range.
[0120] The medium access control (MAC) of wireless LAN usually uses the distributed coordination function (DCF). According to the MAC mechanism of IEEE 802.11, DCF adopts a backoff mechanism to reduce possible packet transmission conflicts. The choice of backoff time largely determines the frequency of transmission. It works as follows: when the sending node detects that the channel has been idle for a certain period of time (inter frame space, DIFS), it will send a backoff message in [0, CW min -1] interval, and use k idle time slots as the BackOff backoff time, where CW min is the size of the contention window. After waiting for k idle time slots, the sending node attempts to send a frame. It can be seen that the contention window is used to set the waiting time before each sending node attempts to send a data frame, which has a great impact on the fairness of the system.
[0121] Firstly, the influence of contention window value on the number of packets forwarded by RSU is studied.
[0122] The time T required for the wireless MAC layer of the RSU node to successfully send a packet can be written as
[0123] T=t DIFS +t BO +t Data +t SIFS (1)
[0124] Among them, T Data is the time to send a packet, t BO is the BackOff time, t DIFS is the distributed inter-frame gap time, t IFS is the short inter-frame gap time.
[0125] According to T Data The definition of
[0126]
[0127] Where R is the MAC layer bandwidth in Mb / s.
[0128] Substituting formula (2) into formula (1), we have
[0129]
[0130] t BO Only related to the contention window value, generally And slot, t DIFS With t IFS These are all fixed parameters of the MAC layer.
[0131] The number of packets m sent by the base station RSU in the time interval duration
[0132]
[0133] According to formula (4), CW min The smaller it is, the smaller the time T to send a packet is, and the more packets the RSU sends to the network. The UDP service has no error control and flow control, and its packet sending rate is always constant. The number of UDP packets m sent by the base station RSU mainly depends on formula (4).
[0134] All packets injected into the network by TCP services are subject to the specific network status. When network congestion occurs (TCP data packets or TCP-ACK packets are lost), the TCP source node will quickly reduce the sending rate, reduce the number of TCP data packets injected into the network, and the TCP-ACK packets sent by the TCP destination will also be greatly reduced. Therefore, unilaterally reducing the sending time of TCP-ACK packets (i.e. reducing CW) min ), cannot completely determine the number of TCP-ACK packets sent by the base station RSU. In other words, for TCP-ACK packets, in addition to the contention window value CW of the MAC layer backoff mechanism on the RSU side min The source and destination of TCP can also affect the number of TCP-ACK packets in the network. Define the rate at which the TCP destination sends TCP-ACK packets as rate TCP_ACK , then the number of TCP-ACK packets sent by the base station RSU is shown in Formula 5.
[0135]
[0136] Therefore, for UDP services, select a smaller CW min The number of UDP packets sent by RSU can be increased. For TCP services, when network congestion occurs, the number of TCP-ACK packets sent by the TCP destination decreases sharply, even if the contention window value CW of the base station RSU is min The setting is very small, and the number of TCP-ACK packets it sends is also limited, which does not improve TCP performance much.
[0137] Secondly, the impact of contention window value on packet collision conflicts is studied.
[0138] Consider that there are n vehicle nodes around the RSU. Assume that the probability of any vehicle node i sending a data frame in a random time slot is τ, and the probability of the data frame colliding with the data frames sent by other nodes is η. When n is constant, the following relationship exists:
[0139]
[0140] According to Bianchi's modeling using Markov chains, m is the maximum number of retransmissions, CW min is the contention window value,
[0141]
[0142] consider Figure 8 In the network shown, when the base station RSU forwards downlink traffic, it also competes for the channel with the unloading vehicles from V1 to V6, so the number of wireless sending nodes is n = 7. minTake a certain value, the default maximum number of retransmissions in 802.11p is m=7, and by combining equations (6) and (7), we can find the numerical solutions for τ and η. min When changes, the change of frame collision probability η is shown in Figure 2.
[0143] According to the above modeling and Figure 2 The conclusion is that when the number of sending nodes is constant, the packet collision probability η is only related to the contention window CW min It is related to the maximum number of retransmissions m, but has nothing to do with the length of the transmission packet. min The smaller it is, the higher the probability of packet collision.
[0144] In order to better illustrate the impact of group collision on the performance of hybrid business task offloading, the group collision process is as follows Figure 3 shown.
[0145] On the one hand, when the base station forwards the TCP-ACK packet, each vehicle is also sending TCP data packets, and the base station sets a too small CW. min , will increase the collision between TCP-ACK packets and TCP data packets sent by vehicles. Figure 3 As shown in (a), once a collision occurs, it means that both TCP data packets (the current colliding TCP data packet and the TCP data packet that TCP-ACK confirms to the source end) cannot be confirmed. The TCP source end will reduce the sending rate twice in a short period of time, seriously affecting the task offloading performance of TCP services. Therefore, for TCP-ACK packets, the base station CW min The value should not be set too small.
[0146] On the other hand, when the base station forwards UDP traffic to the vehicle, CW min If the value is set to a large value, it will significantly increase the waiting time for sending UDP packets and reduce the transmission performance of UDP services. min Setting a smaller value can increase the chances of base station RSU competing for channels and reduce UDP packet transmission delay, but it is also more likely to collide with TCP data packets, such as Figure 3 (b) shows, but only affects the current colliding TCP data packets. Therefore, if UDP services are to be properly protected, for UDP packets, the base station CW min The value should not be set too large.
[0147] The above modeling and experiments show that the contention window value CW of the MAC layer backoff mechanism min It will affect the packet transmission delay and packet collision probability. min The smaller the value, the shorter the backoff time for packets to wait for transmission, but the higher the probability of collision, which is not conducive to TCP services that focus on reliability. minThe larger the value, the smaller the collision probability, but the longer the backoff time for packets to wait for transmission, which is not good for UDP services that focus on timeliness. It can be seen that for a specific packet, the transmission delay and collision probability cannot achieve the best performance at the same time. When sending, RSU must focus on ensuring the comprehensive performance of the entire network's mixed services.
[0148] Therefore, for different types of packets, the base station MAC layer uses different CW min Specifically, for base station forwarding TCP-ACK packets, a larger contention window value is set to reduce the probability of packet collision, reduce the timeout or loss of TCP packets, and improve the vehicle's TCP task offloading performance. For UDP packets, a smaller contention window value is set to reduce the UDP packet backoff waiting time, improve UDP transmission efficiency, and ensure the latency performance of UDP services.
[0149] Assume that the initial value of the wireless MAC layer contention window of the base station RSU is W0.
[0150] (1) For TCP-ACK packets, the wireless MAC layer of the base station sets a contention window CW min =a*W0, where a≥2;
[0151] (2) For UDP packets, the wireless MAC layer of the base station sets a contention window CW min = b * W0, where 0 <b<1。
[0152] Experiment: Task offloading fairness transmission algorithm in mixed business task offloading scenario
[0153] The network topology and simulation parameters are the same as the above experiment, and a task offloading fairness transmission method based on packet type identification is adopted. First, RSU identifies the forwarding packet type; secondly, RSU sets different positions for the packets entering the queue, placing the TCP-ACK packet at the head of the queue and the UDP service packet at the tail of the queue; thirdly, RSU counts the queue length in bytes, and when the queue reaches the maximum value, the packet at the head of the queue is discarded; finally, the MAC layer backoff process competition window is dynamically set, and the initial value W0=16. In order to ensure TCP and UDP performance, set a=2 and b=0.5. The maximum queue length is q max =50000B. The number of unloaded packets received and the delay of the fairness algorithm, such as Figure 4 and Figure 5 shown.
[0154] Figure 4It can be seen that when the base station RSU executes the fairness algorithm, the number of packets received by TCP task offload increases to 5934. The number of packets received by the UDP service sent by the server to the vehicle V7 drops to 2368, accounting for only 28.5% of the total number of packets received in the entire network. The experimental results show that the vehicle UDP service in the mixed service scenario is suppressed to a certain extent, and most of the bandwidth is occupied by TCP, which achieves a good TCP task offload. Figure 5 It can also be seen that the number of packets transmitted by TCP services is greater than that of UDP services. In addition, due to the significant increase in the number of packets transmitted by TCP services, the end-to-end delay of TCP packets has also increased, with an average end-to-end delay of 0.0368 seconds. The fairness algorithm has significantly increased the number of received packets by appropriately increasing the packet delay. The average end-to-end delay of UDP packets is 0.0773 seconds, which is slightly higher than the UDP delay of the default algorithm. Compared with the performance of the default algorithm (Figure 6 and Figure 7 ), the fairness algorithm can greatly improve the transmission performance of TCP services and ensure task offloading in mixed flow scenarios. At the same time, it can also maintain the UDP service at an appropriate level, especially controlling the packet delay of UDP services and maintaining the fairness of TCP / UDP mixed services.
[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A task offloading fairness transmission method based on packet type identification, characterized in that: The following steps are involved: Step 1: Packet type identification: The base station RSU identifies the type of the packet sent by the edge server, reads its message header, and determines whether the packet type is a TCP-ACK packet or a UDP service packet; Step 2: Arrange the position of packets entering the queue. RSU inserts TCP-ACK packets into the head position of the send buffer packet queue according to the packet type identification result, and places UDP service packets at the tail position of the queue. The TCP-ACK packets in the queue will not be placed after the UDP service packets. Step 3: The queue packets with bytes as the statistical unit are discarded. After the new packets are queued, the length of the packets L is counted in bytes. p The original length L of the packet queue in the RSU send buffer old , calculate the current length L of the packet queue in the send buffer new , the maximum length of the buffer queue is specified as q max , according to L new With q max Based on the numerical comparison result, the RSU discards a specific packet or retains the packet; The queue packet discarding in step 3 with bytes as the statistical unit specifically includes the following steps: (1) RSU counts the length of the newly received packet L p The original length L of the packet queue in the RSU send buffer old ; (2) Calculate the current length L of the packet queue in the send buffer new , there is L new =L old +L p ; (3) Set the maximum length of the buffer queue to q max , the queue performs retention or discarding of packets; Step 1: If L new Less than q max , then keep the group; Step 2: If L new Greater than q max , the packet at the head of the queue is discarded; Step 4: Dynamically set the MAC layer contention window value. For different types of packets, the base station MAC layer uses different contention windows CW. min Numeric value; The dynamic setting of the MAC layer contention window value in step 4 specifically includes the following steps: Modeling and experimental description, contention window value CW of MAC layer backoff mechanism min It will affect the packet transmission delay and packet collision probability. For a specific packet, the transmission delay and collision probability cannot achieve the best performance at the same time. The RSU must focus on it when sending to ensure the comprehensive performance of the entire network's mixed services. For different types of packets, the base station MAC layer uses different CW min Numerical value, assuming that the wireless MAC layer of the base station RSU sets the initial value of the contention window to W0; (1) For TCP-ACK packets, the wireless MAC layer of the base station sets a contention window CW min =a*W0, where a≥2; (2) For UDP packets, the wireless MAC layer of the base station sets a contention window CW min = b * W0, where 0 <b<1。 2. The task offloading fairness transmission method based on packet type identification according to claim 1 is characterized in that: The group type identification in step 1 specifically includes the following steps: (1) RSU receives various packets sent by the edge server; (2) RSU reads the "upper layer protocol identifier" field in the header of the received IP message; (3) If the value of the "Upper Layer Protocol Identifier" field is "00000110", the received packet is determined to be a TCP service; Step 1: Read the "ACK" field in the TCP packet header. The value is 1, indicating that the packet is a TCP-ACK packet. Step 2: Read the "ACK" field in the TCP packet header. The value is 0, indicating that the packet is a TCP data packet. (4) If the value of the "Upper Layer Protocol Identifier" field is "00010001", the received packet is determined to be a UDP packet.
3. The task offloading fairness transmission method based on packet type identification according to claim 1 is characterized in that: The arrangement of the positions of the groups entering the queue in step 2 specifically includes the following steps: (1) Insert the TCP-ACK packet into the head position of the packet queue of the RSU send buffer; (2) For UDP packets, insert them into the tail position of the packet queue of the RSU send buffer.
Citation Information
Patent Citations
Active queue management method based on packet DSCP (Differentiated Services Code Point) marks
CN101969408A
D2D task unloading system and multi-type resource transaction method thereof
CN111343595A