Pedestrian trajectory prediction method based on dual mamba architecture and related device

By employing a dual Mamba architecture-based pedestrian trajectory prediction method that combines a Motion-Mamba encoder and a Social-Mamba decoder, the problem of balancing accuracy and efficiency in pedestrian trajectory prediction is solved, achieving high-precision and high-efficiency pedestrian trajectory prediction that is suitable for intelligent transportation and human-computer interaction platforms.

CN120852466BActive Publication Date: 2026-07-31SOUTH CHINA UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH CHINA UNIV OF TECH
Filing Date
2025-06-03
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing pedestrian trajectory prediction methods struggle to balance accuracy and efficiency, especially in large-scale and complex pedestrian interaction scenarios. Traditional models suffer from vanishing gradients, high computational complexity, and slow inference speed, making them unsuitable for dense crowds and real-time applications.

Method used

A pedestrian trajectory prediction method based on a dual Mamba architecture, including a Motion-Mamba encoder and a Social-Mamba decoder, is adopted. By integrating pedestrian motion behavior and social interaction information through trajectory data clustering, bidirectional similarity ranking and selective scanning mechanisms, future trajectories and their probabilities are generated.

Benefits of technology

It significantly improves the accuracy and efficiency of pedestrian trajectory prediction, has good scalability in populations of different densities, and supports future intelligent transportation systems, human-computer interaction platforms, and mobile robot platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852466B_ABST
    Figure CN120852466B_ABST
Patent Text Reader

Abstract

This invention discloses a pedestrian trajectory prediction method and related equipment based on a dual Mamba architecture. The method includes: acquiring trajectory data; clustering the trajectory data to obtain pedestrian movement patterns; acquiring historical observation trajectories; constructing a motion pattern feature vector of the target pedestrian based on the historical observation trajectories and pedestrian movement patterns; sorting the motion pattern feature vectors using a bidirectional similarity ranking method; and inputting the sorted motion pattern feature vectors and neighboring pedestrian feature vectors into a pedestrian trajectory prediction model based on a dual Mamba architecture to generate future trajectories and their corresponding probabilities. The Motion-Mamba encoder is used to extract features from the motion pattern feature vectors, and the Social-Mamba decoder is used to generate prediction results based on the extracted features and neighboring pedestrian feature vectors. This invention significantly improves the accuracy and efficiency of pedestrian trajectory prediction and has good scalability in populations of varying densities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pedestrian trajectory prediction, and in particular to a pedestrian trajectory prediction method and related equipment based on a dual Mamba architecture. Background Technology

[0002] Pedestrian trajectory prediction plays a crucial role in systems such as autonomous driving, robot navigation, and smart city monitoring. Especially when interacting with humans, accurately predicting future pedestrian trajectories is key to ensuring system safety and efficiency. This task requires accurately predicting possible future trajectories of pedestrians based on observed information. In real-world environments, pedestrian movement is highly random, diverse, and uncertain, and is also influenced by the behavior of neighboring individuals. This diversity of movement characteristics and the complexity of social behavior constitute the two core challenges of pedestrian trajectory prediction. The rapid development of deep learning technology in recent years has spurred the development of various pedestrian trajectory prediction models. For example, sequence models based on recurrent neural networks (RNN / LSTM) can capture dependencies in time series, but suffer from gradient vanishing and inefficient inference. Graph neural network (GNN) methods describe social behavior by modeling interactions between people as graph structures, but their modeling capabilities are limited by the design and updating of the graph. While Transformer-based models demonstrate excellent performance in long sequence modeling, their high computational complexity of attention mechanisms and slow inference speed make them difficult to adapt to densely populated scenes and real-time application deployments. Current models often struggle to balance accuracy and efficiency, especially when faced with large-scale and complex pedestrian interaction scenarios. Therefore, there is an urgent need for a new pedestrian trajectory prediction method that combines high accuracy and high efficiency. Summary of the Invention

[0003] In order to at least partially solve one of the technical problems existing in the prior art, the purpose of this invention is to provide a pedestrian trajectory prediction method and related equipment based on a dual Mamba architecture.

[0004] The first technical solution adopted in this invention is:

[0005] A pedestrian trajectory prediction method based on a dual Mamba architecture includes the following steps:

[0006] Acquire trajectory data, cluster the trajectory data, and obtain pedestrian movement patterns;

[0007] Obtain historical observation trajectories, and construct a motion pattern feature vector of the target pedestrian based on the historical observation trajectories and pedestrian movement patterns;

