Message filtering method and device
By establishing a mapping relationship between identity identifiers and application identifiers in the Internet of Vehicles terminal devices and filtering out duplicate messages, the problem of computing resource waste caused by vehicles repeatedly receiving unicast service announcements is solved, and the message processing efficiency and unicast interaction efficiency are improved.
Patent Information
- Application Number
- CN202011570800.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-26
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2040-12-26
AI Technical Summary
In the Internet of Vehicles, vehicles repeatedly receive unicast service announcements broadcast by roadside units, resulting in excessive consumption of computing resources and reduced message processing efficiency.
By establishing a mapping relationship between identity identifiers and application identifiers in terminal devices, repeatedly received messages indicating the same application service are filtered, redundant unicast connections are rejected, and computing resources are saved.
It effectively reduces the computing resource consumption of terminal devices, improves message processing efficiency, and optimizes the unicast interaction process.
Smart Images

Figure CN114697911B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Vehicles, and in particular to a message filtering method and device. Background Art
[0002] With the continuous growth of car ownership, road carrying capacity is gradually becoming saturated, leading to increasingly prominent problems such as traffic congestion and traffic accidents. Internet of Vehicle (IOV) technology can realize intelligent information exchange and sharing between vehicles and X (people, vehicles, roads, cloud, etc.), allowing vehicles to obtain road traffic information and safety warning information in a timely manner, effectively alleviating traffic congestion, avoiding traffic accidents, and to a certain extent reducing traffic safety risks.
[0003] With the development of intelligent connected vehicles, the demand for unicast services in Long Term Evolution (LTE)-based V2X (Vehicle to Everything) is becoming increasingly prominent, such as near-field payment and vehicle identification. Consider the unicast establishment process of V2I (Vehicle to Infrastructure) as an example: a roadside unit (RSU) periodically broadcasts a unicast service announcement (e.g., a service establishment invitation) to notify surrounding vehicles. Upon receiving the unicast service announcement, surrounding vehicles perform parsing operations such as signature verification and then establish a unicast connection with the RSU based on actual service needs.
[0004] Since unicast service announcements are sent periodically, vehicles that have established a unicast connection with the RSU will still repeatedly receive and parse the unicast service announcements broadcast by the RSU, which greatly consumes the vehicle's computing resources and reduces message processing efficiency. Summary of the Invention
[0005] The embodiments of the present application disclose a message filtering method and apparatus, which can enable a terminal to filter repeatedly received messages from the same device indicating the same application service, effectively saving the consumption of computing resources of the terminal and improving message processing efficiency.
[0006] In the first aspect, an embodiment of the present application provides a message filtering method, which is applied to a first terminal, and the first terminal establishes a first unicast connection with a third terminal. The first terminal stores a mapping relationship between a first identity identifier and a first application identifier based on the first unicast connection, wherein the first identity identifier 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 method includes: receiving a first message broadcast by a second terminal, the first message including a second identity identifier and a second application identifier, wherein the second identity identifier is a unique identifier of the second terminal, and the second application identifier is an identifier of the application service provided by the second terminal; when the second identity identifier is the same as the first identity identifier, and the second application identifier matches the first application identifier, the first terminal refuses to establish a second unicast connection with the second terminal.
[0007] In the above method, when the mapping relationship between the second identity identifier and the second application identifier corresponding to the first message is the same as the mapping relationship between the first identity identifier and the first application identifier corresponding to the first unicast connection established by the first terminal, the first terminal discards the first message and does not establish a second unicast connection with the second terminal, thereby enabling the terminal to filter repeatedly received messages indicating the same application service sent from the same device, effectively saving the terminal's computing resource consumption and improving message processing efficiency.
[0008] In a possible implementation of the first aspect, the first identity identifier is the media access control MAC address of the third terminal, the second identity identifier is the MAC address of the second terminal, the first application identifier includes the identifier of the first application or at least one of the mapping values of the identifier of the first application, and the second application identifier includes the identifier of the second application or at least one of the mapping values of the identifier of the second application.
[0009] In implementing the above implementation method, the first identity identifier uniquely represents the third terminal, the second identity identifier 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, by comparing whether the second identity identifier and the first identity identifier are the same, it can be determined whether the second terminal and the third terminal are the same terminal. By comparing whether the second application identifier and the first application identifier are the same, it can be determined whether the second application and the first application are the same application. This helps the first terminal to filter repeatedly received messages indicating the same application service sent from the same device, effectively saving the consumption of computing resources of the terminal.
[0010] In a possible implementation of the first aspect, when the first application identifier is the identifier of the first application and the second application identifier is the identifier of the second application, matching the second application identifier with the first application identifier means that the identifier of the second application is the same as the identifier of the first application.
[0011] By implementing the above implementation method, on the premise that the second terminal and the third terminal are the same terminal, if the identifier of the second application is the same as the identifier of the first application, it means that the second terminal and the third terminal also provide the same application service. In this case, the first terminal can directly filter the first message, effectively saving the consumption of the terminal's computing resources and improving the message processing efficiency.
[0012] In a possible implementation of the first aspect, when the first application identifier is a mapping value of an identifier of the first application and the second application identifier is a mapping value of an identifier of the second application, matching the second application identifier with 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.
[0013] In implementing the above implementation method, on the premise that the second terminal and the third terminal are the same 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 means that the second terminal and the third terminal also provide the same application service. In this case, the first terminal can directly filter the first message, effectively saving the consumption of the terminal's computing resources and improving the message processing efficiency.
[0014] In a possible implementation of the first aspect, 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, which 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.
[0015] In implementing the above implementation method, on the premise that the second terminal and the third terminal are the same 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, then it means that the second terminal and the third terminal also provide the same application service. In this case, the first terminal can directly filter the first message, effectively saving the consumption of the terminal's computing resources and improving the message processing efficiency.
[0016] In a possible implementation of the first aspect, the first message also includes an identification area, which is used to indicate the service scope of the second application supported by the second terminal. The method also includes: when the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match, obtaining the identification area; when the first terminal is not within the identification area, the first terminal refuses to establish a second unicast connection with the second terminal.
[0017] When implementing the above implementation method, when the second terminal and the third terminal are not the same terminal, or when 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 an identification area. If the first terminal is not located in the identification area, it means 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 not related to the first terminal. The first terminal can directly filter the first message, thereby improving message processing efficiency.
[0018] In a possible implementation of the first aspect, when the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match, and when the first terminal is located within the identification area, the first terminal can also respond to the first message to establish the above-mentioned second unicast connection with the second terminal, and store the mapping relationship between the second identity identifier and the second application identifier.
[0019] When implementing the above-mentioned implementation method, when the second terminal and the third terminal are not the same 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 within the service range of the second application supported by the second terminal, the first terminal responds to the first message, establishes a second unicast connection with the second terminal, and stores the mapping relationship between the second identity identifier and the second application identifier based on the second unicast connection, thereby realizing the rapid establishment of the unicast connection and improving the efficiency of unicast interaction.
[0020] In a possible implementation of the first aspect, after the first terminal establishes the second unicast connection with the second terminal, when the first terminal is no longer within the identification area, the first terminal deletes the stored mapping relationship between the second identity identifier and the second application identifier.
[0021] When implementing the above-mentioned implementation method, after the second unicast connection is established, if the first terminal is no longer within 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 identifier and the second application identifier corresponding to the second unicast connection. In this way, when the first terminal is again within the service range of the second application, the received first message can be avoided from being erroneously filtered out.
[0022] In a possible implementation manner of the first aspect, a mapping relationship between the first identity identifier and the first application identifier is stored in mapping information.
[0023] In a possible implementation manner of the first aspect, the mapping information is stored in a network layer or a message layer of the first terminal.
[0024] In 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 using cross-layer primitives, and the first message is filtered based on the network layer, effectively avoiding the consumption of upper-layer resources within 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, without the need for cross-layer primitives, and thus simplifies operation.
[0025] In a possible implementation of the first aspect, the second identity identifier is the source layer 2 identifier of the first message, the identifier of the second application is the application identifier of the first message, and the mapping value of the identifier of the second application is the target layer 2 identifier of the first message.
[0026] In the above implementation method, the second identity identifier can be the source layer 2 identifier field of the first message, the identifier of the second application can be the application identifier field of the first message, and the mapping value of the identifier of the second application can be the target layer 2 identifier field of the first message.
[0027] In a possible implementation manner 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 manner of the first aspect, the second terminal is a roadside unit RSU or an on-board unit OBU.
[0029] By implementing the above implementation, 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 on-board unit OBU can be improved.
[0030] In the second aspect, an embodiment of the present application provides a device for message filtering, which establishes a first unicast connection with a third terminal. The device stores a mapping relationship between a first identity identifier and a first application identifier based on the first unicast connection, wherein the first identity identifier 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 device includes: a receiving unit, which is used to receive a first message broadcast by a second terminal, the first message including a second identity identifier and a second application identifier, wherein the second identity identifier is a unique identifier of the second terminal, and the second application identifier is an identifier of the application service provided by the second terminal; a processing unit, which is used to refuse to establish a second unicast connection with the second terminal when the second identity identifier is the same as the first identity identifier and the second application identifier matches the first application identifier.
[0031] The first identity identifier is the media access control MAC address of the third terminal, the second identity identifier is the MAC address of the second terminal, the first application identifier includes the identifier of the first application or at least one of the mapping values of the identifier of the first application, and the second application identifier includes the identifier of the second application or at least one of the mapping values of the identifier of the second application.
[0032] In a possible implementation of the second aspect, when the first application identifier is the identifier of the first application and the second application identifier is the identifier of the second application, matching the second application identifier with 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 the first application and the second application identifier is a mapping value of an identifier of the second application, matching the second application identifier with 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 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, which 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.
[0035] In a possible implementation of the second aspect, the first message also includes an identification area, which is used to indicate the service scope of the second application supported by the second terminal. The processing unit is also used to: obtain the identification area when the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match; and refuse to establish a second unicast connection with 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 also used to: when the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match, and when the device is located within the identification area, establish a second unicast connection in response to the first message, and store the mapping relationship between the second identity identifier and the second application identifier.
[0037] In a possible implementation manner of the second aspect, the processing unit is further configured to: after establishing the second unicast connection, if the device is no longer located in the identification area, delete the stored mapping relationship between the second identity identifier and the second application identifier.
[0038] In a possible implementation manner of the second aspect, a mapping relationship between the first identity identifier and the first application identifier is stored in mapping information.
[0039] In a possible implementation manner of the second aspect, the mapping information is stored in a network layer or a message layer of the device.
[0040] In a possible implementation of the second aspect, the second identity identifier is the source layer 2 identifier of the first message, the identifier of the second application is the application identifier of the first message, and the mapping value of the identifier of the second application is the target layer 2 identifier of the first message.
[0041] In a possible implementation manner 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 manner of the second aspect, the second terminal is a roadside unit RSU or an on-board unit OBU.
[0043] In a third aspect, an embodiment of the present application provides a device for message filtering, the device comprising a processor and a memory, the memory storing computer program instructions, the processor executing the computer program instructions to enable the device to execute the method in the first aspect or any possible implementation of the first aspect.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code for execution by a device, wherein the program code includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0045] In 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 apparatus for message filtering performs the method described in the first aspect or any possible embodiment of the first aspect. The computer program product may be a software installation package. When the method provided by any possible design of the first aspect is required, the computer program product may be downloaded and executed on the apparatus to implement the method described in the first aspect or any possible embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1This is an architectural diagram of a vehicle network communication system;
[0048] Figure 2 It is a schematic diagram of the protocol stack of the Internet of Vehicles;
[0049] Figure 3 It is a schematic diagram of an application scenario;
[0050] Figure 4 This is a flow chart of a message filtering method provided by an embodiment of the present application;
[0051] Figure 5A This is a schematic diagram of an OBU protocol stack provided in an embodiment of the present application;
[0052] Figure 5B Schematic diagram of another OBU protocol stack provided in an embodiment of the present application;
[0053] Figure 6 This is a flowchart of another message filtering method provided by an embodiment of the present application;
[0054] Figure 7 This is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0055] Figure 8 This is a flowchart of another message filtering method provided by an embodiment of the present application;
[0056] Figure 9 This is another application scenario diagram provided by an embodiment of the present application;
[0057] Figure 10 This is a schematic diagram of the structure of a computing device provided in this embodiment of the present application;
[0058] Figure 11 This is a functional structure diagram of a computing device provided in this embodiment of the present application. DETAILED DESCRIPTION
[0059] The terms used in the embodiments of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "first", "second", etc. in the description and claims of the embodiments of this application are used to distinguish different objects, rather than to describe a specific order.
[0060] The technical solution in this application will be described below with reference to the accompanying drawings.
[0061] See also Figure 1 , Figure 1This is an architectural diagram of a vehicle network communication system, wherein the communication system includes at least multiple terminals, and any two of the multiple terminals can communicate with each other wirelessly. The terminals in this application may include but are not limited to on-board units (OBUs), RSUs, mobile phones, tablet computers, or computers with wireless transceiver functions, smart gas stations, smart traffic lights, etc. Messages can be transmitted between terminals through different types of communication interfaces, such as PC5 ports and / or Uu ports.
[0062] For example, multiple terminals can be terminal 1 and terminal 2. Terminal 1 can be an OBU and terminal 2 can be an RSU. Terminal 1 and terminal 2 can communicate wirelessly. The RSU periodically broadcasts a first message that carries an application identifier. After receiving the first message, if the OBU needs to establish a unicast connection corresponding to the first message with the RSU, it will respond to the first message and establish a unicast connection between itself and the RSU.
[0063] In a specific implementation, Figure 1 As shown, the multiple terminals also include terminal 3. Terminal 1 can be OBU1, terminal 3 can be OBU2, and terminal 2 can be an RSU. In this case, the RSU periodically broadcasts the first message. If OBU1 and OBU2 are both within the broadcast communication range of the RSU, both OBU1 and OBU2 can receive the first message and can determine whether to establish a unicast connection corresponding to the first message with the RSU based on their own business needs. If a unicast connection with the RSU is not required, the subsequently received first message is filtered out. The so-called filtering of the first message means discarding or ignoring the first message. In other words, not responding to the first message actually means refusing to repeatedly establish a unicast connection corresponding to the first message with the sender of the first message. It should be noted that the first message can be a unicast service announcement, and the first message can be carried by a dedicated service announcement (DSA).
[0064] In one specific implementation, terminal 3 can also broadcast the first message. For example, assume that terminal 2 is an RSU, terminal 1 is OBU1, and terminal 3 is OBU2. In this case, assume that OBU2 periodically broadcasts the first message. OBU1 and the RSU both receive the first message. The RSU filters the first message based on a field in the first message (e.g., an application identifier). OBU1 determines based on a field in the first message (e.g., an application identifier) that it will establish a unicast connection with OBU2 corresponding to the first message.
[0065] 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 via 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 based on a field (e.g., an application identifier) in the first message, i.e., establish a unicast connection corresponding to the first message with the server.
[0066] The wireless network device may be a network device in a 2G, 3G, 4G, 5G or future communication system, including multiple cellular towers (only one is shown) and any other networking components required to connect the wireless network device to a wired network.
[0067] The wired network can be a conventional wired communication network that connects wireless network equipment and terminals (e.g., RSUs) to the server. One or more parts of the wired network can be implemented using standard wired networks, optical fibers or other optical networks, cable networks, power lines, and any combination thereof.
[0068] The server can be a service center computer, a V2X application server, an Internet of Things (IoT) application server, a public safety business application server, a drone server (such as a drone supervision enabling server or a drone application business server) or a V2X application enabler (V2X Application Enabler, VAE) server, etc., and this application does not make specific limitations.
[0069] It should be noted that Figure 1 The communication system shown may be a 3rd Generation Partnership Project (3GPP) communication system, for example, a Long Term Evolution (LTE) system, or a 5th Generation (5G) mobile communication system or a New Radio (NR) system, or a non-3GPP communication system, which is not specifically limited in this application.
[0070] It should be noted that Figure 1 This is only an exemplary architecture diagram, but not limited to Figure 1 The number of network elements included in the communication system shown. Although not shown, Figure 1 In addition to the network functional entities shown, Figure 1 The network shown may also include other functional entities. In addition, the method provided in the embodiment of the present application may be applied to Figure 1 The communication system shown in FIG. 1 , of course, the method provided in the embodiment of the present application can also be applied to other communication systems, and the embodiment of the present application is not limited to this.
[0071] Specifically, the terminal can establish Figure 2 The protocol stack shown in the figure can be used between terminals or between terminals and network devices based on Figure 2 See the protocol stack shown. Figure 2 , Figure 2 A schematic diagram of a protocol stack for the Internet of Vehicles is provided.
[0072] The protocol stack consists of the application layer, the network layer, and the access layer. The application layer is primarily responsible for processing the application-layer business logic of application services, such as generating instant messages and unicast service announcements. The application layer includes user applications and a message layer. The message layer is located within the application layer, connecting to the data sublayer downward and supporting specific user applications upward. The message layer supports the transmission of various types of data defined by the network layer of LTE-based vehicle-to-vehicle wireless communication technology. Interaction between the message layer and the data sublayer within the network layer is achieved through cross-layer primitives (also known as operation primitives or service primitives).
[0073] The network layer includes a management sublayer and a data sublayer. The management sublayer is used to provide system configuration and maintenance functions for terminals. The management sublayer can be a dedicated management entity (DME), which provides a management interface for all entities in the data sublayer. The data sublayer includes an adaptation layer, a DSMP layer, etc. The DSMP layer is used to exchange data with different applications, and the adaptation layer is used to provide transmission adaptation functions between the underlying access layer and the upper protocol stack. For example, it distinguishes the underlying interface used by the data packets to be sent (for example, DSMP packets, IP packets, etc.) and passes the corresponding data packets to the corresponding interface of the access layer for transmission. The functions of the adaptation layer also include establishing a mapping between the application identifier and the target layer 2 identifier, and generating / changing / maintaining the source layer 2 identifier. The data sublayer transmits data flows between application layers, as well as data flows between different device management layer entities or between management layer entities and applications.
[0074] The access layer supports a cellular communication interface (e.g., Uu port) and / or a direct communication interface (e.g., PC5 port), where the PC5 port and the Uu port can support different radio access technologies (RAT), for example, the RAT can include LTE technology or NR technology.
[0075] To reduce the consumption of computing resources by the OBU during the unicast establishment process and optimize information processing efficiency, unicast service announcements broadcast by the roadside unit (RSU) can be filtered on the OBU side. Currently, the LTE V2X-based network layer only supports filtering unicast service announcements based on the application identifier (AID). Specifically, after the OBU receives a unicast service announcement from the RSU, the network layer's Dedicated Short Message Protocol (DSMP) packet header contains the AID, and different applications have different corresponding AIDs. For example, the AID for the regular Basic Safety Message (BSM) for emergency vehicles is 113, while the AID for static Roadside Information (RSI) is 3620. Therefore, the OBU can filter specific types of messages based on the AID.
[0076] RSU devices are generally deployed on the roadside, and OBUs may be within the broadcast range of multiple RSU devices that provide the same application services (e.g., highway toll collection). Figure 3 , Figure 3 This is a schematic diagram of an application scenario. On a highway, an RSU device is deployed on the up road and the down road, that is, RSU1 is set on the up road and RSU2 is set on the down road to achieve communication with OBUs in different driving directions. RSU1 and RSU2 communicate with OBUs wirelessly. Figure 3 It can be seen that RSU1 periodically broadcasts Msg1 and RSU2 periodically broadcasts Msg2. The application identifiers of Msg1 and Msg2 are the same, so the AIDs of Msg1 and Msg2 are the same, for example, both are 1. Since the OBU is currently within the communication range of both RSU1 and RSU2, the OBU can receive Msg1 and Msg2.
[0077] Assume that after the OBU receives Msg1 broadcast by RSU1 and establishes a unicast connection with RSU1, it also receives Msg2 sent by RSU2 and Msg1 broadcast again by RSU1. If the above-mentioned AID-based message filtering method is used, although the Msg1 sent again by RSU1 can be filtered out, since the AID of Msg1 is the same as the AID of Msg2, the Msg2 broadcast by RSU2 will also be directly filtered out, resulting in the OBU being unable to establish a unicast connection with RSU2.
[0078] It can be seen from this that if the OBU side only filters messages based on AID, it may fail to establish a unicast connection with other RSUs due to incorrect filtering. If the OBU side does not filter messages at all, the OBU application layer will continuously process the unicast service announcements received from each RSU, such as message signature verification and decoding, which will occupy a large amount of computing resources and reduce message processing efficiency.
[0079] The present application provides a message filtering method that can effectively filter broadcast messages of the same type of application sent by terminals that have established unicast connections with OBUs, saving the consumption of computing resources of OBUs and improving the message processing efficiency of OBUs.
[0080] Based on the above problems, the present application proposes a message filtering method. When a second terminal periodically broadcasts a first message, after the first terminal receives the first message, the method performs judgment and analysis based on the fields related to the application service in the first message (for example, at least one of the application identifier or the target layer 2 identifier) and the source layer 2 identifier in the first message, so as to filter the message broadcast by the second terminal indicating the provision of the same application service when the second terminal has established a unicast connection corresponding to the first message with the first terminal. Figure 4 , Figure 4 This is a flow chart of a message filtering method provided by an embodiment of the present application, which includes but is not limited to the following steps:
[0081] S101: A first terminal receives a first message broadcast by a second terminal.
[0082] In an embodiment of the present application, a second terminal periodically broadcasts a first message, the first message including a source layer 2 identifier and at least one of an application identifier and a target layer 2 identifier. The source layer 2 identifier, also known as an identity identifier, is a unique identifier of the second terminal. The application identifier and the target layer 2 identifier are both related to an application service, and the target layer 2 identifier corresponds to the application identifier. Therefore, both the application identifier and the target layer 2 identifier can be used to identify the application service provided by the second terminal.
[0083] In a specific implementation, the 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. The Source Layer 2 ID is used to indicate the sender of the first message, i.e., the second terminal. Since the second terminal sends the first message in a broadcast format, the Destination Layer 2 ID in this application is a mapping value of the Application ID, and the Destination Layer 2 ID corresponds one-to-one with the Application ID.
[0084] It should be noted that the first message may be a unicast service announcement, and the first message is carried by DSA.
[0085] The first terminal can be any one of OBU, RSU, mobile phone, computer with wireless transceiver function, smart gas station, etc. The second terminal is a device that can communicate with the first terminal and has the ability to broadcast messages. The second terminal includes but is not limited to OBU, RSU, mobile phone, computer with wireless transceiver function, smart gas station, smart traffic light, tablet computer, etc.
[0086] It should be noted that in the embodiment of the present application, different terminals have different source layer 2 identifiers (or identity identifiers). That is, if two terminals have the same identity identifier, then the two terminals are the same terminal. Taking the identity identifier as a MAC address as an example, different terminals have different MAC addresses, and there is no MAC address conflict between different terminals. If two terminals have the same MAC address, then the two terminals are the same terminal. In S101, a first terminal receives a first message broadcast by a second terminal. It can be understood that the identity identifier of the first terminal is different from the identity identifier of the second terminal.
[0087] S102: The first terminal filters the first message according to the source layer 2 identifier and at least one of the application identifier and the target layer 2 identifier.
[0088] In an embodiment of the present application, after receiving a first message, the first terminal may combine the three fields of the application identifier, source layer 2 identifier, and target layer 2 identifier in the first message to determine whether to filter the first message. Specifically, the first terminal may determine whether the unicast connection corresponding to the first message has been established based on the combined fields, and filter the first message if the unicast connection corresponding to the first message has been established. There are three main combinations: application identifier and source layer 2 identifier, target layer 2 identifier and source layer 2 identifier, and application identifier, source layer 2 identifier, and target layer 2 identifier.
[0089] It should be noted that the so-called filtering of the first message by the first terminal means that the first terminal ignores or discards the first message, and there is no need to perform parsing processing such as signature verification and decoding on the first message, and the first terminal refuses to establish a unicast connection corresponding to the first message with the second terminal, thereby greatly reducing the consumption of computing resources of the first terminal and improving the message processing efficiency.
[0090] When determining whether to filter the first message, the first terminal may also rely on mapping information, which records the mapping relationship between the application identifier, the source layer 2 identifier, and the target layer 2 identifier corresponding to the unicast connection currently established by the first terminal. In one specific implementation, the mapping information may be stored in the 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 in the network layer of the first terminal. In other words, the mapping information is established and maintained by the network layer of the first terminal.
[0091] The mapping information may be a mapping relationship table similar to that shown in Table 1. As shown in Table 1, Table 1 records two mapping relationships, namely aid1-mac3-f(aid1) and aid3-mac4-f(aid3). Aid1-mac3-f(aid1) is used as an example for explanation, where it is assumed that mac3 is the MAC address of the third terminal that sends a message, aid1 is the identifier of the first application provided by the third terminal, f(aid1) represents the mapping value corresponding to the application identifier aid1 in the message, and f() is a mapping function. The existence of the mapping relationship aid1-mac3-f(aid1) in the mapping relationship table indicates that the first terminal has established a unicast connection based on the first application with the third terminal. Similarly, in aid3-mac4-f(aid3), assuming that mac4 is the MAC address of the fourth terminal, aid3 is the identifier of the third application, and aid3 is not equal to aid1, that is, the third application is different from the first application, mac4 is not equal to mac3, that is, the fourth terminal is different from the third terminal, f(aid3) is the mapping value of the identifier of the third application, and the mapping relationship aid3-mac4-f(aid3) exists in the mapping relationship table, which means that the first terminal has established a unicast connection based on the third application with the fourth terminal.
[0092] Table 1
[0093]
[0094] The following describes the corresponding judgment methods of the above three combinations based on the mapping information:
[0095] The first combination method: determining whether to filter the first message according to the application identifier and the source layer 2 identifier.
[0096] Specifically, it is determined whether the mapping information contains a first mapping relationship between the application identifier in the first message and the source layer 2 identifier. If the mapping information contains the first mapping relationship, it is determined that the first terminal has established a unicast connection corresponding to the first message with the second terminal. If it is determined that the unicast connection corresponding to the first message has been established, the first message is filtered. If the mapping information does not contain the first mapping relationship, it indicates that the first terminal has not established a unicast connection corresponding to the first message with 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 with the second terminal.
[0097] The second combination method: determining whether to filter the first message according to the target layer 2 identifier and the source layer 2 identifier.
[0098] Specifically, it is determined whether the mapping information contains a second mapping relationship between the target layer 2 identifier and the source layer 2 identifier in the first message. If the mapping information contains the second mapping relationship, it is determined that the first terminal has established a unicast connection corresponding to the first message with the second terminal. If it is determined that the unicast connection corresponding to the first message has been established, the first message is filtered. If the mapping information does not contain the second mapping relationship, it indicates that the first terminal has not established a unicast connection corresponding to the first message with 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 may establish a unicast connection corresponding to the first message with the second terminal.
[0099] The third combination method: determining whether to filter the first message according to the application identifier, the target layer 2 identifier, and the source layer 2 identifier.
[0100] Specifically, it is determined whether the mapping information contains a third mapping relationship between the application identifier, the target layer 2 identifier, and the source layer 2 identifier in the first message. If the mapping information contains the third mapping relationship, it is determined that the first terminal has established a unicast connection corresponding to the first message with the second terminal. If it is determined that the unicast connection corresponding to the first message has been established, the first message is filtered. If the mapping information does not contain the third mapping relationship, it indicates that the first terminal has not established a unicast connection corresponding to the first message with 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 may establish a unicast connection corresponding to the first message with the second terminal.
[0101] The so-called response to the first message means that the first terminal sends its own MAC address to the second terminal so that the first terminal and the second terminal establish a unicast connection corresponding to the first message, and the first terminal adds the mapping relationship between the application identifier, the source layer second identifier and the target layer second identifier in the first message to the mapping information. It should be noted that after the first terminal and the second terminal establish the unicast connection corresponding to the first message, the first terminal can perform unicast interaction with the second terminal based on the unicast connection to conduct business transactions corresponding to the application identifier, such as payment services, vehicle identification, safety reminder services, etc.
[0102] Let's take the first combination as an example, and combine it with Table 1 to illustrate the judgment process of the first combination: if the application identifier of the first message is aid2, aid2 is the identifier of the second application, the source layer 2 identifier of the first message is mac2, mac2 represents the second terminal, and the mapping relationship corresponding to aid2-mac2 and all established unicast connections in Table 1 is compared in turn. For example, first compare aid2-mac2 corresponding to the first message with aid1-mac3 in Table 1. If aid2 is different from aid1 (indicating that the second application is different from the first application), or mac2 is different from mac3 (indicating that the second terminal is different from the third terminal), then aid2-mac2 This mapping relationship is different from the mapping relationship of aid1-mac3 in Table 1. Continue to compare aid2-mac2 with aid3-mac4 in Table 1. If aid2 is different from aid3 (indicating that the second application is different from the third application), or mac2 is different from mac4 (indicating that the second terminal is different from the fourth terminal), then it means that the mapping relationship of aid2-mac2 is different from the mapping relationship of aid3-mac4 in Table 1. Therefore, it can be determined that the mapping relationship of aid2-mac2 does not exist in Table 1, that is, the first terminal has not established a unicast connection based on the second application with the second terminal. In other words, the first terminal has not established a unicast connection corresponding to the first message with the second terminal.
[0103] For another example, in the process of comparing aid2-mac2 corresponding to the first message with the mapping relationships corresponding to all established unicast connections in Table 1, for aid2-mac2 and aid3-mac4 in Table 1, if aid2 and aid3 are different (indicating that the second application and the third application are different), or mac2 and mac4 are different (indicating that the second terminal and the fourth terminal are different), then the mapping relationship of aid2-mac2 is different from the mapping relationship of aid3-mac4 in Table 1; but for aid2-mac2 and aid1-mac3 in Table 1, if aid2 and aid1 are the same (indicating that the second application and the first application are the same application) and mac2 and mac3 are the same (indicating that the second terminal and the third terminal are the same terminal), then the mapping relationship of aid2-mac2 is the same as the mapping relationship of aid1-mac3 in Table 1. Therefore, it can be determined that aid2-mac2 already exists in Table 1, that is, the first terminal has previously established a unicast connection corresponding to the first message with the second terminal. In this case, the first terminal can filter the first message. In other words, the first terminal refuses to establish the unicast connection corresponding to the first message with the second terminal again.
[0104] 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 broadcast by the second terminal, the first terminal establishes a first unicast connection with the third terminal, and the first terminal stores the mapping relationship between the first identity identifier and the first application identifier corresponding to the first unicast connection. In some possible embodiments, the mapping relationship between the first identity identifier and the first application identifier is stored in mapping information, and the mapping information is located at the network layer or message layer of the first terminal. The first identity identifier 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 the application service provided by the third terminal, and the first application identifier includes one or more of the mapping values of the identifier of the first application and the identifier of the first application. The first terminal receives the first message broadcast by the second terminal, the first message including the second identity identifier and the second application identifier, wherein the second identity identifier 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 the application service provided by the second terminal, and the second application identifier includes one or more of the mapping values of the identifier of the second application and the identifier of the second application. The identity identifier of the first terminal is different from the first identity identifier (the identity identifier of the third terminal), and the identity identifier of the first terminal is different from the second identity identifier (the identity identifier of the second terminal). When the second identity identifier is the same as the first identity identifier and the second application identifier matches the first application identifier, it means that the second terminal and the third terminal are the same terminal (because the second identity identifier is the same as the first identity identifier), 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). In other words, the unicast connection corresponding to the first message has been established with the first terminal, so the first terminal can filter the first message, which is manifested as the first terminal refusing to establish a second unicast connection with the second terminal.
[0105] The so-called matching between the second application identifier and the first application identifier includes the following three situations:
[0106] The first is that 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 so-called matching of the second application identifier and 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, combined with the fact that the MAC address of the second terminal is the same as the MAC address of the third terminal (that is, the second identity identifier is the same as the first identity identifier), it is equivalent to the relevant description of the first combination method mentioned above: the mapping information contains a first mapping relationship between the application identifier in the first message and the source layer two identifier, wherein the second identity identifier is the source layer two identifier mentioned above, and the identifier of the second application is the application identifier mentioned above.
[0107] The second type: when the second application identifier is the mapping value of the identifier of the second application and the first application identifier is the mapping value of the identifier of the first application, the so-called matching of the second application identifier and 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, combined with the fact that the MAC address of the second terminal is the same as the MAC address of the third terminal (that is, the second identity identifier is the same as the first identity identifier), it is equivalent to the relevant description of the above-mentioned second combination method: the mapping information contains a second mapping relationship between the target layer two identifier in the first message and the source layer two identifier, wherein the second identity identifier is the source layer two identifier mentioned above, and the mapping value of the identifier of the second application is the target layer two identifier mentioned above.
[0108] The third type: 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 so-called matching of the second application identifier and 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, combined with the fact that the MAC address of the second terminal is the same as the MAC address of the third terminal (that is, the second identity identifier is the same as the first identity identifier), it is equivalent to the relevant description of the above-mentioned third combination method: the mapping information contains a third mapping relationship between the application identifier in the first message, the target layer two identifier and the source layer two identifier, wherein the second identity identifier is the source layer two identifier mentioned above, the identifier of the second application is the application identifier mentioned above, and the mapping value of the identifier of the second application is the target layer two identifier mentioned above.
[0109] It should be noted that the above mapping information can 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 above Figure 2 The relevant description in will not be repeated here. Therefore, the first terminal adds the mapping relationship between the application identifier, the source layer second identifier and the target layer second identifier in the first message to the mapping information. There are also two ways as follows:
[0110] Method A:
[0111] When the mapping information is stored in the network layer, the mapping information of the network layer is established by the application layer of the first terminal through a cross-layer primitive (or called an operation primitive, a service primitive, etc.). For example, assuming that the first terminal receives the first message for the first time (so the first message will not be filtered out), the first message carries AID, Source Layer 2ID and Destination Layer 2ID, and the first terminal determines to establish a unicast connection corresponding to the AID with the second terminal, then the application layer of the first terminal can instruct the DME of the network layer through a cross-layer primitive to add the mapping relationship between the AID, Source Layer 2ID and Destination Layer 2ID in the first message to the mapping information of the network layer. First, when the first terminal acts as the user receiving the service, the grammatical format of its cross-layer primitive is as follows:
[0112] DME-UserService.request(LocalApplicationIndex, Action, UserRequestType, Other Information).
[0113] Among them, UserService represents the first terminal as the user receiving the service, LocalApplicationIndex represents the sequence number i, and Action represents the action. Since the above action is add, Action is set to Add. UserRequestType represents the user request type and is set to Address Mapping. OtherInformation is set to (AID, Source Layer 2ID, Destination Layer 2ID). Therefore, the cross-layer primitive that the network layer uses to add the mapping relationship between the AID, Source Layer 2ID, and Destination Layer 2ID in the first message to the mapping information can be:
[0114] DME-UserService.request(i, Add, Address Mapping, (AID, Source Layer 2ID, Destination Layer 2ID)).
[0115] In some possible embodiments, if it is necessary to delete the mapping relationship corresponding to the application identifier in the first message from the mapping information of the network layer, the Action in the corresponding cross-layer primitive is set to Delete. In this case, the cross-layer primitive is specifically as follows:
[0116] DME-UserService.request(i, Delete, Address Mapping, (AID, Source Layer2ID, Destination Layer 2ID)).
[0117] Second, when the first terminal acts as the service provider, the syntax format of its cross-layer primitive is as follows:
[0118] DME-ProviderService.request(LocalApplicationIndex,Action,UserRequestType,Other Information).
[0119] Among them, ProviderService indicates that the first terminal is the provider of the service. Parameters such as LocalApplicationIndex, Action, UserRequestType, and Other Information can be found in the above description and will not be repeated here. It should be noted that the network layer of the first terminal can set the Action to Add or Delete according to actual needs. Taking the setting of Add as an example, if the first terminal is the provider of the service, when the network layer of the first terminal needs to add the mapping relationship between the AID, Source Layer 2ID, and Destination Layer 2ID in the first message to the mapping information, the corresponding cross-layer primitive is:
[0120] DME-ProviderService.request(i, Delete, Address Mapping, (AID, SourceLayer 2ID, Destination Layer 2ID)).
[0121] It should be noted that if the mapping information is stored in the network layer, the network layer of the first terminal can filter the first message based on any one of the above three combinations and the mapping information, effectively avoiding consumption of upper layer resources in the first terminal.
[0122] See also Figure 5A , Figure 5A is a schematic diagram of a protocol stack of a first terminal provided in an embodiment of the present application, such as Figure 5A As shown, the mapping information is stored in the network layer by the first terminal, that is, the above 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 can perform corresponding processing on the mapping information maintained in the network layer through the above cross-layer primitives.
[0123] Method B: 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 receives the first message for the first time (so the first message will not be filtered out), the first message carries AID, Source Layer 2ID and Destination Layer 2ID. The first terminal decides to establish a unicast connection corresponding to the AID with the second terminal. The first terminal can directly add the mapping relationship between the AID, Source Layer 2ID and Destination Layer 2ID in the first message to the mapping information in the message 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 can directly process the mapping information stored in the message layer accordingly.
[0124] See also Figure 5B , Figure 5B is a schematic diagram of a protocol stack of a first terminal provided in an embodiment of the present application, such as Figure 5B As shown, the mapping information is stored in the message layer by the first terminal, that is, the above 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 can directly perform relevant operations on the mapping information maintained in the message layer.
[0125] In some possible embodiments, when determining whether to filter the first message through any of the three combinations described above, it may occur that the first mapping relationship does not exist in the mapping information, or the second mapping relationship does not exist in the mapping information, or the third mapping relationship does not exist in the mapping information, which means 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 also includes an identification area, and the first terminal can further determine whether to filter the first message based on the identification area. Specifically, when the first terminal is outside the identification area, it means that the first message is irrelevant to the first terminal, and the first terminal filters the first message; when the first terminal is within the identification area, since 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 with the second terminal, and adds the mapping relationship corresponding to the first message to the mapping information of the application layer or the network layer.
[0126] 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 the service scope of the application corresponding to the application identifier in the first message supported by the second terminal. That is, the application corresponding to the application identifier is only valid within the identification area. The identification area can be an identification radius, area range coordinates, etc.
[0127] In one specific implementation, when the identification area is the area range coordinates, the first terminal obtains its own location information and determines whether its own location information belongs to the area range coordinates. If the location information of the first terminal does not belong to the area range coordinates, it means 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 coordinates, it means that the first terminal is located within the identification area. In response to the first message, the first terminal and the second terminal establish a unicast connection corresponding to the first message.
[0128] In another specific implementation, when the identification area is the identification radius, the first terminal needs to obtain not only its own location information but also the location information of the second terminal, wherein the location information of the second terminal can be included in the first message or in other messages broadcast by the second terminal. The location information of the second terminal can also be sent by other terminals whose location information is known to the second terminal. This application does not make specific restrictions. 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 greater than or equal to the identification radius, it means that the first terminal is outside the identification area, so the first terminal directly filters the first message; when the distance is less than the identification radius, it means that the first terminal is within the identification area, so in response to the first message, the first terminal and the second terminal establish a unicast connection corresponding to the first message.
[0129] It should be noted that after the first terminal parses the first message to obtain the identification area, it can also add the mapping relationship between the application identifier, the source layer second identifier and the identification area in the first message to the interaction area information, and the interaction area information is stored in the message layer (see Figure 5A or Figure 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.
[0130] The interactive area information may be a mapping relationship table similar to that shown in Table 2. As shown in Table 2, Table 2 records two mapping relationships, namely aid1-mac3-area1 and aid3-mac4-area2. Taking aid1-mac3-area1 as an example, this mapping relationship indicates that the first terminal has established a unicast connection based on the application identifier aid1 with the terminal whose source layer 2 identifier is mac3, and the identification area corresponding to the application identifier aid1 is area1. For example, see Figure 5A or Figure 5B ,The interaction area information shown in Table 2 is located in the message layer.
[0131] Table 2
[0132]
[0133] In some possible embodiments, after establishing a unicast connection corresponding to the first message, if 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, when the first terminal is again within the identification area corresponding to the application identifier and receives the first message, since the mapping relationship corresponding to the first message does not exist in the mapping information, the first terminal can establish a unicast connection corresponding to the first message with the second terminal to perform related services (for example, paying fees for highway sections). It can be seen that after the unicast interaction based on the first message is completed, if the first terminal is no longer within the identification area, the operation of deleting the mapping relationship corresponding to the first message from the mapping information can effectively prevent the first message received when the first terminal is again within the identification area from being erroneously filtered.
[0134] In some possible embodiments, after establishing a unicast connection corresponding to the first message, 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 also delete the mapping relationship corresponding to the first message from the interactive area information, which is not specifically limited in this application. For example, for aid1-mac3-f(aid1) in Table 1, assuming that the first terminal and the third terminal have established a unicast connection based on the first application (aid1), it can be seen from aid1-mac3-area1 in Table 2 that the service range of the first application supported by the third terminal is area1. When the first terminal is no longer within area1, the first terminal will delete the mapping relationship aid1-mac3-f(aid1) from the mapping information (for example, the above Table 1), and the first terminal will delete the mapping relationship aid1-mac3-area1 from the interactive area information (for example, the above Table 2).
[0135] For example, the first terminal and the second terminal establish a unicast connection based on a high-speed near-field payment application. Assuming that the first terminal is an OBU, the OBU completes the payment service of the highway section where it is located based on the unicast connection. If the OBU is still located in the identification area of the high-speed near-field payment application, when the OBU receives the message of the same high-speed near-field payment application broadcast by the second terminal again, since the OBU has completed a payment service on the highway section, the OBU can directly filter the message according to the mapping information; when the OBU drives out of the identification area of the high-speed near-field 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 high-speed near-field payment application and receives the message corresponding to the high-speed near-field payment application broadcast by the second terminal, the OBU will not incorrectly filter the message.
[0136] It should be noted that the mapping information may be located at the message layer or the network layer, and the interaction area information may be located at the message layer. In some possible embodiments, when both the mapping information and the interaction area information are maintained by the message layer, the mapping information and the interaction area information may also be integrated into a table that represents the mapping relationship between the application identifier, the source layer 2 identifier, the target layer 2 identifier, and the identification area corresponding to the unicast connection established by the first terminal.
[0137] It can be seen that, by implementing an embodiment of the present application, when a first terminal receives a first message periodically broadcast by a second terminal, a judgment and analysis is performed based on the fields related to the application in the first message (for example, at least one of the application identifier and the target layer 2 identifier) and the identifier of the sender in the first message (i.e., the source layer 2 identifier). When the first terminal has established a unicast connection corresponding to the first message with the second terminal, the first message indicating the same application broadcast by the second terminal is filtered, thereby improving the accuracy of message filtering, reducing the consumption of computing resources caused by the first terminal's message parsing, and improving the message processing efficiency.
[0138] See also Figure 6 The following describes a message filtering method provided by an embodiment of the present application. In this example, the first terminal may be an OBU and the second terminal may be an RSU. However, the present application does not limit the first terminal to only an OBU and the second terminal to only an RSU. In addition, Figure 6 The embodiment can be independent of Figure 4 Embodiment, it can also be Figure 4 Supplementary Examples. The method includes but is not limited to the following steps:
[0139] S201: The OBU receives a first message broadcast by the RSU.
[0140] Among them, OBU is called on-board unit, which is a vehicle-mounted device that uses LTE-V2X or NR-V2X technology to communicate with RSU. OBU is usually installed on the vehicle, for example, on the windshield. RSU is mainly used in vehicle-road communication and is a key device for realizing smart roads and vehicle-road systems. RSU consists of an antenna (RSU antenna) and a radio frequency controller (RSU controller). RSU is usually installed on the side of the road. It can also connect to road sensing and monitoring equipment (such as traffic lights, cameras, microwave radars, etc.) to collect road information and road traffic information, and conduct two-way communication and exchange data with nearby passing vehicles.
[0141] The first message includes an application identifier, a source layer 2 identifier, and a target layer 2 identifier, wherein the application identifier is used to distinguish different applications, the source layer 2 identifier is the MAC address of the RSU, and the target layer 2 identifier is the mapping value corresponding to the application identifier.
[0142] S202: The application layer or the network layer of the OBU determines whether the unicast connection corresponding to the first message has been established according to at least one of the application identifier or the target layer 2 identifier and the source layer 2 identifier.
[0143] The unicast connection corresponding to the first message refers to the communication connection between the OBU and the RSU based on the application identifier. There are three methods for the OBU's application layer or network layer to determine whether the unicast connection corresponding to the first message has been established: the first combination described in S102 above: determining whether a first mapping relationship between the application identifier and the source layer second identifier exists in the mapping information; the second combination: determining whether a second mapping relationship between the target layer second identifier and the source layer second identifier exists in the mapping information; and the third combination: determining whether a third mapping relationship between the application identifier, the source layer second identifier, and the target layer second identifier exists in the mapping information. The determination can be made based on any of the three methods described above. When the first mapping relationship exists in the mapping information, the second mapping relationship exists in the mapping information, or the third mapping relationship exists in the mapping information, the unicast connection corresponding to the first message is determined to be established, and S203 is executed. When the first mapping relationship does not exist in the mapping information, the second mapping relationship does not exist in the mapping information, or the third mapping relationship does not exist in the mapping information, the unicast connection corresponding to the first message is determined to be unestablished, and S204 is executed. It should be noted that the mapping information can be established and maintained by the application layer or the network layer.
[0144] For example, the mapping information is located at the network layer of the OBU. In a specific implementation, the OBU determines whether there is a mapping relationship corresponding to the first message in the mapping information based on any one of the three combinations mentioned above. 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 (see Table 1 above), indicating 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 (aid2, mac3, f(aid2)), it can be determined that the mapping relationship aid2-mac3-f(aid2) does not exist in the mapping information. Of course, the mapping relationship aid2-mac3 does not exist in the mapping information, or the mapping relationship mac3-f(aid2) does not exist in the mapping information, indicating that the unicast connection corresponding to the first message has not been established, and S204 is executed. The mapping information of the network layer can be established through the cross-layer primitive DME-UserService.request() or DME-ProviderService.request(). The specific process can be referred to the relevant description of S102 above and will not be repeated here.
[0145] S203: The OBU filters the first message.
[0146] Specifically, when the unicast connection corresponding to the first message has been established, the OBU filters the first message. In other words, the OBU refuses to establish the unicast connection corresponding to the first message with the RSU.
[0147] S204: The OBU parses the first message to obtain an identification area.
[0148] Specifically, when it is determined that the unicast connection corresponding to the first message is not established, the OBU further parses the first message to obtain an identification area. The identification area is the service range corresponding to the application identifier in the first message supported by the RSU. For example, in a highway toll application scenario, the application identifier in the first message broadcast by the RSU is used to indicate the application type is highway toll payment. The first message also includes an identification area. In this case, the identification area represents the current toll road section.
[0149] S205: The OBU determines whether it is within the identification area.
[0150] Specifically, the OBU can determine whether it is within the identification area based on its own location information. When it is determined that it is within the identification area, S206 is executed; when it is determined that it is not within the identification area, S203 is executed. The method for the OBU to determine whether it is within the identification area can be referred to the relevant description in S102 and will not be repeated here.
[0151] For example, in a highway toll collection application scenario, the OBU makes a judgment based on the two fields of the source layer 2 identifier and the application identifier in the first message and the mapping information, and concludes that it has not established a unicast connection corresponding to the first message with the RSU. In this case, the OBU parses the first message to obtain the current toll section, and determines whether its current position is within the toll section. If it is within the toll section, execute S206; if it is not within the toll section, execute S203.
[0152] S206 . In response to the first message, the OBU and the RSU establish a unicast connection corresponding to the first message, and add the mapping relationship corresponding to the first message to the mapping information.
[0153] Specifically, in response to the first message, the OBU sends its own MAC address to the RSU to establish a unicast connection corresponding to the first message with the RSU, and the OBU adds the mapping relationship between the application identifier, source layer 2 identifier and target layer 2 identifier in the first message to the mapping information. At the same time, the OBU can also add the mapping information between the application identifier, source layer 2 identifier and identification area in the first message to the interaction area information.
[0154] It should be noted that the mapping information can be stored in the network layer or the message layer, and the interaction area information is stored in the application layer. The interaction area information stores the mapping relationship between the application identifier, source layer 2 identifier and identification area corresponding to the unicast connection established by the OBU.
[0155] For example, if the first message includes (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 target layer 2 identifier of the RSU, and area1 is the identification area, and area1 is obtained by parsing the first message. Assuming that the OBU determines based on the mapping information that it has not established a unicast connection with the RSU based on the application identifier aid1, and its own location is within area1, the OBU sends its own MAC address to the RSU to establish a unicast connection corresponding to the first message, adds aid1-mac2-f(aid1) to the mapping information, and adds aid1-mac2-area1 to the interaction area information.
[0156] 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 of the application layer or the network layer.
[0157] In a specific implementation, after the OBU and the RSU complete the interaction based on the unicast connection corresponding to the first message, the vehicle where the OBU is located continues to drive, and the position of the vehicle will change. The position of the OBU is the same as the position of the vehicle where the OBU is located. When the OBU is no longer within the identification area (that is, the vehicle where the OBU is located leaves the identification area), the OBU deletes the mapping relationship corresponding to the unicast connection from the mapping information of the application layer or network layer.
[0158] It should be noted that after the OBU establishes the unicast connection corresponding to the first message, the OBU can determine in real time whether it is within the identification area in the first message. The OBU can also determine whether it is within the identification area in the first message at regular intervals. When it is determined that the OBU is no longer within the identification area, the OBU deletes the mapping relationship corresponding to the unicast connection from the mapping information.
[0159] 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, if the mapping information in S206 is located in the network layer, the network layer of the OBU will delete the mapping information corresponding to the first message from the mapping information in S207; if the mapping information in S206 is located in the message layer, the message layer of the OBU will delete the mapping information corresponding to the first message from the mapping information in S207.
[0160] For example, see Figure 7 , Figure 7This is a schematic diagram of a high-speed toll collection scenario. Assume that the OBU is Figure 7 After receiving the first message broadcast by the RSU for the first time at position 1 in the OBU, the first message includes (aid1, mac2, f(aid1), area1). The OBU establishes a unicast connection with the RSU corresponding to the first message, and adds the mapping relationship of 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 position 1 (completes one fee payment). Assuming that the OBU receives the first message broadcast by the RSU again at position 2, the OBU determines based on the mapping information that it has established a unicast connection corresponding to the first message with the RSU. Therefore, the OBU will directly filter the first message received at position 2. This means that the OBU has completed a service payment at position 1 within the identification area area1. Therefore, when the OBU is still within the identification area area1, the OBU does not need to respond to the first message broadcast by the RSU again to make another payment. However, the OBU moves with the vehicle. When the OBU determines that its position is no longer within 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 when the OBU enters area1 again, the first message broadcast by the RSU received by the OBU will not be incorrectly filtered out.
[0161] The message filtering method provided in the embodiment of the present application is applied to Figure 3 In the scenario shown, Figure 3As shown, the OBU is located within the communication range of both RSU1 and RSU2. The OBU can receive Msg1 broadcast by RSU1 and Msg2 broadcast by RSU1, where Msg1 includes (aid1, mac1, f(aid1), area1) and Msg2 includes (aid1, mac2, f(aid1), area2). If the OBU receives both Msg1 and Msg2 for the first time, 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 does not establish a unicast connection corresponding to Msg1 with RSU1, nor does it establish a unicast connection corresponding to Msg2 with RSU2. The OBU further determines that it is currently located in the identification area corresponding to Msg1. a1 and also within the identification area area2 corresponding to Msg2. It can be understood that area1 is within the communication range of RSU1 and area1 is within the communication range of RSU2. Although Msg1 and Msg2 have the same application identifier (both are aid1, assuming aid1 represents the vehicle near-field payment service), applying the message filtering method provided in this application, in the above case, Msg1 and Msg2 will not be filtered. Accordingly, in response to Msg1, the OBU establishes a unicast connection corresponding to Msg1 with RSU1 and adds the mapping relationship aid1-mac1-f(aid1) to the mapping information. In response to Msg2, the OBU establishes a unicast connection corresponding to Msg2 with RSU2 and adds the mapping relationship aid1-mac2-f(aid1) to the mapping information. In some possible embodiments, the OBU may also add the two mapping relationships aid1-mac1-area1 and aid1-mac2-area2 to the interaction area information. If the OBU receives Msg1 broadcast by RSU1 again in area1, 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. If the OBU receives Msg2' broadcast by RSU2 in area2, Msg2' includes (aid2, mac2, f(aid2), area2). Assuming that aid2 represents the vehicle identification service, the OBU determines that none of the mapping relationships aid2-mac2-f(aid2), aid2-mac2, or mac2-f(aid2) exists in the mapping information. Therefore, the OBU responds to Msg2' and establishes a unicast connection with RSU2 corresponding to Msg2'.
[0162] It should be noted that the above is only an example of the near-field payment service for vehicles on highways. The solution provided in the embodiment of this application can be applied not only to the near-field payment service for vehicles, but also to other services, such as vehicle identity recognition services, road safety services, etc. This application does not make specific limitations.
[0163] As can be seen, in the implementation of the present application embodiment, after receiving the first message periodically broadcast by the RSU, the OBU determines whether the unicast connection corresponding to the first message has been established based on the mapping information of the application layer or network layer. If the unicast connection has been established, the OBU filters the first message, thereby filtering broadcast messages broadcast by the same RSU indicating the same application, significantly reducing the consumption of the OBU's computing resources. In addition, the OBU can also determine whether to refuse to establish the unicast connection corresponding to the first message with the RSU based on the mapping information and the identification area obtained after parsing the first message, thereby improving the accuracy of message filtering and the efficiency of message processing.
[0164] In another specific implementation, the message filtering provided by the present application can also be used to filter broadcast messages between OBUs. For example, the first terminal may be OBU1 and the second terminal may be OBU2. Figure 8 , Figure 8 A flowchart of a message filtering method is exemplarily provided. Figure 8 The embodiment can be independent of Figure 4 、 Figure 6 Embodiment, it can also be Figure 4 and Figure 6 In addition to the embodiment, the method includes but is not limited to the following steps:
[0165] S301 : OBU1 receives a first message broadcast by OBU2.
[0166] Among them, the first message broadcast by OBU2 includes an application identifier, a source layer 2 identifier and a target layer 2 identifier, wherein the application identifier is used to indicate the type of application, and different applications have different application identifiers. The source layer 2 identifier is the MAC address of OBU2. Since the first message is sent in the form of a broadcast, the target layer 2 identifier is the mapping value of the application identifier, and the target layer 2 identifier corresponds to the application representation.
[0167] S302 : The application layer or the network layer of the OBU1 determines whether the unicast connection corresponding to the first message has been established according to at least one of the application identifier or the target layer 2 identifier and the source layer 2 identifier.
[0168] Specifically, the mapping information records the mapping relationship between the application identifier, source layer 2 identifier, and target layer 2 identifier corresponding to the unicast connection established by OBU1. The mapping information can be established by the application layer or the network layer. However, when the mapping information is established by the network layer, the application layer uses cross-layer primitives to instruct the network layer to establish it.
[0169] The OBU determines whether the unicast connection corresponding to the first message has been established based on the mapping information. This means: determining whether the mapping information contains a mapping relationship corresponding to the first message, i.e., a first mapping relationship between the application identifier and the source layer 2 identifier, or a second mapping relationship between the target layer 2 identifier and the source layer 2 identifier, or a third mapping relationship between the application identifier, the source layer 2 identifier, and the target layer 2 identifier. If the mapping relationship corresponding to the first message exists in the mapping information, it is determined that the unicast connection corresponding to the first message has been established, and S303 is executed. If the mapping relationship corresponding to the first message does not exist in the mapping information, it is determined that the unicast connection corresponding to the first message has not been established, and S304 is executed. The specific determination method can be referred to the relevant description in S102 and will not be repeated here.
[0170] S303: OBU1 filters the first message.
[0171] S304 , OBU1 parses the first message to obtain an identification area.
[0172] It should be noted that the identification area is the service range corresponding to the application identifier in the first message supported by OBU2. 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 lane corresponding to OBU2.
[0173] S305 : The OBU 1 determines whether it is within the identification area.
[0174] Specifically, OBU1 determines whether it is within the identification area based on its own location information. When OBU1 is within the identification area, it means that the first message is related to OBU1 and S306 is executed; when OBU1 is not within the area, it means that the first message is not related to OBU1 and S303 is executed.
[0175] S306 , in response to the first message, OBU1 and OBU2 establish a unicast connection corresponding to the first message, and add a mapping relationship corresponding to the first message to the mapping information.
[0176] Specifically, when the 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, OBU1 and OBU2 establish a unicast connection corresponding to the first message and add the mapping relationship corresponding to the first message to the mapping information.
[0177] It should be noted that after the unicast connection corresponding to the first message is established, OBU1 and OBU2 can perform unicast interaction based on the unicast connection, that is, execute corresponding services based on the unicast connection. For example, if the application type corresponding to the unicast connection is vehicle identity recognition, the corresponding service is to obtain the identity of the vehicle; if the application identifier corresponding to the unicast connection indicates lane change, the corresponding service is to obtain the lane change information of the corresponding vehicle.
[0178] S307 : When the OBU1 is no longer located in the identification area, the OBU1 deletes the mapping relationship corresponding to the first message from the mapping information of the application layer or the network layer.
[0179] Specifically, after the unicast interaction between OBU1 and OBU2 is completed, if OBU1 moves out of the identification area, that is, OBU1 is no longer within the identification area, OBU1 deletes the mapping relationship corresponding to the first message from the mapping information of the application layer or network layer.
[0180] See also Figure 9 , Figure 9 This is a schematic diagram of an application scenario. Assume that OBU1, OBU2, and OBU3 are traveling in the same direction on a highway. OBU3, OBU1, and OBU2 each occupy a lane from left to right. OBU1's lane is the center lane, while OBU3 and OBU2's lanes are adjacent to OBU1's lane. Assume that OBU2 intends to change lanes left and enter OBU1's lane. OBU2 broadcasts a first message to notify surrounding vehicles of its impending lane change. Assume that the first message includes (aid2, mac2, f(aid2)), where aid2 is the application identifier corresponding to the lane change, mac2 is OBU2's MAC address, and f(aid2) is the mapping value of the application identifier. Since OBU1 and OBU3 are both within OBU2's communication range, both OBU1 and OBU3 can receive the first message broadcast by OBU2.
[0181] 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 in the above S102) does not exist in the mapping information, so OBU3 determines that the unicast connection corresponding to the first message is not established with OBU2. Further, OBU3 parses the first message to obtain the identification area area2 in the first message (such as Figure 9 OBU3 determines that it is not currently located in area2, which means that the first message received by OBU3 is irrelevant to OBU3, and OBU3 can directly filter the first message.
[0182] For OBU1, it is assumed that after OBU1 receives the first message, OBU1 determines that the mapping relationship of aid2-mac2 (the first method in the above S102) does not exist in the mapping information, so OBU1 determines that the unicast connection corresponding to the first message is not established with OBU2. Further, OBU1 parses the first message to obtain the identification area area2 in the first message (such as Figure 9 (The oval area shown in the figure) indicates that OBU1 is currently located within area2. This indicates that the first message received by OBU1 is related to OBU1. In response to the first message, OBU1 sends its MAC address to OBU2 to establish a unicast connection corresponding to the first message and adds the mapping relationship aid2-mac2-f(aid2) to the mapping information. Once the unicast connection is established, OBU1 and OBU2 can interact with each other through unicast. For example, OBU1 can obtain information such as the time and speed of OBU2's lane change. If OBU1 continues driving and receives the first message broadcast by OBU2 again while still within area2, OBU1 can directly filter the received first message using the above determination method. When OBU1 is no longer within area2, OBU1 can delete the mapping relationship aid2-mac2-f(aid2) from the mapping information.
[0183] It can be seen that the implementation of the embodiment of the present application allows, in the interaction between OBUs, an OBU, when having established a unicast connection corresponding to a certain broadcast message with a target OBU, to accurately filter the broadcast messages indicating the same application service repeatedly sent by the target OBU, thereby greatly reducing the computing resources consumed by the OBU for message parsing and improving the message processing efficiency.
[0184] See also Figure 10 , Figure 10 1 is a schematic diagram of the structure of a computing device provided in 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 also includes a transmitter 113. The receiver 112 and the transmitter 113 can also be replaced by a communication interface for providing information input and / or output to the processor 110. Optionally, the memory 111, the receiver 112, and the transmitter 113 can be connected or coupled to the processor 110 via a bus. The computing device 30 can be Figure 4 The first terminal in the embodiment, or Figure 6 The OBU in the embodiment, Figure 8 OBU1 in the embodiment.
[0185] The receiver 112 is used to receive a first message broadcast from an onboard unit (OBU) or roadside unit (RSU). When the computing device 30 determines to establish a unicast connection corresponding to the first message with the OBU or RSU, the transmitter 113 is used to send the MAC address of the computing device 30 to the OBU or RSU. The receiver 112 and the transmitter 113 may include an antenna and a chipset for communicating directly or via an air interface with devices, sensors, RSUs, or other physical devices within the vehicle. The transmitter 113 and the transceiver 112 constitute a communication module, which can be configured to receive and send messages according to one or more other types of wireless communications (e.g., protocols), such as Bluetooth, IEEE 802.11 communication protocols, cellular technologies, Worldwide Interoperability for Microwave Access (WiMAX) or LTE (Long Term Evolution), ZigBee protocols, Dedicated Short Range Communications (DSRC), and RFID (Radio Frequency Identification) communications, among others.
[0186] The specific implementation of each operation performed by the processor 110 can refer to the specific operations such as determining whether the unicast connection corresponding to the first message has been established, filtering the first message, etc. in the above-mentioned method embodiment. The processor 110 can be composed of one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0187] The memory 111 may include a volatile memory, such as a random access memory (RAM); the memory 111 may also 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 also include a combination of the above types. The memory 111 may store programs and data, wherein the stored programs include: a mapping information update program, an interaction area information update program, etc., and the stored data includes: mapping information (i.e., the mapping relationship between the application identifier, the source layer second identifier, and the target layer second identifier), interaction area information (i.e., the mapping relationship between the application identifier, the source layer second identifier, and the identification area), etc. The memory 111 may exist independently or be integrated into the processor 110.
[0188] also, Figure 10 is merely an example of a computing device 30 that may include Figure 10 More or fewer components may be displayed, or components may be configured differently. Figure 10 The various components shown in the figure can be implemented by hardware, software, or a combination of hardware and software.
[0189] In the embodiment of the present application, the computing device 30 is used to implement the above Figure 4 The method described, Figure 6 The method on the OBU side described in the embodiment and Figure 8 The method on the OBU1 side is described in the embodiment.
[0190] See also Figure 11 , Figure 11 4 is a functional structural diagram of a computing device provided in 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 also includes a sending unit 412. The computing device 41 can be implemented in hardware, software, or a combination of hardware and software.
[0191] Among them, the computing device 41 establishes a first unicast connection with the third terminal, and the computing device 41 stores the mapping relationship between the first identity identifier and the first application identifier based on the first unicast connection, and the first identity identifier is the unique identifier of the third terminal, and the first application identifier is the identifier of the application service provided by the third terminal. The receiving unit 410 is used to receive the first message broadcast by the second terminal, the first message includes the second identity identifier and the second application identifier, and the second identity identifier is the unique identifier of the second terminal, and the second application identifier is the identifier of the application service provided by the second terminal; the processing unit 411 is used to refuse to establish a second unicast connection with the second terminal when the second identity identifier is the same as the first identity identifier and the second application identifier matches the first application identifier. In some possible embodiments, the sending unit 412 is used to send the identity identifier of the computing device 41 to the second terminal in response to the first message to establish the above-mentioned second unicast connection.
[0192] The functional modules of the computing device 41 can be used to implement Figure 4 The method described in the embodiment. Figure 4 In the embodiment, the receiving unit 410 can be used to execute S101, and the processing unit 411 can be used to execute S102. The functional modules of the computing device 41 can also be used to implement Figure 6 The method and Figure 8 For the sake of brevity, the method on the OBU1 side described in the embodiment will not be repeated here.
[0193] In the embodiments described above, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0194] It should be noted that, those skilled in the art can see that all or part of the steps in the various methods of the above embodiments can be completed by a program to instruct relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium includes 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 electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0195] The technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a device (which can 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 each embodiment of the present application.
Claims
1. A message filtering method, applied to a first terminal, characterized in that: The first terminal establishes a first unicast connection with a third terminal, and the first terminal stores a mapping relationship between a first identity identifier and a first application identifier based on the first unicast connection, wherein the first identity identifier 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 method includes: receiving a first message broadcast by a second terminal, where the first message includes a second identity identifier and a second application identifier, wherein the second identity identifier 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; When the second identity identifier is the same as the first identity identifier and the second application identifier matches the first application identifier, the first terminal refuses to establish a second unicast connection with the second terminal to filter the first message.
2. The method according to claim 1, characterized in that The first identity identifier is the media access control MAC address of the third terminal, the second identity identifier is the MAC address of the second terminal, the first application identifier includes at least one of the identifier of the first application or the mapping value of the identifier of the first application, and the second application identifier includes at least one of the identifier of the second application or the mapping value of the identifier of the second application.
3. The method according to claim 2, characterized in that 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 matches the first application identifier, which means that the identifier of the second application is the same as the identifier of the first application.
4. The method according to claim 2, characterized in that 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 matches the first application identifier, which 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.
5. The method according to claim 2, characterized in that In the case where 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 in 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.
6. The method according to any one of claims 1 to 5, characterized in that The first message further includes an identification area, where the identification area is used to indicate a service range of a second application supported by the second terminal. The method further includes: When the second identity identifier is different from the first identity identifier, or the second application identifier does not match the first application identifier, acquiring the identification area; When the first terminal is not located within the identification area, the first terminal refuses to establish the second unicast connection with the second terminal.
7. The method according to claim 6, characterized in that The method further comprises: When the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match, and the first terminal is located within the identification area, in response to the first message, the second unicast connection is established, and the mapping relationship between the second identity identifier and the second application identifier is stored.
8. The method according to claim 7, characterized in that The method further comprises: After the second unicast connection is established, when the first terminal is no longer located in the identification area, the stored mapping relationship between the second identity identifier and the second application identifier is deleted.
9. The method according to claim 1, characterized in that The mapping relationship between the first identity identifier and the first application identifier is stored in the mapping information.
10. The method according to claim 9, characterized in that The mapping information is stored in a network layer or a message layer of the first terminal.
11. The method according to claim 2, characterized in that The second identity identifier is the source layer 2 identifier of the first message, the identifier of the second application is the application identifier of the first message, and the mapping value of the identifier of the second application is the target layer 2 identifier of the first message.
12. The method according to claim 1, characterized in that The first message is a unicast service announcement, and the first message is carried by a dedicated service announcement DSA.
13. The method according to claim 1, wherein The second terminal is a roadside unit RSU or an on-board unit OBU.
14. A device for message filtering, characterized in that: The apparatus establishes a first unicast connection with a third terminal, and stores a mapping relationship between a first identity identifier and a first application identifier based on the first unicast connection, wherein the first identity identifier 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, and the apparatus includes: a receiving unit, configured to receive a first message broadcast by a second terminal, the first message including a second identity identifier and a second application identifier, wherein the second identity identifier 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; A processing unit is configured to refuse to establish a second unicast connection with the second terminal to filter the first message when the second identity identifier is the same as the first identity identifier and the second application identifier matches the first application identifier.
15. The device according to claim 14, characterized in that The first identity identifier is the media access control MAC address of the third terminal, the second identity identifier is the MAC address of the second terminal, the first application identifier includes at least one of the identifier of the first application or the mapping value of the identifier of the first application, and the second application identifier includes at least one of the identifier of the second application or the mapping value of the identifier of the second application.
16. The device according to claim 15, characterized in that 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 matches the first application identifier, which means that the identifier of the second application is the same as the identifier of the first application.
17. The device according to claim 15, characterized in that 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 matches the first application identifier, which 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.
18. The device according to claim 15, characterized in that In the case where 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 in 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.
19. The device according to any one of claims 14 to 18, characterized in that The first message further includes an identification area, where the identification area is used to indicate a service range of a second application supported by the second terminal. The processing unit is further configured to: When the second identity identifier is different from the first identity identifier, or the second application identifier does not match the first application identifier, acquiring the identification area; When the apparatus is not located within the identification area, establishing the second unicast connection with the second terminal is rejected.
20. The device according to claim 19, characterized in that The processing unit is further configured to: When the second identity identifier and the first identity identifier are different, or the second application identifier and the first application identifier do not match, and when the device is located within the identification area, the second unicast connection is established in response to the first message, and the mapping relationship between the second identity identifier and the second application identifier is stored.
21. The device according to claim 20, characterized in that The processing unit is further configured to: After the second unicast connection is established, if the device is no longer located in the identification area, the stored mapping relationship between the second identity identifier and the second application identifier is deleted.
22. The device according to claim 14, characterized in that The mapping relationship between the first identity identifier and the first application identifier is stored in the mapping information.
23. The device according to claim 22, characterized in that The mapping information is stored in a network layer or a message layer of the device.
24. The device according to claim 15, characterized in that The second identity identifier is the source layer 2 identifier of the first message, the identifier of the second application is the application identifier of the first message, and the mapping value of the identifier of the second application is the target layer 2 identifier of the first message.
25. The device according to claim 14, characterized in that The first message is a unicast service announcement, and the first message is carried by a dedicated service announcement DSA.
26. The device according to claim 14, characterized in that The second terminal is a roadside unit RSU or an on-board unit OBU.
27. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program instructions, and the program instructions are used to implement the method according to any one of claims 1 to 13.
28. A device for message filtering, characterized in that: The apparatus comprises a memory and a processor, wherein the memory stores computer program instructions, and the processor executes the computer program instructions to enable the apparatus to perform the method according to any one of claims 1 to 13.
29. A computer program product, when the computer program product is run on a processor, causes an apparatus for message filtering to perform the method according to any one of claims 1 to 13.