Message filtering method and apparatus

A message filtering method using unique identifiers and application identifiers in vehicles reduces computational load by discarding duplicate unicast service announcements, enhancing processing efficiency.

JP7534033B2Active Publication Date: 2024-08-14YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023538989
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-26
Filing Date
2021-11-24
Publication Date
2024-08-14
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

Vehicles consuming computational resources by repeatedly processing unicast service announcements from roadside units due to periodic broadcasts, leading to reduced message processing efficiency.

Method used

Implementing a message filtering method that utilizes unique identifiers and application identifiers to determine if a unicast connection is already established, allowing terminals to discard duplicate messages and reduce computational load.

Benefits of technology

Reduces computational resource consumption and improves message processing efficiency by preventing redundant processing of identical messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007534033000011
    Figure 0007534033000011
  • Figure 0007534033000007
    Figure 0007534033000007
  • Figure 0007534033000014
    Figure 0007534033000014
Patent Text Reader

Abstract

The present application discloses a message filtering method and apparatus. The method includes: establishing a first unicast connection by a first terminal to a third terminal; storing a mapping relationship between a first identity and a first application identifier corresponding to the connection, where the first identity is a unique identifier of the third terminal, and the first application identifier is an identifier of an application service provided by the third terminal. The first terminal receives a first message broadcast by a second terminal, where the first message includes a second identity and a second application identifier, where the second identity is a unique identifier of the second terminal, and the second application identifier is an identifier of an application service provided by the second terminal. If the second identity is the same as the first identity and the second application identifier matches the first application identifier, the first terminal refuses to establish a second unicast connection to the second terminal. During the implementation of the present application, repeated messages are filtered, whereby the consumption of computing resources of the terminal is reduced and message processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to the field of Internet of Vehicles, and in particular to a message filtering method and apparatus. [Background technology]

[0002] As the number of vehicles in operation continues to increase, road capacity will gradually become saturated, and problems such as traffic congestion and traffic accidents will become more and more prominent. Intelligent information exchange and sharing between vehicles and X (people, vehicles, roads, groups, etc.) can be implemented based on Internet of Vehicles (IOV) technology. In this way, vehicles can obtain traffic information, crime prevention alarm information, etc. in a timely manner, thereby alleviating traffic congestion, avoiding traffic accidents, and reducing road safety risks to a certain extent.

[0003] With the development of the Internet of intelligent vehicles, the requirements for Vehicle to Everyting (V2X) unicast services based on Long Term Evolution (LTE), such as vehicle-to-vehicle payment and vehicle identity identification, are gradually increasing. The Vehicle to Infrastructure (V2I) unicast establishment process is used as an example. A Roadside Unit (RSU) periodically broadcasts a unicast service announcement (e.g., service establishment guide) to inform surrounding vehicles. After receiving the unicast service announcement, the surrounding vehicles need to perform a parsing operation, such as signature validation, on the unicast service announcement, and establish a unicast connection to the RSU based on the unicast service announcement based on the actual service requirement.

[0004] Because unicast service announcements are transmitted periodically, vehicles that have already established a unicast connection to the RSU still receive and parse the unicast service announcements broadcast by the RSU, thereby heavily consuming the vehicle's computational resources and reducing message processing efficiency. Summary of the Invention

[0005] The embodiments of the present application disclose a message filtering method and apparatus, so that a terminal can filter repeatedly received messages sent by the same device and indicating the same application service, thereby reducing the computational resources consumed by the terminal and improving message processing efficiency.

[0006] According to a first aspect, an embodiment of the present application provides a message filtering method applied to a first terminal, the method including: establishing a first unicast connection to a third terminal by the first terminal; storing a mapping relationship between a first identity and a first application identifier by the first terminal based on the first unicast connection, where the first identity is a unique identifier of the third terminal and the first application identifier is an identifier of an application service provided by the third terminal; receiving a first message broadcasted by a second terminal, the first message including a second identity and a second application identifier, where the second identity is a unique identifier of the second terminal and the second application identifier is an identifier of an application service provided by the second terminal; and refusing to establish a second unicast connection to the second terminal by the first terminal when the second identity is the same as the first identity and the second application identifier matches the first application identifier.

[0007] In the above method, when a mapping relationship between a second identity and a second application identifier corresponding to the first message is the same as a mapping relationship between a first identity and a first application identifier corresponding to a first unicast connection established by the first terminal, the first terminal discards the first message and does not establish a second unicast connection to the second terminal. In this way, the terminal filters repeatedly received messages sent by the same device and indicating the same application service, thereby reducing the computational resources consumed by the terminal and improving message processing efficiency.

[0008] In a possible implementation of the first aspect, the first identity is a media access control MAC address of the third terminal, the second identity is a MAC address of the second terminal, the first application identifier includes at least one of an identifier of the first application or a mapping value of an identifier of the first application, and the second application identifier includes at least one of an identifier of the second application or a mapping value of an identifier of the second application.

[0009] During the implementation of the above implementation, the first identity uniquely represents the third terminal, the second identity uniquely represents the second terminal, the first application identifier uniquely represents the first application provided by the third terminal, and the second application identifier uniquely represents the second application provided by the second terminal. Therefore, whether the second terminal is the same as the third terminal may be determined by comparing whether the second identity is the same as the first identity, and whether the second application is the same as the first application may be determined by comparing whether the second application identifier is the same as the first application identifier. This helps the first terminal to filter repeatedly received messages sent by the same device and indicating the same application service, thereby effectively reducing the computational resources consumed by the terminal.

[0010] In a possible implementation of the first aspect, when the first application identifier is an identifier of a first application and the second application identifier is an identifier of a second application, the second application identifier matching the first application identifier means that the identifier of the second application is the same as the identifier of the first application.

[0011] During the implementation of the above implementation, on the premise that the second terminal is the same as the third terminal, if the identifier of the second application is the same as the identifier of the first application, it indicates that the second terminal and the third terminal further provide the same application. In this case, the first terminal can directly filter the first message, thereby effectively reducing the computational resources consumed by the terminal and improving message processing efficiency.

[0012] In a possible implementation of the first aspect, when the first application identifier is a mapped value of an identifier of a first application and the second application identifier is a mapped value of an identifier of a second application, the second application identifier matching the first application identifier means that the mapped value of the identifier of the second application is the same as the mapped value of the identifier of the first application.

[0013] During the implementation of the above implementation, on the premise that the second terminal is the same as the third terminal, if the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application, it indicates that the second terminal and the third terminal further provide the same application service. In this case, the first terminal can directly filter the first message, thereby effectively reducing the computational resources consumed by the terminal and improving message processing efficiency.

[0014] In a possible implementation of the first aspect, when the first application identifier includes a first application identifier and a mapping value of the first application identifier and the second application identifier includes a second application identifier and a mapping value of the second application identifier, the second application identifier matches the first application identifier means that the second application identifier is the same as the first application identifier and the mapping value of the second application identifier is the same as the mapping value of the first application identifier.

[0015] During the implementation of the above implementation, on the premise that the second terminal is the same as the third terminal, if the identifier of the second application is the same as the identifier of the first application, and the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application, it indicates that the second terminal and the third terminal further provide the same application service. In this case, the first terminal can directly filter the first message, thereby effectively reducing the computational resources consumed by the terminal and improving message processing efficiency.

[0016] In a possible implementation of the first aspect, the first message further includes an identification area, which is used to indicate a service range of a second application supported by the second terminal, and the method further includes obtaining the identification area if the second identity is different from the first identity or the second application identifier does not match the first application identifier, and refusing to establish a second unicast connection to the second terminal by the first terminal if the first terminal is not located in the identification area.

[0017] During the implementation of the above, when the second terminal is different from the third terminal, or the second application provided by the second terminal is different from the first application provided by the third terminal, the first message needs to be parsed to obtain the identification area. If the first terminal is not located in the identification area, it indicates that the first terminal is not currently within the service range of the second application supported by the second terminal. Therefore, the first message is unrelated to the first terminal, and the first terminal can directly filter the first message, thereby improving message processing efficiency.

[0018] In a possible implementation of the first aspect, if the second identity is different from the first identity or the second application identifier does not match the first application identifier and the first terminal is located in an identification area, in response to the first message, the first terminal may further establish a second unicast connection to the second terminal and store a mapping relationship between the second identity and the second application identifier.

[0019] During the implementation of the above, when the second terminal is different from the third terminal, or the second application provided by the second terminal is different from the first application provided by the third terminal, and the first terminal is located in the service range of the second application supported by the second terminal, in response to the first message, the first terminal establishes a second unicast connection to the second terminal, and stores a mapping relationship between the second identity and the second application identifier based on the second unicast connection, thereby implementing the instant establishment of the unicast connection and improving unicast interaction efficiency.

[0020] In a possible implementation of the first aspect, after the first terminal establishes a second unicast connection to the second terminal, when the first terminal is no longer located in the identification area, the first terminal deletes the stored mapping relationship between the second identity and the second application identifier.

[0021] During the implementation of the above, after the establishment of the second unicast connection is completed, when the first terminal is no longer located in the service range of the second application supported by the second terminal, the first terminal needs to delete the mapping relationship between the second identity and the second application identifier corresponding to the second unicast connection. Thus, when the first terminal is again located in the service range of the second application, the received first message can be prevented from being erroneously filtered.

[0022] In a possible implementation of the first aspect, the mapping relationship between the first identity and the first application identifier is stored in mapping information.

[0023] In a possible implementation of the first aspect, the mapping information is stored at a network layer or a message layer of the first terminal.

[0024] During the implementation of the above implementation, when the mapping information is stored in the network layer of the first terminal, the mapping information is established and maintained by the network layer by using cross-layer primitives, and the first message is filtered based on the network layer, thereby effectively avoiding the consumption of upper layer resources in the first terminal. When the mapping information is stored in the message layer of the first terminal, the mapping information is directly established and maintained by the message layer, and no cross-layer primitives need to be used. The operation is simple.

[0025] In a possible implementation of the first aspect, the second identity is a source Layer 2 identifier in the first message, the identifier of the second application is an application identifier in the first message, and the mapping value of the identifier of the second application is a destination Layer 2 identifier in the first message.

[0026] During implementation of the above, the second identity may be a field of the first message, i.e., the source Layer 2 identifier, the identifier of the second application may be a field in the first message, i.e., the application identifier, and the mapping value of the identifier of the second application may be a field of the first message, i.e., the destination Layer 2 identifier.

[0027] In a possible implementation of the first aspect, the first message is a unicast service announcement, and the first message is carried by a dedicated service announcement DSA.

