Multi-person redirection walking and position prediction method based on artificial potential field

Through the multi-person redirection algorithm and LSTM-attention mechanism based on artificial potential field, the frequent resetting of the redirection algorithm and insufficient prediction accuracy in multi-user dynamic scenarios are solved, and efficient and accurate virtual reality navigation is achieved.

CN120407997AActive Publication Date: 2025-08-01ZHONGBEI UNIV +1

Patent Information

Application Number
CN202510478562.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

The existing redirection algorithms have fixed repulsion weights in multi-user dynamic scenarios, resulting in high collision risk, frequent resets and insufficient short-term position prediction accuracy for predictive redirection.

Method used

Using a multi-person redirection method based on artificial potential field, the repulsion weight is dynamically adjusted by calculating the repulsion vector and introducing the concepts of Gaussian attenuation function, relative header factor and user density, and combining LSTM and attention mechanism for position prediction.

Benefits of technology

The reset frequency is significantly reduced, and navigation efficiency and position prediction accuracy are improved in high-density scenarios, especially in large spaces to achieve near-zero reset and more accurate short-term position prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407997A_ABST
    Figure CN120407997A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-person redirection walking and position prediction method based on an artificial potential field, and belongs to the technical field of virtual reality and robot navigation. Aiming at the problems of fixed repulsive force weight, high collision risk and frequent resetting in a multi-user dynamic scene in a traditional redirection walking algorithm and collision caused by insufficient short-term position prediction precision of predictive redirection, the weight distribution of repulsive force between an environment and users is adjusted in real time according to user density through a dynamic situation field weight optimization mechanism; the repulsive force intensity is enhanced when a user approaches an obstacle or a dense area, meanwhile, a safety distance and direction sensing mechanism is introduced, the user movement direction and obstacle included angle analysis is combined, deviation from a high-risk area is guided preferentially, and the invalid reset frequency is reduced. The prediction model adopts an encoder-decoder architecture, an attention mechanism is embedded in a multi-layer long-short-term memory network, key time sequence characteristics in a space-time trajectory are dynamically captured, and the short-term position prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of virtual reality and robot navigation, and particularly relates to a method for multi-person redirected walking and position prediction based on artificial potential field. Background Art

[0002] In recent years, with the development of virtual reality and augmented reality technologies, the integration of virtual and real spaces has become an important trend. In virtual reality, users are allowed to explore a virtual environment simulated by a computer so that virtual reality users can immerse themselves in a completely artificial virtual world and interact with any virtual object. Immersive virtual reality systems that combine head-mounted displays and large-area position tracking systems enable users to move in a virtual environment as naturally as in the physical world. Natural walking is the most common movement technique in the real world and has been proven to enhance the sense of presence and help users perform better in search tasks. This is more intuitive than navigating through a joystick or specialized hardware (such as a treadmill), and accurate redirected navigation has become an important part of virtual reality exploration.

[0003] However, the limited physical tracking space usually restricts the exploration of large virtual spaces. The size of the virtual world cannot be larger than the physical tracking area to avoid collisions with the boundaries of the tracking area. To simulate a world of infinite size, the correspondence between physical and virtual movements can be manipulated to facilitate navigation over a larger range. Reactive algorithms and prediction methods are considered effective means to solve virtual reality redirection. However, the existing reactive algorithms for redirected technology in dynamic multi-user environments still have the problem that the repulsive force weight between the environment and users is fixed and difficult to adapt to the changes in high-density scenarios; the prediction method analyzes the physical environment and the virtual environment to predict the user's next movement and thus formulates a more effective redirection strategy. Accurate short-term position prediction is particularly important for the prediction algorithm. Summary of the Invention

[0004] Aiming at the problems of fixed repulsive force weight, high collision risk, frequent resets in the traditional redirected walking algorithm in multi-user dynamic scenarios, and insufficient short-term position prediction accuracy leading to collisions in predictive redirection, the present invention provides a method for multi-person redirected walking and position prediction based on artificial potential field.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A method for multi-person redirected walking and position prediction based on artificial potential field, the method comprising the following steps:

[0007] Step 1, calculating the repulsive force vector exerted by the environment on the user;

[0008] Further, the specific steps of the said Step 1 are:

[0009] First, calculate the shortest distance between the user and each environmental obstacle to obtain the vector d pointing to the nearest point of the obstacle k :

[0010] d k = p - l k

[0011] where the user's central position is p, and the point on the corresponding boundary line segment of the obstacle that is closest to the user's central position p is denoted as l k , the vector d k indicates the direction between the user and the nearest point of the obstacle, and the modulus ||d k || reflects the distance between the user and the obstacle;

[0012] Subsequently, by normalizing the vector d k and introducing a Gaussian decay function based on the distance from the user to each environmental obstacle:

[0013]

[0014] where σ is the environmental scale parameter, ensuring that the weight increases when the user approaches the obstacle. Finally, the repulsive force vector exerted by the environment on the user is defined as:

[0015]

[0016] where D is the sum of the distances from the user to all obstacles and other users:

[0017]

[0018] where n represents the total number of obstacles; k represents the obstacle variable; m represents the total number of users; i represents the user variable; ||h i || represents the distance between the user and other users.

[0019] The repulsive force generated by each obstacle is weighted by this method. That is, the closer the distance, the stronger the repulsive effect, and the influence of distant obstacles decays rapidly. Different from the original algorithm that only uses the distance ratio for scaling, this method adds a weight factor in the calculation, thereby strengthening the redirection signal in the case of near obstacles to ensure that the user can avoid potential collision hazards in a timely manner.

[0020] Step 2, calculate the repulsive force vector exerted by other users on the current user;

[0021] Furthermore, the specific steps of the said Step 2 are:

[0022] For the interaction between users, this algorithm adopts a similar idea. For each pair of users, first calculate the difference vector h between the two i :

[0023] h i = p - c k

[0024] where c k is the position of another user, then the relative angle is determined using their respective movement directions, and based on this, the normalized relative head - on factor k is obtained i :

[0025]

[0026] where θ1 and θ2 are the angles between the movement direction and the connection line between the current user and other users respectively. This factor has a higher value when users are moving towards each other face - to - face, thus amplifying the repulsive force between them; conversely, when the movement directions are parallel or away from each other, the repulsive force is weaker.

[0027] On this basis, a minimum - distance mechanism is introduced. When the safety threshold s is set and d < s, an additional safety repulsive force F is calculated safety :

[0028]

[0029] Finally, the repulsive force vector exerted by other users on the current user is defined as:

[0030]

[0031] where k i represents the relative head - on factor.

[0032] An additional weight regulation is introduced to smoothly adjust the redirection force in a user - dense scenario, enhancing the naturalness and accuracy of overall movement.

[0033] Step 3, calculate the resultant repulsive force vector. The repulsive force vector is calculated with the physical space and the boundaries of other users as obstacles. Finally, the resultant repulsive force vector is obtained by weighted summation of the environmental repulsive force and the user repulsive force, and the direction of the resultant repulsive force vector is extracted as the turning direction of the user to guide the user's walking to obtain the user's movement trajectory;

[0034] Furthermore, the specific steps of step 3 are as follows:

[0035] The concept of user density is introduced to make the synthesis result dynamically reflect the distribution of users in the environment. The formula is:

[0036]

[0037] where N represents the number of users and radius represents the radius;

[0038] Define the weights of environmental and user repulsion according to the user density respectively:

[0039]

[0040] Among them, α represents the weight of environmental repulsion; β represents the weight of user repulsion.

[0041] In the case of high user density, automatically reduce the influence of environmental repulsion and at the same time enhance the repulsion between users to more precisely adjust the user's movement trajectory. The synthesized total repulsion vector is obtained through the following formula:

[0042]

[0043] Among them, t represents the synthesized total repulsion vector.

[0044] Assign a greater weight to environmental repulsion during synthesis so as to give priority to ensuring collision avoidance safety when approaching the wall. After this dynamic weighted fusion, the obtained total force vector not only reflects the relative effects of each component, but also can flexibly adjust the redirection strategy according to the actual situation, so as to achieve a more concealed and smooth turning operation between the virtual and real worlds.

[0045] Step 4, when the user approaches an obstacle or other users in the virtual environment and there is a risk of collision, introduce reset as an emergency strategy. Its goal is the safe operation of virtual navigation, providing safety guarantee for immersive virtual walking. The system uses the total guiding force vector at the start of reset as the target orientation after the user resets, ensuring the consistency between the user and the virtual path in the physical space and avoiding physical collisions at the same time.

[0046] Furthermore, the specific steps of the said Step 4 are as follows:

[0047] Calculate the Euclidean distance between the user and the environmental vector and other user vectors:

[0048]

[0049] Among them, v i =(v ix , v iy ) is the vector of the environmental obstacle or other users. When the norm of any vector is greater than the set safety threshold, there is a risk of collision; furthermore, calculate the angle difference between the current traveling direction and the guiding force vectors of the environment and other users:

[0050] Δθ = |θ u - θ v | = |(θ u - θ v + π) mod 2π - π|

[0051] Among them, θ uθ is the angle between the moving direction of the current user and the x-axis. v θ is the angle between the direction of the obstacle and the x-axis. When the angle difference Δθ is less than 90°, this vector is considered likely to cause a collision.

[0052] In a multi-user environment, the guiding forces of the environmental vector and the user vector have different effects on user behavior. Different weights w env and w user are set for the environment and the user respectively. When the weighted distance satisfies the following relationship, the system will determine that there is a collision risk and trigger a reset:

[0053] d i ×w ≥ threshold

[0054] where threshold is the collision safety threshold; w represents the weights set for the environment and the user;

