An automatic driving forward collision warning method based on capsule network fusion perception

By constructing a joint mapping relationship between semantic capsules and motion intent capsules, filtering out redundant target capsules, and combining cross-vehicle communication, the shortcomings of existing autonomous driving forward collision warning systems in terms of perception accuracy and decision response speed are solved, achieving more efficient forward collision warning.

CN120913177BActive Publication Date: 2026-05-15NANJING SHUOXIN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING SHUOXIN TECHNOLOGY CO LTD
Filing Date
2025-08-01
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing forward collision warning systems for autonomous driving are insufficient in perception accuracy and decision response speed, making them unsuitable for dynamic and complex traffic scenarios. Furthermore, they fail to effectively integrate multimodal data, resulting in delayed response to emergencies and insufficient robustness in warnings.

Method used

By constructing a spatial-temporal joint mapping relationship between semantic capsules and motion intent capsules, redundant target capsules are filtered out. Combined with cross-vehicle communication, multi-level perception enhancement and trajectory change detection are achieved, thereby improving the real-time performance and stability of the early warning system.

Benefits of technology

It significantly improves the forward collision warning capability of autonomous driving systems in dynamic and complex scenarios, reduces the false recognition and false alarm rates, and achieves earlier and more accurate collision warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120913177B_ABST
    Figure CN120913177B_ABST
Patent Text Reader

Abstract

The application discloses an automatic driving forward collision warning method based on capsule network fusion perception, and relates to the technical field of collision warning. The application encodes the spatial region with structure and semantic meaning in the original perception image through a semantic capsule structure, and embeds the spatial region into a perception capsule structure, so that multi-level and structured perception enhancement is realized, and the context correlation capability of target identification is effectively improved; with the help of dynamic screening of redundant target capsules corresponding to high-interference semantic items, the probability of misidentification and false alarm of the warning is significantly reduced, and the robustness of the system to interference information in a complex traffic scene is improved; meanwhile, through receiving and buffering the motion intention capsules broadcast by the front vehicle, a cross-vehicle trajectory relay mechanism is constructed, the limitation of traditional single perception based on the vehicle is broken, and multi-vehicle cooperative perception and joint judgment are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of collision warning technology, and in particular to a forward collision warning method for autonomous driving based on capsule network fusion perception. Background Technology

[0002] With the rapid development of autonomous driving technology, vehicle safety in high-speed and complex scenarios has become an increasingly important concern, especially the prediction and avoidance of forward collisions, which has become a hot research topic. Existing forward collision warning systems generally rely on multi-source perception data (such as camera images, radar point clouds, and CAN bus data) and combine them with deep learning models for target recognition and hazard assessment. Given the continuous improvement in perception accuracy and decision-making response speed, how to achieve more coupled data fusion and a warning mechanism with stronger semantic discriminative capabilities is one of the important issues in the safety evolution of current autonomous driving systems.

[0003] CN115374308A discloses a method for automatically extracting and displaying forward collision warning events for autonomous vehicles, primarily focusing on the offline processing and display of real-vehicle test data. This method reads CAN bus data and video data, cleans and completes relevant fields, and simultaneously displays multimodal data before and after the warning event on a webpage. While this solution achieves unified visualization of historical test data, facilitating subsequent analysis and review, it is essentially a post-event presentation mechanism and lacks real-time warning capabilities. Furthermore, this method does not construct a semantic perception model for forward collisions, nor does it achieve deep fusion of multimodal data in the feature space, making it difficult to apply to the identification of dynamic, complex, and abrupt collision risk scenarios in real-world driving environments.

[0004] CN119953394A discloses a multi-level autonomous driving forward collision safety warning system and method. It constructs feature vectors from video and radar data respectively, and uses a modal alignment mechanism to achieve feature fusion in a unified three-dimensional space, combined with a deep learning network for warning judgment. This technology possesses a certain degree of real-time performance and hierarchy in information fusion and risk assessment. However, the warning mechanism relies on static model reasoning, failing to dynamically adjust the attention weights of perceived targets in the input structure, and does not fully exploit the interference relationship between semantic scenes and perception results, making it susceptible to disturbances from redundant targets. Furthermore, this scheme does not introduce a cross-vehicle communication mechanism to enhance risk linkage perception capabilities, and the overall system still suffers from limitations such as delayed response to sudden events and insufficient robustness in warning triggering. Summary of the Invention

[0005] In view of the problems existing in the forward collision warning technology for autonomous driving, this invention is proposed.