[0028] In a possible implementation of the first aspect, the second terminal is a roadside unit (RSU) or an on-board unit (OBU).

[0029] During the implementation of the above, the efficiency of unicast interaction between the first terminal and the roadside unit RSU can be improved, or the efficiency of unicast interaction between the first terminal and the vehicle-mounted unit OBU can be improved.

[0030] According to a second aspect, an embodiment of the present application provides a message filtering apparatus for establishing a first unicast connection to a third terminal and storing a mapping relationship between a first identity and a first application identifier based on the first unicast connection, wherein the first identity is a unique identifier of the third terminal and the first application identifier is an identifier of an application service provided by the third terminal, the apparatus including: a receiving unit configured to receive a first message broadcasted by a second terminal, the first message including a second identity and the second application identifier, the second identity being the unique identifier of the second terminal and the second application identifier being an identifier of an application service provided by the second terminal; and a processing unit configured to refuse to establish a second unicast connection to the second terminal if the second identity is the same as the first identity and the second application identifier matches the first application identifier.

[0031] The first identity is a media access control MAC address of the third terminal, the second identity is a MAC address of the second terminal, the first application identifier includes at least one of an identifier of the first application or a mapping value of an identifier of the first application, and the second application identifier includes at least one of an identifier of the second application or a mapping value of an identifier of the second application.

[0032] In a possible implementation of the second aspect, when the first application identifier is an identifier of a first application and the second application identifier is an identifier of a second application, the second application identifier matching the first application identifier means that the identifier of the second application is the same as the identifier of the first application.

[0033] In a possible implementation of the second aspect, when the first application identifier is a mapping value of an identifier of a first application and the second application identifier is a mapping value of an identifier of a second application, the second application identifier matching the first application identifier means that the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application.

[0034] In a possible implementation of the second aspect, when the first application identifier includes a first application identifier and a mapping value of the first application identifier and the second application identifier includes a second application identifier and a mapping value of the second application identifier, the second application identifier matches the first application identifier means that the second application identifier is the same as the first application identifier and the mapping value of the second application identifier is the same as the mapping value of the first application identifier.

[0035] In a possible implementation of the second aspect, the first message further includes an identification area, which is used to indicate a service range of a second application supported by the second terminal, and the processing unit is further configured to obtain the identification area when the second identity is different from the first identity or the second application identifier does not match the first application identifier, and to refuse to establish a second unicast connection to the second terminal when the device is not located in the identification area.

[0036] In a possible implementation of the second aspect, the processing unit is further configured to, in response to the first message, establish a second unicast connection and store a mapping relationship between the second identity and the second application identifier when the second identity is different from the first identity or the second application identifier does not match the first application identifier and the device is located in the identification area.

[0037] In a possible implementation of the second aspect, the processing unit is further configured to delete the stored mapping relationship between the second identity and the second application identifier when the device is no longer located in the identification area after establishing the second unicast connection.

[0038] In a possible implementation of the second aspect, the mapping relationship between the first identity and the first application identifier is stored in mapping information.

[0039] In a possible implementation of the second aspect, the mapping information is stored at a network layer or a message layer of the device.

[0040] In a possible implementation of the second aspect, the second identity is a source Layer 2 identifier in the first message, the identifier of the second application is an application identifier in the first message, and the mapping value of the identifier of the second application is a destination Layer 2 identifier in the first message.

[0041] In a possible implementation of the second aspect, the first message is a unicast service announcement, and the first message is carried by a dedicated service announcement DSA.

[0042] In a possible implementation of the second aspect, the second terminal is a roadside unit RSU or an on-board unit OBU.

[0043] According to a third aspect, an embodiment of the present application provides a message filtering apparatus, the apparatus including a processor and a memory, computer program instructions being stored in the memory, the processor executing the computer program instructions, such that the apparatus performs the method of the first aspect or any one of the possible implementations of the first aspect.

[0044] According to a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein program code for execution by an apparatus is stored on the computer readable storage medium, the program code comprising instructions used to perform the method of the first aspect or any one of the possible implementations of the first aspect.

[0045] According to a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is executed on a processor, the message filtering device can execute the method of the first aspect or any one of the possible implementations of the first aspect. The computer program product may be a software installation package. When the method provided in any one of the possible designs of the first aspect needs to be used, the computer program product may be downloaded to the device and executed to execute the method of the first aspect or any one of the possible implementations of the first aspect.

[0046] In order to more clearly describe the technical solutions of the embodiments of the present application, the following briefly describes the accompanying drawings to describe the embodiments. The accompanying drawings described below only show some embodiments of the present application, and it is obvious that a person skilled in the art can further derive other drawings from the accompanying drawings without creative efforts. [Brief description of the drawings]

[0047] [Figure 1] FIG. 1 is an architecture diagram of an Internet of Vehicles communication system. [Diagram 2] FIG. 2 is a schematic diagram of a protocol stack for the Internet of Vehicles. [Diagram 3] FIG. 1 is a schematic diagram of an application scenario. [Figure 4] 1 is a flowchart of a message filtering method according to an embodiment of the present application. [Figure 5A] FIG. 2 is a schematic diagram of a protocol stack of an OBU according to an embodiment of the present application. [Figure 5B]FIG. 2 is a schematic diagram of another protocol stack of an OBU according to an embodiment of the present application. [Figure 6] 4 is a flowchart of another message filtering method according to an embodiment of the present application. [Figure 7] FIG. 2 is a schematic diagram of an application scenario according to an embodiment of the present application; [Figure 8] 4 is a flowchart of yet another message filtering method according to an embodiment of the present application. [Figure 9] FIG. 2 is a schematic diagram of another application scenario according to an embodiment of the present application; [Figure 10] FIG. 1 is a schematic diagram of the structure of a computing device according to an embodiment of the present application. [Figure 11] FIG. 2 is a schematic diagram of the functional structure of a computing device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0048] The terms used in the embodiments of the present application are merely intended to describe specific embodiments and are not intended to limit the present application. In this description and claims of the embodiments of the present application, the terms "first", "second", etc. are intended to distinguish between different objects and do not indicate a particular order of the objects.

[0049] The following describes the technical solutions of the present application with reference to the accompanying drawings.

[0050] FIG. 1 is an architecture diagram of a communication system of the Internet of Vehicles. The communication system includes at least a plurality of terminals, any two of which may communicate wirelessly with each other. The terminals in the present application may include, but are not limited to, an On-Board Unit (OBU), an RSU, a mobile phone, a tablet computer, a computer with a wireless transceiver function, a smart gas station, a smart traffic light, etc. Messages may be transmitted between the terminals by using various types of communication interfaces, such as a PC5 interface and / or a Uu interface.

[0051] In the case of multiple terminals, terminal 1 and terminal 2 are used as an example. Terminal 1 may be an OBU, terminal 2 may be an RSU, and terminal 1 and terminal 2 may wirelessly communicate with each other. The RSU periodically broadcasts a first message, and the first message carries an application identifier. After receiving the first message, when a unicast connection corresponding to the first message needs to be established for the RSU, the OBU establishes a unicast connection between the OBU and the RSU in response to the first message.

[0052] In a specific implementation, as shown in FIG. 1, the multiple terminals further include terminal 3, where terminal 1 may be OBU1, terminal 3 may be OBU2, and terminal 2 may be an RSU. In this case, the RSU periodically broadcasts a first message. If OBU1 and OBU2 are both within the broadcast communication range of the RSU, each of OBU1 and OBU2 can receive the first message, and may determine whether to establish a unicast connection corresponding to the first message to the RSU based on the service requirements of each of OBU1 and OBU2. If a unicast connection to the RSU does not need to be established, the first message received thereafter is filtered. Filtering the first message means discarding or ignoring the first message. In other words, not responding to the first message is essentially refusing to repeatedly establish a unicast connection corresponding to the first message to the sender of the first message. It should be noted that the first message may be a unicast service announcement, and the first message may be carried by a Dedicated Service Advertisement (DSA).

[0053] In a specific implementation, terminal 3 may also broadcast the first message. For example, it is assumed that terminal 2 is an RSU, terminal 1 is an OBU1, and terminal 3 is an OBU2. In this case, it is assumed that OCU2 repeatedly broadcasts the first message, and OBU1 and RSU each receive the first message. In this way, the RSU filters the first message after making a decision based on a field in the first message (e.g., an application identifier), and OBU1 decides to establish a unicast connection corresponding to the first message to OBU2 after making a decision based on a field in the first message (e.g., an application identifier).

[0054] In some possible embodiments, the system further includes a wireless network device, a wired network, and a server. The terminal may communicate with the server by using the wired network or the wireless network device. For example, the terminal may receive a first message broadcast by the server, and the terminal may determine whether to filter the first message or respond to the first message, i.e., establish a unicast connection to the server corresponding to the first message, based on a field (e.g., an application identifier) ​​in the first message.

[0055] The wireless network device may be a network device of a 2G, 3G, 4G, 5G, or future communication system and includes multiple cell towers (only one shown) and any other networking components for connecting the wireless network device to a wired network.

[0056] The wired network may be a conventional wired communication network that connects wireless network devices and terminals (e.g., RSUs) to a server. One or more portions of the wired network may be implemented by using a standard wired network, an optical fiber or other optical network, a cable network, a power line, and any combination thereof.

[0057] The server may be a service center computer, a V2X application server, an Internet of Things (IoT) application server, a public safety service application server, an unmanned aerial vehicle server (e.g., an unmanned aerial vehicle surveillance enablement server or an unmanned aerial vehicle application service server), a V2X Application Enabler (VAE) server, etc. This is not particularly limited in the present application.

[0058] It should be noted that the communication system shown in Fig. 1 may be a 3rd Generation Partnership Project (3GPP) communication system, for example, a Long Term Evolution (LTE) system, a 5th Generation (5G) mobile communication system or a New Radio (NR) system, or a non-3GPP communication system, which is not particularly limited in this application.

[0059] It should be noted that Fig. 1 is only an example of an architecture diagram, and the number of network elements included in the communication system shown in Fig. 1 is not limited. In addition to the network function entities shown in Fig. 1, the network shown in Fig. 1 may further include other function entities, which are not shown in Fig. 1. Furthermore, the method provided in this embodiment of the present application may be applied to the communication system shown in Fig. 1. Indeed, the method provided in this embodiment of the present application may also be applied to other communication systems, which is not limited in this embodiment of the present application.

[0060] Specifically, the terminal may establish a protocol stack as shown in Fig. 2, and an interaction may be performed between the terminals or between the terminal and the network side device based on the protocol stack as shown in Fig. 2. Fig. 2 is a schematic diagram of a protocol stack of the Internet of Vehicles.