[0055] During the reset process, the system will lock the total guiding force vector at the start of the reset to prevent the target orientation from changing during rotation. The selection of the rotation direction follows the "maximum angle principle", that is, between the current direction of the user and the guiding force vector, the direction with a larger rotation angle is selected. The rotation angle is calculated as follows:

[0056] Δθ rotate = min(|θ t - θ u |, 2π - |θ t - θ u |)

[0057] where θ t is the direction of the total guiding force. The rotation gain is determined by the rotation angle (a larger rotation angle ensures a smaller rotation gain, that is, a smaller impact on the user). The rotation gain calculation formula is as follows:

[0058]

[0059] Step 5, standardize the user movement trajectory used for redirection. Use MinMaxScaler to normalize the data, scale all input data to between 0 and 1, and divide the dataset into a training set and a test set at a ratio of 80%. The data will be used for the prediction model to predict the short-term movement trajectory of the user;

[0060] Step 6, in the process of using the prediction model to predict the short-term movement trajectory of the user, the prediction model uses a multi-layer long short-term memory network LSTM as the encoder and decoder. The encoder maps the original spatio-temporal trajectory data to a high-dimensional context space, and the decoder generates accurate future position predictions based on this context space. The encoder adopts a three-layer stacked LSTM structure. Stacking multiple LSTM layers captures different features in the time series from multiple levels, enhancing its ability to express complex data. The specific steps are as follows:

[0061] The input sequence of the encoder is X = {x1, x2,..., x T}, each of which is a d-dimensional feature at the t-th moment. For the LSTM in the l-th layer, its state update formula at time step t is:

[0062]

[0063] Among them, σ(·) is the sigmoid activation function, tanh(·) is the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication; W i l 、 respectively represent the input weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which act on the input vector x t at the current moment, and are used to learn the influence of input features on the update of each gate and cell state; respectively represent the recurrent (hidden) weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which act on the hidden state vector at the previous moment and are used to learn the influence of historical hidden states on the update of the current gate and cell state; respectively represent the bias vectors for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which are used to adjust the activation thresholds for the update of each gate and cell state; they are, in order, the input gate the forget gate f t l 、the output gate the cell state update and the hidden state update

[0064] The task of the decoder is to predict the position at future time steps based on the context vector generated by the encoder. The decoder adopts the RepeatVector operation and a multi-layer LSTM structure, and generates the future trajectory sequence dynamically. The specific steps are as follows:

[0065] The goal of the decoder is to generate the trajectory for the future n future time steps The output at each time step depends on the hidden state and cell state at the previous moment. The decoder is updated in the same way as the encoder, successively updating the hidden state and cell state:

[0066]

[0067] Among them, represents the hidden state vector of the decoder at the t-th time step; represents the cell state vector of the decoder at the t-th time step; y t-1 represents the output at the previous moment input to the decoder at the t-th time step;

[0068] Subsequently, the predicted value at each time step is mapped through a fully connected layer:

[0069]

[0070] Among them, W y represents the weight matrix of the output layer; b y represents the bias vector of the output layer; respectively controlling the linear transformation and bias from the hidden state to the final predicted value.

[0071] The RepeatVector operation repeats the output of the encoder (hidden state and cell state) n future times, and gradually generates the future trajectory through the LSTM layer of the decoder, and finally outputs

[0072] This can not only effectively cope with the changing environment and user behavior, but also improve the prediction ability of the model over a long time span. Especially in the scenario of multi-user interaction, the ability to generate sequences helps to predict future change trends, so as to achieve more accurate spatio-temporal position prediction.

[0073] Step 7, introduce an attention mechanism between the encoder and the decoder, so that the model can dynamically focus on the historical data that is most important for future trajectory prediction.

[0074] Furthermore, the specific steps of the said Step 7 are:

[0075] At each time step, calculate the correlation e t between the current state s j of the decoder and the output h tj of the encoder:

[0076]

[0077] Among them, represents the transpose of the hidden state vector s t of the decoder at the t-th time step; W aRepresents the attention weight matrix in the attention mechanism, which is used to perform a linear transformation on s t and h j to capture their mutual relationship and importance in attention calculation.

[0078] Subsequently, calculate the attention weights:

[0079]

[0080] Calculate the weighted context vector c using the attention weights t :

[0081]

[0082] The final output is the decoder output enhanced by attention:

[0083]

[0084] The attention mechanism is particularly important in complex spatio-temporal trajectory prediction tasks. Especially in situations where user behavior changes significantly or the environment is complex, the attention mechanism helps the model focus on key time steps, thereby improving the accuracy of prediction.

[0085] Compared with the prior art, the present invention has the following advantages:

[0086] Through mechanisms such as dynamic potential field weight optimization and direction perception, it effectively solves the problem of insufficient adaptability caused by fixed repulsive force weights in traditional algorithms in high-density scenarios. It can significantly reduce the reset frequency in both single-user and multi-user environments and achieve near-zero reset in large spaces, verifying the adaptability of the algorithm to complex environments. Through safety distance constraints and non-linear enhancement strategies for repulsive forces, it effectively balances the interaction conflicts between users and navigation efficiency, providing a new paradigm for solving the dynamic obstacle avoidance problem in virtual-real space mapping. At the same time, by integrating temporal features and spatial attention mechanisms, it significantly improves the accuracy of short-term position prediction. Especially in large spaces with high degrees of freedom of user movement, the model's ability to capture long-term trajectory trends is more prominent. This phenomenon is consistent with the sequence modeling theory, that is, the attention mechanism can effectively alleviate the information decay problem in long sequence dependencies through dynamic weight allocation. Brief Description of the Drawings

[0087] Figure 1 It is a schematic diagram of the guidance and reset process of the multi-person redirection algorithm;

[0088] Figure 2 It is a schematic diagram of the process of predicting position information by the short-term position prediction method;

[0089] Figure 3 It is a schematic diagram of the prediction performance under different space sizes;

[0090] Figure 4 It is a comparison chart of the prediction method and the local magnification of GRU. Detailed implementation manner

[0091] To deeply understand the present invention, we will describe it comprehensively and meticulously. However, the present invention has various implementation manners and is not limited to the specific examples listed herein. The presentation of these examples aims to deepen the comprehensive understanding of the disclosed content of the present invention.

[0092] A method for multi-person redirected walking and position prediction based on artificial potential field, the method comprising the following steps:

[0093] Step 1, calculating the repulsive force vector acting on the user by the environment;

[0094] Further, the specific steps of step 1 are:

[0095] First, calculate the shortest distance between the user and each environmental obstacle to obtain a vector d pointing to the nearest point of the obstacle k :

[0096] d k = p - l k

[0097] wherein, the central position of the user is p, and the point on the corresponding boundary line segment of the obstacle that is closest to the central position p of the user is denoted as l k , the vector d k indicates the direction between the user and the nearest point of the obstacle, and the modulus ||d k || reflects the distance between the user and the obstacle;

[0098] Subsequently, normalize the vector d k and introduce a Gaussian attenuation function according to the distance from the user to each environmental obstacle:

[0099]

[0100] wherein, σ is the environmental scale parameter, ensuring that the weight increases when the user approaches the obstacle. Finally, the repulsive force vector acting on the user by the environment is defined as:

[0101]

[0102] wherein, D is the total distance from the user to all obstacles and other users:

[0103]

[0104] wherein, n represents the total number of obstacles; k represents the obstacle variable; m represents the total number of users; i represents the user variable; ||h i|| represents the distance between the user and other users.

[0105] The repulsive force generated by each obstacle is weighted by this method. That is, the closer the distance, the stronger the repulsive effect it generates, and the influence of distant obstacles decays rapidly. Different from the original algorithm that only uses the distance ratio for scaling, this method adds a weight factor in the calculation, so as to strengthen the redirection signal in the case of approaching obstacles and ensure that the user can avoid potential collision hazards in time.

[0106] Step 2: Calculate the repulsive force vector exerted by other users on the current user;

[0107] Furthermore, the specific steps of step 2 are as follows:

[0108] For user interactions, this algorithm adopts a similar idea. For each pair of users, first calculate the difference vector h i :

[0109] h i = p - c k

[0110] where c k is the position of another user, then use their respective movement directions to determine the relative angle, and accordingly calculate the normalized relative head-on factor k i :

[0111]

[0112] where θ1 and θ2 are the angles between the movement directions of the current user and other users and the connecting line respectively. This factor takes a higher value when the users are moving head-on towards each other, thus amplifying the repulsive force between them; conversely, when the movement directions are parallel or away from each other, the repulsive force is weaker.

[0113] On this basis, a minimum distance mechanism is introduced. When the safety threshold s, d < s, calculate the additional safety repulsive force F safety :

[0114]

[0115] Finally, the repulsive force vector exerted by other users on the current user is defined as:

[0116]

[0117] where k i represents the relative head-on factor.

[0118] An additional weight regulation is introduced to smoothly adjust the redirection force in a user-dense scenario and improve the naturalness and accuracy of the overall movement.

[0119] Step 3: Calculate the resultant repulsive force vector. The repulsive force vector is calculated with the boundaries of the physical space and other users as obstacles. Finally, the resultant repulsive force vector is obtained by weighted summation of the environmental repulsive force and the user repulsive force. Extract the direction of the resultant repulsive force vector as the turning direction of the user to guide the user to walk and obtain the user's movement trajectory;

[0120] Further, the specific steps of Step 3 are as follows:

[0121] The concept of user density is introduced to make the synthesis result dynamically reflect the distribution of users in the environment. The formula is:

[0122]

[0123] where N represents the number of users and radius represents the radius;

[0124] Define the weights of the environmental and user repulsive forces respectively according to the magnitude of the user density:

[0125]

[0126] where α represents the environmental repulsive force weight; β represents the user repulsive force weight;