[0006] Therefore, the problem to be solved by this invention is how to achieve accurate extraction of key risk factors and detection of trajectory mutations by constructing a spatial-temporal joint mapping relationship between semantic capsules and motion intention capsules, thereby significantly improving the real-time performance, stability and foresight of the early warning system.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] In a first aspect, the present invention provides a forward collision warning method for autonomous driving based on capsule network fusion perception, comprising: constructing a multi-level semantic tag set based on the vehicle's current perception image and environmental annotation information, and encoding the spatial region corresponding to each semantic tag as a semantic capsule; dynamically filtering redundant spatial target capsules in the perception capsule structure according to the highly interfering semantic items contained in the semantic tag set, and retaining key capsules with high coupling with the semantic capsules; receiving motion intent capsules broadcast from the vehicle ahead, and caching them in a cross-vehicle relay sequence in chronological order; jointly projecting the key capsules selected by the vehicle and the cached motion intent capsules onto a unified trajectory vector space, and generating a comprehensive trajectory change index through joint mapping, which is used to determine whether there is a tendency for abrupt changes in the direction of movement of the vehicle ahead, and triggering a warning flag.

[0009] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the step of encoding the spatial region corresponding to each semantic label into a semantic capsule includes: classifying the image region into semantic labels according to a preset semantic hierarchy index table based on the current frame image data, wherein each semantic label is accompanied by a corresponding category confidence score and image coordinate index, forming a semantic structure map; performing spatial clustering according to the image coordinate index in the semantic structure map, dividing the candidate region set with structure preservation, wherein each candidate region corresponds to a single semantic label and satisfies the minimum pixel coverage constraint; for each candidate region, generating a semantic encoding triplet by combining the corresponding semantic label and category confidence score, and using the semantic encoding triplet as input to construct a semantic capsule, generating a semantic capsule set.

[0010] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the step of spatial clustering based on semantic labels to divide a set of candidate regions with structure preservation includes: extracting the corresponding image pixel coordinate set according to each semantic label in the semantic structure map, and removing unstable pixels located in the edge transition region; calculating the composite similarity of pixels in the image pixel coordinate set based on spatial distance and structural gradient direction consistency, and generating a set of candidate subclusters; calculating the pixel coverage area of ​​each candidate subcluster in the set of candidate subclusters, and retaining it in the effective region set if the pixel coverage area is greater than or equal to the minimum pixel coverage constraint, otherwise removing it; and merging all candidate subclusters that satisfy the minimum pixel coverage constraint according to semantic labels and outputting them as a set of candidate regions.

[0011] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the method for dynamically filtering redundant spatial target capsules in the perception capsule structure using high-interference semantic items includes: extracting preset high-interference semantic items from a semantic tag set to form an interference tag subset, and forming an interference priority table based on the product of the coverage area and confidence level of each interference tag in the current frame; matching the spatial center point coordinates of each target perception capsule in the perception capsule set with the position of the capsule corresponding to the high-interference semantic item in the semantic capsule set to generate a spatial mapping matrix, wherein the elements in the generated spatial mapping matrix are the interference overlap rates between the target perception capsule and the semantic capsule set; based on the maximum interference overlap rate corresponding to each target perception capsule in the spatial mapping matrix, if it exceeds a set interference threshold and the corresponding interference tag ranks higher than a set level in the interference priority table, then the corresponding target perception capsule is included in the redundant capsule set; wherein the target perception capsules not belonging to the redundant capsule set are key capsules with high coupling.

[0012] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the formation of the spatial mapping matrix includes: for each target perception capsule in the perception capsule set, extracting the coordinates of the spatial center point and establishing a set of mapping index structures; traversing each semantic capsule in the semantic capsule set that is marked as a high-interference semantic item, extracting the corresponding image region coordinate set, and establishing a semantic index table; representing the perception capsule as a set of corresponding pixels or bounding boxes, and calculating the region overlap ratio with the image region corresponding to the semantic capsule; normalizing the region overlap ratio of each target perception capsule and each semantic capsule to generate a spatial mapping matrix, wherein the elements represent the normalized interference overlap rate.

[0013] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the step of receiving the motion intention capsule broadcast from the vehicle in front includes: receiving a broadcast data frame, wherein the broadcast data frame includes the motion intention capsule of the vehicle in front, a frame timestamp, and a unique identifier of the vehicle in front; the motion intention capsule of the vehicle in front includes an acceleration vector and a steering angle vector; if the frame timestamp is greater than the last update timestamp of the vehicle in front, and the CRC check of the data frame passes, then it is received.

[0014] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the common projection onto a unified trajectory vector space includes: after unfolding the sequence of preceding vehicle motion intent capsules over time, matching a set of preceding vehicle trajectory position vectors in space for each key capsule of the vehicle based on spatial position interpolation or nearest neighbor search; using the frame in the cached preceding vehicle motion intent capsules that is closest to the current frame timestamp as the main reference point, constructing a trajectory mapping pair corresponding to the current key capsule of the vehicle, and forming a trajectory vector space.