[0061] The protocol stack includes an application layer, a network layer, and an access layer. The application layer is mainly used to process the application layer service logic of the application service, for example, to generate instant messages and unicast service announcements. The application layer includes a user application and a message layer. The message layer is located in the application layer. The message layer connects to the data sublayer below and supports a specific user application above. The message layer can support the transmission of various types of data defined by the network layer of the LTE-based vehicle Internet wireless communication technology. The interaction between the message layer and the data sublayer in the network layer is implemented by using cross-layer primitives (also called operation primitives or service primitives).

[0062] The network layer includes a management sublayer and a data sublayer, the management sublayer is used to provide functions such as system configuration and maintenance to the terminal, and the management sublayer may be a Dedicated Management Entity (DME), which provides a management interface for all entities of the data sublayer. The data sublayer includes an adaptation layer, a DSMP layer, etc. The DSMP layer is used to perform data interaction with different applications. The adaptation layer is used to provide the function of transmission adaptation between the lower access layer and the upper protocol stack. For example, the underlying interface used for a data packet to be transmitted (e.g., a DSMP data packet or an IP data packet) is identified, and the corresponding data packet is forwarded to the corresponding layer of the access layer for transmission. The functions of the adaptation layer further include establishing a mapping between application identifiers and destination layer 2 identifiers, generating, modifying, or maintaining source layer 2 identifiers, etc. The data sublayer transports data streams between application layers, between different device management layer entities, or between a management layer entity and an application.

[0063] The access layer supports a cellular communication interface (e.g., a Uu interface) and / or a direct communication interface (e.g., a PC5 interface). The PC5 interface and the Uu interface may support different Radio Access Technologies (RATs). For example, the RATs may include LTE technology or NR technology.

[0064] In order to reduce the computational resources of the OBU consumed in the unicast establishment process and optimize information processing efficiency, the unicast service announcements broadcast by the roadside unit (RSU) may be filtered at the OBU side. Currently, the network layer of V2X based on LTE only supports filtering of unicast service announcements based on Application Identifier (AID). Specifically, the Dedicated Short Message Protocol (DSMP) data packet header of the network layer includes an AID, and different applications correspond to different AIDs, so that after the OBU receives the unicast service announcement from the RSU, the OBU may filter a certain type of message based on the AID. For example, the AID of the conventional Basic Safety Message (BSM) of an emergency vehicle is 113, and the AID of the stationary Road Side Information (RSI) is 3620.

[0065] RSU devices are generally deployed on roadsides, and an OBU may be within the broadcast range of multiple RSU devices that provide the same application service (e.g., highway toll collection). For example, FIG. 3 is a schematic diagram of an application scenario. On a highway, one RSU device is deployed on an uphill road and an downhill road separately. In other words, RSU1 is deployed on an uphill road, and RSU2 is deployed on an downhill road to communicate with OBUs in different driving directions. RSU1 and RSU2 communicate with the OBUs wirelessly, respectively. As can be seen from FIG. 3, RSU1 periodically broadcasts Msg1, and RSU2 periodically broadcasts Msg2. The application identifier of Msg1 is the same as the application identifier of Msg2. Therefore, the AID of Msg1 is the same as the AID of Msg2. For example, the AIDs are both 1. Since the OBU is currently located in both the communication range of RSU1 and the communication range of RSU2, the OBU can receive Msg1 and Msg2.

[0066] It is assumed that after receiving Msg1 broadcast by RSU1 and establishing a unicast connection to RSU1, the OBU further receives Msg2 sent by RSU2 and Mgs1 broadcast again by RSU1. If messages are filtered in the above AID-based manner, Msg1 re-sent by RSU1 may be filtered, but Msg2 broadcast by RSU2 is directly filtered because the AID of Msg1 is the same as the AID of Msg2. As a result, the OBU can establish a unicast connection to RSU2.

[0067] Therefore, it can be seen that if messages are filtered at the OBU based only on the AID, the OBU may not be able to establish a unicast connection to another RSU that should be connected due to incorrect filtering. If messages are not filtered at the OBU end, the application layer of the OBU will continuously perform processing such as message signature validity verification or decryption on the unicast service announcements received from the RSUs, thereby occupying a large amount of computational resources and reducing message processing efficiency.

[0068] The present application provides a message filtering method to effectively filter broadcast messages for the same type of application sent by terminals that have already established a unicast connection to the OBU, thereby reducing the computational resources consumed by the OBU and improving the message processing efficiency of the OBU.

[0069] Based on the above existing problems, the present application proposes a message filtering method. When the second terminal periodically broadcasts a first message, after receiving the first message, the first terminal makes a determination and analysis based on a field in the first message related to the application service (e.g., at least one of an application identifier or a destination layer 2 identifier) ​​and a source layer 2 identifier in the first message, so that if the second terminal has already established a unicast connection corresponding to the first message to the first terminal, the message broadcast by the second terminal indicating that the same application service is provided is filtered. Figure 4 is a flowchart of a message filtering method according to an embodiment of the present application. The method includes but is not limited to the following steps.

[0070] S101: A first terminal receives a first message broadcast by a second terminal.

[0071] In this embodiment of the present application, the second terminal periodically broadcasts a first message. The first message includes a source Layer 2 identifier, and the first message further includes at least one of an application identifier or a destination Layer 2 identifier. The source Layer 2 identifier, which may also be called an identity, is a unique identifier of the second terminal. Both the application identifier and the destination Layer 2 identifier are related to an application service, and the destination Layer 2 identifier corresponds to the application identifier. Thus, each of the application identifier and the destination Layer 2 identifier may be used to indicate an identifier of an application service provided by the second terminal.

[0072] In a specific implementation, an Application Identifier (AID) is used to distinguish different applications. In other words, the AID can be used to distinguish different application layer services. The Source Layer 2 ID is the MAC address of the second terminal, and the Source Layer 2 ID is used to indicate the sender of the first message, that is, the second terminal. Since the second terminal sends the first message in a broadcast manner, the Destination Layer 2 ID of the present application is a mapping value of the Application Identifier, and the Destination Layer 2 ID has a one-to-one correspondence with the Application Identifier.

[0073] It should be noted that the first message may be a unicast service announcement, and the first message is carried by the DSA.

[0074] The first terminal may be any one of an OBU, an RSU, a mobile phone, a computer with a wireless transceiver function, a smart gas station, etc. The second terminal is a device with a message broadcast function that can communicate with the first terminal. The second terminal may be, but is not limited to, an OBU, an RSU, a mobile phone, a computer with a wireless transceiver function, a smart gas station, a smart traffic light, a tablet computer, etc.

[0075] It should be noted that in this embodiment of the present application, different terminals have different source layer 2 identifiers (or identities). In other words, if the identities of two terminals are the same, it indicates that the two terminals are the same. For example, the identities are MAC addresses. The MAC addresses of different terminals are different, and there is no MAC address collision between different terminals. If the two terminals have the same MAC address, it indicates that the two terminals are the same. In S101, a first terminal receives a first message broadcast by a second terminal. It can be understood that the identity of the first terminal is different from the identity of the second terminal.

[0076] S102: The first terminal filters the first message based on a source Layer 2 identifier and at least one of an application identifier or a destination Layer 2 identifier.

[0077] In this embodiment of the present application, after receiving the first message, the first terminal may combine three fields in the first message: an application identifier, a source Layer 2 identifier, and a destination Layer 2 identifier, to determine whether to filter the first message. Specifically, the first terminal may determine whether a unicast connection corresponding to the first message is established based on the combined fields, and filter the first message if a unicast connection corresponding to the first message is established. There are mainly three ways: an application identifier and a source Layer 2 identifier; a destination Layer 2 identifier and a source Layer 2 identifier; and an application identifier, a source Layer 2 identifier, and a destination Layer 2 identifier.

[0078] It should be noted that the first terminal filters the first message means that the first terminal ignores or discards the first message, does not need to perform parsing processing such as signature validation or decryption on the first message, and refuses the first terminal to establish a unicast connection corresponding to the first message with the second terminal. Therefore, the computation resources consumed by the first terminal are greatly reduced, and the message processing efficiency is improved.

[0079] The first message may further rely on mapping information when determining whether to filter the first message. The mapping information records a mapping relationship between an application identifier, a source Layer 2 identifier, and a destination Layer 2 identifier corresponding to a unicast connection currently established by the first terminal. In a specific implementation, the mapping information may be stored at a message layer of the first terminal. In other words, the mapping information is established and maintained by the message layer of the first terminal. In another specific implementation, the mapping information may be stored at a network layer of the first terminal. In other words, the mapping information is established and maintained by the network layer of the first terminal.

[0080] The mapping information may be similar to the mapping relationship table shown in Table 1. As shown in Table 1, Table 1 records two relationships: aid1-mac3-f(aid1) and aid3-mac4-f(aid3). aid1-mac3-f(aid1) is used as an example for explanation. It is assumed that mac3 is the MAC address of the sender, i.e., the third terminal, for example, aid1 is the identifier of the first application provided by the third terminal, f(aid1) indicates a mapping value corresponding to the application identifier aid1 in the message, and f() is a mapping function. The mapping relationship aid1-mac3-f(aid1) exists in the mapping relationship table and indicates that the first terminal has already established a unicast connection based on the first application to the third terminal. Similarly, in aid3-mac4-f(aid3), it is assumed that mac4 is the MAC address of the fourth terminal, aid3 is the identifier of the third application, aid3 is not equal to aid1, in other words, the third application is different from the first application, mac4 is not equal to mac3, in other words, the fourth terminal is different from the third terminal, and f(aid3) is the mapping value of the identifier of the third application. The mapping relationship aid3-mac4-f(aid3) exists in the mapping relationship table and indicates that the first terminal has already established a unicast connection based on the third application to the fourth terminal. [Table 1]

[0081] The following describes subsequently the determination methods corresponding to the above three combination methods based on the mapping information.

[0082] The first combination method is to determine whether to filter the first message based on the application identifier and the source Layer 2 identifier.

[0083] Specifically, it is determined whether a first mapping relationship between the application identifier and the source Layer 2 identifier in the first message exists in the mapping information. If the first mapping relationship exists in the mapping information, it is determined that the first terminal has already established a unicast connection corresponding to the first message to the second terminal, and the first message is filtered when it is determined that the unicast connection corresponding to the first message has been established. If the first mapping relationship does not exist in the mapping information, it indicates that the first terminal has not established a unicast connection corresponding to the first message to the second terminal. If it is determined that the unicast connection corresponding to the first message has not been established, in response to the first message, the first terminal establishes a unicast connection corresponding to the first message to the second terminal.