[0127] In the case of dense users, automatically reduce the influence of the environmental repulsive force and at the same time enhance the repulsive force between users to more precisely adjust the user's movement trajectory. The synthesized total repulsive force vector is obtained through the following formula:

[0128]

[0129] where t represents the synthesized total repulsive force vector.

[0130] Give a greater weight to the environmental repulsive force during synthesis so as to give priority to ensuring collision avoidance safety when approaching the wall. After this dynamic weighted fusion, the obtained total force vector not only reflects the relative effects of each component, but also can flexibly adjust the redirection strategy according to the actual situation, so as to achieve a more concealed and smooth turning operation between the virtual and real worlds.

[0131] Step 4: When the user approaches an obstacle or other users in the virtual environment and there is a risk of collision, introduce reset as an emergency strategy. Its goal is the safe operation of virtual navigation, providing safety guarantee for immersive virtual walking. The system uses the total guiding force vector at the start of reset as the target orientation of the user after reset to ensure the consistency between the user and the virtual path in the physical space and avoid physical collisions at the same time;

[0132] Further, the specific steps of Step 4 are as follows:

[0133] Calculate the Euclidean distance between the user and the environmental vector and the vectors of other users:

[0134]

[0135] wherein, v i =(v ix , v iy ) is the vector of the environmental obstacle or other users. When the norm of any vector is greater than the set safety threshold, there is a risk of collision. Furthermore, the angle difference between the current traveling direction and the guiding force vectors of the environment and other users is calculated:

[0136] Δθ = |θ u - θ v | = |(θ u - θ v + π) mod 2π - π|

[0137] wherein, θ u is the angle between the moving direction of the current user and the x-axis, and θ v is the angle between the direction of the obstacle and the x-axis. When the angle difference Δθ is less than 90°, the vector is regarded as likely to cause a collision.

[0138] In a multi-user environment, the guiding forces of the environmental vector and the user vector have different effects on user behavior. Different weights w env and w user are set for the environment and the user respectively. When the weighted distance satisfies the following relational expression, the system will determine that there is a risk of collision and trigger a reset:

[0139] d i × w ≥ threshold

[0140] wherein, threshold is the collision safety threshold; w represents the weights set for the environment and the user;

[0141] During the reset process, the system will lock the total guiding force vector at the start of the reset to prevent the target orientation from changing during the rotation. The selection of the rotation direction follows the "maximum angle principle", that is, between the current direction of the user and the guiding force vector, the direction with a larger rotation angle is selected. The rotation angle is calculated as follows:

[0142] Δθ rotate = min(|θ t - θ u |, 2π - |θ t - θ u |)

[0143] wherein, θ t is the direction of the total guiding force. The rotation gain is determined through the rotation angle (a larger rotation angle ensures a smaller rotation gain, that is, a smaller impact on the user). The calculation formula for the rotation gain is as follows:

[0144]

[0145] Step 5: Standardize the user movement trajectories used for redirection. Normalize the data using MinMaxScaler, scale all data to between 0 and 1, and divide the dataset into a training set and a test set at a ratio of 80%. The data is used for the prediction model to predict the short-term movement trajectories of users.

[0146] Step 6: During the process of using the prediction model to predict the short-term movement trajectories of users, the prediction model uses a multi-layer long short-term memory network (LSTM) as the encoder and decoder. The encoder maps the original spatio-temporal trajectory data to a high-dimensional context space, and the decoder generates accurate future position predictions based on this context space. The encoder uses a three-layer stacked LSTM structure. Stacking multiple LSTM layers captures different features in the time series from multiple levels, enhancing its ability to represent complex data. The specific steps are as follows:

[0147] The input sequence of the encoder is X = {x1, x2,..., x T}, where each is a d-dimensional feature at time step t. For the LSTM in the l-th layer, its state update formula at time step t is:

[0148]

[0149] where σ(·) is the sigmoid activation function, tanh(·) is the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication;

[0150] W i l and respectively represent the input weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which act on the input vector x t at the current moment, and are used to learn the influence of input features on the update of each gate and cell state; respectively represent the recurrent (hidden) weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which act on the hidden state vector at the previous moment and are used to learn the influence of historical hidden states on the update of the current gate and cell state; respectively represent the bias vectors for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer of the LSTM, which are used to adjust the activation thresholds for the update of each gate and cell state; in order, they are the input gate the forget gate f t l the output gate the cell state update and the hidden state update

[0151] The task of the decoder is to predict the position of the future time step based on the context vector generated by the encoder. The decoder uses RepeatVector operation and multi-layer LSTM structure to dynamically generate the future trajectory sequence. The specific steps are as follows:

[0152] The goal of the decoder is to generate the future n future The trajectory of time steps The output of each time step depends on the hidden state and cell state of the previous moment. The decoder updates in the same way as the encoder, updating the hidden state and cell state in turn:

[0153]

[0154] in, represents the hidden state vector of the decoder at the tth time step; represents the cell state vector of the decoder at the tth time step; y t-1 Represents the output of the decoder at the moment before the input at the tth time step;