[0015] As a preferred embodiment of the autonomous driving forward collision warning method based on capsule network fusion perception described in this invention, the step of generating a comprehensive trajectory change index through joint mapping to determine whether there is a tendency for abrupt changes in the direction of movement of the vehicle ahead includes: in the trajectory vector space, mapping the vehicle's motion intention capsule group and the sequence of the vehicle's motion intention capsules one-to-one according to the corresponding positions of the key capsules, and constructing a trajectory deviation matrix based on the difference in vector direction, where each element represents the magnitude of the vector difference between a pair of key capsules; extracting key offset indices from the spatial-pair trajectory deviation matrix, calculating the weighted combination of the maximum offset value and the mean value of each row to form a trajectory change index vector, representing the maximum degree of change in the intention of each key capsule of the vehicle ahead; if any component in the trajectory change index vector exceeds a set change threshold, a warning flag is triggered.

[0016] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, they implement the steps of the autonomous driving forward collision warning method based on capsule network fusion perception as described in the first aspect of the present invention.

[0017] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of the autonomous driving forward collision warning method based on capsule network fusion perception as described in the first aspect of the present invention.

[0018] The beneficial effects of this invention are as follows: By using a semantic capsule structure, this invention encodes spatial regions with structural and semantic meaning in the original perceived image and embeds them into the perception capsule structure, thereby achieving multi-level, structured perception enhancement and effectively improving the contextual association capability of target recognition; by dynamically filtering out redundant target capsules corresponding to highly interfering semantic items, the probability of misidentification and false alarms is significantly reduced, and the robustness of the system to interference information in complex traffic scenarios is improved; at the same time, by receiving and caching motion intent capsules broadcast by vehicles ahead, a cross-vehicle trajectory relay mechanism is constructed, breaking the limitations of traditional single-vehicle perception and realizing multi-vehicle collaborative perception and joint judgment.

[0019] Capsule mapping and trajectory mutation detection in a unified trajectory vector space can identify abnormal movement trends of the vehicle in front in advance, thereby triggering collision warnings earlier and more accurately.

[0020] Overall, this invention combines the advantages of structural perception, semantic enhancement, and spatiotemporal coordination, significantly improving the forward collision warning capability of autonomous driving systems in dynamic and complex scenarios. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart of the autonomous driving forward collision warning method based on capsule network fusion perception in this invention. Detailed Implementation

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0024] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0025] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0026] This is a flowchart of an autonomous driving forward collision warning method based on capsule network fusion perception according to an embodiment of the present invention. Figure 1 As shown, the autonomous driving forward collision warning method based on capsule network fusion perception includes:

[0027] S1: Based on the vehicle's current perceived image and environmental annotation information, construct a multi-level semantic label set, and encode the spatial region corresponding to each semantic label into a semantic capsule.

[0028] It should be noted that semantic capsules occupy an independent channel in the capsule structure, possessing semantically specific selectability, and providing a structural basis for subsequent filtering mechanisms.

[0029] Encoding the spatial regions corresponding to each semantic tag into semantic capsules includes:

[0030] S1.1: Based on the current frame image data, the image region is classified by semantic label according to the preset semantic hierarchy index table. Each semantic label is accompanied by the corresponding category confidence and image coordinate index, forming a semantic structure map.

[0031] Specifically, in the current frame image captured by the vehicle, a complete image frame is obtained through an integrated visual sensor, and the original pixel matrix is ​​extracted from it. This original pixel matrix is ​​used as input for pixel-by-pixel classification through a semantic segmentation model.

[0032] The semantic segmentation model is a pre-trained network whose parameters fit stably on multi-class road condition data. It can output the corresponding label probability distribution for different categories of scene elements (including roads, lane lines, curbs, static obstacles, dynamic pedestrians, and other vehicles). To improve classification stability, a semantic hierarchical index table is added to the label classification stage. This table has a pre-defined index structure, where each item is a high-level semantic classification node, with sub-category nodes attached to each node, and a category priority parameter is included.

[0033] The semantic hierarchy index table performs unified semantic label encoding mapping on semantic segmentation results under different road scenarios, solving the problem of category mixing in the label segmentation results. The semantic label output results constructed by the above steps are defined as semantic structure graphs. Each semantic label is accompanied by two types of core attribute information: the first is the set of image pixel coordinates corresponding to the semantic label category, and the second is the classification confidence score of the semantic label category (extracted from the maximum probability output by the semantic segmentation model).

[0034] The above two types of attributes are encapsulated into complete tag tuple information, with the structure being [semantic tag, confidence score, coordinate index set], thus forming a semantic structure graph.