[0084] The second combination method is to determine whether to filter the first message based on the destination layer 2 identifier and the source layer 2 identifier.

[0085] Specifically, it is determined whether a second mapping relationship between the destination Layer 2 identifier and the source Layer 2 identifier in the first message exists in the mapping information. If the second mapping relationship exists in the mapping information, it is determined that the first terminal has already established a unicast connection corresponding to the first message to the second terminal, and the first message is filtered when it is determined that the unicast connection corresponding to the first message has been established. If the second mapping relationship does not exist in the mapping information, it indicates that the first terminal has not established a unicast connection corresponding to the first message to the second terminal. When it is determined that the unicast connection corresponding to the first message has not been established, in response to the first message, the first terminal may establish a unicast connection corresponding to the first message to the second terminal.

[0086] A third combination method is to determine whether to filter the first message based on the application identifier, the destination Layer 2 identifier, and the source Layer 2 identifier.

[0087] Specifically, it is determined whether a third mapping relationship between the application identifier, the destination Layer 2 identifier, and the source Layer 2 identifier in the first message exists in the mapping information. If the third mapping relationship exists in the mapping information, it is determined that the first terminal has already established a unicast connection corresponding to the first message to the second terminal, and the first message is filtered when it is determined that the unicast connection corresponding to the first message has been established. If the third mapping relationship does not exist in the mapping information, it indicates that the first terminal has not established a unicast connection corresponding to the first message to the second terminal. When it is determined that the unicast connection corresponding to the first message has not been established, in response to the first message, the first terminal may establish a unicast connection corresponding to the first message to the second terminal.

[0088] Responding to the first message means that the first terminal sends the MAC address of the first terminal to the second terminal, so that the first terminal establishes a unicast connection corresponding to the first message to the second terminal, and the first terminal adds a mapping relationship between the application identifier, the source Layer 2 identifier, and the destination Layer 2 identifier in the first message to the mapping information. It should be noted that after the first terminal establishes a unicast connection corresponding to the first message to the second terminal, the first terminal may perform a unicast interaction with the second terminal based on the unicast connection, to perform a service transaction corresponding to the application identifier, such as a payment service, a vehicle identification, or a safety reminder service.

[0089] The above first combination method is used as an example, and the decision process in the first combination method is described with reference to Table 1. If the application identifier in the first message is aid2, aid2 is the identifier of the second application, the source layer 2 identifier in the first message is mac2, and mac2 represents the second terminal, aid2-mac2 is compared in order with the mapping relationships corresponding to all established unicast connections in Table 1. For example, aid2-mac2 corresponding to the first message is first compared with aid1-mac3 in Table 1. If aid2 is different from aid1 (which indicates that the second application is different from the first application), or mac2 is different from mac3 (which indicates that the second terminal is different from the third terminal), it indicates that the mapping relationship aid2-mac2 is different from the mapping relationship aid1-mac3 in Table 1, and aid2-mac2 is further compared with aid3-mac4 in Table 1. If aid2 is different from aid3 (which indicates that the second application is different from the third application) or mac2 is different from mac4 (which indicates that the second terminal is different from the fourth terminal), it indicates that the mapping relationship aid2-mac2 is different from the mapping relationship aid3-mac4 in Table 1. Therefore, it is determined that the mapping relationship aid2-mac2 does not exist in Table 1, that is, the first terminal has not established a unicast connection based on the second application to the second terminal. In other words, the first terminal has not established a unicast connection corresponding to the first message to the second terminal.

[0090] As another example, in the process of sequentially comparing aid2-mac2 corresponding to the first message with the mapping relationships corresponding to all established unicast connections in Table 1, if aid2-mac2 and aid3-mac4 in Table 1 are different from aid3 (which indicates that the second application is different from the third application) or mac2 is different from mac4 (which indicates that the second terminal is different from the fourth terminal), it indicates that the mapping relationship aid2-mac2 is different from the mapping relationship aid3-mac4 in Table 1. However, if aid2-mac2 and aid1-mac3 in Table 1 are different from aid1 (which indicates that the second application is the same as the first application) and mac2 is the same as mac3 (which indicates that the second terminal is the same as the third terminal), it indicates that the mapping relationship aid2-mac2 is the same as the mapping relationship aid1-mac3 in Table 1. Therefore, aid2-mac2 may be determined to already exist in Table 1, indicating that the first terminal has previously established a unicast connection corresponding to the first message to the second terminal. In other words, the first terminal refuses to re-establish a unicast connection corresponding to the first message to the second terminal.

[0091] In summary, the core idea of ​​filtering the first message by the first terminal is summarized as follows: before the first terminal receives the first message broadcasted by the second terminal, the first terminal establishes a first unicast connection to the third terminal, and the first terminal stores a mapping relationship between the first identity and the second application identifier corresponding to the first unicast connection. In some possible embodiments, the mapping relationship between the first identity and the first application identifier is stored in mapping information, and the mapping information is located in the network layer or message layer of the first terminal. The first identity is a unique identifier of the third terminal, for example, the MAC address of the third terminal. The first application identifier is an identifier of an application service provided by the third terminal, and the first application identifier includes one or more of an identifier of the first application and a mapping value of the identifier of the first application. The first terminal receives the first message broadcasted by the second terminal, and the first message includes the second identity and the second application identifier. The second identity is a unique identifier of the second terminal, for example, the MAC address of the second terminal. The second application identifier is an identifier of an application service provided by the second terminal, and the second application identifier includes one or more of an identifier of the second application and a mapping value of the identifier of the second application. The identity of the first terminal is different from the first identity (the identity of the third terminal), and the identity of the first terminal is different from the second identity (the identity of the second terminal).If the second identity is the same as the first identity and the second application identifier matches the first application identifier, it indicates that the second terminal is the same as the third terminal (because the second identity is the same as the first identity) and the application service provided by the second terminal is the same as the application service provided by the third terminal (because the second application identifier is the same as the first application identifier), that is, the first terminal has already established a unicast connection corresponding to the first message. Therefore, the first terminal may filter the first message, that is, the first terminal refuses to establish a second unicast connection to the second terminal.

[0092] There are three cases in which the second application identifier matches the first application identifier:

[0093] In the first case, when the second application identifier is the identifier of the second application and the first application identifier is the identifier of the first application, the second application identifier matching the first application identifier means that the identifier of the second application is the same as the identifier of the first application. In this case, the MAC address of the second terminal is the same as the MAC address of the third terminal (i.e., the second identity is the same as the first identity), which is equivalent to the related description of the above first combination method: a first mapping relationship between the application identifier and the source Layer 2 identifier in the first message exists in the mapping information. The second identity is the above source Layer 2 identifier, and the identifier of the second application is the above application identifier.

[0094] In the second case, when the second application identifier is a mapping value of the identifier of the second application and the first application identifier is a mapping value of the identifier of the first application, the second application identifier matching the first application identifier means that the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application. In this case, the MAC address of the second terminal is the same as the MAC address of the third terminal (i.e., the second identity is the same as the first identity), which is equivalent to the related description of the above second combination method: a second mapping relationship between the destination Layer 2 identifier and the source Layer 2 identifier in the first message exists in the mapping information. The second identity is the above source Layer 2 identifier, and the mapping value of the identifier of the second application is the above destination Layer 2 identifier.

[0095] In the third case, when the second application identifier includes the identifier of the second application and the mapping value of the identifier of the second application, and the first application identifier includes the identifier of the first application and the mapping value of the identifier of the first application, the second application identifier matches the first application identifier means that the identifier of the second application is the same as the identifier of the first application, and the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application. In this case, the MAC address of the second terminal is the same as the MAC address of the third terminal (i.e., the second identity is the same as the first identity), which is equivalent to the related description of the above third combination method: a third mapping relationship exists in the mapping information between the application identifier, the destination Layer 2 identifier, and the source Layer 2 identifier in the first message. The second identity is the above source Layer 2 identifier, the identifier of the second application is the above application identifier, and the mapping value of the identifier of the second application is the above destination Layer 2 identifier.

[0096] It should be noted that the above mapping information may be established and maintained by the network layer or message layer of the first terminal. For the description of the network layer or message layer, please refer to the related description of FIG. 2. The details will not be described again here. Therefore, there are also two ways for the first terminal to add the mapping relationship between the application identifier, the source layer 2 identifier, and the destination layer 2 identifier in the first message to the mapping information:

[0097] Method A:

[0098] When the mapping information is stored in the network layer, the application layer of the first terminal instructs the network layer to establish the mapping information in the network layer by using a cross-layer primitive (also called an operation primitive, a service primitive, etc.). For example, it is assumed that the first terminal first receives a first message (so the first message is not filtered), the first message carries an AID, a source layer 2 ID, and a destination layer 2 ID, and the first terminal decides to establish a unicast connection corresponding to the AID to the second terminal. In this case, the application layer of the first terminal may instruct the DME of the network layer to add a mapping relationship between the AID, the service layer 2 ID, and the destination layer 2 ID in the first message to the mapping information in the network layer by using a cross-layer primitive. First, when the first terminal functions as a user accepting a service, the syntax format of the cross-layer primitive of the first terminal is as follows: DME-UserService.request(LocalApplicationIndex,Action,UserRequestType,other information) UserService indicates that the first terminal acts as a user accepting a service, LocalApplicationIndex indicates the sequence number i, and Action indicates the action. Since the above action is addition, Action is set to Add. UserRequestType indicates the type of user request and is set to Address Mapping. Other information is set to (AID, source layer 2 ID, and destination layer 2 ID). Therefore, the cross-layer primitive for the network layer to add the mapping relationship between the AID, source layer 2 ID, and destination layer 2 ID in the first message to the mapping information is: DME-UserService.request(i,Add,Address Mapping,(AID,Source Layer 2 ID,Destination Layer 2 ID)) It may be.

[0099] In some possible embodiments, if the mapping relationship corresponding to the application identifier in the first message needs to be deleted from the mapping information at the network layer, the Action of the cross-layer primitive corresponding to deleting the mapping relationship needs to be set to Delete. In this case, the cross-layer primitive is specifically as follows: DME-UserService.request(i,Delete,Address Mapping,(AID,Source Layer 2 ID,Destination Layer 2 ID))