[0155] The predicted value for each subsequent time step Mapping through a fully connected layer:

[0156]

[0157] Among them, W y represents the weight matrix of the output layer; b y Represents the bias vector of the output layer; it controls the linear transformation and bias from the hidden state to the final predicted value respectively.

[0158] The RepeatVector operation repeats the encoder output (hidden state and cell state) by n future times, and gradually generates future trajectories through the LSTM layer of the decoder, and finally outputs

[0159] This not only effectively copes with changing environments and user behaviors, but also improves the model's predictive capabilities over long time spans. In particular, in scenarios with multiple users interacting, the ability to generate sequences helps predict future trends, leading to more accurate spatiotemporal location predictions.

[0160] In step 7, an attention mechanism is introduced between the encoder and decoder, so that the model can dynamically focus on the most important historical data for future trajectory prediction.

[0161] Furthermore, the specific steps of step 7 are:

[0162] At each time step, calculate the current state of the decoder st and the correlation e with the encoder output h j : tj :

[0163]

[0164] wherein, represents the transpose of the hidden state vector s of the decoder at the t-th time step; W t ; a represents the attention weight matrix in the attention mechanism, which is used to perform a linear transformation on s t and h j to capture their mutual relationship and importance in the attention calculation.

[0165] Subsequently, the attention weights are calculated:

[0166]

[0167] The weighted context vector c is calculated using the attention weights t :

[0168]

[0169] The final output is the decoder output enhanced by attention:

[0170]

[0171] The attention mechanism is particularly important in complex spatio-temporal trajectory prediction tasks, especially when the user behavior changes greatly or the environment is complex. The attention mechanism helps the model focus on key time steps, thus improving the prediction accuracy.

[0172] The simulation method is a commonly used method for studying redirected walking. The redirected method APF-WPR and the position prediction method proposed by the invention were evaluated on the simulation dataset. The simulation dataset consists of simulated user movement trajectories, and the movement trajectory of each user includes physical positions and virtual positions.

[0173] Table 1 Comparison of results of different redirected methods for a single user on the simulation dataset

[0174]

[0175] Table 1 shows the comparison results of the evaluation metrics of the method proposed in this invention and some mainstream single-user redirection methods on the simulated dataset. The proposed method is superior to the recent method APF-S2T and the algorithm S2C which has been proven to be the best-performing in such tasks before, indicating that the minimum safety distance mechanism strengthens the role of environmental repulsion when approaching the boundary, enabling users to adjust their paths earlier, reducing the need for emergency resets, and effectively improving the redirection performance. Compared with the S2C method that guides users to turn towards the center, the method proposed in this invention has a significant improvement in rooms of different sizes; compared with APF-RDW, in small spaces, the number of resets of users is reduced by 20% compared to APF-RDW, and the average distance between resets is increased by 25%, and it is superior to this method in other scenarios; compared with the recent APF-S2T method, this method is slightly lower than APF-S2T in medium-sized spaces, but has obvious improvements in small and large spaces, indicating the applicability of this method to rooms of different sizes.

[0176] Table 2 Comparison of results of different redirection methods for multiple users on the simulated dataset

[0177]

[0178]

[0179] Multi-user experiments were conducted on the simulated dataset, as shown in Table 2. The method proposed in this invention is superior to the APF-RDW method in both the number of resets and the distance between resets. It is slightly lower than APF-S2T in small and medium-sized spaces with a small number of people, and is superior to APF-S2T under other conditions. The experimental data further proves that in most test scenarios, the algorithm of this invention can further reduce the number of resets. Especially in the case of a large physical space, the number of resets is close to 0, which will greatly improve the walking experience.

[0180] To verify the performance of the prediction method, the prediction accuracy of this method was compared with that of traditional LSTM models and GRU models at different physical space scales (5×5m, 10×10m, 20×20m, 30×30m). Figure 3 Shows the performance of the three models in terms of mean square error. The results further show that this method is significantly superior to the commonly used LSTM and GRU models in the virtual reality field at all space scales. In small spaces, due to the limited movement of users, the trajectory repeatability is relatively high. The attention mechanism can accurately capture periodic patterns, significantly reducing the prediction error, making the error smaller and more concentrated.

[0181] Figure 4It shows a partial magnification comparison between the proposed method and the GRU method. It is worth noting that in a large space, the prediction error of the proposed method does not increase with the expansion of the space. Instead, due to the increased freedom of user movement and enhanced path continuity, the model's ability to capture long-term trends is more prominent, resulting in a smaller and more stable prediction error, significantly outperforming the other two methods. This verifies the effectiveness of the attention mechanism in dynamically adjusting the weights of historical information in the decoder. Especially in sparse scenarios, the model can suppress local noise interference by enhancing the attention weights of long-distance time steps.

[0182] The content not detailedly described in the specification of the present invention belongs to the prior art well-known to those skilled in the art. Although the illustrative specific embodiments of the present invention have been described above for the understanding of those skilled in the art of the present technology, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions made using the inventive concept of the present invention are within the scope of protection.