[0008] The motion pattern feature vectors are sorted using a two-way similarity ranking method.

[0009] The sorted motion pattern feature vector and the neighboring pedestrian feature vector are input into the pedestrian trajectory prediction model based on the dual Mamba architecture to generate future trajectories and their corresponding probabilities.

[0010] The pedestrian trajectory prediction model includes a Motion-Mamba encoder and a Social-Mamba decoder. The Motion-Mamba encoder is used to extract features from the motion pattern feature vector, and the Social-Mamba decoder is used to generate prediction results based on the extracted features and the feature vectors of neighboring pedestrians.

[0011] Furthermore, the acquisition of trajectory data, clustering the trajectory data, and obtaining pedestrian movement patterns include:

[0012] Based on the trajectory data, the trajectory of each pedestrian is broken down to obtain historical trajectory and future trajectory;

[0013] The K-means algorithm is used to cluster future trajectories, resulting in L representative motion patterns C = {c1, c2, ..., c...}. L Each pattern represents a possible future direction and behavioral trend of a pedestrian.

[0014] Furthermore, the step of constructing a motion pattern feature vector of the target pedestrian based on historical observation trajectories and pedestrian motion patterns includes:

[0015] The clustered motion pattern C and the observed historical trajectory X of the target pedestrian are combined into a unified motion pattern feature vector, as shown in the following expression:

[0016] Z c =F c (C,W c )

[0017] Z o =F o (X,W o )

[0018] z m =concat(Z) c Z o )

[0019] In the formula, Z c Z is the clustering feature vector. o F is the feature vector of the observed trajectory. c (·,·) and F o (·,·) denotes a training parameter matrix W c and W o Linear layers;

[0020] Cluster feature vector Zc and the observed trajectory feature vector Z o By connecting the vectors, we obtain the motion pattern feature vector Z. m .

[0021] Furthermore, the sorting of motion pattern feature vectors using a bidirectional similarity ranking method includes:

[0022] By calculating the cosine similarity between the historical trajectory of the target pedestrian and the historical trajectory segment corresponding to each representative motion pattern, the motion pattern feature vectors are sorted in ascending and descending order according to the similarity, thereby ensuring the efficiency and completeness of trajectory information extraction.

[0023] The formula for calculating cosine similarity is as follows:

[0024]

[0025] In the formula, b i Representation of representative motion pattern c i Related historical trajectory.

[0026] Furthermore, the Motion-Mamba encoder operates as follows:

[0027] Motion pattern feature vector Z m The input to the Motion-Mamba encoder is first normalized, and then split into two routes for processing.

[0028] In the first route, the vector sequence is processed through a linear layer; in the second route, the vector sequence is processed through another linear layer and then a bidirectional similarity ranking method is used to obtain two directional subsequences.

[0029] For each subsequence, the sequence is processed sequentially using the SiLU activation function and 1-D convolution, followed by input to the state-space model for further processing. The results of the two subsequences are gated from the result of the first route, merged, and then output through a linear layer. Finally, the motion feature Z containing rich spatiotemporal information is obtained. e .

[0030] Furthermore, the Social-Mamba decoder is composed of Social-Mamba blocks, and the Social-Mamba decoder operates as follows:

[0031] Given a target pedestrian, N neighboring pedestrians and their observed trajectories X. ne The feature vector Z of the neighboring pedestrians is obtained through linear transformation. ne :

[0032] The Social-Mamba block first processes the motion features Z output by the Motion-Mamba encoder. e After normalization, the result is split into two paths for processing. One path goes through a linear layer and then an activation function to output W, while the other path goes through another linear layer and then an activation function to output X.

[0033] Using the neighbor pedestrian feature vector Z ne The parameter matrix is ​​obtained; the parameter matrix and X are input into the state space model to generate γ; then Y and W are merged, and then passed through a normalization layer and a linear layer; finally, the output of the Social-Mamba block is fed into two multilayer perceptrons to generate the future trajectory and the corresponding probability.

[0034] Furthermore, the loss function during training of the pedestrian trajectory prediction model is:

[0035]

[0036] In the formula, For trajectory prediction loss, The loss is the probabilistic prediction loss, where λ1 and λ2 are weighting parameters.

[0037] The second technical solution adopted in this invention is:

[0038] An electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a pedestrian trajectory prediction method based on a dual Mamba architecture as described above.

[0039] The third technical solution adopted in this invention is:

[0040] A computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement a pedestrian trajectory prediction method based on a dual Mamba architecture as described above.

[0041] The fourth technical solution adopted in this invention is:

[0042] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned pedestrian trajectory prediction method based on a dual Mamba architecture.

[0043] The beneficial effects of this invention are: compared with past pedestrian trajectory prediction methods, this invention significantly improves the accuracy and efficiency of pedestrian trajectory prediction, has good scalability in crowds of different densities, and provides key technical support for future intelligent transportation systems, human-computer interaction platforms, and mobile robot platforms. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart illustrating the steps of a pedestrian trajectory prediction method based on a dual Mamba architecture in an embodiment of the present invention.

[0046] Figure 2 This is a flowchart illustrating the pedestrian trajectory prediction method based on a dual Mamba architecture in an embodiment of the present invention. Detailed Implementation

[0047] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0048] The terminology used in the embodiments of this application is for the purpose of describing specific embodiments only and is not intended to limit the embodiments of this application. The singular forms "a," "described," and "the" used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. Furthermore, unless otherwise expressly limited, terms such as "set," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0049] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0050] In the description of this application, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0051] In the description of this application, "and / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship.

[0052] Early traditional trajectory prediction methods relied heavily on designing various physical models, such as using position, velocity, and acceleration to describe pedestrian motion, and using rule-based methods to model social interactions. However, these hand-designed models often performed poorly when dealing with complex motion behaviors and changing social scenarios, and were difficult to adjust.

[0053] With the development of deep learning technology, many sequence modeling methods have been applied to pedestrian trajectory prediction, especially Recurrent Neural Networks (RNNs) and Long Short-Term Memory Networks (LSTMs). These methods predict trajectories by learning the temporal series features of pedestrians and the spatial interaction features between their neighbors. However, RNN-based methods suffer from gradient vanishing or exploding problems, especially in long-term predictions, and their inference efficiency is limited by their inherent recurrent structure. Furthermore, Graph Neural Networks (GNNs), by modeling crowds as a graph structure where nodes represent pedestrians and edges represent interactions between people, can more effectively capture social interactions among pedestrians. However, the construction and updating of graph structures still suffer from high computational overhead and struggle to cope with complex changes in dynamic social environments. The Transformer architecture, with its powerful long-range dependency modeling capabilities, has achieved widespread application in the field of pedestrian trajectory prediction. However, Transformer-based methods rely on a self-attention mechanism, whose computational complexity increases quadratically with the number of pedestrians. This leads to computational and memory overhead issues when dealing with large-scale pedestrian prediction tasks, affecting their real-time performance and efficiency, and limiting their deployment in resource-constrained real-world applications.

[0054] Mamba, an emerging deep learning architecture evolved from state-space models, holds great potential by maintaining linear computational complexity while modeling long-range dependencies. Compared to traditional structured state-space models (S4), Mamba significantly improves computational efficiency by integrating a selective scanning mechanism, enabling the model to dynamically adjust computational parameters based on relevant inputs. In many tasks, the Mamba architecture outperforms traditional methods, particularly in natural language processing and computer vision. However, directly applying Mamba to such tasks presents several challenges, including the redundancy and disorder of pedestrian trajectory data and the complexity of social behavior modeling arising from multi-agent interactions.

[0055] Based on this, this invention combines the advantages of Mamba and proposes a dual Mamba architecture to address the challenges of modeling the diversity of motion features and the complexity of social behavior in pedestrian trajectory prediction. By introducing two core modules—a Motion-Mamba encoder and a Social-Mamba decoder—this architecture can effectively integrate pedestrian motion behavior and social interaction information, process disordered and redundant input trajectory data, and generate diverse and socially reasonable future trajectories. Furthermore, the bidirectional similarity ranking method proposed in this invention aims to optimize the information aggregation effect of Mamba in sequence data processing, thereby improving prediction accuracy while ensuring computational efficiency, possessing good scalability and deployability, and providing key technical support for future intelligent transportation systems, human-computer interaction platforms, and mobile robot platforms.

[0056] Example 1

[0057] like Figure 1 and Figure 2 As shown, this embodiment provides a pedestrian trajectory prediction method based on a dual Mamba architecture, including the following steps:

[0058] S1. Obtain trajectory data, cluster the trajectory data, and obtain pedestrian movement patterns;

[0059] S2. Obtain historical observation trajectories and construct the motion pattern feature vector of the target pedestrian based on the historical observation trajectories and pedestrian movement patterns.

