A computer-implemented method for collecting spatiotemporal behaviors and generating a spatiotemporal behavior track of a subject wearing a Virtual Reality, VR, display device or a Mixed Reality, MR, display device, the method comprising: obtaining a first time series containing a plurality of sampling points (S101), wherein the plurality of sampling points are vertical projections of a center point of the VR display device or the MR display device to a ground of a virtual reality scene or a mixed reality scene, respectively; selecting any one of the plurality of sampling points as a current sampling point (S102); setting a window time based on a sampling time of the current sampling point, and finding a first sampling point and a last sampling point within the window time, wherein a middle time of the window time is the sampling time of the current sampling point, and the window time comprises sampling times corresponding to at least three sampling points; taking a first position as a center of a circle, wherein the first position is a center point of the VR display device or the MR display device corresponding to the current sampling point; determining an angle included between a first line connecting the first position with the first sampling point and a second line connecting the first position with the last sampling point; calculating an angular speed between the first sampling point and the last sampling point according to the angle between the first line and the second line and a time interval between the first sampling point and the last sampling point; and if the angular speed is greater than a preset angular speed threshold, taking the current sampling point as a displacement point; performing the above process on each of others of the plurality of sampling points to obtain a second time series containing a plurality of displacement points; and drawing a moving track map based on the second time series (S103). obtaining a first time series containing a plurality of sampling points (S101), wherein the plurality of sampling points are vertical projections of a center point of the VR display device or the MR display device to a ground of a virtual reality scene or a mixed reality scene, respectively; selecting any one of the plurality of sampling points as a current sampling point (S102); setting a window time based on a sampling time of the current sampling point, and finding a first sampling point and a last sampling point within the window time, wherein a middle time of the window time is the sampling time of the current sampling point, and the window time comprises sampling times corresponding to at least three sampling points; taking a first position as a center of a circle, wherein the first position is a center point of the VR display device or the MR display device corresponding to the current sampling point; determining an angle included between a first line connecting the first position with the first sampling point and a second line connecting the first position with the last sampling point; calculating an angular speed between the first sampling point and the last sampling point according to the angle between the first line and the second line and a time interval between the first sampling point and the last sampling point; and if the angular speed is greater than a preset angular speed threshold, taking the current sampling point as a displacement point; performing the above process on each of others of the plurality of sampling points to obtain a second time series containing a plurality of displacement points; and drawing a moving track map based on the second time series (S103). <EOS>