Claims

1. A method for multi-person redirected walking and position prediction based on artificial potential field, characterized in that The method includes the following steps: Step 1, calculate the repulsive force vector exerted by the environment on the user; Step 2, calculate the repulsive force vector exerted by other users on the current user; Step 3, calculate the resultant repulsive force vector. Calculate the repulsive force vector with the boundaries of the physical space and other users as obstacles. Finally, the resultant repulsive force vector is obtained by weighted summation of the environmental repulsive force and the user repulsive force. Extract the direction of the resultant repulsive force vector as the turning direction of the user, and guide the user to walk to obtain the user's movement trajectory; Step 4, when the user approaches an obstacle or other users in the virtual environment and there is a risk of collision, introduce reset as an emergency strategy. The redirection system uses the total guiding force vector at the start of the reset as the target orientation after the user's reset, ensuring the user's consistency with the virtual path in the physical space while avoiding physical collisions; Step 5, standardize the user movement trajectory used by the redirection system. Use MinMaxScaler to normalize the data, scale all data between 0 and 1, and divide the dataset into a training set and a test set at a ratio of 80%. The data is used for the prediction model to predict the user's short-term movement trajectory; Step 6, during the process of using the prediction model to predict the user's short-term movement trajectory, the prediction model uses a multi-layer long short-term memory network LSTM as the encoder and decoder. The encoder maps the original spatio-temporal trajectory data to a high-dimensional context space, and the decoder generates accurate future position predictions based on this context space; Step 7, introduce an attention mechanism between the encoder and decoder, enabling the prediction model to dynamically focus on the historical data for future trajectory prediction and accurately predict the user's short-term movement trajectory.

2. The method for multi-person redirected walking and position prediction based on artificial potential field according to claim 1, characterized in that, The specific operation of calculating the repulsive force vector exerted by the environment on the user in Step 1 is as follows: First, calculate the shortest distance between the user and each environmental obstacle to obtain the vector d pointing to the nearest point of the obstacle k : d k = p - l k Among them, the user center position is p, and the point on the boundary line segment corresponding to the obstacle that is closest to the user center position p is denoted as l k , the vector d k indicates the direction between the user and the closest point to the obstacle, and the modulus ||d k || reflects the distance between the user and the obstacle; Subsequently, by normalizing the vector d k and introducing a Gaussian decay function based on the distance from the user to each environmental obstacle: Among them, σ is the environmental scale parameter, ensuring that the weight increases when the user approaches an obstacle. Finally, the repulsive force vector exerted by the environment on the user is defined as: Among them, D is the total distance from the user to all obstacles and other users: Among them, n represents the total number of obstacles; k represents the obstacle variable; m represents the total number of users; i represents the user variable; ||h i || represents the distance between a user and other users.

3. A method for multi-person redirected walking and position prediction based on artificial potential field according to claim 2, characterized in that The specific operation of calculating the repulsive force vector exerted by other users on the user in Step 2 is as follows: For each pair of users, first calculate the difference vector h between the two i : h i = p - c k where c k is the position of another user, and the modulus ||h i || reflects the distance between the user and the obstacle. Then, the relative angle is determined using their respective movement directions, and based on this, the normalized relative head direction factor k i is obtained as follows: Wherein, θ1 and θ2 are respectively the angles between the movement direction of the current user and the connection line with other users. A minimum distance mechanism is introduced, and a safety threshold s is set. When d < s, an additional safety repulsive force F is calculated safety : Finally, the repulsive force vector generated by other users acting on the current user is defined as: where k i represents a relative headward factor.

4. A method for multi-person redirected walking and position prediction based on artificial potential field according to claim 3, characterized in that, The specific operation of Step 3 for calculating the resultant repulsive force vector, calculating the repulsive force vector with the boundaries of the physical space and other users as obstacles, and finally obtaining the resultant repulsive force vector by weighted summation of the environmental repulsive force and the user repulsive force, and extracting the direction of the resultant repulsive force vector as the turning direction of the user to guide the user to walk to obtain the user's movement trajectory is as follows: Introduce the concept of user density to make the synthesis result dynamically reflect the distribution of users in the environment. The formula is: Among them, N represents the number of users, and radius represents the radius; Define the weights of the environmental and user repulsive forces respectively according to the size of the user density: Among them, α represents the environmental repulsive force weight; β represents the user repulsive force weight; The synthesized total repulsive force vector is obtained through the following formula: Among them, t represents the synthesized total repulsive force vector.