[0060] S3. Sort the motion pattern feature vectors using a two-way similarity sorting method;

[0061] S4. Input the sorted motion pattern feature vector and the neighboring pedestrian feature vector into the pedestrian trajectory prediction model based on the dual Mamba architecture to generate the future trajectory and its corresponding probability.

[0062] The pedestrian trajectory prediction model includes a Motion-Mamba encoder and a Social-Mamba decoder. The Motion-Mamba encoder is used to extract features from the motion pattern feature vector, and the Social-Mamba decoder is used to generate prediction results based on the extracted features and the feature vectors of neighboring pedestrians.

[0063] The goal of pedestrian trajectory prediction is to predict future pedestrian trajectories based on historical observation information, ensuring that the predicted results are as close as possible to the actual trajectories. Therefore, this embodiment designs a high-precision and efficient dual-Mamba pedestrian trajectory prediction architecture, mainly composed of two core parts: a Motion-Mamba encoder and a Social-Mamba decoder. The proposed method first clusters pedestrian motion patterns and constructs a motion pattern feature vector for the target pedestrian based on the relationship between historical observation trajectories and motion patterns. Then, it sorts the motion pattern feature vectors using a bidirectional similarity ranking method. Finally, it inputs the data into the dual-Mamba architecture to integrate interactions with neighboring pedestrians, ultimately generating diverse future trajectories and their corresponding probabilities.

[0064] The method of this embodiment will be explained in detail below with reference to specific implementation methods.

[0065] (1) Motion pattern generation

[0066] Since pedestrian movement typically follows a few basic motion behaviors within a short period, this embodiment does not use the original redundant trajectory data. Instead, it employs a clustering method to generate a set of representative motion patterns to cover the general motion behaviors of pedestrians. This reduces the free space for subsequent predictions, improves prediction efficiency, and reduces computational burden. Specifically, the trajectory of each pedestrian is first split to obtain the historical trajectory (length T). obs ) and future trajectory (length T) pred Then, the K-means algorithm is used to cluster the future trajectories, resulting in L representative motion patterns C = {c1, c2, ..., c...}. L Each pattern represents a possible future direction and behavioral trend of a pedestrian. These motion patterns are used to describe the pedestrian's possible future movement paths, and the similarity between the corresponding historical trajectory and these motion patterns provides a basis for predicting future behavior. To further improve the accuracy and efficiency of prediction, this embodiment combines the clustered motion patterns C and the observed target pedestrian historical trajectory X into a unified motion pattern feature vector, as shown in the following expression:

[0067] Z c =F c (C,W c )#(1)

[0068] Z o =F o (X,W o )#(2)

[0069] Z m =concat(Z) c Z o )#(3)

[0070] Clustering feature vectors Observation trajectory feature vector F c (·,·) and F o (·,·) denotes a training parameter matrix W c and W o A linear layer. The clustering feature vector and the observed trajectory feature vector are concatenated to obtain the motion pattern feature vector.

[0071] (2) Bidirectional similarity ranking

[0072] Pedestrian trajectory data is often chaotic and disordered, and directly inputting it into a Mamba-based encoder may lead to performance degradation. To fully utilize the recursive nature of Mamba and optimize the performance of the Mamba encoder, this embodiment proposes a bidirectional similarity ranking method. This method calculates the cosine similarity between the target pedestrian's historical trajectory and the historical trajectory segments corresponding to each representative motion pattern, as shown below:

[0073]

[0074] Where b i Representation of representative motion pattern c i The relevant historical trajectories are then used to sort the motion patterns in ascending and descending order based on similarity, ensuring both efficiency and completeness in trajectory information extraction. In this way, the Mamba encoder can efficiently and accurately extract the spatiotemporal sequence features of trajectories while avoiding performance loss due to the randomness of the input order.

[0075] (3) Motion-Mamba encoder

[0076] The Motion-Mamba encoder utilizes Mamba's selective scanning mechanism to efficiently capture the relationships between various motion patterns. Motion pattern feature vector Z m First, the data is normalized and then split into two paths for processing. In the first path, the vector sequence is processed through a linear layer. In the second path, the sequence is processed through another linear layer and then subjected to a bidirectional similarity ranking method to obtain two directional subsequences. For each subsequence, a SiLU activation function is applied, followed by a 1-D convolution, and then the data is processed by a state-space model. The results of the two subsequences are gated by the result of the first path, merged, and then output through a linear layer. Finally, the motion feature representation containing rich spatiotemporal information after encoder processing is as follows:

[0077] Z e =EncoderLayer(Zm )#(5)

[0078] (4) Social-Mamba decoder

[0079] Attention mechanisms require calculating the correlation between any two elements to model social interaction behavior, leading to quadratic computational complexity. To address this issue, Mamba's selection mechanism allows for selective processing of neighbor behavior information, filtering out neighbors irrelevant to the target pedestrian and focusing only on relevant neighbor behaviors, thus significantly reducing computational complexity. Therefore, this embodiment proposes a Social-Mamba block as the main component of the decoder. This decoder parameterizes the motion behavior of neighboring pedestrians and effectively models social interaction behavior in conjunction with SSM. Given N neighbors around a target pedestrian and their past observed trajectories... The feature vectors of neighboring pedestrians are obtained through linear transformation:

[0080] Z ne =F ne (X ne W ne )#(6)

[0081] Then, the neighboring pedestrian feature vectors, along with the output of the Motion-Mamba encoder, are fed into the decoder to further predict future trajectories. The Social-Mamba block first normalizes the motion features output by the encoder, then splits them into two paths for processing. One path passes through a linear layer and an activation function, outputting W; the other path passes through another linear layer and an activation function, outputting X. Simultaneously, this embodiment parameterizes the motion behavior of neighboring pedestrians using the neighboring pedestrian feature vector Z. ne The parameter matrix is ​​obtained. Then, the parameter matrix and X are input into the state-space model to generate Y. Next, Y and W are merged, and then passed through a normalization layer and a linear layer. Finally, the output of the Social-Mamba block is fed into two multilayer perceptrons to directly and simultaneously generate the future trajectory and its corresponding probability, as shown below:

[0082]

[0083] (5) Loss Function

[0084] To train the entire dual Mamba architecture, this embodiment designs a loss function. Includes trajectory prediction loss and probability prediction loss The two-part approach serves as one implementation method: the trajectory loss employs Huber loss, and the probability loss employs cross-entropy loss. λ1 and λ2 are weighting parameters that control the different loss terms.

[0085] In summary, this invention utilizes the Mamba model, which excels in natural language processing and computer vision tasks, to explore the feasibility and superiority of applying Mamba to pedestrian trajectory prediction tasks. Mamba is an improvement on the state-space model; by introducing a selective scan mechanism, it can automatically select and use the most useful information for the current state, filtering out information irrelevant to the current state, thus enhancing the model's contextual understanding ability. It exhibits excellent performance in long sequence modeling while maintaining linear computational complexity. This invention proposes a dual Mamba prediction architecture that integrates motion behavior and social interaction. This method mainly consists of two core Mamba-based modules—a Motion-Mamba encoder and a Social-Mamba decoder. The Motion-Mamba encoder models the observed trajectory and clustered motion patterns, extracting spatiotemporal feature relationships under different patterns. The Social-Mamba decoder incorporates neighbor information, selectively integrating neighbor behaviors that have the greatest impact on the target pedestrian, generating a more reasonable socialized future trajectory. Furthermore, due to the redundancy and disorder of trajectory data, processing it using the proposed bidirectional similarity ranking method before inputting the data into the encoder can fully leverage the recursive structure characteristics of Mamba, improve the information aggregation effect, and effectively enhance the accuracy, stability, and operational efficiency of prediction.

[0086] Example 2

[0087] This invention also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to achieve the following: Figure 1 This paper presents a pedestrian trajectory prediction method based on a dual Mamba architecture.

[0088] It is understood that the memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the stored data area may store data created according to the use of the server, etc.

[0089] A processor may include one or more processing cores. The processor connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU) and Modem. The CPU primarily handles the operating system and applications; the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.

[0090] Since this electronic device is the electronic device corresponding to the pedestrian trajectory prediction method based on the dual Mamba architecture in this embodiment of the invention, and the principle of solving the problem by this electronic device is similar to that of this method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0091] Example 3

[0092] This invention also provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to achieve the following: Figure 1 This paper presents a pedestrian trajectory prediction method based on a dual Mamba architecture.

[0093] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0094] Since this storage medium is the storage medium corresponding to a pedestrian trajectory prediction method based on a dual Mamba architecture in an embodiment of the present invention, and the principle of this storage medium in solving the problem is similar to that of this method, the implementation of this storage medium can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.

[0095] Example 4

