A pedestrian trajectory data rectification method, device, equipment and medium
By acquiring pedestrian trajectory data, performing structured processing and mean calculation, and using preset error values for location correction, the problem of reliance on map vendors in existing technologies is solved, and real-time correction of pedestrian trajectory data and system adaptability are achieved.
Patent Information
- Application Number
- CN202310620289.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-05-29
AI Technical Summary
Existing pedestrian trajectory tracking systems rely on third-party map data, which limits the methods of location correction and makes it impossible to seamlessly switch between coordinates from different map vendors. Furthermore, existing methods cannot achieve real-time and efficient trajectory queries.
By acquiring pedestrian trajectory data, performing structured processing, calculating the trajectory mean and determining the offset, and using preset error values for position correction, real-time correction processing is achieved, avoiding dependence on third-party map data.
It enables real-time correction of pedestrian trajectory data, eliminates trajectory sampling value deviations caused by interference, and is compatible with the requirements of any third-party map manufacturer and business system without the need for system redevelopment.
Smart Images

Figure CN116662469B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of navigation technology, and in particular to a pedestrian trajectory data rectification method, device, equipment and medium. BACKGROUND
[0002] Most of the existing personnel trajectory tracking systems are based on navigation maps. The historical trajectory of pedestrians is dependent on third-party map data and road network data, and the position rectification is performed based on the third-party data as a reference. However, this position rectification method is completely limited by map manufacturers, and the map coordinates between third-party manufacturers are not unified, and seamless switching cannot be performed. SUMMARY
[0003] Therefore, the embodiments of the present application provide a pedestrian trajectory data rectification method, device, equipment and medium to solve the problem that the position rectification method of the historical trajectory of the existing pedestrian is completely limited by map manufacturers, and the map coordinates between third-party manufacturers are not unified, and seamless switching cannot be performed.
[0004] According to a first aspect, the embodiments of the present application provide a pedestrian trajectory data rectification method, which comprises:
[0005] Obtaining pedestrian trajectory data and obtaining trajectory structured data based on the pedestrian trajectory data; the trajectory structured data includes the longitude, the latitude, the trajectory local time and the trajectory acquisition timestamp of the earth center coordinate system;
[0006] Obtaining the trajectory mean value of the trajectory structured data within a preset time, determining whether the trajectory structured data is offset based on the trajectory mean value, and performing position rectification on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data is offset; the offset is that the distance between the trajectory structured data and the trajectory mean value exceeds the preset error value; the preset error value is used to represent the travel distance of the pedestrian within the preset collection time; the preset collection time is the collection interval between adjacent two pedestrian trajectory data.
[0007] In combination with the first aspect, in a first implementation manner of the first aspect, the obtaining of the trajectory mean value of the trajectory structured data within a preset time, the determination of whether the trajectory structured data is offset based on the trajectory mean value, and the performance of position rectification on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data is offset, specifically comprises:
[0008] Storing the trajectory structured data into a memory list, and listening to whether the data in the memory list meets a position rectification mechanism; the position rectification mechanism is that the number of trajectory structured data exceeds a preset number and the number is increasing;
[0009] determine that the distance exceeds the preset error value, obtain a previous trajectory structured data adjacent to the trajectory structured data, perform position correction on the trajectory structured data based on the previous trajectory structured data and the preset error value, and generate position correction data corresponding to the trajectory structured data;
[0010] determine that the distance exceeds the preset error value, obtain a previous trajectory structured data adjacent to the trajectory structured data, perform position correction on the trajectory structured data based on the previous trajectory structured data and the preset error value, and generate position correction data corresponding to the trajectory structured data;
[0011] update the trajectory structured data to the position correction data.
[0012] In the second implementation form of the first aspect, in combination with the first implementation form of the first aspect, the step of determining that the distance exceeds the preset error value, obtaining a previous trajectory structured data adjacent to the trajectory structured data, performing position correction on the trajectory structured data based on the previous trajectory structured data and the preset error value, and generating position correction data corresponding to the trajectory structured data, specifically comprises:
[0013] determine all point values of the trajectory structured data within the preset time;
[0014] determine a maximum point value and a minimum point value of the point values;
[0015] determine a point mean value of point values other than the maximum point value and the minimum point value, to obtain a trajectory mean value;
[0016] based on the trajectory structured data and the previous trajectory structured data adjacent thereto, calculate the distance between the trajectory structured data and the trajectory mean value.
[0017] In the third implementation form of the first aspect, in combination with the first implementation form of the first aspect, the step of determining that the distance exceeds the preset error value, obtaining a previous trajectory structured data adjacent to the trajectory structured data, performing position correction on the trajectory structured data based on the previous trajectory structured data and the preset error value, and generating position correction data corresponding to the trajectory structured data, specifically comprises:
[0018] determine that the distance exceeds the preset error value, and obtain a previous trajectory structured data adjacent to the trajectory structured data;
[0019] determine an amplitude direction between the trajectory structured data and the previous trajectory structured data;
[0020] based on the amplitude direction, accumulate the preset error value to the previous trajectory structured data to generate position correction data corresponding to the trajectory structured data.
[0021] In combination with the first aspect, in the fourth implementation form of the first aspect, the method further comprises the following steps:
[0022] persistently save the trajectory structured data after position correction.
[0023] With reference to the first aspect, in a fifth implementation form of the first aspect, the pedestrian trajectory data is acquired, and trajectory structured data is obtained based on the pedestrian trajectory data, specifically including:
[0024] The pedestrian trajectory data is acquired every preset collection time based on the preset collection time.
[0025] The pedestrian trajectory data is structured to obtain trajectory structured data.
[0026] With reference to the first aspect, in a sixth implementation form of the first aspect, the method further includes the following steps after the step of acquiring the pedestrian trajectory data and obtaining the trajectory structured data based on the pedestrian trajectory data:
[0027] Based on the information contained in the trajectory structured data, invalid trajectory structured data is deleted.
[0028] According to the second aspect, an embodiment of the present application further provides a pedestrian trajectory data rectification device, the device comprising:
[0029] A trajectory collection module is configured to acquire pedestrian trajectory data and obtain trajectory structured data based on the pedestrian trajectory data; the trajectory structured data contains longitude, latitude, trajectory local time and trajectory acquisition timestamp in the earth center coordinate system.
[0030] A trajectory rectification module is configured to acquire a trajectory mean value of the trajectory structured data within a preset time, determine whether the trajectory structured data is offset based on the trajectory mean value, and perform position rectification on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data is offset; the offset refers to a distance between the trajectory structured data and the trajectory mean value exceeding the preset error value; the preset error value is used to represent a travel distance of the pedestrian within the preset collection time; and the preset collection time refers to a collection interval between adjacent two pedestrian trajectory data.
[0031] According to the third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the pedestrian trajectory data rectification method according to any one of the above aspects.
[0032] According to the fourth aspect, an embodiment of the present application further provides a non-transitory computer readable storage medium, which stores a computer program executable by a processor to implement the steps of the pedestrian trajectory data rectification method according to any one of the above aspects.
[0033] The pedestrian trajectory data correction method, device, equipment and medium provided by the application can realize real-time correction and modification of pedestrian trajectory data, can eliminate trajectory sampling value deviation caused by interference, does not depend on any third-party map data, can adapt to requirements of any third-party map manufacturer and business system on pedestrian navigation data, does not need to develop a system again, and can be connected in a module form at any time. BRIEF DESCRIPTION OF DRAWINGS
[0034] The features and advantages of the application will be more clearly understood through the following detailed description taken in conjunction with the accompanying drawings, which are given by way of illustration and are not to be considered limiting of the application, in which:
[0035] Figure 1 Fig. 1 shows one of flow diagrams of the pedestrian trajectory data correction method provided by the application;
[0036] Figure 2 Fig. 2 shows a specific flow diagram of step S30 in the pedestrian trajectory data correction method provided by the application;
[0037] Figure 3 Fig. 3 shows a specific flow diagram of step S32 in the pedestrian trajectory data correction method provided by the application;
[0038] Figure 4 Fig. 4 shows a specific flow diagram of step S33 in the pedestrian trajectory data correction method provided by the application;
[0039] Figure 5 Fig. 5 shows another of flow diagrams of the pedestrian trajectory data correction method provided by the application;
[0040] Figure 6 Fig. 6 shows a specific flow diagram of step S10 in the pedestrian trajectory data correction method provided by the application;
[0041] Figure 7 Fig. 7 shows a third of flow diagrams of the pedestrian trajectory data correction method provided by the application;
[0042] Figure 8 Fig. 8 shows a structural diagram of the pedestrian trajectory data correction device provided by the application;
[0043] Figure 9 Fig. 9 shows a structural diagram of the electronic equipment of the pedestrian trajectory data correction method provided by the application. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0045] Most of the existing personnel trajectory tracking systems are based on navigation maps. The navigation map relies on the road coordinate position correction function of the map vendor. For historical trajectory query, especially for the historical trajectory of pedestrians, the position correction and the estimated travel speed are dependent on the third-party map software function and road network data information. The geographic position information obtained is also based on the specific coordinate system information provided by the map Application Program Interface (API), and is not universal to other third-party map systems. Therefore, if the business system changes the third-party map provider, the map trajectory module needs to be redeveloped to adapt to different map vendors, so as to perform position, trajectory and other query services. The existing business system cannot achieve accurate positioning and trajectory query without relying on the third-party map system.
[0046] At the same time, the pedestrian trajectory is basically queried through the later time period. Such a way has a lag for trajectory query, and cannot achieve real-time trajectory query. Even if the trajectory is corrected in position by various position correction algorithms, the query is slow and inefficient.
[0047] In order to solve the above problems, a pedestrian trajectory data correction method is provided in the embodiment, which is aimed at correcting the pedestrian trajectory data in real time without relying on third-party data. The pedestrian trajectory data correction method of the present application can be used in electronic devices, including but not limited to computers, mobile terminals, wearable smart devices, etc. Figure 1 is a flowchart of the pedestrian trajectory data correction method according to the embodiment of the present application, as shown in Figure 1 The method comprises the following steps:
[0048] S10, obtain pedestrian trajectory data, and obtain trajectory structured data based on the pedestrian trajectory data. In the embodiment of the application, the GPS data is collected by an electronic device provided with a Global Positional System (GPS) module, and the GPS data is the pedestrian trajectory data. The electronic device includes but is not limited to a computer, a wearable smart device, and the like. As some preferred embodiments of the application, a background running service is started in the electronic device provided with the GPS module, and a GPS data is obtained by the background every certain time. The electronic device collects the GPS data in this way.
[0049] It should be noted that the original GPS data contains latitude (lat), longitude (lng), timestamp, current time, and the like.
[0050] In step S10, the pedestrian trajectory data is also processed into trajectory structured data, that is, the GPS data is converted into structured data and saved as a specific data structure. The trajectory structured data contains longitude, latitude, trajectory local time, and trajectory acquisition timestamp (GPS satellite timestamp) in the Earth's center coordinate system (GPS-84 coordinate system).
[0051] In the embodiment of the application, the GPS module is set to collect the original pedestrian trajectory data every certain preset collection time, and the preset collection time is the collection interval between two adjacent pedestrian trajectory data. For example, the GPS module is set to collect data every 1 second, and the data is processed in a structured manner synchronously, so that the data collection, processing, and time continuity and data non-repeatability are ensured.
[0052] S30, obtain a trajectory mean value of the trajectory structured data within a preset time, determine whether the trajectory structured data is offset based on the trajectory mean value, and perform position rectification on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data is offset.
[0053] In the embodiment of the application, the offset is that the distance between the trajectory structured data and the trajectory mean value exceeds the preset error value; and the preset error value is used to represent the travel distance of the pedestrian within the preset collection time, that is, the travel step is obtained based on the travel speed of the pedestrian and the preset collection time.
[0054] When the distance between the trajectory structured data and the trajectory mean value exceeds the preset error value, it indicates that the trajectory structured data is offset, and the position of the abnormal point is rectified, and the point value of the point is updated. The original point and the correction operation can be output to a log file, so as to facilitate corresponding recording and query.
[0055] The provided pedestrian trajectory data correction method of the present application carries out structured processing on the obtained original pedestrian trajectory data, then obtains the trajectory mean value of the trajectory structured data within a preset time, judges whether the current trajectory structured data produces deviation through the trajectory mean value, and when deviation is produced, carries out correction and modification on the deviated trajectory based on the travel distance of the pedestrian within a preset collection time, so as to realize real-time correction and modification processing of the pedestrian trajectory data, eliminate the trajectory sampling value deviation caused by the interference, and simultaneously adapt to the requirements of any third-party map manufacturer and business system on the pedestrian navigation data, without the need of redeveloping the system, and can be connected in the form of a module at any time.
[0056] The present application will be described below in combination with Figure 2 The pedestrian trajectory data correction method of the present application is described, and step S30 specifically comprises:
[0057] S31, store the trajectory structured data into the memory list, and listen to whether the data in the memory list satisfies the position correction mechanism. In the embodiment of the present application, the position correction mechanism is that the number of trajectory structured data exceeds a preset number and the number is increasing.
[0058] In this method, the data is calculated in the memory, and does not need to be read through the I / O end, so that the analysis and processing speed of the data presents an exponential level. The real-time display of the trajectory of the business system can be met.
[0059] After the trajectory structured data is obtained, the trajectory structured data is stored into the memory of the electronic device, and a process Thread listening to the memory list is started. After each new trajectory structured data enters the memory list, this asynchronous mechanism can listen to the change of the data, and triggers the judgment mechanism based on the change of the data to judge whether the position correction mechanism is satisfied and to start the position correction processing.
[0060] Preferably, in order to make the data correct and effective, the preset number is set to 12, that is, when the process Thread listens to find that the trajectory structured data stored in the memory list exceeds 12 and the number of trajectory structured data is increasing (for example, the 13th data is stored, at this time, the process Thread listens to the state of the memory list relative to the storage of 12 data before, the storage number of trajectory structured data exceeds 12 and is increasing the storage amount of data), the position correction mechanism is triggered to carry out the position correction processing. As can be seen, the position correction mechanism in this method is a dynamic mechanism, when the data in the memory list exceeds the preset number and is still continuously increasing, each time new trajectory structured data is stored into the memory list of the electronic device, the position correction mechanism is triggered to carry out trajectory position correction on the new trajectory structured data.
[0061] The process Thread listens to the memory list of the electronic device, and this asynchronous mode can not affect the running of the main system and can also perform multitasking work.
[0062] As some preferred embodiments of the embodiments of the application, the process Thread is set to sleep if new data is not listened to for more than a preset listening time, so as to prevent the process Thread from being in a running state all the time and wasting more system resources.
[0063] S32, determining that the position correction mechanism is met, calculating the trajectory mean value of the trajectory structured data within a preset time, and determining the distance between the trajectory structured data and the trajectory mean value.
[0064] When it is determined that the position correction mechanism is met, the current trajectory structured data and the trajectory structured data within a preset time before the current trajectory structured data are stored in a calculation list clist. It should be noted that, since the GPS module is set to collect data every preset collection time, step S32 is to store the current trajectory structured data and a plurality of continuous trajectory structured data before the current trajectory structured data in the calculation list clist.
[0065] More specifically, the step is to store the current trajectory structured data and 12 continuous trajectory structured data before the current trajectory structured data in the calculation list clist. Then, the trajectory mean value of the trajectory structured data within a preset time is calculated, that is, the point mean value of the 13 point data is calculated, to obtain the trajectory mean value. Then, the distance between the current trajectory structured data and the trajectory mean value is calculated, which represents the amplitude between the current trajectory structured data and the trajectory mean value.
[0066] S33, determining that the distance exceeds a preset error value, obtaining a previous trajectory structured data adjacent to the trajectory structured data, and performing position correction on the trajectory structured data based on the previous trajectory structured data and the preset error value to generate position correction data corresponding to the trajectory structured data.
[0067] S34, updating the trajectory structured data to the position correction data.
[0068] In order to improve the accuracy of the trajectory mean value calculation process, the following will be described in combination with Figure 3 The pedestrian trajectory data correction method of the application is described, and step S32 specifically includes:
[0069] S321, determining all point values of the trajectory structured data within a preset time. It can be understood that the point values include the current trajectory structured data, that is, the 13th trajectory structured data.
[0070] S322, determine the maximum point value and the minimum point value of the point value. Find the maximum and minimum point values in the point value, the two point values above may have a large error, and thus lead to the calculation result of the trajectory mean value is not accurate, therefore, ignore the maximum and minimum point values in the subsequent calculation process.
[0071] S323, determine the point mean value of the point value outside the maximum point value and the minimum point value, obtain the trajectory mean value, that is, take the average value of the other 11 point values except the maximum point value and the minimum point value, and then obtain the trajectory mean value. In this way, it is prevented that the trajectory data is disturbed greatly and the data is deviated greatly.
[0072] S324, based on the trajectory structured data and its adjacent previous trajectory structured data, calculate the distance between the trajectory structured data and the trajectory mean value. In the embodiment of the application, the corresponding distance is obtained according to the latitude and longitude of the trajectory structured data and its adjacent previous trajectory structured data.
[0073] Specifically, the calculation formula of the distance is:
[0074] Distance=R*Arccos(C)*π / 180
[0075] C=sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lng1-lng2)
[0076] Wherein, Distance represents the distance; R represents the earth radius; lat1 represents the latitude value of the previous trajectory structured data; lat2 represents the latitude value of the current trajectory structured data; lng1 represents the longitude value of the previous trajectory structured data; lng2 represents the longitude value of the current trajectory structured data.
[0077] The following will be described in combination with Figure 4 The pedestrian trajectory data correction method of the application is described, which specifically comprises the following steps in step S33:
[0078] S331, determine that the distance exceeds the preset error value, and obtain the adjacent previous trajectory structured data of the trajectory structured data.
[0079] In the embodiment of the application, the preset error value is used to represent the distance of the pedestrian in the preset collection time, that is, the step is obtained based on the walking speed of the pedestrian and the preset collection time.
[0080] Generally, the walking speed of the pedestrian is 0.5-1m / s, so the preset error value is 0.5-1m / s*△T, and △T represents the preset collection time.
[0081] If the distance exceeds the preset error value, it indicates that the current trajectory structured data needs to be position corrected, otherwise, if the distance does not exceed the preset error value, it indicates that the current trajectory structured data is correct data, and the trajectory structured data does not need to be position corrected.
[0082] S332, determine the amplitude direction between the trajectory structured data and the previous trajectory structured data. That is, the orientation of the current trajectory structured data relative to the previous trajectory structured data.
[0083] S333, based on the amplitude direction, add the preset error value to the previous trajectory structured data to generate the position correction data corresponding to the trajectory structured data.
[0084] According to the amplitude direction obtained in the foregoing, the amplitude corresponding to the preset error value is compensated based on the current trajectory structured data and the adjacent previous trajectory structured data, to obtain the approximate position of the trajectory structured data, which is then taken as a new position point of the trajectory structured data, and the data of the trajectory structured data in the memory list is updated to the data of the position correction data.
[0085] After the trajectory structured data is determined whether to need position correction and the corresponding position correction is processed, the current calculation list clist needs to be emptied every time a new trajectory structured data is added to the subsequent memory list, and the newly added trajectory structured data and the adjacent previous 12 trajectory structured data are calculated again to determine whether the new trajectory structured data needs to be position corrected and to perform the corresponding position correction when the position correction is needed. Through continuous iterative calculation, the position correction of all trajectory structured data is completed, that is, the update.
[0086] The following will be combined Figure 5 The pedestrian trajectory data correction method of the present application is described, and the method further includes the following steps:
[0087] S40, the trajectory structured data after position correction is persistently saved.
[0088] As some possible implementation modes of the embodiment of the present application, the persistent saving includes serialization processing and compatible saving.
[0089] Specifically, the memory list of the analysis processing is designed according to the object-oriented style, the data stored in the memory list is transmitted through the http layer to complete the serialization operation of the trajectory data, and various conversion requirements such as json / xml can be realized.
[0090] In the embodiment of the present application, the trajectory structured data after the position correction processing, i.e., the trajectory data after the position correction, can be saved into a mainstream SQL database / NOSQL database, and directly saved as text information. Such a data saving mode does not require a specific storage medium, and is compatible.
[0091] Therefore, the trajectory data structure is serialized, and can be saved in a json / xml format, which is compatible with any existing system, and supports various tcp / http transmissions. In addition, the thread safety mechanism can be achieved by updating only one memory list.
[0092] The present application will be described below in combination with Figure 6 The present application will be described below in combination with
[0093] S11, obtaining the pedestrian trajectory data once every preset collection time based on the preset collection time.
[0094] S12, performing a structured processing on the pedestrian trajectory data to obtain trajectory structured data.
[0095] The present application will be described below in combination with Figure 7 The present application will be described below in combination with
[0096] S20, deleting invalid trajectory structured data based on the information contained in the trajectory structured data. In the embodiment of the present application, the longitude and latitude, time stamp and the like contained in the trajectory structured data are used to determine whether the trajectory structured data is valid or invalid data. Specifically, the invalid trajectory structured data is out of the domestic longitude and latitude range or incorrect data.
[0097] Preferably, when the invalid trajectory structured data is removed, the First In, First Out (FIFO) principle is followed, i.e., when a structured trajectory structured data is obtained from the head of the memory list each time, whether the trajectory structured data is within the current domestic coordinate range and whether it is correct coordinate data are determined according to the longitude and latitude, time stamp and the like contained in the trajectory structured data. If both are yes, it indicates that the trajectory structured data is normal data. If one of them is no (for example, the trajectory structured data is 0 or the trajectory structured data is out of the domestic longitude and latitude range), it indicates that the trajectory structured data is invalid data, which will be removed. Each time, one data at the head of the memory queue is read and analyzed. The operation of removing the invalid data is recorded in the corresponding log file, and the corresponding query can be performed by querying the local log file.
[0098] It can be understood that the subsequent step S30 is processed for valid trajectory structured data.
[0099] The pedestrian trajectory data correction device provided by the embodiment of the present application is described below. The pedestrian trajectory data correction device described below can be correspondingly referred to the pedestrian trajectory data correction method described above.
[0100] To solve the above problems, the pedestrian trajectory data correction device is provided in the embodiment, which is used to correct the pedestrian trajectory data in real time without relying on third-party data. The pedestrian trajectory data correction device of the embodiment of the present application can be used in electronic devices, including but not limited to computers, mobile terminals, wearable smart devices, etc. Figure 8 The structure diagram of the pedestrian trajectory data correction device according to the embodiment of the present application is shown in FIG. 1, which includes: Figure 8
[0101] The trajectory acquisition module 10 is used to acquire the pedestrian trajectory data and obtain the trajectory structured data based on the pedestrian trajectory data. In the embodiment of the present application, the GPS data is acquired by the electronic device equipped with the GPS module, and the GPS data is the pedestrian trajectory data. The electronic device includes but is not limited to computers, wearable smart devices, etc. As some preferred embodiments of the present application, a background running service is started in the electronic device equipped with the GPS module, and the background acquires a GPS data every certain time. The electronic device acquires the GPS data in this way.
[0102] It should be noted that the original GPS data contains latitude (lat), longitude (lng), timestamp, current time, etc.
[0103] The pedestrian trajectory data is also processed into the trajectory structured data in the trajectory acquisition module 10, that is, the GPS data is converted into the structured data and saved as a specific data structure. The trajectory structured data contains the longitude, latitude, trajectory local time and trajectory acquisition timestamp (GPS satellite timestamp) of the earth center coordinate system (GPS-84 coordinate system).
[0104] In the embodiment of the present application, the GPS module is set to acquire the original pedestrian trajectory data every preset acquisition time, and the preset acquisition time is the acquisition interval between two adjacent pedestrian trajectory data. For example, the GPS module is set to acquire data every 1 second, and the data is processed in structure at the same time, so as to complete the data acquisition, processing and ensure the continuity of time and the non-repetition of data.
[0105] The trajectory deviation correction module 30 is configured to acquire a trajectory mean value of the trajectory structured data within a preset time, determine whether the trajectory structured data has deviation based on the trajectory mean value, and perform position correction on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data has deviation.
[0106] In the embodiment of the present application, the deviation refers to a distance between the trajectory structured data and the trajectory mean value exceeding the preset error value; and the preset error value is used to represent a walking distance of the pedestrian within the preset acquisition time, i.e., the walking step is obtained based on the walking speed of the pedestrian and the preset acquisition time.
[0107] When the distance between the trajectory structured data and the trajectory mean value exceeds the preset error value, it indicates that the trajectory structured data has deviation, i.e., an abnormal position point, and the preset error value is used to perform position correction on the abnormal position point in the device, and update the point value of the point. The original point value and the correction operation can be output to a log file, so as to facilitate corresponding recording and query.
[0108] The deviation correction device for pedestrian trajectory data provided by the present application performs structured processing on the acquired original pedestrian trajectory data, acquires a trajectory mean value of the trajectory structured data within a preset time, judges whether the current trajectory structured data has deviation based on the trajectory mean value, and performs deviation correction and modification on the deviated trajectory based on the walking distance of the pedestrian within the preset acquisition time when the deviation occurs, so as to realize real-time deviation correction and modification processing of the pedestrian trajectory data, eliminate the deviation of the trajectory sampling value caused by the interference, and not rely on any third-party map data. At the same time, the device can adapt to the requirements of any third-party map manufacturer and business system for pedestrian navigation data, does not need to develop the system again, and can be connected in the form of a module at any time.
[0109] Figure 9 An example of a schematic diagram of a physical structure of an electronic device is shown in Figure 9 The electronic device can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 can communicate with each other through the communications bus 840. The processor 810 can invoke a logical instruction in the memory 830 to execute a deviation correction method for pedestrian trajectory data, and the method includes:
[0110] Acquire pedestrian trajectory data, and obtain trajectory structured data based on the pedestrian trajectory data; the trajectory structured data includes a longitude, a latitude, a trajectory local time, and a trajectory acquisition timestamp in a geocenter coordinate system;
[0111] The trajectory structured data is acquired, a trajectory mean value of the trajectory structured data in a preset time is obtained, whether the trajectory structured data produces deviation is determined based on the trajectory mean value, and if it is determined that the deviation is produced, position rectification is performed on the trajectory structured data based on a preset error value; the deviation is that a distance between the trajectory structured data and the trajectory mean value exceeds the preset error value; the preset error value is used to represent a travel distance of the pedestrian in a preset collection time; and the preset collection time is a collection interval between adjacent two pedestrian trajectory data.
[0112] In addition, the logic instructions in the memory 830 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0113] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the pedestrian trajectory data rectification method provided by the above-mentioned methods, and the method comprises:
[0114] Pedestrian trajectory data is acquired, and trajectory structured data is obtained based on the pedestrian trajectory data; the trajectory structured data includes a longitude, a latitude, a trajectory local time, and a trajectory acquisition timestamp in a geocenter coordinate system;
[0115] A trajectory mean value of the trajectory structured data in a preset time is obtained, whether the trajectory structured data produces deviation is determined based on the trajectory mean value, and if it is determined that the deviation is produced, position rectification is performed on the trajectory structured data based on a preset error value; the deviation is that a distance between the trajectory structured data and the trajectory mean value exceeds the preset error value; the preset error value is used to represent a travel distance of the pedestrian in a preset collection time; and the preset collection time is a collection interval between adjacent two pedestrian trajectory data.
[0116] In yet another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the pedestrian trajectory data rectification method provided by the above-mentioned methods, and the method comprises:
[0117] Obtaining pedestrian trajectory data, and obtaining trajectory structured data based on the pedestrian trajectory data; the trajectory structured data includes longitude, latitude, trajectory local time and trajectory acquisition timestamp in the earth center coordinate system;
[0118] Obtaining the trajectory mean value of the trajectory structured data within a preset time, determining whether the trajectory structured data is offset based on the trajectory mean value, and performing position rectification on the trajectory structured data based on a preset error value if it is determined that the trajectory structured data is offset; the offset is that the distance between the trajectory structured data and the trajectory mean value exceeds the preset error value; the preset error value is used to represent the travel distance of the pedestrian within a preset collection time; and the preset collection time is the collection interval between adjacent two pedestrian trajectory data.
[0119] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the method described in each embodiment or some part of the embodiment.
[0121] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for correcting pedestrian trajectory data, characterized in that, The method includes: Acquire pedestrian trajectory data and obtain structured trajectory data based on the pedestrian trajectory data; the structured trajectory data includes longitude, latitude, local time of the trajectory, and trajectory acquisition timestamp in the Earth's centroid coordinate system; The system acquires the average trajectory value of the structured trajectory data within a preset time period. Based on the average trajectory value, it determines whether the structured trajectory data has shifted. If a shift is determined, the system corrects the position of the structured trajectory data based on a preset error value. The shift occurs when the distance between the structured trajectory data and the average trajectory value exceeds the preset error value. The preset error value represents the distance traveled by a pedestrian within a preset collection time period. The preset collection time is the collection interval between two adjacent pedestrian trajectory data. The process involves acquiring the average trajectory value of the structured trajectory data within a preset time period, determining whether the structured trajectory data has shifted based on the average trajectory value, and if a shift is determined, performing position correction on the structured trajectory data based on a preset error value. Specifically, this includes: The trajectory structured data is stored in a memory list, and the data in the memory list is monitored to see if it meets the position correction mechanism. The position correction mechanism is defined as the number of trajectory structured data exceeding the preset number and the number increasing. Determine if the position correction mechanism is satisfied, calculate the mean value of the trajectory structured data within a preset time, and determine the distance between the trajectory structured data and the trajectory mean value; If the distance exceeds a preset error value, obtain the previous trajectory structured data adjacent to the trajectory structured data. Based on the previous trajectory structured data and the preset error value, perform position correction on the trajectory structured data to generate position correction data corresponding to the trajectory structured data. Update the trajectory structured data with position correction data; The determination of whether the position correction mechanism is satisfied includes calculating the mean value of the trajectory structured data within a preset time period and determining the distance between the trajectory structured data and the trajectory mean value, specifically including: Determine the location values of all points in the trajectory structured data within a preset time period; Determine the maximum and minimum point values; Determine the mean value of the points other than the maximum and minimum point values to obtain the mean value of the trajectory; Based on the structured trajectory data and its preceding adjacent structured trajectory data, the distance between the structured trajectory data and the trajectory mean is calculated; the formula for calculating the distance is: in, Indicates distance; Indicates the Earth's radius; This represents the dimension value of the previous trajectory structured data; This represents the dimension value of the current trajectory structured data; This represents the longitude value of the previous trajectory structured data; This represents the longitude value of the current trajectory structured data; The determination that the distance exceeds a preset error value involves acquiring the preceding trajectory structured data adjacent to the trajectory structured data, performing position correction on the trajectory structured data based on the preceding trajectory structured data and the preset error value, and generating position correction data corresponding to the trajectory structured data. Specifically, this includes: If the distance exceeds a preset error value, obtain the structured data of the previous adjacent trajectory; Determine the amplitude direction between the structured trajectory data and the previous structured trajectory data; Based on the amplitude direction, the preset error value is accumulated to the previous trajectory structured data to generate position correction data corresponding to the trajectory structured data.
2. The method for correcting pedestrian trajectory data according to claim 1, characterized in that, The method also includes the following steps: The structured trajectory data after position correction is persistently saved.
3. The method for correcting pedestrian trajectory data according to claim 1, characterized in that, The acquisition of pedestrian trajectory data and the generation of structured trajectory data based on the pedestrian trajectory data specifically include: Based on a preset collection time, pedestrian trajectory data is acquired once at preset collection time intervals; The pedestrian trajectory data is processed into structured data to obtain structured trajectory data.
4. The method for correcting pedestrian trajectory data according to claim 1, characterized in that, The method further includes the following steps after the steps of acquiring pedestrian trajectory data and obtaining structured trajectory data based on the pedestrian trajectory data: Based on the information contained in the trajectory structured data, invalid trajectory structured data is deleted.
5. A device for correcting pedestrian trajectory data, characterized in that, The device includes: The trajectory acquisition module is used to acquire pedestrian trajectory data and obtain structured trajectory data based on the pedestrian trajectory data; the structured trajectory data includes the longitude and latitude of the Earth's centroid coordinate system, the local time of the trajectory, and the trajectory acquisition timestamp; The trajectory correction module is used to obtain the average trajectory value of the structured trajectory data within a preset time period. Based on the average trajectory value, it determines whether the structured trajectory data has shifted. If a shift is determined, the module corrects the position of the structured trajectory data based on a preset error value. The shift occurs when the distance between the structured trajectory data and the average trajectory value exceeds the preset error value. The preset error value represents the distance traveled by a pedestrian within a preset collection time period. The preset collection time is the collection interval between two adjacent pedestrian trajectory data. The trajectory correction module specifically includes: The trajectory structured data is stored in a memory list, and the data in the memory list is monitored to see if it meets the position correction mechanism. The position correction mechanism is defined as the number of trajectory structured data exceeding the preset number and the number increasing. Determine if the position correction mechanism is satisfied, calculate the mean value of the trajectory structured data within a preset time, and determine the distance between the trajectory structured data and the trajectory mean value; If the distance exceeds a preset error value, obtain the previous trajectory structured data adjacent to the trajectory structured data. Based on the previous trajectory structured data and the preset error value, perform position correction on the trajectory structured data to generate position correction data corresponding to the trajectory structured data. Update the trajectory structured data with position correction data; The determination of whether the position correction mechanism is satisfied includes calculating the mean value of the trajectory structured data within a preset time period and determining the distance between the trajectory structured data and the trajectory mean value, specifically including: Determine the location values of all points in the trajectory structured data within a preset time period; Determine the maximum and minimum point values; Determine the mean value of the points other than the maximum and minimum point values to obtain the mean value of the trajectory; Based on the structured trajectory data and its preceding adjacent structured trajectory data, the distance between the structured trajectory data and the trajectory mean is calculated; the formula for calculating the distance is: in, Indicates distance; Indicates the Earth's radius; This represents the dimension value of the previous trajectory structured data; This represents the dimension value of the current trajectory structured data; This represents the longitude value of the previous trajectory structured data; This represents the longitude value of the current trajectory structured data; The determination that the distance exceeds a preset error value involves acquiring the preceding trajectory structured data adjacent to the trajectory structured data, performing position correction on the trajectory structured data based on the preceding trajectory structured data and the preset error value, and generating position correction data corresponding to the trajectory structured data. Specifically, this includes: If the distance exceeds a preset error value, obtain the structured data of the previous adjacent trajectory; Determine the amplitude direction between the structured trajectory data and the previous structured trajectory data; Based on the amplitude direction, the preset error value is accumulated to the previous trajectory structured data to generate position correction data corresponding to the trajectory structured data.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method for correcting pedestrian trajectory data as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for correcting pedestrian trajectory data as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Road network extraction and track correction method and system based on vehicle GPS
CN113253319A