5. A method for multi-person redirected walking and position prediction based on artificial potential field according to claim 4, characterized in that, In step 4, when the user approaches an obstacle or another user in the virtual environment and there is a risk of collision, reset is introduced as an emergency strategy. The system uses the total guiding force vector at the start of the reset as the target orientation of the user after reset to ensure the consistency between the user and the virtual path in the physical space and avoid physical collisions. The specific process is as follows: Calculate the Euclidean distance between the user vector and the environment vector and other user vectors: where, v i =(v ix , v iy ) is the vector of the environmental obstacle or other users. When the norm of any vector is greater than the set safety threshold, there is a risk of collision. Furthermore, calculate the angle difference between the current traveling direction and the guiding force vectors of the environment and other users: Δθ = |θ u - θ v | = |(θ u - θ v + π) mod 2π - π| where, θ u is the angle between the moving direction of the current user and the x-axis, and θ v is the angle between the direction of the obstacle and the x-axis. When the angle difference Δθ is less than 90°, this vector is regarded as likely to cause a collision; Set different weights for the environment and the user as w env and w user , when the weighted distance satisfies the following relational expression, the system will determine that there is a collision risk and trigger a reset: d i × w ≥ threshold where threshold is the collision safety threshold; w represents the weights set for the environment and the user; During the reset process, the selection of the rotation direction follows the "maximum angle principle", and the rotation angle is calculated as follows: Δθ rotate = min(|θ t - θ u |, 2π - |θ t - θ u |) where, θ t is the direction of the total guiding force; the rotation gain is determined by the rotation angle, and the calculation formula for the rotation gain is as follows:

6. A method for multi-person redirected walking and position prediction based on artificial potential field according to claim 5, characterized in that, In step 6, during the process of using the prediction model to predict the short-term motion trajectory of the user, the prediction model uses a multi-layer long short-term memory network (LSTM) as the encoder and decoder. The encoder maps the original spatio-temporal trajectory data to a high-dimensional context space, and the decoder generates accurate future position predictions based on this context space. Among them, the encoder in the prediction model adopts a three-layer stacked LSTM structure. Stacking multiple LSTM layers captures different features in the time series from multiple levels, enhancing the encoder's ability to express complex data. The specific steps are as follows: The input sequence is X = {x1, x2,..., x T}, each of which is a d-dimensional feature at time step t. For the LSTM at the l-th layer, its state update formula at time step t is as follows: where, σ(·) is the sigmoid activation function, tanh(·) is the hyperbolic tangent activation function, and ⊙ represents element-wise multiplication; represent the input weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer LSTM, respectively, which act on the input vector x at the current time t and are used to learn the influence of input features on the update of each gate and cell state; represent the recurrent weight matrices for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer LSTM, respectively, which act on the hidden state vector at the previous time and are used to learn the influence of historical hidden states on the update of the current gate and cell state; represent the bias vectors for the input gate, forget gate, output gate, and candidate cell state update in the l-th layer LSTM, respectively, which are used to adjust the activation thresholds for the update of each gate and cell state; they are, in order, the input gate forget gate f t l output gate cell state update and hidden state update The task of the decoder is to predict the position at future time steps based on the context vector generated by the encoder. The decoder adopts the RepeatVector operation and a multi-layer LSTM structure, and dynamically generates the future trajectory sequence. The specific steps are as follows: The goal of the decoder is to generate the trajectories for the next n future time steps The output at each time step depends on the hidden state and cell state at the previous time step. The decoder is updated in the same way as the encoder, successively updating the hidden state and cell state: Among them, represents the hidden state vector of the decoder at the t-th time step; represents the cell state vector of the decoder at the t-th time step; y t-1 represents the output of the previous moment input by the decoder at the t-th time step; The predicted values for each subsequent time step Are mapped through a fully connected layer: Among them, W y represents the weight matrix of the output layer; b y represents the bias vector of the output layer; respectively control the linear transformation and bias from the hidden state to the final predicted value; The RepeatVector operation repeats the output of the encoder n future times and gradually generates the future trajectory through the LSTM layer of the decoder, and finally outputs 7. A method for multi-person redirected walking and position prediction based on artificial potential field according to claim 6, characterized in that In step 7, an attention mechanism is introduced between the encoder and the decoder to enable the prediction model to dynamically focus on the historical data for future trajectory prediction and accurately predict the short-term motion trajectory of the user. The specific steps are as follows: At each time step, compute the correlation e between the current decoder state s t and the encoder output h j : tj ​ Among them, represents the transpose of the hidden state vector s of the decoder at the t-th time step t ; W a represents the attention weight matrix in the attention mechanism; Subsequently, calculate the attention weights: Calculate the weighted context vector c using attention weights t : The final output is the decoder output enhanced by attention:

Citation Information

Patent Citations

  • Large-scale virtual scene roaming method based on multi-person redirection

    CN112150634A

  • Mechanical arm trajectory planning and collision detection method based on augmented reality

    CN118155107A

  • Seq2Seq-AM model construction method and pedestrian trajectory prediction and safety risk early warning method

    CN119599208A

  • Robotic systems using learning to provide real-time vibration-supressing control

    US20220184802A1

  • Systems and methods of providing deep learning based neurocognitive impairment evaluation using extended reality

    US20240186009A1

Cited By

  • Robot automatic obstacle avoidance system and method based on multi-source sensor

    CN121165743A