[0035] S1.2: Based on the image coordinate index in the semantic structure map, perform spatial clustering according to semantic labels to divide the candidate region set with structure preservation. Each candidate region corresponds to a single semantic label and satisfies the minimum pixel coverage constraint.

[0036] Among them, spatial clustering based on semantic labels to divide the candidate region set with structure preservation includes:

[0037] Based on each semantic tag in the semantic structure graph, the corresponding set of image pixel coordinates is extracted, and unstable pixels located in the edge transition region are removed. The identification of unstable pixels is based on a local texture gradient threshold standard, which is a lower limit value of gradient change within a set range. If the horizontal or vertical gradient transformation in the neighborhood of a pixel exceeds the local texture gradient threshold, the corresponding pixel is defined as an edge pixel and is thus removed in subsequent processing.

[0038] For pixels in the image pixel coordinate set, the composite similarity is calculated by weighting based on spatial distance and structural gradient direction consistency, and then connectedness grouping is performed to generate a candidate sub-cluster set.

[0039] Specifically, for any two spatially adjacent pixels in the set (i.e., adjacent pixels that satisfy a Euclidean distance of 1 in the image coordinates), the composite similarity is defined as a weighted function of the difference between the Euclidean spatial distance and the structural gradient direction between the pixel pairs.

[0040] The process of generating candidate subcluster sets through connectivity grouping includes:

[0041] Based on the set of pixel coordinates corresponding to semantic tags, the composite similarity between any spatially adjacent pixel pairs is calculated. The set of pixel pairs that are adjacent to each other on the image and have the smallest composite similarity is selected to construct a pixel connection graph, which represents the adjacency relationship of spatial continuity and structural consistency.

[0042] In the pixel connectivity graph, a graph branching traversal is used to extract each set of connected pixels into an independent sub-cluster. All pixels in each sub-cluster are associated through composite similarity to form a weakly connected structure and are not connected to other clusters by edges. Each set of pixels in the weakly connected structure is taken as a candidate sub-cluster, and the corresponding semantic label and pixel set are retained to form a candidate sub-cluster set. The above candidate sub-cluster sets are structurally coherent, and each sub-cluster corresponds to a unique label.

[0043] Furthermore, for each candidate sub-cluster in the candidate sub-cluster set, the pixel coverage area is calculated. If the pixel coverage area is greater than or equal to the minimum pixel coverage constraint (the minimum pixel coverage constraint is 50×50 pixels), it is retained in the effective region set; otherwise, it is discarded.

[0044] The pixel coverage area is calculated by counting the number of pixels contained in each of the candidate subclusters in the above set and converting it into the pixel coverage area on the image coordinates.

[0045] All candidate subclusters that satisfy the minimum pixel coverage constraint are merged according to semantic labels and output as a candidate region set.

[0046] S1.3: For each candidate region, generate a semantic encoding triple by combining the corresponding semantic label and category confidence, and use the semantic encoding triple as input to construct a semantic capsule to generate a semantic capsule set.

[0047] Each candidate region corresponds to a unique semantic label and possesses the following three key attributes: first, label identification; second, image spatial region encoding, which is an aggregated representation of pixel coordinates within the region; and third, category confidence.

[0048] Semantic encoded triples are represented into capsules through mapping. The mapping function is a predefined capsule model that maps semantic encoded triples into tensors of fixed dimensions while keeping the label vector channel and the spatial vector channel independent.

[0049] After generating the semantic capsule set, it is embedded into the perceptual capsule structure. In the capsule network framework, the original perceptual capsule structure consists of a set of target perceptual capsules, each containing spatial location, physical attribute encoding, and motion state vector. In this invention, the semantic capsule set is embedded into the perceptual capsule structure with independent channels. Each semantic capsule remains structurally independent, neither sharing channels nor participating in the weight coupling of the perceptual capsules. This structural design ensures that the semantic capsules are filterable, meaning that any semantic capsule can be accessed, evaluated, or removed individually in subsequent structures, thus providing a basis for targeted semantic coupling analysis. Furthermore, the semantic capsules retain spatial coordinate channels for subsequent matching.

[0050] S2: Based on the highly interfering semantic items contained in the semantic tag set, dynamically filter out redundant spatial target capsules in the perception capsule structure, and retain key capsules that have a high degree of coupling with the semantic capsule.

[0051] In this embodiment of the invention, the redundant spatial target capsule in the perception capsule structure for dynamically filtering out highly interfering semantic terms includes:

[0052] S2.1: Extract preset high-interference semantic items from the semantic tag set to form an interference tag subset, and form an interference priority table based on the product of the coverage area and confidence of each interference tag in the current frame.