[0096] In some possible implementations, various aspects of the methods of the embodiments of the present invention can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a pedestrian trajectory prediction method based on a dual Mamba architecture according to various exemplary embodiments of this application as described above. The executable computer program code or "code" for performing the various embodiments can be written in high-level programming languages ​​such as C, C++, Python, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0097] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0098] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0099] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A pedestrian trajectory prediction method based on a dual Mamba architecture, characterized in that, Includes the following steps: Acquire trajectory data, cluster the trajectory data, and obtain pedestrian movement patterns; Obtain historical observation trajectories, and construct a motion pattern feature vector of the target pedestrian based on the historical observation trajectories and pedestrian movement patterns; The motion pattern feature vectors are sorted using a two-way similarity ranking method. The sorted motion pattern feature vector and the neighboring pedestrian feature vector are input into the pedestrian trajectory prediction model based on the dual Mamba architecture to generate future trajectories and their corresponding probabilities. The pedestrian trajectory prediction model includes a Motion-Mamba encoder and a Social-Mamba decoder. The Motion-Mamba encoder is used to extract features from the motion pattern feature vector, and the Social-Mamba decoder is used to generate prediction results based on the extracted features and the feature vectors of neighboring pedestrians. The step of constructing a motion pattern feature vector for the target pedestrian based on historical observation trajectories and pedestrian motion patterns includes: Clustered motion patterns and the observed historical trajectory of the target pedestrian These are combined into a unified motion pattern feature vector, expressed as follows: In the formula, For clustering feature vectors, The observed trajectory feature vector; and This indicates a trainingable parameter matrix. and Linear layers; Cluster feature vectors and observation trajectory feature vector By connecting the vectors, we obtain the motion pattern feature vector. ; The Motion-Mamba encoder operates as follows: Motion pattern feature vector The input to the Motion-Mamba encoder is first normalized, and then split into two routes for processing. In the first route, the vector sequence is processed through a linear layer; in the second route, the vector sequence is processed through another linear layer and then a bidirectional similarity ranking method is used to obtain two directional subsequences. For each subsequence, the sequence is processed sequentially using the SiLU activation function and 1-D convolution, followed by input to the state-space model for further processing. The results of the two subsequences are gated from the result of the first route, merged, and then output through a linear layer. Finally, motion features containing rich spatiotemporal information are obtained. ; The Social-Mamba decoder consists of Social-Mamba blocks, and its operation is as follows: For a given target pedestrian around Neighbors, pedestrians, and their past observation trajectories The feature vectors of neighboring pedestrians are obtained through linear transformation. : The Social-Mamba block first processes the motion features output by the Motion-Mamba encoder. After normalization, the data is split into two paths for processing. One path passes through a linear layer and then an activation function, producing the output. Another route goes through another linear layer and then outputs an activation function. ; Using neighbor pedestrian feature vectors Obtain the parameter matrix; combine the parameter matrix with... Input together into the state space model generation Then merge and Then, the output of the Social-Mamba block is fed into two multilayer perceptrons to generate future trajectories and their corresponding probabilities.

2. The pedestrian trajectory prediction method based on a dual Mamba architecture according to claim 1, characterized in that, The process of acquiring trajectory data, clustering the trajectory data, and obtaining pedestrian movement patterns includes: Based on the trajectory data, the trajectory of each pedestrian is broken down to obtain historical trajectory and future trajectory; The K-means algorithm is used to cluster future trajectories to obtain... Representative sports patterns Each pattern represents a possible future direction and behavioral trend of a pedestrian.

3. The pedestrian trajectory prediction method based on a dual Mamba architecture according to claim 1, characterized in that, The method of sorting motion pattern feature vectors using a bidirectional similarity ranking method includes: By calculating the cosine similarity between the historical trajectory of the target pedestrian and the historical trajectory segment corresponding to each representative motion pattern, the motion pattern feature vectors are sorted in ascending and descending order according to the similarity, thereby ensuring the efficiency and completeness of trajectory information extraction. The formula for calculating cosine similarity is as follows: In the formula, Representation and representative movement patterns Related historical trajectory.

4. The pedestrian trajectory prediction method based on a dual Mamba architecture according to claim 1, characterized in that, The loss function for training the pedestrian trajectory prediction model is: In the formula, For trajectory prediction loss, For probability prediction loss, and These are weight parameters.

5. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method as described in any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method as described in any one of claims 1 to 4.

7. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, are used to perform the method as described in any one of claims 1 to 4.