Communication method and apparatus, and related device
View Patent ↗Embodiments of this application provide a communication method and apparatus, and a related device. The method includes: A first device sends first V2X unicast information to a second device, where the first V2X unicast information includes a first media access control MAC address and a first identifier; the first device receives second V2X unicast information from the second device, where the second V2X unicast information includes a second MAC address and a second identifier; and the first device generates another MAC address when the second V2X unicast information carries indication information, the first MAC address is the same as the second MAC address, and the first identifier is the same as the second identifier, where the indication information indicates that the second MAC address is a conflicting address.
1 . A communication method, comprising:
sending, by a first device, first vehicle to everything (V2X) unicast information to a second device, wherein the first V2X unicast information comprises a first media access control (MAC) address and a first identifier that is not part of the first MAC address;
receiving, by the first device, second V2X unicast information from the second device, wherein the second V2X unicast information comprises a second MAC address and a second identifier that is not part of the second MAC address; and
generating another MAC address when the following conditions met: the second V2X unicast information carries indication information, the first MAC address is the same as the second MAC address, and the first identifier is the same as the second identifier, wherein the indication information indicates that the second MAC address is a conflicting address.
2 . The method according to claim 1 , wherein the first identifier is generated by the first device, and remains unchanged in a transmission process of a unicast service corresponding to the first V2X unicast information.
3 . The method according to claim 1 , wherein the first V2X unicast information further comprises a third identifier, the third identifier changes in a transmission process of a unicast service corresponding to the first V2X unicast information, and the second V2X unicast information further comprises a fourth identifier; and
the generating another MAC address when the second V2X unicast information carries indication information, the first MAC address is the same as the second MAC address, and the first identifier is the same as the second identifier comprises:
generating another MAC address when the second V2X unicast information carries the indication information, the first MAC address is the same as the second MAC address, the first identifier is the same as the second identifier, and the third identifier is the same as the fourth identifier.
4 . The method according to claim 3 , wherein the third identifier is determined in at least one of the following manners:
a quantity of transmissions of the unicast service corresponding to the first V2X unicast information;
a current phase of the unicast service corresponding to the first V2X unicast information; or
a random value.
5 . The method according to claim 3 , wherein the first V2X unicast information further comprises a fifth identifier, the second V2X unicast information further comprises a sixth identifier, the fifth identifier indicates a manner for determining the third identifier, and the sixth identifier indicates a manner for determining the fourth identifier.
6 . The method according to claim 3 , wherein the first identifier and the second identifier are dedicated short range communications service advertisement (DSA) identifiers, and the third identifier and the fourth identifier are content count.
7 . The method according to claim 1 , wherein the second V2X unicast information is carried in a MAC data frame, a DSA data frame, or a dedicated short message protocol (DSMP) data frame.
8 . The method according to claim 1 , wherein the method further comprises:
generating, by the first device, another identifier after reselecting generating another MAC address.
9 . A communication method, comprising:
receiving, by a second device, first V2X unicast information from a first device, wherein the first V2X unicast information comprises a first media access control (MAC) address and a first identifier that is not part of the first MAC address; and
sending, by the second device, second V2X unicast information to the first device when the first MAC address conflicts with a MAC address of a third device, wherein the second V2X unicast information comprises indication information, a second MAC address, and a second identifier that is not part of the second MAC address, the indication information indicates that the second MAC address is a conflicting address, the second MAC address is the same as the first MAC address, and the second identifier is the same as the first identifier.
10 . The method according to claim 9 , wherein the first identifier is generated by the first device, and remains unchanged in a transmission process of a unicast service corresponding to the first V2X unicast information.
11 . The method according to claim 9 , wherein the method further comprises:
receiving, by the second device, third V2X unicast information from the third device, wherein the third V2X unicast information comprises a third MAC address and a seventh identifier; and
that the first MAC address conflicts with a MAC address of a third device comprises:
the first MAC address is the same as the third MAC address, and the first identifier is different from the seventh identifier.
12 . The method according to claim 9 , wherein the first V2X unicast information further comprises a third identifier, the third identifier changes in a transmission process of a unicast service corresponding to the first V2X unicast information, the second V2X unicast information further comprises a fourth identifier, and the fourth identifier is the same as the third identifier.
13 . The method according to claim 12 , wherein the method further comprises:
receiving, by the second device, the third V2X unicast information from the third device, wherein the third V2X unicast information comprises a third MAC address, a seventh identifier, and an eighth identifier; and
determining, by the second device, that the first MAC address is the same as the third MAC address and the first identifier is different from the seventh identifier; and
the sending, by the second device, second V2X unicast information to the first device comprises:
when the third identifier and the eighth identifier are determined based on a quantity of transmissions of a unicast service corresponding to unicast information, sending, by the second device, the second V2X unicast information to the first device based on a fact that a value corresponding to the third identifier is less than a value corresponding to the eighth identifier; or
when the third identifier and the eighth identifier are determined based on a current phase of a unicast service corresponding to unicast information, sending, by the second device, the second V2X unicast information to the first device based on a fact that a value corresponding to the third identifier is less than a value corresponding to the eighth identifier; or
when the third identifier and the eighth identifier are random values, randomly sending, by the second device, the second V2X unicast information to the first device.
14 . The method according to claim 12 , wherein the first V2X unicast information further comprises a fifth identifier, the second V2X unicast information further comprises a sixth identifier, the fifth identifier indicates a manner for determining the third identifier, and the sixth identifier indicates a manner for determining the fourth identifier.
15 . The method according to claim 12 , wherein the first identifier and the second identifier are dedicated short range communication service advertisement (DSA) identifiers, and the third identifier and the fourth identifier are content count.
16 . A communication apparatus, comprising:
one or more processors configured to:
send first V2X unicast information to a second device, wherein the first V2X unicast information comprises a first media access control MAC address and a first identifier that is not part of the first MAC address;
receive second V2X unicast information from the second device, wherein the second V2X unicast information comprises a second MAC address and a second identifier that is not part of the second MAC address; and
generate another MAC address when the following conditions met: the second V2X unicast information carries indication information, the first MAC address is the same as the second MAC address, and the first identifier is the same as the second identifier, wherein the indication information indicates that the second MAC address is a conflicting address.
17 . The apparatus according to claim 16 , wherein the one or more processors are configured to generate the first identifier, and wherein the first identifier remains unchanged in a transmission process of a unicast service corresponding to the first V2X unicast information.
18 . The apparatus according to claim 16 , wherein the first V2X unicast information further comprises a third identifier, the third identifier changes in a transmission process of a unicast service corresponding to the first V2X unicast information, and the second V2X unicast information further comprises a fourth identifier; and
the one or more processors are configured to:
generate another MAC address when the second V2X unicast information carries the indication information, the first MAC address is the same as the second MAC address, the first identifier is the same as the second identifier, and the third identifier is the same as the fourth identifier.
19 . The apparatus according to claim 18 , wherein the third identifier is determined in at least one of the following manners:
a quantity of transmissions of the unicast service corresponding to the first V2X unicast information;
a current phase of the unicast service corresponding to the first V2X unicast information; or
a random value.
20 . The apparatus according to claim 18 , wherein the first V2X unicast information further comprises a fifth identifier, the second V2X unicast information further comprises a sixth identifier, the fifth identifier indicates a manner for determining the third identifier, and the sixth identifier indicates a manner for determining the fourth identifier.
21 . The apparatus according to claim 18 , wherein the first identifier and the second identifier are dedicated short range communications service advertisement (DSA) identifiers, and the third identifier and the fourth identifier are content count.