[0053] High-interference semantic terms refer to semantic regions that frequently appear in traffic scenarios but are significantly misleading or noisy in predicting target behavior decisions. These include types such as light and shadow patches, false lane lines, billboard obstructions, car window reflections, and background crowds. Each high-interference semantic label is provided by a static label list in the system configuration file. This list is defined as an interference label dictionary, with a key-value pair structure where the key is the semantic name and the value is the interference level coefficient.

[0054] S2.2: Match the spatial center point coordinates of each target perception capsule in the perception capsule set with the position of the capsule corresponding to the high-interference semantic item in the semantic capsule set to generate a spatial mapping matrix. The elements in the generated spatial mapping matrix are the interference overlap rates between the target perception capsule and the semantic capsule set.

[0055] The formation of the space mapping matrix includes:

[0056] S2.2.1: For each target sensing capsule in the sensing capsule set, extract the coordinates of the spatial center point and establish a set of mapping index structures.

[0057] S2.2.2: Traverse each semantic capsule in the semantic capsule set that is marked as a highly interfering semantic item, extract the corresponding image region coordinate set, and establish a semantic index table.

[0058] S2.2.3: Represent the perceptual capsule as a set of corresponding pixels or a bounding box, and calculate the region overlap ratio with the image region corresponding to the semantic capsule.

[0059] S2.2.4: Normalize the region overlap ratio of each target perception capsule and each semantic capsule to generate a spatial mapping matrix, where the elements represent the normalized interference overlap rate, and bind the interference priority label of the semantic capsule to the column index of the spatial mapping matrix.

[0060] In practice, the product of the interference coefficient level coefficient and the regional overlap ratio is used as the interference intensity. The interference intensity of each sensing capsule is normalized, which is performed row by row, with each row representing a sensing capsule. Each column corresponds to an interference semantic label. Each element represents the normalized interference contribution of the sensing capsule from a certain semantic term under all interference sources, and finally forms a spatial mapping matrix.

[0061] S2.3: Based on the maximum interference overlap rate corresponding to each target sensing capsule in the spatial mapping matrix, if it exceeds the set interference threshold (for example, the interference threshold is set to regional overlap rate > 30%), and the corresponding interference label ranks higher than the set level in the interference priority table, then the corresponding target sensing capsule will be included in the redundant capsule set; among them, the target sensing capsules that do not belong to the redundant capsule set are key capsules with high coupling.

[0062] In the above operations, the screening criteria have a dual constraint mechanism. On the one hand, it requires a sufficiently high spatial overlap ratio, and on the other hand, it requires the corresponding interference labels to have a sufficiently high influence level. This ensures that the screening operation has both structural significance and semantic weight, and avoids the problem of false screening caused by indiscriminate removal.

[0063] S3: Receive motion intent capsules broadcast from the vehicle ahead and cache them in chronological order into the cross-vehicle relay sequence.

[0064] S3.1: Receiving a motion intention capsule broadcast from a vehicle ahead includes: receiving a broadcast data frame, the broadcast data frame including the motion intention capsule of the vehicle ahead, a frame timestamp, and a unique identifier of the vehicle ahead.

[0065] The system listens for data frame signals sent by vehicles ahead in the physical broadcast channel within a preset time interval, and the received data frame structure is in a fixed format.

[0066] The preceding vehicle's motion intention capsule includes acceleration vectors and steering angle vectors. Specifically, the preceding vehicle's longitudinal acceleration, lateral acceleration, instantaneous direction angle, and rate of change of direction angle are uniformly encapsulated into a four-dimensional floating-point vector. Each component is quantized and its dimensions and precision range are recorded, including units such as meters per second squared and degrees per second. Traditional vehicle-to-vehicle communication often only transmits scalar velocity or direction. This embodiment provides linear acceleration information and angular acceleration information simultaneously through a four-dimensional vector. Both types of vectors can directly complete dynamic constraint prediction at the decision-making level, avoiding the cumulative errors caused by secondary derivation.

[0067] A Cyclic Redundancy Check (CRC-32) code is appended to the end of the data packet. If the CRC value recalculated by the receiver matches the value stored at the end of the frame, the data is considered lossless; otherwise, it is discarded to ensure that the buffer sequence contains only reliable motion information. If the frame timestamp is greater than the vehicle's last update timestamp and the data frame's CRC check passes, it is received. Otherwise, the frame is considered invalid and discarded without being written to the buffer list, reducing the proportion of memory occupied by invalid data.

[0068] Upon receiving the frame, it is immediately marked as a valid frame, and the last updated timestamp is refreshed to the new timestamp value. This design can eliminate the risk of replay attacks or insertion of historical frames due to signal backtracking, while ensuring that the timeline monotonically increases in multi-frame concurrent scenarios, which facilitates subsequent sequential insertion operations.

