A V2X message clustering method and system based on k-means algorithm
Through the V2X message clustering method based on the k-means algorithm, the problem of poor clustering effect of V2X messages in the prior art in complex traffic environments is solved, and priority processing of high-correlation critical messages is achieved, which improves the timeliness and reliability of message processing.
Patent Information
- Application Number
- CN202210212240.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-04
AI Technical Summary
The existing V2X message preprocessing methods have poor clustering effects in complex traffic environments, resulting in insufficient timeliness of critical message processing and the fact that low-priority messages are given priority authentication.
The V2X message clustering method based on the k-means algorithm is adopted. By constructing the V2X vehicle network, periodically broadcasting and receiving BSM basic security information, analyzing and classifying messages, performing trajectory cross-calculation, combining the k-means algorithm to cluster messages, and prioritizing them according to the clustering results.
It effectively improves the processing priority of critical messages with high correlation, enhances the timeliness of critical messages by on-board units, reduces the computational complexity, and improves the timeliness of critical messages.
Smart Images

Figure CN114549886B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of V2X received message preprocessing, and in particular to a V2X message clustering method and system based on a k-means algorithm. Background Art
[0002] Auxiliary safety messages, one of the three major applications of V2X vehicle networking, have very high requirements for real-time and reliability. Therefore, in order to improve the message processing capabilities of OBU vehicle terminals, it is very necessary to conduct pre-processing research on V2X messages. In terms of the priority of message processing, the existing message relevance clustering effect cannot meet the complex traffic environment, reducing the timeliness of processing critical messages. In order to enhance the processing capabilities of OBU to receive V2X messages and improve the reliability and real-time performance of safety message processing, OBU V2X message pre-processing becomes a key link.
[0003] In C-V2X, V2X messages can be divided into two types: safety messages and service messages. Because the computing power of OBU is limited, highly correlated safety messages should be processed with priority over other messages, but there are problems with poor clustering effect and poor clustering timeliness in the preprocessing method. Pei Yu et al. proposed a signal strength-based k-means clustering algorithm for message processing priority. According to the research of Rui M et al., the signal strength of the message received between two vehicles is inversely proportional to the distance between the vehicles. Assuming that the signal strength of the message received between the two vehicles is linearly inversely proportional to the distance between the vehicles, the message correlation is divided according to the distance between the vehicles. This scheme can realize message correlation clustering in simple scenarios, but in actual traffic environments, first of all, the signal strength of the two vehicles is not linearly related to the distance between the vehicles, and the message correlation of distant vehicles is not necessarily lower than that of nearby vehicles, so the application effect is poor. Hamida EB et al. also prioritized BSM messages from neighbors, but it is flawed to cluster different types of messages in the same way. If entertainment messages and safety warning messages are processed together in the field of Internet of Vehicles, it is very likely that safety warning messages will be missed and threaten system security. Lin, X, Li et al. adopted a batch processing method to ensure the timeliness of preprocessing, but this solution still has certain limitations in the application of Internet of Vehicles. The batch processing method processes a batch of message sets at the same time, but when a batch of message sets contains illegal messages, the entire data packet will be lost.
[0004] In the above method, although message clustering can be basically achieved, the priority allocation of messages is unreasonable, and there may be a situation where low-priority messages are authenticated first. Summary of the invention
[0005] In order to solve the problems existing in the above prior art, the present invention proposes a V2X message clustering method based on the k-means algorithm, which includes: building a V2X vehicle network; the V2X communication module of the first vehicle user periodically broadcasts the BSM basic safety information of the vehicle, and receives the BSM basic safety information broadcast by other vehicle users, wherein the BSM basic safety information includes the vehicle longitude, latitude, heading angle and timestamp data of the vehicle user; the received BSM basic safety information is parsed, and illegal and invalid messages are deleted to obtain parsed information; the parsed information is classified and processed, if the parsed information is non-safety information, the information is divided into the lowest priority queue, if the parsed information is safety information, the parsed information is subjected to trajectory intersection calculation; the trajectory intersection calculation result is combined with the received BSM basic safety information to obtain a new message set; the new message is clustered by using the k-means algorithm to obtain a clustering result; and the messages are prioritized according to the clustering result.
[0006] Preferably, obtaining BSM basic safety information includes using autonomous sensors to collect information about vehicle users, and using a fusion algorithm to fill in the type of obstacle, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values, and heading angle information into the collaborative perception message based on the collected information. The filled-in information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information, and after the message is filled, it is broadcast through the V2X communication module at a fixed period t2.
[0007] Preferably, parsing the received BSM basic security information includes: after the OBU / RSU receives the basic security information broadcast by the V2X communication module, it performs signature verification on the information to confirm the identity of the sender; obtains the identity information of the sender, which includes the signer information, ciphertext and signature; verifies the obtained information, including verifying whether the certificate is valid, whether the message is self-signed, whether the certificate contains the signer's public key and whether the V2X message is valid. If any verification fails, the message is discarded; if the verification passes, the signer message is encoded and the digest is calculated to obtain the signer's digest, and the V2X message digest value is further calculated. The two digest values are integrated, and the signature is verified using the public key and the digest value on the certificate, and the signature verification result is returned to finally obtain the original plaintext message.
[0008] Preferably, the process of performing trajectory intersection calculation on the parsed information includes:
[0009] Step 1: Obtain the location information and target status information of the own vehicle;
[0010] Step 2: Construct a three-dimensional coordinate system with the vehicle as the coordinate center based on the position information of the vehicle and the target state information; obtain the position information of the target relative to the vehicle based on the established three-dimensional coordinate system, and obtain the longitudinal distance and lateral distance of the target relative to the vehicle;
[0011] Step 3: Calculate the relative distance d between the own vehicle and the target vehicle based on the position information of the own vehicle combined with the lateral and longitudinal distances i , target latitude and longitude information and heading angle information;
[0012] Step 4: According to the relative distance d i , target longitude and latitude information, and heading angle information are used to calculate the possibility of the trajectory intersection between the target vehicle and the own vehicle, and obtain the trajectory intersection possibility result.
[0013] Preferably, the process of clustering new messages using the k-means algorithm includes:
[0014] Step 1: Get a new message set P i = {P1,P2,...,P n}, where 1≤i≤n;
[0015] Step 2: According to the number of priority queues k, from the data set P i Randomly select k samples as the initial cluster center point C j ={C1,C2,...,C k}, where 1≤j≤k;
[0016] Step 3: Calculate each sample x in the dataset separately i to C j The Euclidean distance d(x i ,C j ), and divide each sample into the cluster with the nearest center point;
[0017] Step 4: For each cluster, recalculate the cluster center of the cluster;
[0018] Step 5: Repeat steps 3 and 4, and iterate and update the cluster center positions until the change of each cluster center position in any iteration is less than the threshold or the maximum number of iterations of the algorithm reaches the upper limit, stop the algorithm, and get the clustering result;
[0019] Step 6: Get the priority weight of the cluster according to the clustering results.
[0020] Furthermore, the formula for recalculating the cluster center of the cluster is:
[0021]
[0022] where c jis the clustering message cluster, |c j | is the number of clusters, and x is the sample data point.
[0023] Furthermore, the calculation formula of the cluster priority weight is:
[0024]
[0025] Among them, γ is the weight value of the cluster; β i is the cluster center; ix , β iy are the x and y coordinates of the cluster center in the coordinate system respectively; ε1 and ε2 are the coefficients of distance weight; ε3 is the weight coefficient of the possibility of trajectory intersection.
[0026] A V2X message clustering system based on a k-means algorithm, the system comprising: a vehicle-mounted sensor, a V2X communication module, a high-precision positioning module and a message clustering module;
[0027] The vehicle-mounted sensor is used to sense obstacle information within the effective range of the surrounding environment, and fills the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values and heading angle information into the collaborative perception message through a data fusion algorithm. The filled information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information;
[0028] The V2X communication module includes a sending submodule and a receiving submodule;
[0029] The sending submodule is used to broadcast the type and status information of obstacles sensed by the vehicle-mounted sensors to the surrounding vehicle-mounted terminals, and broadcast the vehicle's BSM basic safety message at a period of t1;
[0030] The receiving submodule is used to ensure the authenticity and timeliness of the received messages. Its main tasks are to receive broadcast V2X messages and perform message parsing, security message screening, and filtering of illegal and outdated messages.
[0031] The high-precision positioning module is used to obtain the latitude and longitude information and heading angle information of the vehicle to establish a three-dimensional coordinate system centered on the vehicle, so as to calibrate and calculate the position information of nearby targets in the coordinate system;
[0032] The message clustering module is used to perform relevance clustering and priority division on the received V2X messages.
[0033] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned V2X message clustering methods based on the k-means algorithm.
[0034] To achieve the above-mentioned purpose, the present invention also provides a V2X message clustering device based on a k-means algorithm, comprising a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory, and is used to execute the computer program stored in the memory, so that the V2X message clustering device based on the k-means algorithm executes any of the above-mentioned V2X message clustering methods based on the k-means algorithm.
[0035] Beneficial effects of the present invention:
[0036] 1) The present invention can effectively reflect the probability of lane resource contention conflict, thereby increasing the processing priority of high-correlation critical messages.
[0037] 2) The present invention can enhance the timeliness of the on-board unit's processing of critical messages and reduce the computational complexity, thereby improving the timeliness of the processing of critical messages. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is an architecture diagram of a V2X message clustering system based on a k-means algorithm of the present invention;
[0039] Figure 2 A schematic diagram of the possibility of track intersection of the present invention;
[0040] Figure 3 It is a message clustering flow chart of the present invention;
[0041] Figure 4 It is the angle and the intersection possibility curve diagram of the track of the present invention;
[0042] Figure 5 This is a flow chart of the k-means algorithm of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] A V2X message clustering method based on a k-means algorithm comprises: building a V2X vehicle network; a V2X communication module of a first vehicle user periodically broadcasts the BSM basic safety information of the vehicle, and receives the BSM basic safety information broadcasted by other vehicle users, wherein the BSM basic safety information includes the vehicle longitude, latitude, heading angle and timestamp data of the vehicle user; parsing the received BSM basic safety information, and deleting illegal and invalid messages to obtain parsed information; classifying the parsed information, if the parsed information is non-safety information, the information is divided into a queue with the lowest priority level, if the parsed information is safety information, trajectory intersection calculation is performed on the parsed information; the trajectory intersection calculation result is combined with the received BSM basic safety information to obtain a new message set; clustering the new messages using the k-means algorithm to obtain a clustering result; and prioritizing the messages according to the clustering result.
[0045] A specific implementation of a V2X message clustering method based on a k-means algorithm, the method comprising:
[0046] S1: The V2X communication module broadcasts the basic safety message of the vehicle BSM at a period of t1, and broadcasts the cooperative perception information at a period of t2. The cooperative perception information is sensed by the vehicle-mounted sensor and the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values and heading angle information are filled into the cooperative perception message using a data fusion algorithm. The information filled in at the same time also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information.
[0047] S2: The V2X communication message receiving submodule receives the V2X message, parses it, filters out illegal and outdated messages, and classifies the messages. It extracts the vehicle longitude, latitude, heading angle, and timestamp data from the received V2X safety messages, compares the message timestamp with the local time, and filters out timeout messages. Δt=t hv -t rv , where Δt is the maximum tolerable transmission delay, t hv is the local time, t rv is the sending timestamp of the target message. If Δt>1(s), the timeout message is discarded. Finally, the message type is used to determine whether the message is involved in clustering. If it is a non-safety message, the safety parameter r<1, and the message is not involved in clustering. The message is directly divided into the lowest priority queue; otherwise, the message is subjected to trajectory intersection probability calculation.
[0048] S3: Calculate the probability of trajectory intersection between the target and the vehicle.
[0049] The specific steps for calculating the probability of trajectory intersection between the target and the vehicle include:
[0050] Step 1: Based on the vehicle position information obtained by the high-precision positioning module and the target state information obtained in step S2, a three-dimensional coordinate system with the vehicle as the coordinate center is established to calibrate the position information of the nearby target relative to the vehicle and obtain the longitudinal and lateral distances of the target relative to the vehicle; the relative distance d is calculated based on the latitude and longitude information obtained by the high-precision positioning module of the vehicle and the lateral and longitudinal distances. i and target longitude and latitude information; if it is obstacle information, the target heading angle information can be calculated based on the target position at the previous moment. If it is a BSM message containing heading angle information, the heading angle data can be directly extracted.
[0051] Step 2: Calculate the track intersection probability between each target and the vehicle based on the position information and heading angle information. The track intersection probability calculation method is as follows:
[0052] The present invention combines the sum of the relative azimuth angle and the relative heading angle as the basis for the possibility of track intersection, as shown in the schematic diagram Figure 3 As shown. The larger the sum of the two angles, the smaller the possibility of the track crossing. The calculation formulas for the relative heading angle and the relative azimuth angle are as follows:
[0053] θ=θ rv -θ hv
[0054]
[0055] Among them, θ hv is the heading angle of the vehicle, θ rv θ is the heading angle of the target vehicle. p is the relative azimuth angle, α hv and β hv are the longitude and latitude of the vehicle, α rv and β rv are the longitude and latitude of the target vehicle respectively. When β rv ≥β hv It is necessary to determine whether θ is less than zero. If it is less than 0, then θ = θ + 360, otherwise θ = θ + 180.
[0056] The larger the sum of the relative azimuth angle and the relative heading angle, the more parallel and safer the two trajectories are. The characteristic formula is as follows:
[0057]
[0058] Where k = 0.00028, α = 2, the unit of angle sum is degree, and the relationship curve between angle sum and trajectory intersection probability is as follows: Figure 4 As shown, the horizontal axis is the angle and the vertical axis is the trajectory intersection possibility.
[0059] A specific implementation method for calculating the azimuth angle is based on the earth model. From the north meridian, the horizontal angle between the clockwise direction and the target direction line (which can be regarded as the angle indicated by the compass) is the dihedral angle formed by the OPN plane and the OPQ plane. With the North Pole N as the vertex, N-PQO forms a trihedral angle. The dihedral angle N-OP-Q is θ, and its plane angle is The size of the dihedral angle p-ON-Q is λ2-λ1, and its plane angle is δ. The result obtained when solving the distance between two points is expressed as:
[0060]
[0061]
[0062] The azimuth angle is obtained according to the calculation formula of cos(δ):
[0063]
[0064] Step 3: Combine the source message and the calculation results (orbit crossing possibility, relative distance) into a new message set P i = {P1,P2,...,P n}, where 1≤i≤n.
[0065] S4: Use k-means algorithm to cluster new messages.
[0066] like Figure 5 As shown in FIG. 1 , the specific steps of clustering new messages using the k-means algorithm include:
[0067] S41: According to the priority queue number k, from the data set P i Randomly select k samples as the initial cluster center point C j ={C1,C2,...,C k}, where 1≤j≤k.
[0068] S42: Calculate each sample x in the data set separately i to C j The Euclidean distance d(x i ,C j ), and divide each sample into the cluster with the nearest center point.
[0069]
[0070] S43: For each cluster, recalculate the cluster center of the cluster. The cluster center point calculation method is: where c j is the clustering message cluster, |cj | is the number of clusters, and x is the sample data point.
[0071] S44: Repeat steps S42 and S43, and iterate and update the cluster center positions in a loop until the change in each cluster center position in any iteration is less than the threshold or the maximum number of iterations of the algorithm reaches the upper limit, and then stop the algorithm.
[0072] S45: Clustered message set P i '(1<i<k) is divided into k clusters, namely message cluster 1, message cluster 2, ..., message cluster k. Then P i '(1<i<k) According to the priority weight of the cluster, the messages in the cluster are mapped to the corresponding priority queue. The priority weight of each cluster is sorted from large to small according to the following characteristic formula, and the priority of each cluster is from high to low.
[0073]
[0074] Where γ is the weight value of the cluster; β i is the cluster center; ix , β iy They are the x and y coordinates of the cluster center in the coordinate system respectively; the distance weight coefficient ε1 = 0.5; according to the maximum distance of V2X communication of 300 meters, ε2 = 300; the weight coefficient of the possibility of trajectory intersection ε3 = 0.5.
[0075] S5: Finally, add the messages with safety factor r<1 to the lowest priority queue to form the clustered priority queue Priority(L1)>Priority(L2)>...>Priority(LK). The system processes the messages in the order of priority. If the queue is empty, search for the message in the next highest priority queue and process it until the queue is empty.
[0076] A V2X message clustering system based on k-means algorithm, such as Figure 1 As shown, the system includes: vehicle-mounted sensors, V2X communication modules, high-precision positioning modules and message clustering modules;
[0077] The vehicle-mounted sensor is used to sense obstacle information within the effective range of the surrounding environment, and fills the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values and heading angle information into the collaborative perception message through a data fusion algorithm. The filled information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information;
[0078] The V2X communication module includes a sending submodule and a receiving submodule;
[0079] The sending submodule is used to broadcast the type and status information of obstacles sensed by the vehicle-mounted sensors to the surrounding vehicle-mounted terminals, and broadcast the vehicle's BSM basic safety message at a period of t1;
[0080] The receiving submodule is used to ensure the authenticity and timeliness of the received messages. Its main tasks are to receive broadcast V2X messages and perform message parsing, security message screening, and filtering of illegal and outdated messages.
[0081] The high-precision positioning module is used to obtain the latitude and longitude information and heading angle information of the vehicle to establish a three-dimensional coordinate system centered on the vehicle, so as to calibrate and calculate the position information of nearby targets in the coordinate system;
[0082] The message clustering module is used to perform relevance clustering and priority division on the received V2X messages.
[0083] The vehicle-mounted sensing includes a variety of autonomous sensors (such as millimeter wave radar, camera and laser radar), and the number of each sensor is one or more. The autonomous sensor refers to a sensor that can obtain the distance, type and speed of the target without communicating with the target. The vehicle-mounted sensor module is used to sense the obstacle information (including falling rocks, potholes, pedestrians, animals, etc.) within the effective range of the surrounding environment, and fill the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values and heading angle information into the collaborative perception message through the data fusion algorithm. The filled information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information, and broadcasts it through the V2X communication module at a fixed period t2 after the message is filled. The longitude and latitude information of the obstacle can be calculated based on the longitude and latitude information obtained by the high-precision positioning module of the vehicle and the longitudinal distance and lateral distance of the obstacle relative to the vehicle; the obstacle heading angle information can be calculated based on the position comparison with the target at the previous moment.
[0084] 1. The method of screening security messages and filtering illegal and outdated messages is as follows: introduce the security parameter r, and make a judgment based on the message type of the received V2X message. If it is a basic safety message or a collaborative perception message, r>1, and continue to the next step; otherwise, r<1, and directly enter the lowest priority queue. Extract the digital signature and timestamp information of the received V2X message, filter out illegal messages with the message verification algorithm; and compare the message timestamp with the local time Δt=t hv -t rv Filter out outdated messages, where Δt is the maximum tolerable transmission delay, t hv is the local time, t rv It is the sending timestamp of the target message. If Δt>1 (unit: second), the message is discarded.
[0085] The high-precision positioning module and V2X communication module are used to obtain the location information of the vehicle and the target. The three-dimensional coordinates with the vehicle as the coordinate center are established to calibrate the location information of nearby targets relative to the vehicle. Based on the azimuth information and heading angle information, the possibility of road resource competition and collision at the next moment is estimated according to the trajectory intersection possibility algorithm. The schematic diagram is shown in the figure. Figure 2 shown.
[0086] The k-means clustering algorithm includes: first, judging whether to participate in clustering according to the message security parameter r. If r < 1, it does not participate in clustering and directly enters the lowest priority queue; otherwise, it calculates the possibility of trajectory intersection and enters the message clustering module for further processing. Specifically, from the message set P i Select k message samples as the initial cluster center point C j ={C1,C2,...,C k}, where 1≤j≤k. The cluster center initialization selection strategy is to equally divide the V2X message time slice (Unit: ms) and then calculate each sample x in the dataset separately i to C j The Euclidean distance of each point is calculated, and each sample is divided into the cluster with the nearest center point. The end condition of the cyclic alternation of the centroid position of each cluster is that the change of the current position of all centroids compared with the last cluster center position is less than the threshold Or the algorithm stops when the maximum number of iterations μ2 is reached. Constants μ1 and μ2 should be determined based on the maximum number of vehicles and message clusters in the actual traffic flow. If the threshold coefficient μ1 is set too small, the algorithm may converge to a high degree but converge slowly. If the maximum number of iterations μ2 is set too small, the program may end before the algorithm converges.
[0087] The present invention uses the possibility and distance of trajectory intersection as input parameters of the k-means clustering algorithm, which can effectively reflect the emergency scenarios where there is a conflict over lane resources and the distance is close, thereby improving the processing priority of urgent messages. The method first divides the messages into safety messages and non-safety messages by judging the message type, clusters the safety messages with higher real-time requirements using the k-means algorithm, and maps the clustering results to priority queues according to the cluster center weight sorting method, and assigns the messages in the cluster to the corresponding priority queues according to the sorting results. This method can enhance the timeliness of the on-board unit's processing of urgent messages and reduce the computational complexity, thereby improving the timeliness of the processing of urgent messages.
[0088] In one embodiment of the present invention, the present invention also includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned V2X message clustering methods based on the k-means algorithm.
[0089] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0090] A V2X message clustering device based on a k-means algorithm comprises a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory and is used to execute the computer program stored in the memory, so that the V2X message clustering device based on the k-means algorithm performs any of the above-mentioned V2X message clustering methods based on the k-means algorithm.
[0091] Specifically, the memory includes: ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk, etc., which can store program codes.
[0092] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0093] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A V2X message clustering method based on k-means algorithm, characterized in that: include: Build V2X vehicle networking; The V2X communication module of the first vehicle user periodically broadcasts the BSM basic safety information of the vehicle, and receives the BSM basic safety information broadcast by other vehicle users, wherein the BSM basic safety information includes the vehicle longitude, latitude, heading angle and timestamp data of the vehicle user; parses the received BSM basic safety information, deletes illegal and invalid messages, and obtains parsed information; Classify and process the parsed information. If the parsed information is non-safety information, the information is classified into the lowest priority queue. If the parsed information is safety information, the parsed information is subjected to track intersection calculation. The track intersection calculation result is combined with the received BSM basic safety information to obtain a new message set. Use the k-means algorithm to cluster new messages and obtain clustering results; prioritize the messages according to the clustering results; Obtaining BSM basic safety information includes using autonomous sensors to collect vehicle user information, and using a fusion algorithm to fill the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values, and heading angle information into the collaborative perception message based on the collected information. The filled information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information. After the message is filled, it is broadcasted through the V2X communication module at a fixed period t2; The process of clustering new messages using the k-means algorithm includes: Step 1: Get a new message set P i = {P1,P2,...,P n }, where 1≤i≤n; Step 2: According to the number of priority queues k, from the data set P i Randomly select k samples as the initial cluster center point C j ={C1,C2,...,C k }, where 1≤j≤k; Step 3: Calculate each sample x in the data set separately i to C j The Euclidean distance d(x i ,C j ), and divide each sample into the cluster with the nearest center point; Step 4: For each cluster, recalculate the cluster center of the cluster; its expression is: where c j is the clustering message cluster, |c j | is the number of clusters, and x is the sample data point; Step 5: Repeat steps 3 and 4, and iterate and update the cluster center positions until the change of each cluster center position in any iteration is less than the threshold or the maximum number of iterations of the algorithm reaches the upper limit, stop the algorithm, and get the clustering result; Step 6: Get the priority weight of the cluster according to the clustering results; the calculation formula is: Among them, γ is the weight value of the cluster; β i is the cluster center; ix , β iy are the x and y coordinates of the cluster center in the coordinate system respectively; ε1 and ε2 are the coefficients of distance weight; ε3 is the weight coefficient of the possibility of trajectory intersection.
2. According to claim 1, a V2X message clustering method based on k-means algorithm is characterized in that: Parsing the received BSM basic security information includes: after receiving the basic security information broadcast by the V2X communication module, the OBU / RSU performs signature verification on the information to confirm the identity of the sender; obtaining the identity information of the sender, which includes the signer information, ciphertext and signature; verifying the obtained information, including verifying whether the certificate is valid, whether the message is self-signed, whether the certificate contains the signer's public key and whether the V2X message is valid. If any verification fails, the message is discarded; if the verification passes, the signer message is encoded and the digest is calculated to obtain the signer's digest, and the V2X message digest value is further calculated. The two digest values are integrated, and the signature is verified using the public key and digest value on the certificate. The signature verification result is returned to finally obtain the original plaintext message.
3. The V2X message clustering method based on the k-means algorithm according to claim 1, characterized in that: The process of performing trajectory intersection calculation on the parsed information includes: Step 1: Obtain the location information and target status information of the own vehicle; Step 2: Construct a three-dimensional coordinate system with the vehicle as the coordinate center based on the position information of the vehicle and the target state information; obtain the position information of the target relative to the vehicle based on the established three-dimensional coordinate system, and obtain the longitudinal distance and lateral distance of the target relative to the vehicle; Step 3: Calculate the relative distance d between the own vehicle and the target vehicle based on the position information of the own vehicle combined with the lateral and longitudinal distances i , target latitude and longitude information and heading angle information; Step 4: According to the relative distance d i , target longitude and latitude information, and heading angle information are used to calculate the possibility of the trajectory intersection between the target vehicle and the own vehicle, and obtain the trajectory intersection possibility result.
4. A V2X message clustering system based on a k-means algorithm, executing a V2X message clustering method based on a k-means algorithm as described in any one of claims 1 to 3, characterized in that: The system includes: vehicle-mounted sensors, V2X communication module, high-precision positioning module and message clustering module; The vehicle-mounted sensor is used to sense obstacle information within the effective range of the surrounding environment, and fills the obstacle type, longitudinal distance and lateral distance relative to the vehicle, longitude and latitude values and heading angle information into the collaborative perception message through a data fusion algorithm. The filled information also includes the target temporary ID, vehicle ID, speed, data source, and timestamp information; The V2X communication module includes a sending submodule and a receiving submodule; The sending submodule is used to broadcast the type and status information of obstacles sensed by the vehicle-mounted sensors to the surrounding vehicle-mounted terminals, and broadcast the vehicle's BSM basic safety message at a period of t1; The receiving submodule is used to ensure the authenticity and timeliness of the received messages. Its main tasks are to receive broadcast V2X messages and perform message parsing, security message screening, and filtering of illegal and outdated messages. The high-precision positioning module is used to obtain the latitude and longitude information and heading angle information of the vehicle to establish a three-dimensional coordinate system centered on the vehicle, so as to calibrate and calculate the position information of nearby targets in the coordinate system; The message clustering module is used to perform relevance clustering and priority division on the received V2X messages.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the V2X message clustering method based on the k-means algorithm as claimed in any one of claims 1 to 3.
6. A V2X message clustering device based on k-means algorithm, characterized in that: It includes a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory and is used to execute the computer program stored in the memory, so that the V2X message clustering device based on the k-means algorithm executes the V2X message clustering method based on the k-means algorithm according to any one of claims 1 to 3.