Vehicle trajectory prediction method based on improved HTM
By employing multi-dimensional compression coding and an improved HTM algorithm, the problems of high computational complexity and historical interference in dynamic environments in vehicle trajectory prediction are solved, achieving efficient and accurate vehicle trajectory prediction suitable for intelligent transportation systems.
Patent Information
- Application Number
- CN202511388361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-01-09
AI Technical Summary
Existing vehicle trajectory prediction methods have high computational complexity when processing high-dimensional input data, making it difficult to achieve efficient and low-latency real-time prediction. Furthermore, they are easily affected by historical interference and noise accumulation in dynamic environments.
Employing multi-dimensional compression coding, spatial pooling training (SPL_SN) with micropillar self-recommendation, and temporal pooling training (TPL_LA) with position-awareness, combined with a sequence state buffer (SSCM) module, a sparse distribution representation is constructed to optimize feature extraction and temporal correlation of the HTM network, supporting parallel processing of multiple inputs.
It significantly reduces data redundancy, improves model robustness and classification accuracy, enhances real-time inference capabilities in dynamic environments, and achieves efficient computation with low latency and low power consumption, making it suitable for online learning and inference tasks with complex temporal patterns.
Smart Images

Figure CN121300350A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and intelligent transportation, in particular to a vehicle trajectory prediction method based on improved hierarchical temporal memory (HTM). BACKGROUND
[0002] Vehicle trajectory prediction is one of the core technologies of intelligent transportation and autonomous driving, which can support real-time obstacle avoidance and path planning of autonomous driving systems, help optimize traffic management, identify high-risk behaviors, analyze accident black spots to prevent collisions, and accelerate the simulation training of autonomous driving by generating virtual scenarios. Its core value lies in improving driving safety, improving traffic efficiency, reducing economic costs and supporting sustainable development, and is one of the key supports for promoting the landing of intelligent transportation.
[0003] Brain-like learning is a hot topic in the field of artificial intelligence and machine learning. Hierarchical Temporal Memory (HTM) is a machine learning technology that simulates the organization and mechanism of brain cortex cells and mimics the human brain's information processing mechanism. HTM is essentially a memory-based system. HTM network is trained by a large amount of time data and stores a large number of pattern sequences, which can predict the next possible input or detect whether the current input is abnormal using the previous time prediction. HTM can be used for prediction and anomaly detection in time series data.
[0004] Unlike existing artificial neural networks, HTM uses cells as the basic unit and uses a hierarchical approach for management. First, several cells are combined into a microcolumn, and then these microcolumns form the HTM network space. The spatial pool algorithm and the temporal pool algorithm are two important steps in training HTM. First, use the spatial pool algorithm to select some activated microcolumns from all microcolumns to correspond to the current input. Then use the temporal pool algorithm to select some activated cells from these microcolumns to express the position information of the input. By adjusting the relevant dendritic branches on these active cells, the association between inputs and inputs is constructed, and learning is performed. At the same time, the active cells and the constructed dendritic branches are used to predict the next input. SUMMARY
[0005] The core of the present application is a vehicle trajectory prediction method based on improved HTM, which includes four modules: multi-dimensional compression encoding, microcolumn self-recommendation spatial pool training (SPL_SN), position-aware temporal pool training (TPL_LA), and multi-path input processing mechanism. The specific steps are as follows: Step 1) Obtain the trajectory attribute data of the motor vehicle, including the license plate information, position coordinates, time characteristics and road type of the motor vehicle.
[0006] Step 2) compress and encode the historical spatio-temporal attribute data to represent the spatial features of the data.
[0007] Step 3) use the SPL_SN (Spatial Pooler Training Algorithm with Self-Nominated Minicolumns) to extract spatial features from the encoding and form a sparse distributed representation (SDR) to obtain the micro-column representation of the historical trajectory data of the motor vehicle.
[0008] Step 4) use the TPL_LA (Position-Aware Temporal Pooling Training Algorithm) to learn sequence features from the micro-column sparse distributed representation and construct the temporal correlation of the motor vehicle trajectory data.
[0009] Step 5) add a sequence state cache module to extend the HTM, allowing the model to handle multiple sequences simultaneously and allowing multiple input channels.
[0010] Step 6) based on the trained model, the system can predict the running position of the motor vehicle within a predetermined time period in the future based on the input current attribute data of the motor vehicle.
[0011] Further, the specific steps of step two multi-dimensional encoding are as follows: (1) Trajectory feature encoding For the GPS point sequence of the motor vehicle, convert each GPS coordinate to a two-dimensional coordinate (x, y) in the plane space, divide it into grid squares according to the preset resolution, and use a deterministic hash function to independently map the (x, y) coordinates of each square to an encoding with a length of n1 and a number of 1 bits of w1. The encoding of the x coordinate and the y coordinate is combined by concatenation to form the spatial feature encoding, ensuring that the spatial feature encoding of adjacent grid squares has a preset overlap degree to preserve the position proximity semantics.
[0012] (2) Time feature encoding For the timestamp of the motor vehicle, support user-defined time period division rules (such as 7:00~10:00 for the morning peak period, 10:00~16:00 for the flat peak period, 16:00~24:00 for the evening peak and night period, etc.), assign each timestamp to the corresponding time period, and use a numerical encoder to generate a time feature encoding with a length of n2 and a number of 1 bits of w2. The time feature encoding of adjacent time periods is designed to maintain semantic continuity through overlapping ranges.
[0013] (3) Road type feature coding For road types used by motor vehicles (such as highways, national highways, urban main roads, secondary roads, pedestrian streets, etc.), each road type is used as a category feature. A category encoder is used to generate semantic feature codes with a length of n3 and a set number of 1 bits of w3. Semantically related road types retain semantic similarity by adjusting the coding overlap, while the coding overlap of unrelated road types (such as highways and pedestrian streets) is ≤5%.
[0014] (4) License plate number coding Similar to the analysis above, license plate numbers can also be combined into a single code using a numerical encoder and a category encoder, with a length of [length missing]. Set 1 bit to Semantic feature encoding.
[0015] (5) Multi-dimensional feature fusion The spatial feature codes generated in steps (1) to (3) are fused. The fusion method is either concatenation or proportional merging to ensure that the set bits of each dimension are similar. The final generated degree is n= + + Set the number of 1 bits to w= The encoding is used for feature extraction in subsequent spatial pooling training algorithms.
[0016] (6) Compression encoding Let the positions of the first and last significant bits in the four dimensions of the encoding vector before fusion be t(1), t(2), t(3), and t(4), respectively. Then, the positions of the first and last significant bits in each part of the fused encoding are calculated according to the following formula: + The value of s(i) is calculated using the above formula, where i takes the values 1, 2, 3, and 4. Therefore, s(i) represents the trajectory, time, road type, and the position of the first valid digit of the license plate number, respectively. The final compressed encoding can be represented as: Furthermore, the specific steps in step two, improved with SPL_SN, are as follows: (1) Calculate the micropillar overlap value ( ) For each micropillar, the overlap value between its synaptic connections and the current compressed SDR is calculated, reflecting the degree of matching between the micropillar and the current data. The formula used for calculation is as follows: in This indicates whether the synapse between the i-th micropillar and the j-th component in the data encoding is in a connected state, with values of 0 and 1, representing the two states of disconnection and connection, respectively. This represents the value of the j-th component in the encoding corresponding to the input. This represents the excitation factor of the j-th micropillar. Let represent the receptive field of the i-th micropillar.
[0017] (2) Calculate the self-recommendation degree of micro-columns based on the overlap value Based on the overlap value between the micro-pillar and the current data encoding, the algorithm will determine the self-recommendation state of the micro-pillar. It is divided into three types, and the calculation rules are shown in the following formula.
[0018] The minimum threshold for activating a micropillar is represented. Combined with the number of 1s in the data encoding, the fault tolerance of the spatial pool can be calculated. `state(i)` represents the self-recommendation state of the i-th micropillar in the current training environment, and is divided into three types: `same`, `similar`, and `distinct`. `state(i) = same` indicates that the micropillar can be activated by the current data, and the data it previously participated in is highly similar to or the same as the current data; `state(i) = similar` indicates that the micropillar has some overlap with the current data but does not meet the activation condition, and the content is similar; `state(i) = distinct` indicates that the micropillar has little overlap with the current data, and the data it participated in differs significantly.
[0019] (3) Select microcolumns based on self-recommendation level: By comprehensively utilizing the self-recommendation state and load-bearing capacity of micropillars, a suitable set of micropillars can be selected to represent the current data. The spatial pool is defined using a_n micropillars to represent the data, and the micropillar sets of adjacent data overlap by at most o_n micropillars. The process is as follows: a) Calculate the current self-recommendation status of the microcolumn based on the data.
[0020] b) For micropillars with the self-recommended state "same", activate the micropillar containing the current value and count it as n1; if n1≥a_n, return the set; otherwise, select the n2 micropillars with the lowest carrying capacity from the remaining micropillars and activate them. n2 takes the maximum value that satisfies n1+n2≤o_n, and update its carrying capacity and data information.
[0021] c) If the number of activated micropillars in the same class is less than o_n, then select the n3 micropillars with the lowest carrying capacity from the similar class to activate them. n3 is the maximum value that satisfies n1+n2+n3≤o_n, and update their carrying capacity, storage content, participation count and synaptic persistence value.
[0022] d) Among the microcolumns whose self-recommendation state is distinct, randomly select the one with the lowest load-bearing capacity. Each micropillar is activated. Simultaneously, the load-bearing information of these micropillars is updated, the current data content is stored on the micropillars, and the number of micropillars participating in the data is incremented by 1. The synaptic persistence values of these micropillars are also updated according to the encoding of the current data.
[0023] e) The algorithm ensures that the sets of micropillars mapped to similar data overlap and are sparsely distributed by randomly selecting a predetermined number of micropillars from the same and similar state micropillars for activation, making full use of the space pool micropillars, while limiting the number of activations to ensure convergence.
[0024] (4) Dynamically adjust micropillar synapses The set of micropillars activated by the self-recommendation-based micropillar hierarchical selection algorithm has a mapping relationship with the current data. Connections to the data need to be added to the micropillars to maintain this mapping relationship. The method for adding connections to active micropillars can be expressed by the following formula.
[0025] in This indicates the number of the active micro-column selected by the algorithm from the current data. This represents the set of position indices of the connected synapses possessed by the micropillar, whose content corresponds to a 1-component data encoding. This is the content of the current data.
[0026] Furthermore, the specific steps in step four, improved with TPL_LA, are as follows: (1) Receive SDR generated by the space pool Obtain the sparse distribution representation (SDR) of the micropillars at the current time step after spatial pooling training. This SDR already contains the spatial features of the sequence data.
[0027] (2) Location-aware selection of active cells In the location-aware HTM time-pooling training algorithm, location information is introduced to optimize HTM cell selection, distinguish identical data in the sequence, enhance feature memory, and omit the optimal matching step. The specific process is as follows: a) When the active cells on the micropillar activated by HTM at time t are the predicted cells at time t-1, the cells contain dendritic branches activated by the active cells at time t-1. Adjusting these dendritic branches will enhance the learning of the current sequence. In this case, the following rules are used to set these cells as learning cells.
[0028] in, This indicates whether the i-th cell on the j-th micropillar is a learning cell, with 1 representing yes and 0 representing no. It is the set of active micropillars at time t. This represents whether the i-th cell on the j-th micropillar is a predicted cell at time t-1, where 1 indicates that the cell is a predicted cell and 0 indicates that the cell is not a predicted cell.
[0029] b) When the active cells on the micropillar activated by HTM at time t are not the predicted cells at time t-1, these cells do not contain active dendritic branches. In this case, the following rules are used to select learning cells from the micropillar, and dendritic branches are added to these cells to build an association with the learning cells input at time t-1, thereby achieving the learning of the current sequence features.
[0030] c) Based on the selected learning cell, use the following rules to set all active cells in the input (excluding the learning cell) to an inactive state, thus reducing the size of the active cell set. It is the set of all learning cells at time t. This represents the active cell matrix at time t-1.
[0031] (3) Update adjacent data dendritic branches After generating learning cells, their learning of the current sequence can be enhanced by adjusting their active dendritic branches. Specifically, the adjustment follows two rules: a) When the active cell on the micropillar activated by HTM at time t is the predicted cell at time t-1, the rule for updating the dendritic branch of adjacent data is as follows.
[0032] Where activeThreshold is the activation threshold for dendritic branches. Let be the synaptic value matrix of the k-th dendritic branch in the i-th cell on the j-th micropillar, with the same dimension as the active cell matrix.
[0033] b) When the active cells on the micropillars activated by HTM at time t are not the predicted cells at time t-1, learn the dendritic branches in the cells. The rules for increasing the scheme are shown in the following formula. Wherein... The initial persistent value for the synapses in the created dendritic branches.
[0034] (4) Generate predicted SDRs (time series predictions) Based on the dendritic branch connection strength of the learning cells, the set of activated micropillars for the next time step (i.e., predicted SDR) is predicted to represent the spatial features of the next time step (such as the next position of a motor vehicle).
[0035] Furthermore, the HTM structure and process for tolerating multiple inputs used in step five are as follows: (1) Compression encoding The process in claim 2 is used to encode the original vehicle attribute data in multiple dimensions using a compression encoder, thereby forming a compressed code.
[0036] (2) Obtaining sequence spatial features The SPL_SN algorithm described in claim 3 is used to perform spatial pooling deposition operations, thereby obtaining the spatial feature representation of vehicle attribute sequence data.
[0037] (3) Obtaining context information By using the SSCM module to obtain accurate contextual information of sequence data, the accurate temporal relationship between sequence data is constructed using the TPL_LN algorithm.
[0038] (4) Prediction Results Based on the current activation state, a prediction cell set is calculated, and the data sequence formed by multiple inputs is predicted and analyzed using the prediction cell set.
[0039] Furthermore, the specific content of SSCM used in step 5 is as follows: (1) The Sequence State Cache Module (SSCM) records the temporary training state of each subsequence, including the sequence ID, active cell set, and learning cell set. During training, the corresponding state is quickly retrieved in the SSCM by the sequence ID, and the cached cell set provides contextual information, enabling the time pool algorithm to accurately construct the temporal relationship between subsequences and enhance the model's ability to model complex sequences.
[0040] (2) The SSCM module is designed with a map data structure to increase the speed of querying and reading / writing state information. The key value is the ID of the subsequence where the input data is located, and the value includes the following two contents: a) , This represents the set of active cells corresponding to the data of the p-th sequence at the previous time step. This indicates the activity state of the i-th cell on the j-th micropillar in this state. A value of 1 indicates that the cell is active, and a value of 0 indicates that the cell is inactive. This information represents the context information corresponding to the previous time step of the p-sequence in the data sequence. It can be used to detect whether there are predicted cells on the micropillars activated by the input data at the next time step of the p-sequence, providing a basis for activating cells in the next time step of the p-sequence.
[0041] b) , This represents the set of learning cells corresponding to the data of the p-th sequence at the previous time step. This indicates whether the i-th cell on the j-th micropillar is a learning cell in this state. A value of 1 indicates that the cell is a learning cell; otherwise, it is not. The learning cell set can express the contextual representation of the data in the subsequence. Combining the learning cell set of the p-sequence data at the current time step, the temporal relationship between the p-sequence data is constructed by creating or adjusting existing dendritic branches on the learning cells at the current time step.
[0042] (3) After the time pool completes the training of a sequence of data, it constructs key-value pairs using the sequence ID as the key and the two datasets mentioned above as the value and puts them into the SSCM module. Using this caching module, based on the ID of the sequence to which the current data belongs, the time pool training algorithm can obtain the context information of the corresponding sequence and construct the correct temporal relationship between the sequence data.
[0043] The beneficial effects of this invention are: (1) The multi-dimensional compression coding method proposed in this invention constructs a sparse distributed representation by integrating spatial grid, time period and semantic category triple coding mechanism, which significantly reduces data redundancy and compresses feature dimensions, effectively alleviating the computational bottleneck caused by high-dimensional input.
[0044] (2) Based on this, a micro-pillar self-recommendation spatial pooling algorithm is designed to collaboratively model neuron load capacity and synaptic overlap, realize a dynamic hierarchical activation mechanism, and implement a synaptic protection strategy while enhancing the response of key features, thereby improving the robustness of the model and the classification accuracy.
[0045] (3) Further introduce the position-aware time pooling algorithm (TPL_LA), embed relative position encoding into the time-series pooling process, optimize the cross-cycle cell selection mechanism, reduce the set of active neurons through position constraints, and effectively suppress historical interference and noise accumulation in long time series.
[0046] (4) In addition, a Sequence State Cache (SSCM) mechanism is constructed to support parallel processing of multiple behavior trajectories and fast retrieval of context states, significantly improving the system's real-time inference capability and memory access efficiency in dynamic environments. The overall architecture achieves high-precision recognition while realizing efficient computation with low latency and low power consumption, making it suitable for online learning and inference tasks with complex temporal patterns. Attached Figure Description
[0047] Figure 1 This is a flowchart of a vehicle trajectory prediction method based on improved HTM; Detailed Implementation To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0048] Example 1: A Broad Process Example of a Vehicle Trajectory Prediction Method Based on Improved HTM A vehicle trajectory prediction method based on improved Hidden Memory Techniques (HTM) comprises five core steps in its end-to-end processing flow: multi-dimensional data acquisition and encoding, SPL_SN spatial feature extraction, TPL_LA temporal correlation construction, SSCM multi-path context caching, and future position prediction. The details are as follows: Step 1: Acquisition of multi-dimensional trajectory attribute data Obtain the trajectory attribute data of the target vehicle, including vehicle GPS coordinates, sampling timestamp, road type, and license plate number.
[0049] Step 2: Multi-dimensional feature fusion encoding A multi-dimensional feature fusion coding method is adopted to convert the features of each dimension into sparse codes and then fuse them: a) Spatial coding: Map GPS coordinates to a 100×100 grid to generate a code of length n1 with 3 bits w1.
[0050] b) Time encoding: Mapping time periods to a time encoding of length n2 and setting the number of bits to 1 w2. c) Road type encoding: Generate an encoding of length n3 with 1 bit w3. d) License plate number encoding: Convert the license plate number into a numerical value and generate an encoding of length n4 with 1 bit w4.
[0051] f) Fusion Encoding: A proportional merging method is used (space:time:road:license plate = 4:2:2:2), generating a total length n = Set the number of bits to 1, w= Fusion coding e) Compression encoding: Adjust the position of the first effective bit of each dimension according to the formula in claim 2.6, and finally compress it to a length n'=w.
[0052] Step 3: SPL_SN Spatial Pooling Feature Extraction a) Parameter settings: number of micropillars in the space pool M, number of activated micropillars a_n, overlap of adjacent input micropillars o_n=4, activation threshold o_threshold=0.7, secondary threshold o_threshold2=0.3; b) Overlap value calculation: For each microcolumn i, calculate the overlap value between its synaptic connections and the fusion encoding (e.g., for the synaptic connections w_{100,j} of microcolumn i = 100 corresponding to the 1-component positions of the encoding, the overlap value o_100 = Σw_{100,j}x_j = 5); c) Self-recommendation state division: If o_i > o_threshold × w, then state(i) = same; if o_threshold2 × w ≤ o_i ≤ o_threshold × w, then state(i) = similar; if o_100 < o_threshold2 × w, then state(i) = distinct; d) Microcolumn hierarchical selection: i. Select the microcolumns containing the current encoding from the microcolumns in the same state. If the number n1 ≥ a_n × o_threshold2, then activate these n1 microcolumns; ii. Select the n2 microcolumns with the lowest load from the microcolumns in the similar state, ensuring that n1 + n2 ≤ o_n, and then select a_n - (n1 + n2) microcolumns with the lowest load from the microcolumns in the distinct state; iii. Finally, activate the microcolumn set SDR Step 4: TPL_LA temporal correlation construction a) Receive SDR: Obtain the current moment microcolumn SDR SDR_t output by Step 3; b) Location-aware cell selection: Through the SSCM module, obtain the set of active cells A_{t - 1} at the previous moment of the vehicle. If the active cell of the current microcolumn is a predicted cell in A_{t - 1}, then set it as a learning cell; c) Dendritic branch update: If the learning cell is a predicted cell at the previous moment, then enhance its dendritic branch connections. If not, then add new dendritic branches.; d) Generate predicted SDR: According to the dendritic branch strength of the learning cell, predict the microcolumn SDR SDR_{t + 1}^pred at the next moment.
[0053] Step 5: SSCM multi-channel context caching a) Data structure: Map<sequence ID, Value>; b) Read-write logic: During training, quickly retrieve the state of the vehicle at the previous moment through the Key, and cache A_t and L_t at the current moment after updating.
[0054] Step 6: Future position prediction According to the predicted SDR SDR_{t + 1}^pred generated in Step 4, map it back to the spatial features, and combine with the temporal features to predict the position at the next moment.
[0055] Example 2: Specific Scenario Example of Taxi Trajectory Prediction Taking the morning peak trajectory prediction of a taxi (license plate number: Beijing A·12345) in Chaoyang District, Beijing as an example, the specific parameters are as follows: The number of micro-columns M = 10, numbered 1 to 10, and the number of cells on each micro-column is 4, numbered 1 to 4, 5 to 8,..., 37 to 40 respectively. Step 1: Multi-dimensional Coding Calculation Encode and fuse the location, time, road type, and license plate number respectively. Assume that the final encoded form is obtained according to the position information of the first significant digit of each segment, such as: E_compress = [2, 3, 4, 7, 8, 12, 13, 14, 19, 20, 21].
[0056] Step 2: Activation of SPL_SN Micro-columns Assume that by calculating the overlap value and self-recommendation status of each micro-column, the finally activated micro-columns are micro-columns 1, 3, and 5 according to the hierarchical selection activation method.
[0057] Step 3: Construction of TPL_LA Temporal Association The predicted cell set at the previous moment obtained through the SSCM module is {1, 12, 15}. According to the predicted cell set at the previous moment and the currently active micro-columns, the active cells at the current moment can be obtained as {1, 12, 17, 18, 19, 20}. The predicted cell set can be calculated through the currently active cells...
[0058] Step 5: Prediction of Future Location The predicted cell set obtained at this time can predict the information of the active micro-columns at the next moment and obtain the corresponding SDR. According to the mapping relationship between the initial vehicle position information and the SDR, we can obtain the currently predicted position of the vehicle.
[0059] So far, the prediction process ends.
[0060] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
Claims
1. A vehicle trajectory prediction method based on improved Hidden Memory Method (HTM), characterized in that, Includes the following steps: Step 1) Obtain the trajectory attribute data of the motor vehicle, including the vehicle's license plate information, location coordinates, time characteristics, and road type; Step 2) Compress and encode the trajectory attribute data of the motor vehicle to represent the spatial characteristics of the data; Step 3) The spatial feature extraction of the encoding is performed using the Spatial Pooler Training Algorithm with Self-Nominated Minicolumns (SPL_SN) based on microcolumn self-recommendation to form a sparse distributed representation (SDR), thus obtaining the microcolumn representation of the motor vehicle historical trajectory data. Step 4) The position-aware temporal pooling training algorithm TPL_LA is used to learn the sequence features of the sparse distribution representation of the micro-pillars and construct the temporal correlation relationship of the vehicle trajectory data. Step 5) Add a sequence state cache module to extend HTM, enabling the model to process multiple sequences simultaneously and allowing multiple inputs; Step 6) Based on the trained model, the system can predict the running location of a motor vehicle within a preset time period based on the input current attribute data of the motor vehicle.
2. The vehicle trajectory prediction method based on improved HTM according to claim 1, characterized in that, The specific method for compressing and encoding vehicle attribute data using multi-dimensional feature encoding and fusion techniques in step 2) is as follows: S1 trajectory feature encoding; For the GPS location sequence of motor vehicles, each GPS coordinate is converted into a two-dimensional coordinate (x, y) in planar space, divided into grid blocks according to a preset resolution, and a deterministic hash function is used to independently map the (x, y) coordinates of each block into an encoding of length n1 and set to w1 bits. The encodings of x and y coordinates are merged into spatial feature encoding through concatenation to ensure that the spatial feature encodings of adjacent grid blocks have a preset overlap to preserve the semantics of location proximity. S2 time feature coding; For vehicle timestamps, user-defined time period division rules are supported: 7:00-10:00 is the morning peak period, 10:00-16:00 is the off-peak period, and 16:00-24:00 is the evening peak and nighttime period. Each timestamp is assigned to the corresponding time period. A numerical encoder is used to generate a time feature code of length n2 with w2 bits set to 1. The time feature code of adjacent time periods maintains semantic continuity through overlapping range design. S3 road type feature coding; For road types used by motor vehicles, including highways, national roads, urban main roads, secondary roads and pedestrian streets, each road type is used as a category feature. A category encoder is used to generate semantic feature codes with a length of n3 and a set number of 1 bits of w3. Semantically related road types retain semantic similarity by adjusting the coding overlap, while the coding overlap of unrelated road types is ≤5%. S4 license plate number; Similar to the analysis above, the license plate number can also be combined into a single code using a numerical encoder and a category encoder. This code is a semantic feature code with a length of n4 and a 1-bit value of w4. S5 multi-dimensional feature fusion; The spatial feature codes generated in steps 1) to 3) are fused together. The fusion method is either concatenation or proportional merging to ensure that the 1-bit bits of each dimension are similar. The final generated code has a degree of n = n1 + n2 + n3 + n4 and a number of 1-bit bits of w = w1 + w2 + w3 + w4, which is used for feature extraction in the subsequent spatial pooling training algorithm. S6 compression encoding; Let the positions of the first and last significant bits in the four dimensions of the encoding vector before fusion be t(1), t(2), t(3), and t(4), respectively. Then, the positions of the first and last significant bits in each part of the fused encoding are calculated according to the following formula: s(1)=t(1) s(2)=t(2)+n1 s(3)=t(3)+n1+n2 s(4)=t(4)+n1+n2+n3 The value of s(i) is calculated using the above formula, where i takes the values 1, 2, 3, and 4. Therefore, s(i) represents the trajectory, time, road type, and the position of the first valid digit of the license plate number, respectively. The final compressed code can be represented as: encoder={s(1),s(1)+1,s(1)+2,...s(1)+w1,s(2),s(2)+1,s(2)+2,...s(2)+w2,s(3),s(3)+1,s(3)+2,...s(3)+w3,s(4),s(4)+1,s(4)+2,...s(4)+w4}.
3. The vehicle trajectory prediction method based on improved HTM according to claim 1, characterized in that, The improved process of the SPL_SN spatial pooling training algorithm based on micropillar self-recommendation in step 3) is as follows: S1 calculates the micropillar overlap value (o) i ); For each micropillar, the overlap value between its synaptic connections and the current compressed SDR is calculated, reflecting the degree of matching between the micropillar and the current data. The formula used for calculation is as follows: Where w ij This indicates whether the synapse between the i-th micropillar and the j-th component in the data encoding is in a connected state, taking values of 0 and 1, representing the disconnected and connected states, respectively. j This represents the value of the j-th component in the encoding corresponding to the input, b i Let ∏ represent the excitation factor of the j-th micropillar. i Let i represent the receptive field of the i-th micropillar; S2 calculates the self-recommendation degree of the micro-column based on the overlap value; Based on the overlap value between the micropillar and the current data encoding, the algorithm divides the self-recommendation state of the micropillar into three types, and the calculation rules are shown in the following formula; o threshold The minimum threshold for activating a micropillar is represented. Combined with the number of 1s in the data encoding, the fault tolerance rate of the spatial pool can be calculated. `state(i)` represents the self-recommendation state of the i-th micropillar in the current training environment, and is divided into three types: `same`, `similar`, and `distinct`. `state(i) = same` indicates that the micropillar can be activated by the current data, and the data it has participated in is highly similar to or the same as the current data; `state(i) = similar` indicates that the micropillar has some overlap with the current data but does not meet the activation condition, and the content is similar; `state(i) = distinct` indicates that the micropillar has little overlap with the current data, and the data it has participated in differs significantly. S3 selects microcolumns based on self-recommendation level: By comprehensively utilizing the self-recommendation state and load-bearing capacity of micropillars, a suitable set of micropillars can be selected to represent the current data. The spatial pool is set to use a_n micropillars to represent the data, and the micropillar sets of adjacent data overlap by a maximum of o_n micropillars. The process is as follows: a) Calculate the current self-recommendation status of the micro-column based on the data; b) For micropillars with the self-recommendation state "same", activate the micropillar containing the current value and count it as n1; if n1≥a_n, return the set; otherwise, select the n2 micropillars with the lowest carrying capacity from the remaining micropillars and activate them. n2 takes the maximum value that satisfies n1+n2≤o_n and update its carrying capacity and data information. c) If the number of activated micropillars in the same class is less than o_n, then select the n3 micropillars with the lowest carrying capacity from the similar class to activate them. n3 is the maximum value that satisfies n1+n2+n3≤o_n, and update their carrying capacity, storage content, participation count and synaptic persistence value. d) Among the micropillars with the distinct self-recommendation status, randomly select the a_n-n1-n2-n3 micropillars with the lowest load capacity for activation; at the same time, update the load capacity information of these micropillars, save the content of the current data on the micropillars, and increase the number of micropillars participating in the data by 1. The synaptic persistence value of these micropillars should also be updated according to the encoding of the current data. e) This algorithm ensures that the sets of micropillars that map similar data overlap and are sparsely distributed by randomly selecting a predetermined number of micropillars from the same and similar state micropillars for activation, making full use of the space pool micropillars, while limiting the number of activations to ensure convergence. S4 Dynamically Adjustable Micropillar Synapses The set of micropillars activated by the self-recommendation-based micropillar hierarchical selection algorithm has a mapping relationship with the current data. Connections to the data need to be added to the micropillars to maintain this mapping relationship. The method for adding connections to active micropillars can be expressed by the following formula: W active i =W active i ∪encoder(CurrentInput) Where active_i represents the number of the active micro-column selected by the algorithm from the current data, W active_i This represents the set of position indices of the connected synapses of the micropillar, whose content corresponds to the data encoded as a 1-component. CurrentInput is the content of the current data.
4. The vehicle trajectory prediction method based on improved HTM according to claim 1, characterized in that, The improved process of the location-aware time pool training algorithm TPL_LA in step 4) is as follows: S1 receives the SDR generated by the space pool; Obtain the sparse distribution representation of micropillars (SDR) at the current time after spatial pooling training. This SDR already contains the spatial features of the sequence data. S2 selects active cells based on location awareness; In the location-aware HTM time-pooling training algorithm, location information is introduced to optimize HTM cell selection, distinguish identical data in the sequence, enhance feature memory, and omit the best matching step. The specific process is as follows: a) When the active cells on the micropillar activated by HTM at time t are the predicted cells at time t-1, the cells contain dendritic branches activated by the active cells at time t-1. Adjusting these dendritic branches will enhance the learning of the current sequence. In this case, the following rules are used to set these cells as learning cells. in, This indicates whether the i-th cell on the j-th micropillar is a learning cell, with 1 representing yes and 0 representing no. W t It is the set of active micropillars at time t. This represents whether the i-th cell on the j-th micropillar is a predicted cell at time t-1, where 1 indicates that the cell is a predicted cell and 0 indicates that the cell is not a predicted cell. b) When the active cells on the micropillar activated by HTM at time t are not the predicted cells at time t-1, these cells do not contain active dendritic branches. In this case, the following rules are used to select learning cells from the micropillar, and dendritic branches are added to the cells to build an association with the learning cells input at time t-1, thereby achieving the learning of the current sequence features. c) Based on the selected learning cell, use the following rules to set all active cells in the input (excluding the learning cell) to an inactive state, thus reducing the size of the active cell set. It is the set of all learning cells at time t, Φ t-1 This represents the active cell matrix at time t-1; S3 updates the dendritic branches of adjacent data; After generating learning cells, their learning of the current sequence can be enhanced by adjusting their active dendritic branches; specifically, the adjustment follows two rules: a) When the active cell on the micropillar activated by HTM at time t is the predicted cell at time t-1, the rule for updating the dendritic branches of adjacent data is as follows; Where activeThreshold is the activation threshold for dendritic branches. Let be the synaptic value matrix of the k-th dendritic branch in the i-th cell on the j-th micropillar, with the same dimension and size as the active cell matrix; b) When the active cells on the micropillars activated by HTM at time t are not the predicted cells at time t-1, learn the dendritic branches in the cells. The rules for the addition scheme are shown in the following formula. Where I_P is the initial persistence value of the synapse in the created dendritic branch; S4 generates predicted SDRs; Based on the dendritic branch connection strength of the learning cells, the set of activated micropillars for the next time step is predicted, i.e., the SDR is predicted, which is used to represent the spatial features of the next time step, such as the next position of a motor vehicle.
5. The vehicle trajectory prediction method based on improved HTM according to claim 1, characterized in that, The HTM structure and process for tolerating multiple inputs described in step 5) are as follows: S1 compression encoding; The process in claim 2 is used to encode the original vehicle attribute data in multiple dimensions using a compression encoder, thereby forming a compressed code; S2 obtains spatial features of the sequence; The SPL_SN algorithm described in claim 3 is used to perform spatial pooling deposition operations, thereby obtaining the spatial feature representation of vehicle attribute sequence data; S3 obtains context information; The SSCM module was used to obtain accurate contextual information of the sequence data, and the TPL_LN algorithm was used to construct accurate temporal relationships between the sequence data. S4 prediction results; Based on the current activation state, a prediction cell set is calculated, and the data sequence formed by multiple inputs is predicted and analyzed using the prediction cell set.
6. The vehicle trajectory prediction method based on improved HTM according to claim 5, characterized in that, The specific contents of the Sequence State Cache (SSCM) module used in step 5.3 are as follows: The S1 Sequence State Cache Module (SSCM) records the temporary training state of each subsequence, including the sequence ID, active cell set, and learning cell set. During training, the corresponding state can be quickly retrieved in the SSCM by the sequence ID, and the cached cell set provides contextual information, enabling the time pool algorithm to accurately construct the temporal relationship between subsequences and enhance the model's ability to model complex sequences. The S2 SSCM module is designed with a map data structure to increase the speed of querying and reading / writing state information. The key value is the ID of the subsequence where the input data is located, and the value includes the following two items: a) Φ last_p This represents the set of active cells corresponding to the p-th sequence in the previous time step. This indicates the active state of the i-th cell on the j-th microcolumn in this state. A value of 1 indicates that the cell is active, and a value of 0 indicates that the cell is inactive. This information represents the context information corresponding to the previous time step of the p sequence in the data sequence. It can be used to detect whether there are predicted cells on the microcolumn activated by the input data at the next time step of the p sequence, and to provide a basis for the activation of cells by the data at the next time step of the p sequence. b) This represents the set of learning cells corresponding to the data of the p-th sequence at the previous time step. This indicates whether the i-th cell on the j-th micropillar is a learning cell in this state. If the value is 1, it means that the cell is a learning cell; otherwise, the cell is not a learning cell. The learning cell set can express the contextual representation of the data in the subsequence. By combining the learning cell set of the p-sequence data at the current time and creating or adjusting the existing dendritic branches on the learning cells at the current time, the temporal relationship between the p-sequence data can be constructed. After the time pool completes the training of a sequence of data, it constructs a key-value pair with the sequence ID as the key and the two datasets mentioned above as the value and puts it into the SSCM module. Using this cache module, the time pool training algorithm can obtain the context information of the corresponding sequence based on the ID of the sequence to which the current data belongs and construct the correct temporal relationship between the sequence data.
7. A vehicle trajectory prediction method based on an improved HTM as described in any one of claims 1-6, characterized in that, The multi-dimensional compression coding includes SPL_SN and TPL_LA as well as an HTM structure that tolerates multiple inputs. The multi-dimensional compression coding compresses the original multi-dimensional data into shorter codes, reducing computational complexity. The SPL_SN is used to activate the micro-pillar set of the spatial pool to quickly obtain the sparse distribution representation of the input. The TPL_LA constructs the sequential relationship of inputs in the time series and makes predictions for subsequent inputs, while the HTM structure that tolerates multiple inputs is used to implement multiple inputs.