[0069] S3.2: Add the valid broadcast data frame to the intent buffer sequence with the unique identifier of the corresponding vehicle (create it if it does not exist), and insert it in order according to the frame timestamp. If the timestamp of the current frame is greater than the time of the last frame of the original queue, update the sequence head pointer to the frame to form a cross-vehicle relay sequence.

[0070] Specifically, when a valid broadcast frame is received, the system first checks if a vehicle unique identifier key exists. If not, a new doubly linked list node is dynamically created, and the new node is registered in the mapping table to complete the initial pairing process. If the vehicle unique identifier key already exists in the preset mapping table, the system directly locates the corresponding linked list. This invention, through a hybrid structure of hash index and doubly linked list, can still guarantee constant-level retrieval complexity in scenarios with millions of concurrent vehicles, avoiding the linear time overhead caused by sequential traversal and improving real-time write performance.

[0071] The linked list insertion strategy follows an ascending time order rule: when the timestamp of a new frame is less than the timestamp of the tail node of the linked list, a suitable insertion point is located from the tail to the front using bidirectional pointers, and then the new node is inserted; if the timestamp is greater than the timestamp of the tail node, the new node is appended to the tail. Conventional FIFO buffers have difficulty handling out-of-order frames. This embodiment maintains a strictly monotonically increasing time sequence within each preceding vehicle's linked list through ordered insertion, which facilitates the trajectory extrapolation module to directly perform motion prediction according to the linked list order without additional sorting processing, while avoiding trajectory reversal anomalies caused by out-of-order frames.

[0072] The linked list maintenance includes a head pointer pointing to the latest node and a tail pointer pointing to the oldest node. When an appended node triggers a tail update, the head pointer is immediately moved to the new node, ensuring that subsequent accesses to the head pointer directly obtain the latest motion intent. To prevent the linked list from becoming too long and consuming memory, a maximum node threshold is set. When the linked list length exceeds the threshold, expired nodes at the tail are automatically released. The release process uses a lazy reclamation strategy, marking and then clearing to ensure that real-time data writing is not blocked. Through the above vehicle-based and time-ordered management mechanism, a cross-vehicle relay sequence set is ultimately formed. This set stores the motion intent capsules of multiple target preceding vehicles within a continuous time window.

[0073] S4: Project the key capsules selected by this vehicle and the cached motion intent capsules together into a unified trajectory vector space, and generate a comprehensive trajectory change index through joint mapping to determine whether there is a tendency for a sudden change in the direction of movement of the vehicle ahead, and trigger a warning flag.

[0074] S4.1: After unfolding the sequence of preceding vehicle motion intent capsules over time, a set of preceding vehicle trajectory position vectors is spatially matched for each key capsule of the vehicle based on spatial position interpolation or nearest neighbor search to form a trajectory vector space.

[0075] In the specific operation, the set of key perception capsules that are retained after interference removal is first extracted. Each key perception capsule carries the spatial center position under the current frame timestamp, and the starting point of the vehicle's trajectory is constructed based on the coordinates.

[0076] To obtain the trajectory information of the vehicle ahead, a cached sequence of motion intention capsules of the preceding vehicle is extracted from the broadcast. Each capsule in this sequence is periodically broadcast by the preceding vehicle through a physical channel and contains the motion state data at the current moment. In the receiver's cache, all the preceding vehicle motion intention capsules are arranged sequentially according to their timestamps, forming a trajectory candidate sequence that evolves over time.

[0077] To ensure an effective spatial pairing between the current vehicle's key capsule and the preceding vehicle's motion intent capsule, a one-to-one mapping needs to be established between the spatial center point of each key capsule and a capsule in the preceding vehicle's trajectory sequence. To this end, a spatial proximity search strategy based on minimizing positional distance is employed to determine the closest trajectory point. Specifically, for each key capsule, its spatial center point coordinates in the image are first extracted and transformed into a unified trajectory vector space. Subsequently, the spatial position coordinates corresponding to each capsule in the preceding vehicle's motion intent capsule sequence are traversed, and the linear distance between each capsule and the current key capsule's position is calculated sequentially.

[0078] The motion intention capsule of the preceding vehicle is interpolated according to the processing timestamp of this vehicle to generate a time-synchronized sequence of trajectory points.

[0079] After completing the entire traversal, all calculated spatial distance values ​​are sorted in ascending order, and the few nearest preceding vehicle trajectory points are selected as a candidate set. In standard configurations, the three nearest trajectory points are selected by default to establish a stable spatial correspondence. This method effectively avoids offset issues caused by single matching anomalies, improving the robustness of the mapping results. Next, a weighted integration is performed based on the spatial positions of these nearest points to obtain a comprehensive position vector as the trajectory vector of the key sensing capsule in the preceding vehicle's trajectory. The weighting method assigns weights inversely proportional to the distance from each point to the vehicle's key capsule; the closer the distance, the greater the weight, making the spatial correspondence more physically meaningful.