[0100] Second, when the first terminal acts as a service provider, the syntax format of the cross-layer primitive of the first terminal is as follows: DME-ProviderService.request(LocalApplicationIndex,Action,UserRequestType,otherinformation) ProviderService represents that the first terminal acts as a service provider. For parameters such as LocalApplicationIndex, Action, UserRequestType, and other information, please refer to the above description. Details will not be described again here. The network layer of the first terminal may set Action to Add or Delete based on actual requirements. An example in which Action is set to Add is used. When the first terminal acts as a service provider, when the network layer of the first terminal needs to add a mapping relationship between the AID, source layer 2 ID, and destination layer 2 ID in the first message to the mapping information, the corresponding cross-layer primitive is: DME-ProviderService.request(i, Add ,Address Mapping,(AID, source layer 2 ID, destination layer 2 ID) It is.

[0101] It should be noted that when the mapping information is stored in the network layer, the network layer of the first terminal may filter the first message based on the mapping information in any one of the above three combination methods, thereby effectively avoiding the consumption of upper layer resources of the first terminal.

[0102] Fig. 5A is a schematic diagram of a protocol stack of a first terminal according to an embodiment of the present application. As shown in Fig. 5A, the mapping information is stored in a network layer by the first terminal. Specifically, Table 1 is located in the network layer. When the first terminal needs to add a mapping relationship to the mapping information or delete a mapping relationship from the mapping information, the network layer of the first terminal may perform corresponding processing on the mapping information held by the network layer by using the above cross-layer primitive.

[0103] Method B:

[0104] When the mapping information is stored in the message layer, the mapping information is established by the message layer. For example, when the first terminal first receives the first message (therefore, the first message is not filtered), the first message carries an AID, a source layer 2 ID, and a destination layer 2 ID, and the first terminal determines to establish a unicast connection corresponding to the AID to the second terminal. In this case, the first terminal directly adds the mapping relationship between the AID, the service layer 2 ID, and the destination layer 2 ID in the first message to the mapping information in the network layer. In some possible embodiments, when the first terminal needs to delete the mapping relationship corresponding to the first message, the message layer of the first terminal may directly perform the corresponding processing on the mapping information stored in the message layer.

[0105] Figure 5B is a schematic diagram of a protocol stack of a first terminal according to an embodiment of the present application. As shown in Figure 5B, the mapping information is stored in a message layer by the first terminal. Specifically, Table 1 is located in the message layer. When the first terminal needs to add a mapping relationship to the mapping information or delete a mapping relationship from the mapping information, the message layer of the first terminal may directly perform the relevant operation on the mapping information held by the message layer.

[0106] In some possible embodiments, when it is determined whether to filter the first message in any one of the above three combination methods, the first mapping relationship may not exist in the mapping information, the second mapping relationship may not exist in the mapping information, or the third mapping relationship may not exist in the mapping information. That is, it indicates that the first terminal has not established a unicast connection corresponding to the first message with the second terminal. In this case, the first message may further include an identification area, and the first terminal may further determine whether to filter the first message by referring to the identification area. Specifically, when the first terminal is located outside the identification area, it indicates that the first message is unrelated to the first terminal, and the first terminal filters the first message. When the first terminal is located in the identification area, the unicast connection corresponding to the first message has not been established, so in response to the first message, the first terminal establishes a unicast connection corresponding to the first message with the second terminal, and adds a mapping relationship corresponding to the first message to the mapping information at the application layer or network layer.

[0107] Specifically, when it is determined that the first terminal has not established a unicast connection corresponding to the first message with the second terminal, the first terminal parses the first message to obtain an identification area in the first message. The identification area is used to indicate a service range of an application corresponding to an application identifier in the first message supported by the second terminal. That is, the application corresponding to the application identifier is only valid in the identification area. The identification area may be an identification radius, an area range coordinate, etc.

[0108] In a specific implementation, when the identification area is an area range coordinate, the first terminal obtains the location information of the first terminal and determines whether the location information of the first terminal belongs to the area range coordinate. If the location information of the first terminal does not belong to the area range coordinate, it indicates that the first terminal is located outside the identification area, so the first terminal directly filters the first message. If the location information of the first terminal belongs to the area range coordinate, it indicates that the first terminal is located in the identification area, and in response to the first message, the first terminal establishes a unicast connection corresponding to the first message to the second terminal.

[0109] In another specific implementation, when the identification area is an identification radius, in addition to needing to obtain the location information of the first terminal, the first terminal also needs to obtain the location information of the second terminal. The location information of the second terminal may be included in the first message, or may be included in another message broadcast by the second terminal. The location information of the second terminal may also be transmitted by another terminal that knows the location information of the second terminal. This is not particularly limited in this application. The distance between the first terminal and the second terminal is calculated based on the location information of the first terminal and the location information of the second terminal. When the distance is equal to or greater than the identification radius, it indicates that the first terminal is located outside the identification area, so the first terminal directly filters the first message. When the distance is less than the identification radius, it indicates that the first terminal is located in the identification area, so in response to the first message, the first terminal establishes a unicast connection corresponding to the first message to the second terminal.

[0110] After parsing the first message to obtain the identification area, the first terminal may further add the mapping relationship between the application identifier, the source layer 2 identifier, and the identification area in the first message to the interaction area information. The interaction area information is stored at the message layer (see FIG. 5A or FIG. 5B). The interaction area information is used to record the mapping relationship between the application identifier, the source layer 2 identifier, and the identification area corresponding to the unicast connection established by the first terminal.

[0111] The interaction area information may be similar to the mapping relationship table shown in Table 2. As shown in Table 2, Table 2 records two mapping relationships: aid1-mac3-area1 and aid3-mac4-area2, and aid1-mac3 is used as an example for explanation. The mapping relationship indicates that the first terminal has already established a unicast connection based on the application identifier aid1 to a terminal whose source layer 2 identifier is mac3, and the identification area corresponding to the application identifier aid1 is area1. For example, as shown in FIG. 5A or FIG. 5B, the interaction area information shown in Table 2 is located in the message layer. [Table 2]

[0112] In some possible embodiments, after the unicast connection corresponding to the first message is established, when the current location of the first terminal is no longer within the identification area of ​​the first message, the first terminal needs to delete the mapping relationship corresponding to the first message from the mapping information. In this way, if the first message is received when the first terminal is again located in the identification area corresponding to the application identifier, the mapping relationship corresponding to the first message does not exist in the mapping information, so the first terminal can establish a unicast connection corresponding to the first message to the second terminal to perform a related service (e.g., toll payment). Therefore, it can be seen that the operation of deleting the mapping relationship corresponding to the first message from the mapping information when the first terminal is no longer located in the identification area after the unicast interaction based on the first message is completed can effectively prevent the first terminal from erroneously filtering the first message received when the first terminal is again located in the identification area.

[0113] In some possible embodiments, after the unicast connection corresponding to the first message is established, when the location of the first terminal is no longer within the identification area of ​​the first message, in addition to deleting the mapping relationship corresponding to the first message from the mapping information, the application layer may further delete the mapping relationship corresponding to the first message from the interaction area information. This is not particularly limited in the present application. For example, in the case of aid1-mac3-f(aid1) in Table 1, it is assumed that the first terminal establishes a unicast connection based on the first application (aid1) to the third terminal. As can be seen from aid1-mac3-area1 in Table 2, the service range of the first application supported by the third terminal is area1. When the first terminal is no longer located in area1, the first terminal deletes the mapping relationship aid1-mac3-f(aid1) from the mapping information (e.g., Table 1). Furthermore, the first terminal deletes the mapping relationship aid1-mac3-area1 from the interaction area information (e.g., Table 2).

[0114] For example, a first terminal establishes a unicast connection based on a highway short-distance payment application to a second terminal. It is assumed that the first terminal is an OBU, and the OBU has completed a payment service for the highway section where the OBU is located based on the unicast connection. When the OBU is still located in the identification area of ​​the highway short-distance payment application, when the OBU receives the same highway short-distance payment application message broadcast by the second terminal again, the OCU may directly filter the first message based on the mapping information, since the OBU has completed the payment service for the highway section once. When the OBU leaves the identification area of ​​the highway short-distance payment application, the OBU needs to delete the mapping relationship corresponding to the unicast connection from the mapping information, so that when the OBU re-enters the identification area of ​​the highway short-distance payment application and receives a message corresponding to the highway short-distance payment application broadcast by the second terminal, the OBU will not erroneously filter the first message.

[0115] It should be noted that the mapping information may be located at the message layer or the network layer, and the interaction area information is located at the message layer. In some possible embodiments, when both the mapping information and the interaction area information are held by the message layer, the mapping information and the interaction area information may be combined into one table. The table is used to indicate the mapping relationship between the application identifier, the source Layer 2 identifier, the destination Layer 2 identifier, and the identification area corresponding to the unicast connection established by the first terminal.

[0116] During the implementation of this embodiment of the present application, when receiving a first message periodically broadcast by a second terminal, the first terminal performs a decision and analysis based on the application-related fields (e.g., application identifier and / or destination Layer 2 identifier) ​​in the first message and the sender identifier (i.e., source Layer 2 identifier) ​​in the first message, and knows to filter the first message broadcast by the second terminal indicating the same application if the first terminal has already established a unicast connection corresponding to the first message to the second terminal. In this way, the message filtering accuracy is improved, the consumption of computational resources caused by message parsing by the first terminal is reduced, and the message processing efficiency is improved.

[0117] As shown in Fig. 6, the following describes a message filtering method according to an embodiment of the present application. An example in which a first terminal is an OBU and a second terminal is an RSU may be used to describe an example of a solution. However, in the present application, the first terminal is not limited to only an OBU, and the second terminal is not limited to only an RSU. Furthermore, the embodiment of Fig. 6 may be unrelated to the embodiment of Fig. 4, or may be a supplement to the embodiment of Fig. 4. The method includes, but is not limited to, the following steps:

[0118] S201: An OBU receives a first message broadcast by an RSU.

[0119] The OBU is called an on-board unit, which is an on-board device that communicates with the RSU by using LTE-V2X or NR-V2X technology. The OBU is usually installed in a vehicle, for example, on the windshield. The RSU is mainly used in vehicle-to-road communication and is a key device for implementing an intelligent transportation system and an intelligent vehicle-infrastructure cooperative system. The RSU includes an antenna (RSU antenna), a radio frequency controller (RSU controller), etc. The RSU is usually placed on the side of the road and may further be connected to a road surface detection / monitoring device (e.g., a traffic light, a camera, or a microwave radar) to collect road information, road traffic information, etc., and may perform two-way communication and data exchange with nearby vehicles.

[0120] The first message includes an application identifier, a source Layer 2 identifier, and a destination Layer 2 identifier, where the application identifier is used to distinguish different applications, the source Layer 2 identifier is a MAC address of the RSU, and the destination Layer 2 identifier is a mapping value corresponding to the application identifier.

[0121] S202: The application layer or network layer of the OBU determines whether a unicast connection corresponding to the first message is established based on the source Layer 2 identifier and at least one of the application identifier or the destination Layer 2 identifier.

[0122] The unicast connection corresponding to the first message is a communication connection between the OBU and the RSU based on the application identifier. The three methods for determining whether the unicast connection corresponding to the first message is established by the application layer or the network layer of the OBU are respectively the above first combination method described in S102, that is, determining whether a first mapping relationship between the application identifier and the source Layer 2 identifier exists in the mapping information, the second combination method, that is, determining whether a mapping relationship between the destination Layer 2 identifier and the source Layer 2 identifier exists in the mapping information, and the third combination method, that is, determining whether a third mapping relationship between the application identifier, the source Layer 2 identifier, and the destination Layer 2 identifier exists in the mapping information. The determination may be performed in any one of the above three methods. If the first mapping relationship exists in the mapping information, if the second mapping relationship exists in the mapping information, or if the third mapping relationship exists in the mapping information, it is determined that the unicast connection corresponding to the first message is established, and S203 is performed. Alternatively, if the first mapping relationship does not exist in the mapping information, if the second mapping relationship does not exist in the mapping information, or if the third mapping relationship does not exist in the mapping information, it is determined that the unicast connection corresponding to the first message is not established, and S204 is executed. It should be noted that the mapping information may be established and maintained by an application layer or a network layer.

[0123] An example is used in which the mapping information is located in the network layer of the OBU. In a specific implementation, the OBU determines whether a mapping relationship corresponding to the first message exists in the mapping information by any one of the above three combination methods. For example, if the three fields included in the first message are (aid1, mac3, f(aid1)), it can be determined that the mapping relationship aid1-mac3-f(aid1) exists in the mapping information (referred to as Table 1 above). In this way, it indicates that the unicast connection corresponding to the first message has been established, and S203 is executed. If the three fields corresponding to the first message are (adi2, mac3, f(aid2)), it can be determined that the mapping relationship aid2-mac3-f(aid2) does not exist in the mapping information. Indeed, neither the mapping relationship aid2-mac3 exists in the mapping information, nor the mapping relationship mac3-f(aid2) exists in the mapping information. In this way, it indicates that the unicast connection corresponding to the first message has not been established, and S204 is executed. The mapping information in the network layer may be established by using the cross-layer primitive DME-UserService.request() or DME-ProviderService.request(). For the specific process, please refer to the relevant description of S102. The details will not be described again here.

[0124] S203: The OBU filters the first message.

[0125] Specifically, when a unicast connection corresponding to the first message is established, the OBU filters the first message, that is, the OBU refuses to establish a unicast connection corresponding to the first message to the RSU.

[0126] S204: The OBU parses the first message to obtain an identification area.

[0127] Specifically, when it is determined that a unicast connection corresponding to the first message has not been established, the OBU further parses the first message to obtain an identification area. The identification area is a service range corresponding to an application identifier in the first message supported by the RSU. For example, in an application scenario of highway toll collection, the application identifier in the first message broadcast by the RSU is used to indicate that the application type is highway toll collection, and the first message further includes an identification area. In this case, the identification area represents a current toll road section.

[0128] S205: The OBU determines whether the OBU is within an identification area.

[0129] Specifically, the OBU may determine whether the OBU is in the identification area based on the location information of the OBU. If it is determined that the OBU is located in the identification area, S206 is executed. If it is determined that the OBU is not located in the identification area, S203 is executed. For the method of determining whether the OBU is located in the identification area by the OBU, please refer to the relevant description of S102. The details will not be described again here.

[0130] For example, in the application scenario of highway area toll collection, the OBU determines that it knows that it has not established a unicast connection corresponding to the first message to the RSU based on the mapping information and the two fields in the first message, which are the source Layer 2 identifier and the application identifier. In this case, the OBU parses the first message to obtain the current toll road section, and determines whether the current location of the OBU is within the toll road section. If the OBU is located in the toll road section, S206 is executed. If the OBU is not located in the toll road section, S203 is executed.

[0131] S206: In response to the first message, the OBU establishes a unicast connection corresponding to the first message to the RSU, and adds a mapping relationship corresponding to the first message to the mapping information.

[0132] Specifically, in response to the first message, the OBU sends a MAC address of the OBU to the RSU to establish a unicast connection corresponding to the first message to the RSU, and the OBU adds a mapping relationship between the application identifier, the source Layer 2 identifier, and the destination Layer 2 identifier in the first message to the mapping information. Furthermore, the OBU may further add the mapping information between the application identifier, the source Layer 2 identifier, and the identification area in the first message to the interaction area information.

[0133] It should be noted that the mapping information may be stored at the network layer or the message layer, the interaction area information is stored at the application layer, and the mapping relationship between the application identifier, the source Layer 2 identifier, and the identification area corresponding to the unicast connection established by the OBU is stored in the interaction area information.

[0134] For example, if the first message contains (aid1,mac2,f(aid1),area1), where aid1 is the identifier of the first application, mac2 is the source Layer 2 identifier of the RSU, f(aid1) is the destination Layer 2 identifier of the RSU, and area1 is an identification area, area1 is obtained by parsing the first message. Based on the mapping information, the OBU determines that the OBU has not established a unicast connection based on the application identifier aid1 to the RSU, and it is assumed that the OBU is located in area1. In this case, the OBU sends the MAC address of the OBU to the RSU to establish a unicast connection corresponding to the first message, and adds aid1-mac2-f(aid1) to the mapping information and adds aid1-mac2-area1 to the interaction area information.

[0135] S207: When the OBU is no longer located in the identification area, the OBU deletes the mapping relationship corresponding to the first message from the mapping information at the application layer or the network layer.

[0136] In a specific implementation, after the OBU completes the interaction with the RSU based on the unicast connection corresponding to the first message, the vehicle in which the OBU is located continues to move, and the location of the vehicle changes. The location of the OBU is the same as the location of the vehicle in which the OBU is located. When the OBU is no longer located in the identification area (i.e., the vehicle in which the OBU is located has left the identification area), the OBU deletes the mapping relationship corresponding to the unicast connection from the mapping information in the application layer or the network layer.

[0137] It should be noted that after the OBU establishes the unicast connection corresponding to the first message, the OBU may determine in real time whether the OBU is within the identification area corresponding to the first message, or the OBU may determine at intervals whether the OBU is within the identification area in the first message. When the OBU determines that it is no longer located in the identification area, the OBU deletes the mapping relationship corresponding to the unicast connection from the mapping information.

[0138] It should be noted that the storage location of the mapping information in S206 is consistent with the storage location of the mapping information in S207. That is, when the mapping information in S206 is in the network layer, in S207, the network layer of the OBU stores the mapping information corresponding to the first message. relationship Alternatively, in the case where the mapping information of S206 is in the message layer, in S207, the OBU message layer deletes the mapping information corresponding to the first message. relationship from the mapping information.

[0139] For example, FIG. 7 is a schematic diagram of highway area toll collection. After an OBU first receives a first message broadcasted by an RSU at location 1 in FIG. 7, it is assumed that the first message includes (aid1, mac2, f(aid1), area1). The OBU establishes a unicast connection corresponding to the first message to the RSU, adds a mapping relationship aid1-mac2-f(aid1) corresponding to the first message to the mapping information, and adds aid1-mac2-area1 corresponding to the first message to the interaction area information. The OBU completes the unicast interaction with the RSU at location 1 (completes the toll payment once). It is assumed that the OBU receives the first message broadcasted by the RSU at location 2 again, and the OBU determines, based on the mapping information, that the OBU has already established a unicast connection corresponding to the first message to the RSU. Therefore, the OBU directly filters the first message received at location 2, which means that the OBU has completed the service payment once at location 1 within the identification area area1. Therefore, if the OBU is still within the identification area area1, the OBU does not need to perform payment again in response to the first message broadcast again by the RSU. However, as the OBU moves with the vehicle, if the OBU determines that the OBU's location is no longer located in the identification area area1, the OBU deletes the mapping relationship aid1-mac3-f(aid1) corresponding to the first message from the mapping information, so that the first message broadcast by the RSU and received by the OBU will not be erroneously filtered when the OBU re-enters area1.

[0140] The message filtering method provided in this embodiment of the present application is applied to the scenario shown in Fig. 3. As shown in Fig. 3, an OBU is located in both the communication range of RSU1 and the communication range of RSU2. The OBU receives Msg1 broadcasted by RSU1 and Msg2 broadcasted by RSU2. 2When the OBU first receives both Msg1 and Msg2, the OBU determines that there is no mapping relationship corresponding to Msg1 in the mapping information, and there is no mapping relationship corresponding to Msg2 in the mapping information. Therefore, the OBU has not established a unicast connection corresponding to Msg1 to RSU1, and has not established a unicast connection corresponding to Msg2 to RSU2. The OBU further determines that the OBU is currently located in the identification area corresponding to Msg1 and is also located in the identification area corresponding to Msg2. area1 is located in the communication range of RSU1, and area2 is located in the communication range of RSU2. 2It can be understood that Msg1 is located in the communication range of RSU2. Although the application identifier of Msg1 and the application identifier of Msg2 are the same (it is assumed that both application identifiers are aid1, and aid1 represents a vehicle near-distance payment service), Msg1 and Msg2 are not filtered in the above case by using the message filtering method provided in this application. Correspondingly, in response to Msg1, the OBU establishes a unicast connection corresponding to Msg1 to the RSU, and adds a mapping relationship aid1-mac1-f(aid1) to the mapping information. In response to Msg2, the OBU establishes a unicast connection corresponding to Msg2 to RSU2, and adds a mapping relationship aid1-mac2-f(aid1) to the mapping information. In some possible embodiments, the OBU further adds the mapping relationships aid1-mac1-area1 and aid1-mac2-area2 to the interaction area information. When the OBU receives Msg1 broadcast by RSU1 in area area1 again, the OBU determines that the mapping relationship aid1-mac1-f(aid1) corresponding to Msg1 already exists in the mapping information, and the OBU directly filters the received Msg1 this time. When the OBU receives Msg2' broadcast by RSU2 in area area2, and Msg2' contains (aid2, mac2, f(aid2), area2), if aid2 represents a vehicle identification service, the OBU determines that none of the mapping relationships aid2-mac2-f(aid2), aid2-mac2, and mac2-f(aid2) exists in the mapping information. Thus, in response to Msg2', the OBU establishes a unicast connection corresponding to Msg2' to RSU2.

[0141] It should be noted that the above is only described by using the vehicle proximity payment service on the highway as an example. The solution provided in this embodiment of the present application can not only be applied to the vehicle proximity payment service, but also to other services such as vehicle identification service or road condition safety service, which is not particularly limited in the present application.

[0142] During the implementation of this embodiment of the present application, after receiving a first message periodically broadcast by an RSU, the OBU determines whether a unicast connection corresponding to the first message is established based on mapping information at the application layer or the network layer, and the OBU filters the first message if a unicast connection is established, so that broadcast messages broadcast by the same RSU and indicating the same application are filtered, and the consumption of computing resources of the OBU is greatly reduced. Furthermore, the OBU may further determine whether to refuse to establish a unicast connection corresponding to the first message for the RSU by referring to the mapping information and the identification area obtained after the first message is parsed, thereby improving the message filtering accuracy and the message processing efficiency.

[0143] In another specific implementation, the message filtering provided in the present application may be further implemented to filter broadcast messages between OBUs. For example, the first terminal may be OBU1, and the second terminal may be OBU2. Figure 8 is an example of a flow chart of a message filtering method. The embodiment of Figure 8 may be unrelated to the embodiment of Figure 4 and the embodiment of Figure 6, or may be a supplement to the embodiment of Figure 4 and the embodiment of Figure 6. The method includes but is not limited to the following steps:

[0144] S301: OBU1 receives a first message broadcast by OBU2.

[0145] The first message broadcast by OBU2 includes an application identifier, a source Layer 2 identifier, and a destination Layer 2 identifier. The application identifier is used to indicate the type of application. Different applications have different application identifiers. The source Layer 2 identifier is the MAC address of OBU2. Since the first message is sent in a broadcast manner, the destination Layer 2 identifier is a mapping value of the application identifier, and the destination Layer 2 identifier corresponds to the application identifier.

[0146] S302: The application layer or network layer of the OBU1 determines whether a unicast connection corresponding to the first message is established based on the source Layer 2 identifier and at least one of the application identifier or the destination Layer 2 identifier.

[0147] Specifically, the mapping information records a mapping relationship between an application identifier, a source layer 2 identifier, and a destination layer 2 identifier corresponding to a unicast connection established by OBU1. The mapping information may be established by an application layer or may be established by a network layer. However, when the mapping information is established by a network layer, the application layer instructs the network layer to establish the mapping information by using a cross-layer primitive.

[0148] The OBU determines whether a unicast connection corresponding to the first message is established based on the mapping information is to determine whether a mapping relationship corresponding to the first message exists in the mapping information, that is, a first mapping relationship between an application identifier and a source layer 2 identifier, a second mapping relationship between a destination layer 2 identifier and a source layer 2 identifier, or a third mapping relationship between an application identifier, a source layer 2 identifier, and a destination layer 2 identifier, and if a mapping relationship corresponding to the first message exists in the mapping information, determine that a unicast connection corresponding to the first message is established, and execute S303; if a mapping relationship corresponding to the first message does not exist in the mapping information, determine that a unicast connection corresponding to the first message is not established, and execute S304. For a specific determination method, please refer to the relevant description of S102. Details will not be described again here.

[0149] S303: OBU1 filters the first message.

[0150] S304: OBU1 parses the first message to obtain the identification area.

[0151] It should be noted that the identification area is the service range corresponding to the application identifier in the first message supported by the OBU 2. For example, when the first message is an application message prompting the vehicle to change lanes, the identification area is the area of ​​the adjacent lanes corresponding to the OBU 2.

[0152] S305: OBU1 determines whether OBU1 is within the identification area.

[0153] Specifically, OBU1 determines whether OBU1 is within the identification area based on the location information of OBU1. If OBU1 is located in the identification area, it indicates that the first message is related to OBU1, and S306 is executed. If OBU1 is not located in the identification area, it indicates that the first message is not related to OBU1, and S303 is executed.

[0154] S306: In response to the first message, OBU1 establishes a unicast connection corresponding to the first message to OBU2, and adds a mapping relationship corresponding to the first message to the mapping information.

[0155] Specifically, when a mapping relationship corresponding to the first message does not exist in the mapping information and OBU1 is located in the identification area, in response to the first message, a unicast connection corresponding to the first message is established for OBU1 and OBU2, and the mapping relationship corresponding to the first message is added to the mapping information.

[0156] It should be noted that after completing the establishment of the unicast connection corresponding to the first message, OBU1 may perform unicast interaction with OBU2 based on the unicast connection, that is, perform the corresponding service based on the unicast connection. For example, when the application type corresponding to the unicast connection is vehicle identity identification, the corresponding service is to obtain the identity of the vehicle. Alternatively, when the application identifier corresponding to the unicast connection indicates lane change, the corresponding service is to obtain lane change information of the corresponding vehicle.

[0157] S307: When OBU1 is no longer located in the identification area, OBU1 deletes the mapping relationship corresponding to the first message from the mapping information at the application layer or the network layer.

[0158] Specifically, after the unicast interaction between OBU1 and OBU2 is completed, when OBU1 leaves the identification area, i.e., when OBU1 is no longer located in the identification area, OBU1 deletes the mapping relationship corresponding to the first message from the mapping information at the application layer or network layer.

[0159] FIG. 9 is a schematic diagram of an application scenario. It is assumed that OBU1, OBU2, and OBU3 are moving in the same direction on a road, and OBU3, OBU1, and OBU2 occupy one lane in sequence from left to right, respectively. The lane in which OBU1 is located is a middle lane. The lane in which OBU3 is located and the lane in which OBU2 is located are separately adjacent to the lane in which OBU1 is located. It is assumed that OBU2 intends to change lanes to the left to enter the lane in which OBU1 is located. In this case, OBU2 broadcasts a first message to inform surrounding vehicles that OBU2 is about to change lanes. It is assumed that the first message includes (aid2,mac2,f(aid2)), where aid2 is an application identifier corresponding to lane change, mac2 is the MAC address of OBU2, and f(aid2) is the mapping value of the application identifier. Because OBU1 and OBU3 are both within communication range of OBU2, both OBU1 and OBU3 are able to receive the first message broadcast by OBU2.

[0160] For OBU3, it is assumed that after OBU3 receives the first message, OBU3 determines that the mapping relationship f(aid2)-mac2 (the second combination method of S102) does not exist in the mapping information. Therefore, OBU3 determines that OBU3 has not established a unicast connection corresponding to the first message to OBU2. Furthermore, OBU3 parses the first message to obtain the identification area area2 (the elliptical area shown in FIG. 9) in the first message. OBU3 determines that OBU3 is not currently located in area2, which indicates that the first message received by OBU3 is unrelated to OBU3. In this case, OBU3 may directly filter the first message.

[0161] In the case of OBU1, after OBU1 receives the first message, OBU1 creates a mapping relationship aid2-mac2 (the first combinationIt is assumed that OBU1 determines that the MAC address of OBU1 in the first message does not exist in the mapping information. Therefore, OBU1 determines that OBU1 has not established a unicast connection corresponding to the first message to OBU2. Furthermore, OBU1 parses the first message to obtain the identification area area2 (the elliptical area shown in FIG. 9 ) in the first message. OBU1 determines that OBU1 is currently located in area2, which indicates that the first message received by OBU1 is related to OBU1. In response to the first message, OBU1 sends the MAC address of OBU1 to OBU2 to establish a unicast connection corresponding to the first message to OBU2, and adds the mapping relationship aid2-mac2-f(aid2) to the mapping information. After completing the establishment of the unicast connection, OBU1 may perform a unicast interaction with OBU2 based on the established unicast connection. For example, OBU1 may obtain information from OBU2, such as the moment and speed at which OBU2 makes a lane change this time. OBU1 continues to move. If OBU1 receives the first message broadcast by OBU2 again when OBU1 is still located in area2, OBU1 may directly filter the first message received this time through the decision performed in the above manner. If OBU1 is no longer located in area2, OBU1 may delete the mapping relationship aid2-mac2-f(aid2) from the mapping information.

[0162] During the implementation of this embodiment of the present application, it can be seen that during interaction between OBUs, if an OBU has already established a unicast connection corresponding to a broadcast message with a target OBU, the OBU can correctly filter broadcast messages that are repeatedly sent by the target OBU and indicate the same application service, thereby greatly reducing the computing resources consumed by message parsing by the OBU and improving message processing efficiency.

[0163] 10 is a schematic diagram of a structure of a computing device according to an embodiment of the present application. The computing device 30 includes at least a processor 110, a memory 111, and a receiver 112. In some possible embodiments, the computing device 30 may further include a transmitter 113. The receiver 112 and the transmitter 113 may be replaced by a communication interface, configured to provide information input and / or output to the processor 110. Optionally, the memory 111, the receiver 112, and the transmitter 113 may be separately connected or coupled to the processor 110 by using a bus. The computing device 30 may be the first terminal of the embodiment of FIG. 4, or the OBU of the embodiment of FIG. 6, or the OBU1 of the embodiment of FIG. 8.

[0164] The receiver 112 is configured to receive a first message broadcast by an on-board unit, a roadside unit, etc. When the computing device 30 determines to establish a unicast connection corresponding to the first message to the on-board unit, the roadside unit, etc., the transmitter 113 is configured to transmit a MAC address of the computing device 30 to the on-board unit, the roadside unit, etc. The receiver 112 and the transmitter 113 may include an antenna and a chipset configured to communicate directly or over an air interface with a device, a sensor, an RSU, or other entity device in the vehicle. The transmitter 113 and Receiver112 forms a communication module. The communication module may be configured to receive and transmit messages through one or more types of wireless communication (e.g., protocols), such as Bluetooth, IEEE 802.11 communication protocol, cellular technology, Worldwide Interoperability for Microwave Access (WiMAX) or LTE (Long Term Evolution), ZigBee protocol, Dedicated Short Range Communications (DSRC), RFID (Radio Frequency Identification) communication, and the like.

[0165] For specific implementation of the operations performed by the processor 110, please refer to the specific operations in the above method embodiments, such as determining whether a unicast connection corresponding to the first message is established and filtering the first message. The processor 110 may include one or more general-purpose processors, such as a Central Processing Unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLS may be a Complex Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), a Generic Array Logic (GAL), or any combination thereof.

[0166] The memory 111 may be a volatile memory, such as a random access memory (RAM). The memory 111 may alternatively include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The memory 111 may alternatively include a combination of the above types. The memory 111 may store programs and data. The stored programs include a mapping information update program, an interaction area information update program, and the like. The stored data includes mapping information (i.e., a mapping relationship between an application identifier, a source layer 2 identifier, and a destination layer 2 identifier), interaction area information (i.e., a mapping relationship between an application identifier, a source layer 2 identifier, and an identification area), and the like. The memory 111 may exist independently or may be incorporated into the processor 110.

[0167] Additionally, Figure 10 is merely an example of a computing device 30. Computing device 30 may include more or fewer components or have a different component organization than those shown in Figure 1. Additionally, each component shown in Figure 10 may be implemented by hardware, software, or a combination of hardware and software.

[0168] In this embodiment of the present application, the computing device 30 is configured to perform the method described in FIG. 4, the method on the OBU side described in the embodiment of FIG. 6, and the method on the OBU1 side described in the embodiment of FIG. 8.

[0169] 11 is a schematic diagram of a functional structure of a computing device according to an embodiment of the present application. The computing device 41 includes a receiving unit 410 and a processing unit 411. Optionally, in some possible embodiments, the computing device 41 further includes a sending unit 412. The computing device 41 may be implemented through hardware, software, or a combination of hardware and software.

[0170] The computing device 41 establishes a first unicast connection of the third terminal, and stores a mapping relationship between the first identity and the first application identifier based on the first unicast connection. The first identity is a unique identifier of the third terminal, and the first application identifier is an identifier of an application service provided by the third terminal. The receiving unit 410 is configured to receive a first message broadcasted by the second terminal. The first message includes a second identity and a second application identifier, where the second identity is a unique identifier of the second terminal, and the second application identifier is an identifier of an application service provided by the second terminal. The processing unit 411 is configured to refuse to establish a second unicast connection to the second terminal when the second identity is the same as the first identity and the second application identifier matches the first application identifier. In some possible embodiments, the sending unit 412 is configured to send the identity of the computing device 41 to the second terminal in response to the first message, so as to establish a second unicast connection.

[0171] The functional modules of the computing device 41 may be configured to implement the method described in the embodiment of Fig. 4. In the embodiment of Fig. 4, the receiving unit 410 may be configured to execute S101, and the processing unit 411 may be configured to execute S102. The functional modules of the computing device 41 may be further configured to implement the method on the OSU side described in the embodiment of Fig. 6 and the method on the OBU1 side described in the embodiment of Fig. 8. For the sake of brevity of this specification, the details will not be described again here.

[0172] In the above embodiments of this specification, the description of each embodiment has its own focus. For the parts not described in detail in the embodiments, please refer to the relevant descriptions of other embodiments.

[0173] It should be noted that those skilled in the art can understand that all or part of the steps of the method in the above embodiment may be implemented by a program instructing relevant hardware. The program may be stored in a computer-readable storage medium. The storage medium may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other computer-readable medium that can carry or store data.

[0174] The technical solution of the present application may be essentially or in part contributed to the prior art, or all or part of the technical solution may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a device (which may be a personal computer, a server, or a network device, a robot, a single-chip microcomputer, a chip, a robot, etc.) to execute all or part of the steps of the method described in the embodiments of the present application.

[0175] This application claims priority to Chinese Patent Application No. 202011570800.9, filed with the State Intellectual Property Office of the People's Republic of China on December 26, 2020, for the invention titled "MESSAGE FILTERING METHOD AND APPARATUS", the entire text of which is incorporated herein by reference.

Claims

1. A message filtering method applied to a first terminal, comprising: Establishing a first unicast connection by the first terminal to a third terminal; and storing a mapping relationship between a first identity and a first application identifier by the first terminal based on the first unicast connection, wherein the first identity is a unique identifier of the third terminal, and the first application identifier is an identifier of an application service provided by the third terminal. receiving a first message broadcast by a second terminal, the first message including a second identity and a second application identifier, the second identity being a unique identifier of the second terminal, and the second application identifier being an identifier of an application service provided by the second terminal; refusing to establish a second unicast connection by the first terminal to the second terminal if the second identity is the same as the first identity and the second application identifier matches the first application identifier; The method according to claim 1,

2. The first identity is a Medium Access Control (MAC) address of the third terminal, the second identity is a MAC address of the second terminal, the first application identifier includes at least one of an identifier of a first application or a mapping value of the identifier of the first application, and the second application identifier includes at least one of an identifier of a second application or a mapping value of the identifier of the second application. The method of claim 1.

3. When the first application identifier is the identifier of the first application and the second application identifier is the identifier of the second application, the second application identifier matching the first application identifier means that the identifier of the second application is the same as the identifier of the first application. The method of claim 2.

4. When the first application identifier is the mapping value of the identifier of the first application and the second application identifier is the mapping value of the identifier of the second application, the second application identifier matching the first application identifier means that the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application. The method of claim 2.

5. When the first application identifier includes the identifier of the first application and the mapping value of the identifier of the first application, and the second application identifier includes the identifier of the second application and the mapping value of the identifier of the second application, the second application identifier matches the first application identifier means that the identifier of the second application is the same as the identifier of the first application, and the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application. The method of claim 2.

6. The first message further includes an identification area, the identification area being used to indicate a service range of a second application supported by the second terminal, and the method further comprises: obtaining the identification area if the second identity is different from the first identity or if the second application identifier does not match the first application identifier; refusing to establish the second unicast connection to the second terminal by the first terminal if the first terminal is not located in the identification area; Further comprising 6. The method according to any one of claims 1 to 5.

7. The method comprises: If the second identity is different from the first identity or the second application identifier does not match the first application identifier and the first terminal is located in the identification area, in response to the first message, establishing the second unicast connection and storing a mapping relationship between the second identity and the second application identifier. The method according to claim 6.

8. The method comprises: and deleting the stored mapping relationship between the second identity and the second application identifier when the first terminal is no longer located in the identification area after establishing the second unicast connection. The method of claim 7.

9. the mapping relationship between the first identity and the first application identifier is stored in mapping information; 9. The method according to any one of claims 1 to 8.

10. The mapping information is stored in a network layer or a message layer of the first terminal.

10. The method of claim 9.

11. the second identity is a source Layer 2 identifier in the first message, the identifier of the second application is an application identifier in the first message, and the mapped value of the identifier of the second application is a destination Layer 2 identifier in the first message.

6. The method according to any one of claims 2 to 5.

12. the first message is a unicast service announcement, and the first message is carried by a Dedicated Service Announcement (DSA); 12. The method according to any one of claims 1 to 11.

13. The second terminal is a roadside unit (RSU) or an on-board unit (OBU).

13. The method according to any one of claims 1 to 12.

14. A message filtering apparatus for establishing a first unicast connection to a third terminal and storing a mapping relationship between a first identity and a first application identifier based on the first unicast connection, wherein the first identity is a unique identifier of the third terminal and the first application identifier is an identifier of an application service provided by the third terminal, the apparatus comprising: a receiving unit configured to receive a first message broadcast by a second terminal, the first message including a second identity and a second application identifier, the second identity being a unique identifier of the second terminal, and the second application identifier being an identifier of an application service provided by the second terminal; a processing unit configured to refuse to establish a second unicast connection to the second terminal if the second identity is the same as the first identity and the second application identifier matches the first application identifier; An apparatus having

15. The first identity is a Medium Access Control (MAC) address of the third terminal, the second identity is a MAC address of the second terminal, the first application identifier includes at least one of an identifier of a first application or a mapping value of the identifier of the first application, and the second application identifier includes at least one of an identifier of a second application or a mapping value of the identifier of the second application.

15. The apparatus of claim 14.

16. When the first application identifier is the identifier of the first application and the second application identifier is the identifier of the second application, the second application identifier matching the first application identifier means that the identifier of the second application is the same as the identifier of the first application.

16. The apparatus of claim 15.

17. When the first application identifier is the mapping value of the identifier of the first application and the second application identifier is the mapping value of the identifier of the second application, the second application identifier matching the first application identifier means that the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application.

16. The apparatus of claim 15.

18. When the first application identifier includes the identifier of the first application and the mapping value of the identifier of the first application, and the second application identifier includes the identifier of the second application and the mapping value of the identifier of the second application, the second application identifier matches the first application identifier means that the identifier of the second application is the same as the identifier of the first application, and the mapping value of the identifier of the second application is the same as the mapping value of the identifier of the first application.

16. The apparatus of claim 15.

19. The first message further includes an identification area, the identification area being used to indicate a service range of a second application supported by the second terminal, and the processing unit: obtaining the identification area if the second identity is different from the first identity or if the second application identifier does not match the first application identifier; refusing to establish the second unicast connection to the second terminal if the device is not located in the identification area. [0023] 19. Apparatus according to any one of claims 14 to 18.

20. The processing unit includes: and further configured to, in response to the first message, establish the second unicast connection and store a mapping relationship between the second identity and the second application identifier when the second identity is different from the first identity or the second application identifier does not match the first application identifier and the device is located in the identification area.

20. The apparatus of claim 19.

21. The processing unit includes: and further configured to delete the stored mapping relationship between the second identity and the second application identifier when the device is no longer located in the identification area after establishing the second unicast connection.

21. The apparatus of claim 20.

22. the mapping relationship between the first identity and the first application identifier is stored in mapping information; 22. Apparatus according to any one of claims 14 to 21.

23. The mapping information is stored at a network layer or a message layer of the device.

23. The apparatus of claim 22.

24. the second identity is a source Layer 2 identifier in the first message, the identifier of the second application is an application identifier in the first message, and the mapped value of the identifier of the second application is a destination Layer 2 identifier in the first message.

19. Apparatus according to any one of claims 15 to 18.

25. the first message is a unicast service announcement, and the first message is carried by a Dedicated Service Announcement (DSA); 25. Apparatus according to any one of claims 14 to 24.

26. The second terminal is a roadside unit (RSU) or an on-board unit (OBU).

26. Apparatus according to any one of claims 14 to 25.

27. A computer readable medium having program instructions stored thereon, comprising: The program instructions are used to implement the method according to any one of claims 1 to 13, Computer-readable medium.

28. 1. A message filtering device having a memory and a processor, comprising: Computer program instructions are stored in the memory; The processor executes the computer program instructions to cause the device to perform the method of any one of claims 1 to 13. A message filtering device.

Citation Information

Patent Citations

  • Method and apparatus for transmitting v2x data in wireless communication system

    US20190349730A1

  • Unicast session over a direct communication link

    US20200351966A1

  • L2 procedures for unicast and / or multicast link establishment and maintenance

    WO2020068991A1

  • New radio vehicle sidelink discovery

    WO2020092742A1