[0080] Through the above method, the spatial pairing of each key sensing capsule of this vehicle with the corresponding position vector in the trajectory of the preceding vehicle's motion intention is completed in sequence, and finally a set of mapping relationship pairs with temporal consistency and spatial continuity is formed.

[0081] S4.2: In the trajectory vector space, the motion intention capsule group of this vehicle and the motion intention capsule sequence of the preceding vehicle are mapped one by one according to the corresponding positions of the key capsules, and a trajectory deviation matrix is ​​constructed based on the difference in vector direction, where each element represents the magnitude of the vector difference between a pair of key capsules.

[0082] After completing the spatial pairing, for each mapping pair, extract the motion representation vector of the vehicle's key perception capsule and the motion intention vector of the vehicle in front. After normalizing both into unit vectors, calculate the directional deviation value between them and construct a trajectory deviation matrix. Each row element is the directional deviation value, which is twice the angle between the 1-cos vectors. This can be solved using the dot product.

[0083] The trajectory deviation matrix constructed above reflects the degree of directional deviation between each key sensing capsule of this vehicle and the corresponding trajectory of the preceding vehicle.

[0084] S4.3: Extract key offset indicators from the spatial-pair trajectory deviation matrix, calculate the weighted combination of the maximum offset value and the mean value of each row to form a trajectory mutation indicator vector, which represents the maximum degree of mutation between each vehicle's key capsule and the intention of the preceding vehicle.

[0085] Specifically, a trajectory change index vector is constructed using a weighted combination model of maximum amplitude and average amplitude, and the calculation formula is as follows:

[0086]

[0087] Where S is the trajectory mutation index, α∈[0,1] is the peak weighting coefficient, and D i Let m be the directional offset at the i-th key position, where m is a positive integer. This represents the maximum deviation among all directions.

[0088] S4.4: If any component in the trajectory mutation index vector exceeds the set mutation threshold, the warning flag will be triggered.

[0089] This embodiment also provides a computer device applicable to the autonomous driving forward collision warning method based on capsule network fusion perception, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the autonomous driving forward collision warning method based on capsule network fusion perception proposed in the above embodiment.

[0090] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0091] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for forward collision warning of autonomous driving based on capsule network fusion perception as proposed in the above embodiments.

[0092] In summary, this invention encodes spatial regions with structural and semantic meaning in the original perceived image through a semantic capsule structure and embeds them into the perception capsule structure, achieving multi-level, structured perception enhancement and effectively improving the contextual association capability of target recognition. By dynamically filtering out redundant target capsules corresponding to highly interfering semantic items, the probability of misidentification and false alarms is significantly reduced, improving the system's robustness to interference information in complex traffic scenarios. At the same time, by receiving and caching motion intent capsules broadcast by vehicles ahead, a cross-vehicle trajectory relay mechanism is constructed, breaking the limitations of traditional single-vehicle perception and realizing multi-vehicle collaborative perception and joint judgment.

[0093] Capsule mapping and trajectory mutation detection in a unified trajectory vector space can identify abnormal movement trends of the vehicle in front in advance, thereby triggering collision warnings earlier and more accurately.

[0094] Overall, this invention combines the advantages of structural perception, semantic enhancement, and spatiotemporal coordination, significantly improving the forward collision warning capability of autonomous driving systems in dynamic and complex scenarios.

[0095] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A forward collision warning method for autonomous driving based on capsule network fusion perception, characterized in that: include: Based on the vehicle's current perceived image and environmental annotation information, a multi-level semantic tag set is constructed, and the spatial region corresponding to each semantic tag is encoded as a semantic capsule; Based on the highly interfering semantic items contained in the semantic tag set, redundant spatial target capsules in the perception capsule structure are dynamically filtered out, while key capsules with high coupling with the semantic capsule are retained. Receive motion intent capsules broadcast from vehicles ahead and cache them in chronological order into a cross-vehicle relay sequence; The key capsules selected by this vehicle and the cached motion intent capsules are jointly projected into a unified trajectory vector space. A comprehensive trajectory change index is generated through joint mapping to determine whether there is a tendency for a sudden change in the direction of movement of the vehicle ahead and to trigger a warning flag. The method of generating a comprehensive trajectory mutation index through joint mapping to determine whether there is a tendency for abrupt changes in the direction of motion of the vehicle ahead includes: mapping the current vehicle's motion intention capsule group and the sequence of the vehicle ahead's motion intention capsules one by one according to the corresponding positions of the key capsules in the trajectory vector space, and constructing a trajectory deviation matrix based on the difference in vector direction, where each element represents the magnitude of the vector difference between a pair of key capsules; The key offset index is extracted from the spatial-pair trajectory deviation matrix. The weighted combination of the maximum offset value and the mean value of each row is calculated to form the trajectory mutation index vector, which represents the maximum degree of mutation between each key capsule of this vehicle and the intention of the preceding vehicle. If any component in the trajectory mutation index vector exceeds the set mutation threshold, the warning flag is triggered.

2. The autonomous driving forward collision warning method based on capsule network fusion perception as described in claim 1, characterized in that: Encoding the spatial region corresponding to each semantic tag into a semantic capsule includes: Based on the current frame image data, the image region is classified by semantic label according to the preset semantic hierarchy index table. Each semantic label is accompanied by the corresponding category confidence and image coordinate index, forming a semantic structure map. Based on the image coordinate index in the semantic structure map, spatial clustering is performed according to semantic labels to divide a set of candidate regions with structure preservation. Each candidate region corresponds to a single semantic label and satisfies the minimum pixel coverage constraint. For each candidate region, a semantic encoding triple is generated by combining the corresponding semantic label and category confidence. The semantic encoding triple is then used as input to construct a semantic capsule, generating a set of semantic capsules.

3. The method for forward collision warning of autonomous driving based on capsule network fusion perception as described in claim 2, characterized in that: The step of spatial clustering based on semantic labels to divide a set of candidate regions with structure preservation includes: Based on each semantic tag in the semantic structure graph, extract the corresponding set of image pixel coordinates and remove unstable pixels located in the edge transition region; For pixels in the image pixel coordinate set, a weighted composite similarity is calculated based on spatial distance and structural gradient direction consistency, and a candidate sub-cluster set is generated; For each candidate sub-cluster in the candidate sub-cluster set, calculate the pixel coverage area. If the pixel coverage area is greater than or equal to the minimum pixel coverage constraint, it is retained in the effective region set; otherwise, it is discarded. All candidate subclusters that satisfy the minimum pixel coverage constraint are merged according to semantic labels and output as a candidate region set.

4. The method for forward collision warning of autonomous driving based on capsule network fusion perception as described in claim 1, characterized in that: The redundant spatial target capsules in the high-interference semantic item dynamic screening perception capsule structure include: Extract preset high-interference semantic items from the semantic tag set to form an interference tag subset, and form an interference priority table based on the product of the coverage area and confidence of each interference tag in the current frame. The spatial center point coordinates of each target perception capsule in the perception capsule set are matched with the position of the capsule corresponding to the high interference semantic item in the semantic capsule set to generate a spatial mapping matrix. The elements in the generated spatial mapping matrix are the interference overlap rate between the target perception capsule and the semantic capsule set. Based on the maximum interference overlap rate corresponding to each target sensing capsule in the spatial mapping matrix, if it exceeds the set interference threshold and the corresponding interference label ranks higher than the set level in the interference priority table, then the corresponding target sensing capsule will be included in the redundant capsule set. Among them, the target perception capsules that do not belong to the redundant capsule set are key capsules with high coupling.

5. The method for forward collision warning of autonomous driving based on capsule network fusion perception as described in claim 4, characterized in that: The formation of the spatial mapping matrix includes: For each target sensing capsule in the sensing capsule set, extract the coordinates of the spatial center point and establish a set of mapping index structures; Traverse each semantic capsule in the semantic capsule set that is marked as a high-interference semantic item, extract the corresponding image region coordinate set, and build a semantic index table; The perception capsule is represented as a set of corresponding pixels or a bounding box, and the region overlap ratio is calculated between it and the image region corresponding to the semantic capsule. The region overlap ratio of each target perception capsule and each semantic capsule is normalized to generate a spatial mapping matrix, where the elements represent the normalized interference overlap rate.

6. The method for forward collision warning of autonomous driving based on capsule network fusion perception as described in claim 1, characterized in that: The motion intent capsule that receives broadcasts from vehicles ahead includes: Receive broadcast data frames, the broadcast data frames including a capsule of the preceding vehicle's motion intention, a frame timestamp, and a unique identifier of the preceding vehicle; The preceding vehicle motion intention capsule includes an acceleration vector and a steering angle vector; If the frame timestamp is greater than the last update timestamp of this vehicle, and the data frame CRC check passes, then it is received.

7. The method for forward collision warning of autonomous driving based on capsule network fusion perception as described in claim 1, characterized in that: The common projection onto a unified trajectory vector space includes: After unfolding the sequence of capsules representing the intention of the preceding vehicle over time, a set of preceding vehicle trajectory position vectors is matched in space for each key capsule based on spatial position interpolation or nearest neighbor search, forming a trajectory vector space.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the autonomous driving forward collision warning method based on capsule network fusion perception as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the autonomous driving forward collision warning method based on capsule network fusion perception as described in any one of claims 1 to 7.