High-precision tourist trajectory data acquisition method based on opportunity network
By building an opportunity network on tourists' handheld smartphone devices, using high-frequency sampling and accuracy improvement modules, the problems of high-precision trajectory data acquisition cost and insufficient accuracy are solved, and low-cost and high-precision GPS data acquisition is achieved, which is suitable for smart scenic spot management and research.
Patent Information
- Application Number
- CN202411812856.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-07
AI Technical Summary
The existing technology is difficult to collect high-precision mobile trajectory data for tourists on a large scale. Traditional tracking technology is not suitable for high-precision trajectory data acquisition, and the high-precision positioning based on IoT devices is high. UWB technology has not yet been popularized and mobile phone support is limited.
A high-precision trajectory data acquisition method based on the opportunity network is proposed. Through the opportunity network formed by the handheld smartphone equipment of tourists and data collectors, the data acquisition module, the high-frequency sampling GPS data, the data storage module, the opportunity communication module and the accuracy improvement module are used to achieve high-precision GPS data acquisition and accuracy improvement module.
It realizes convenient and low-cost collection of high-precision GPS data for tourists, and does not rely on third-party communication infrastructure, and is suitable for smart scenic spot management and research.
Smart Images

Figure CN119584050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of tourism management and opportunity network application, and in particular to a method for collecting high-precision trajectory data of tourists based on opportunity networks. Background Art
[0002] Movement is the most important external behavior of tourists in tourism activities. Studying tourists' movement can better understand tourists' travel activities and experiences, which in turn helps the design, management, service, marketing and product development of tourist destinations. Tourist movement trajectory data is the basis of tourist mobility research. With the rapid development of smart tourism, the demand for the accuracy of tourist location data in scenic area management is constantly increasing. The micro-scale study of tourists' micro-movement behavior and safe evacuation management in scenic areas requires the collection of tourists' micro-precision movement trajectory data.
[0003] However, due to the limitations of technology, manpower and financial resources, it has long been difficult to collect high-precision mobile trajectory data of tourists on a large scale. Traditional tracking technologies including observation, log questionnaires, etc. are not suitable for high-precision trajectory data collection. At present, trajectory tracking is mainly based on digital footprint technology, including IP positioning, telephone base stations, check-ins, UGC data with geo-tags, etc., which are also not suitable for high-precision mobile data collection. Based on short-range communication technologies of the Internet of Things such as WiFi, Bluetooth, RFID and UWB, high-precision positioning can be achieved indoors and outdoors, and even centimeter-level positioning can be achieved, but it is necessary to lay out Internet of Things equipment, including positioning base stations and positioning servers, and the deployment cost is high. Moreover, the UWB technology for high-precision positioning has not yet been rolled out in the C-end consumer market, and only a small number of mobile phones support it. Therefore, it is necessary to prepare client devices for tourists, resulting in higher costs.
[0004] With the gradual improvement of GPS positioning accuracy and the popularization of mobile phone GPS, the collection of mobile phone GPS data has become an important source of tourists' movement trajectory data. Some mobile phone applications (such as Erbulu and Liuzhijiao) collect mobile client GPS data. Therefore, mobile phone GPS data is mostly controlled by IT companies, and its sampling frequency cannot achieve the accuracy required to study tourists' micro-behavior.
[0005] Therefore, how to provide a convenient and low-cost method to obtain high-precision GPS data from tourists' mobile phones and directly recover it without relying on third-party communication infrastructure is an important issue that needs to be urgently addressed in the field of tourism management. Summary of the invention
[0006] In view of this, the purpose of the present invention is to propose a method for collecting high-precision trajectory data of tourists based on opportunistic networks, to provide scenic area managers and researchers with a convenient, low-cost method that does not rely on third-party communication infrastructure to collect high-precision trajectory data of tourists, and to lay a foundation for smart scenic area management and research.
[0007] Based on the above objectives, this application proposes a method for collecting high-precision tourist trajectory data based on an opportunity network, which includes:
[0008] A. The system requires the participation of two types of personnel, including tourists and data collectors;
[0009] B. The system consists of an opportunity network consisting of the two types of people holding smartphone devices;
[0010] C. The smartphone devices include smartphone devices with Android and iOS operating systems.
[0011] The method for collecting high-precision trajectory data of tourists based on an opportunity network is characterized by the following specific steps:
[0012] (1) The tourist smartphone device described in claim 1 includes a data collection module, a data storage module, an opportunistic communication module, and an accuracy improvement module; the data collection personnel smartphone device described in claim 1 includes a data storage module and an opportunistic communication module;
[0013] (2) The function of the data collection module is to sample tourists’ smartphone GPS data at a high frequency in order to improve GPS accuracy;
[0014] (3) The data storage module includes memory variables and SQLite database tables, which are used to store collected GPS data, intermediate variables for improving accuracy, GPS trajectory data packets of neighboring nodes, etc.
[0015] (4) The function of the opportunistic communication module is to realize the M2M communication (direct data transmission between two devices) of the smart phone device described in claim 1 without relying on third-party communication infrastructure. The functions include neighbor node discovery and ranging, network topology construction, data routing and forwarding, system message broadcasting and other data transmission functions; the module realizes opportunistic communication based on BLE (Bluetooth Low Energy) technology and opportunistic communication based on WiFi technology;
[0016] (5) The function of the accuracy improvement module is to use the opportunistic communication module to achieve neighbor node ranging, share neighbor node GPS data, and integrate multi-source data through polygon collaborative positioning and adaptive Kalman filtering technology to achieve GPS data accuracy improvement.
[0017] Furthermore, the opportunistic communication module includes:
[0018] The function of the opportunistic communication based on BLE technology is to prepare data for the precision improvement module described in claim 2; the main function of the opportunistic communication based on WiFi technology is to realize the recovery of GPS trajectory data of the tourist's handheld smartphone device described in claim 1;
[0019] Further, the BLE technology is a low-power Bluetooth technology that can be used on smartphone devices with Android and iOS 2 operating systems as described in claim 1, and is suitable for short-range and low-bandwidth opportunistic network communications;
[0020] The accuracy improvement module requires opportunistic communication to obtain the ranging and latest GPS data of neighboring nodes. In this process, the data transmission rate requirement is low. As the GPS sampling frequency increases, it needs to be triggered frequently, and collaboration between Android and iOS devices is required to better complete the task.
[0021] Therefore, based on BLE opportunistic communication, data is prepared for the precision improvement module. The specific steps are as follows:
[0022] First, based on BLE opportunistic communication, all neighbor nodes within the communication range are discovered and distance is measured; neighbor discovery can also achieve distance measurement between nodes. BLE uses the received signal strength RSSI value (in dBm) to estimate the distance. The calculation formula is:
[0023] (1)
[0024] Where d is the distance (meters); is the reference signal strength; RSSI is the received Bluetooth signal strength; n is the environmental attenuation factor, usually between 2 and 4, usually 3 for indoors and 2 for open areas;
[0025] Then, based on BLE opportunistic communication, the latest GPS data is exchanged between neighboring nodes within 1 hop range.
[0026] Furthermore, the WiFi technology is implemented based on WiFi Direct technology in the Android operating system smartphone device described in claim 1, and is implemented based on Multipeer Connectivity technology in the iOS operating system smartphone device described in claim 1; although Multipeer Connectivity is not strictly WiFi Direct, it can discover and connect other devices in the same local area network to achieve opportunistic communication; although cross-platform opportunistic communication between Multipeer Connectivity (iOS) and Wi-Fi Direct (Android) can be achieved, a more complex network architecture is required;
[0027] The data recovery, more specifically, is that the tourist's handheld smartphone device node needs to forward the GPS track record within a period of time to the data collector's handheld smartphone device node in a single hop or multi-hop manner; at this time, the data transmission volume is large, and there is no need to achieve cross-platform communication between Android and iOS.
[0028] Therefore, data recovery between systems is achieved based on WiFi opportunistic communication. The specific steps are as follows:
[0029] First, based on the WiFi opportunistic communication, the neighbors of smartphones with the same operating system are discovered and the distance is measured. The distance is calculated according to formula (1), where RSSI is the received WiFi signal strength;
[0030] Then, a dynamic network topology is constructed according to the discovered neighbor nodes. The system does not need to maintain the global topology structure. The topology is flattened through the Gabriel graph, and unnecessary edges are removed to save topology maintenance and data transmission costs. The construction process of the Gabriel graph is as follows:
[0031] For any two nodes u and v, the edge (u, v) is retained only if the following conditions are met, that is, no other node w satisfies ,in is the Euclidean distance between nodes u and v, ; Finally, data routing is implemented on the network topology constructed by the Gabriel graph; the data routing adopts GPSR (Greedy Perimeter Stateless Routing) routing based on geographic location; since the system collects GPS data, when the GPS location of the node is known, choosing GPSR routing based on geographic location has certain advantages; GPSR does not need to maintain complex routing tables and is suitable for dynamic topology structures.
[0032] Furthermore, the GPSR routing includes the following specific steps:
[0033] First, GPSR forwards the data packet to a neighboring node closer to the target node in a greedy forwarding manner; for the current node S, the target node D, and the neighbor node set N(S), the next hop node N is selected. * satisfy:
[0034] (2)
[0035] in Represents neighbor nodes The Euclidean distance to the target node D. If the current node has no neighboring nodes that are closer to the target than itself, it is called a "local minimum problem";
[0036] GPSR then starts perimeter routing to bypass the "holes" (unconnected areas) in the network until a node is found that can be greedily forwarded again; perimeter routing uses the Gabriel graph to flatten the network topology, and to ensure that the network edge can be traversed correctly, the right-hand rule is used to select the next node The angle is:
[0037] (3)
[0038] in Representation vector and The angle between them is calculated in the counterclockwise direction;
[0039] Greedy forwarding can effectively reduce routing overhead, and peripheral routing avoids the local minimum problem, thereby improving the transmission success rate.
[0040] Furthermore, the accuracy improvement module improves the GPS data accuracy based on a multi-source data fusion method, including:
[0041] There are two steps: polygon co-localization and adaptive Kalman filtering.
[0042] Furthermore, the polygonal collaborative positioning improves the GPS accuracy of the current node based on the triangulation principle, and the specific steps are as follows:
[0043] First, the neighbor node ranging and current GPS data are obtained by utilizing the opportunistic communication based on BLE technology as described in claim 3;
[0044] Then, the polygon co-location is performed using the neighbor node data: Assume that the position of the current node T is (x, y), and the neighbor node set is {N i |i=1,2,…,N}, each neighbor node N i The known position of (x i , y i ), the distance obtained by ranging is d i , construct the following nonlinear equations and solve them by the least squares method:
[0045] (4)
[0046] Furthermore, the adaptive Kalman filter further improves the GPS data accuracy based on polygon collaborative positioning, and the specific steps are as follows:
[0047] First, use the result of polygon co-localization as the initial state of the Kalman filter , Kalman filter state prediction equation:
[0048] (5)
[0049] (6)
[0050] in is the predicted state, is the predicted state covariance matrix, A is the state transfer matrix, B is the control input matrix, is the control input, Q is the process noise;
[0051] Then, when updating the measurement, the neighbor node’s distance measurement, GPS data and the polygon co-positioning result are used as the observation vector, and the current state is predicted based on the state at the previous moment. The measurement update equation is:
[0052] (7)
[0053] (8)
[0054] (9)
[0055] in is the Kalman gain matrix, is the measurement vector, H is the observation matrix, and R is the measurement noise covariance matrix;
[0056] Finally, according to the current measurement data quality, the values of the process noise covariance matrix Q and the measurement noise covariance matrix R are adjusted to adapt to the complex and dynamic actual environment; the adjustment of Q and R is affected by many factors: for example, when tourists change from slow walking to running, the movement speed of the node changes significantly, so the Q value is increased to reduce the dependence on the state of the previous moment; occlusion and signal interference in the environment will cause RSSI fluctuations to become larger, which indicates that the uncertainty of the measurement increases, and the Q and R values increase with the increase of the RSSI fluctuation range; the accuracy of GPS signals is affected by environmental occlusion, equipment positioning capabilities, etc., and the quality is poor. When the horizontal dilution of precision (HDOP) is high, it indicates that the positioning accuracy is low, and the Q and R values need to be increased to reduce the dependence of state prediction on historical trajectories; if the signal of the neighboring node has a high loss rate, it means that the measurement data may be incomplete, and increasing the value of R can reduce the impact of low-quality data; the specific adjustment formula is:
[0057] (10)
[0058] (11)
[0059] in and are the initial process noise covariance matrix and the measurement noise covariance matrix; is the standard deviation of RSSI, reflecting the degree of signal fluctuation; is the reference threshold of RSSI fluctuation; The change in speed between the previous moment and the previous moment; Speed change reference threshold; HDOP is the current GPS HDOP value, reflecting the quality of GPS signal; is the reference threshold of HDOP; PLR is the data loss rate; is the reference threshold of PLR; α, β, γ are adjustment coefficients, reflecting the influence weight of each parameter. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is shown as the functional module of the present invention.
[0061] Figure 2 A system schematic diagram according to an implementation example of the present invention is shown.
[0062] Figure 3 A schematic diagram of data flow for initiating BLE neighbor discovery and ranging according to an implementation example of the present invention is shown.
[0063] Figure 4 A schematic diagram of data flow initiating WiFi neighbor discovery and topology construction according to an implementation example of the present invention is shown.
[0064] Figure 5 A schematic diagram of a data flow initiated by a Sink node receiving data according to an implementation example of the present invention is shown. DETAILED DESCRIPTION
[0065] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It should also be noted that, for ease of description, only the parts related to the relevant inventions are shown in the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0066] Example 1: Figure 2 System schematic diagram shown.
[0067] The system includes four types of nodes: nodes holding Android and iOS smartphones by tourists, and nodes holding Android and iOS smartphones by data collectors.
[0068] The system includes two types of opportunistic communication links: one based on BLE for precision improvement and one based on WiFi for data transmission.
[0069] In order to support multiple smartphone operating systems and reduce development costs, the system uses the open source cross-platform mobile application development framework React Native to implement the system. React Native code supports both iOS and Android, and compiles JavaScript code into native components, giving the application performance close to that of native applications.
[0070] Specifically, the react-native-ble-plx library is used in React Native to implement BLE periodic scanning, discover neighbor nodes and obtain ranging information; react-native-ble-plx does not support broadcasting and needs to be implemented in combination with native code through Native Modules. BluetoothLeAdvertiser is used for BLE broadcasting in Android, and CoreBluetooth framework is used for BLE broadcasting in iOS; when BLE performs point-to-point opportunistic communication, one device acts as a broadcaster to send data and the other device acts as a scanner to receive data. Due to limitations of iOS, the system uses Android as the broadcaster and iOS as the scanner.
[0071] Specifically, the react-native-wifi-reborn library is used in React Native to manage WiFi communication, but the specific communication bottom layer needs to be implemented in the native system. On Android, first create a Native Module based on Java, use the WifiP2pManager API to scan and connect devices to implement WiFi Direct opportunistic communication; then in React Native, call the WifiP2pManager API through Native Modules. On iOS, first create a Multipeer Connectivity Native Module based on Swift to implement neighbor discovery and opportunistic communication; then use Native Modules in React Native to call the Multipeer Connectivity Framework.
[0072] For example, a specific system operation example: during data recovery, nodes can forward data in a single hop or in multiple hops. For example, iOS node e forwards data to Sink node f through Multipeer Connectivity, and Android node a forwards data to Sink node d through WiFi Direct of b and c. During accuracy improvement, node A of the Android system discovers neighbor nodes of different operating systems through BLE opportunistic links, such as B of the Android system and C and D of the iOS system.
[0073] Example 2: Figure 3 The following is a schematic diagram of the data flow initiated by BLE neighbor discovery and ranging.
[0074] Specifically, the visitor (TNode) node completes Figure 3 The example needs to maintain memory variables GPS0 and GPSa_coor to store the current GPS data of the node and the GPS data after polygon co-location, respectively. The memory list variable BLE_neighbor_list maintains real-time Bluetooth neighbor nodes, where each node data structure is {id, ble_dist, GPS}, which respectively represents the node identification, Bluetooth ranging and node GPS data. Node A maintains the SQLite database table my_gps to store the GPS data of this node after improving the accuracy. The table structure is {num, state, GPS}, which represents the record number, whether it is successfully received by the Sink node and GPS data.
[0075] In React Native, GPS data collection is implemented based on the geolocation library react-native-geolocation-service. High-frequency sampling is achieved by setting the minimum update distance and update interval parameters, and the Geolocation.watchPosition method is called for real-time location tracking. Since GPS data needs to be improved in accuracy before being stored in the database, the temporary variable GPS0 is used to save the latest GPS data.
[0076] Specifically, in Figure 2 In the system diagram, when the BLE opportunity link of node A discovers the neighbor and performs ranging at the same time, the variable BLE_neighbor_list is initialized, and the latest GPS data GPS0 is exchanged with the neighbor node within 1 hop based on the BLE broadcast link.
[0077] When all neighbor nodes GPS0 are received or the neighbor discovery cycle ends, polygon collaborative positioning is performed based on BLE_neighbor_list data to obtain GPS data GPSa_coor with improved accuracy; then based on GPSa_coor as the initial quantity x0 of the adaptive Kalman filter, the neighbor node ranging, GPS0 and the GPSa_coor of this node are constructed into the measurement vector z of the adaptive Kalman filter k Perform data fusion filtering to obtain the high-precision GPS of node A and store it in the table my_gps.
[0078] Example 3: Figure 4 Schematic diagram of data flow initiated by WiFi neighbor discovery and topology construction.
[0079] Specifically, the visitor (TNode) node completes Figure 4 The example needs to maintain the GPS data {id, GPS} of the Sink node, and maintain the memory list variable WiFi_neighbor_list of the WiFi neighbor node in real time. The data structure of each neighbor node is {id, wifi_dist, GPS}, which respectively represent the node identification, WiFi ranging and node GPS; the SQLite database tables include my_gps and other_gps, where other_gps is used to store GPS data packets forwarded by neighbor nodes, and the data structure is {id, start, end, gps_list}, which respectively represent the neighbor node id. The gps_list data packet records the start sequence number, end sequence number and GPS record list. The data structure of gps_list is {num, GPS}, which respectively represent the GPS sequence number and GPS data.
[0080] Specifically, in Figure 2In the system diagram, when the WiFi opportunity link of node a discovers neighbors and performs ranging at the same time, the memory variable WiFi_neighbor_list is initialized in the memory, and then the network topology is built based on the Gabriel graph and the neighbor node ranging data, and the nodes in WiFi_neighbor_list are deleted.
[0081] According to the GPS and WiFi_neighbor_list data of Sink node d, the next hop node is selected for forwarding for its own GPS data packet based on GPSR routing; due to the frequent changes in the opportunistic network topology, in order to avoid the failure of large data forwarding, GPS records are forwarded in the network in batches.
[0082] For example, if node a packages and forwards records n to n+k of my_gps data to intermediate node b, then the database table other_gps of node b will cache one GPS data packet pkga={a, n, n+k, gps_list} of node a, where gps_list contains k+1 gps records {num,GPS}. If the encounter cycle continues after forwarding its own GPS data, node a selects the best data packet from other_gps based on GPSR routing and forwards it in sequence.
[0083] In the example, gps_list itself is also a table. However, SQLite does not support nested tables. However, SQLite3.9+ supports the JSON data type, which can implement the above operations.
[0084] Specifically, the data is stored in the gps_list field in JSON format. When inserting data, the gps_list field can be stored as a string in JSON format: INSERT INTO other_gps (id, start, end, gps_list)VALUES (id, 10, 20, '[{"n":10, "GPS":gps10}, …,{"n":20, "GPS":gps20}]'); when querying, use SQLite's JSON function json_extract() to parse the JSON data in the field; in addition, to complete data recovery, the constant {id, GPS} of the destination node GPS needs to be stored in memory.
[0085] Example 4: Figure 5 The data flow diagram shown is initiated by the Sink node receiving data.
[0086] Specifically, the data collector (Sink) node completes Figure 5The example needs to maintain a SQLite database table trace_gps to save the received TNode GPS data. The table structure is {id, num, GPS}. The memory caches the successfully received TNode GPS data list received. The data structure of each element in the list is {id, start, end}, which respectively represent the TNode ID, the start sequence number and the end sequence number in the successfully received GPS data packet.
[0087] Specifically, in Figure 2 In the system diagram, when the sink node d receives the pkga forwarded by the node c, it first parses the pkga record and writes it into the database table trace_gps. After the write is successful, it adds the record {a, n, n+k} to the memory list variable received and broadcasts it to the entire network. Specifically, when a receives the received message from d, it modifies the state of the relevant record in my_gps to True, so that when there is another opportunity for data transmission, it starts to package and forward from num=n+k+1; in addition, considering that tourists may leave the scenic area at any time, and may not receive messages from the sink node, the a node no longer sends confirmation information; but in order to prevent the broadcast message from surviving for a long time in the system and affecting the system performance, a deadline is set, that is, it will automatically die after forwarding hopk.
[0088] Specifically, when other nodes receive the received message from d, they will delete the relevant records in other_gps to avoid unnecessary forwarding.
[0089] In fact, there are multiple Sinks in the scenic area, and mobile Sinks can also be set up. To ensure that TNode knows the locations of all Sinks, GPSR routing and data recovery can be better performed, so the Sink node needs to broadcast its own GPS throughout the network. Since new tourists join the scenic area at any time, the GPS information broadcast by the Sink node does not set a deadline.
[0090] Specifically, in order to spread the broadcast message throughout the entire network as quickly as possible, all available communication opportunities are utilized, including BLE opportunistic communication links and WiFi opportunistic communication links.
Claims
1. A method for collecting high-precision tourist trajectory data based on an opportunity network, characterized in that: Contains: A. The system requires the participation of two types of personnel, including tourists and data collectors; B. The system consists of an opportunity network consisting of the two types of people holding smartphone devices; C. The smartphone devices include smartphone devices with Android and iOS operating systems.
2. A method for collecting high-precision tourist trajectory data based on an opportunity network, characterized in that: The specific steps are as follows: (1) The tourist smartphone device described in claim 1 includes a data collection module, a data storage module, an opportunistic communication module, and an accuracy improvement module; the data collection personnel smartphone device described in claim 1 includes a data storage module and an opportunistic communication module; (2) The function of the data collection module is to sample tourists’ smartphone GPS data at a high frequency in order to improve GPS accuracy; (3) The data storage module includes memory variables and SQLite database tables, which are used to store collected GPS data, intermediate variables for improving accuracy, GPS trajectory data packets of neighboring nodes, etc. (4) The function of the opportunistic communication module is to realize the M2M communication (direct data transmission between two devices) of the smart phone device described in claim 1 without relying on third-party communication infrastructure. The functions include neighbor node discovery and ranging, network topology construction, data routing and forwarding, system message broadcasting and other data transmission functions; the module realizes opportunistic communication based on BLE (Bluetooth Low Energy) technology and opportunistic communication based on WiFi technology; (5) The function of the accuracy improvement module is to use the opportunistic communication module to achieve neighbor node ranging, share neighbor node GPS data, and integrate multi-source data through polygon collaborative positioning and adaptive Kalman filtering technology to achieve GPS data accuracy improvement.
3. The method according to claim 2, characterized in that The step (4) comprises: The function of the opportunistic communication based on BLE technology is to prepare data for the precision improvement module described in claim 2; the main function of the opportunistic communication based on WiFi technology is to realize the recovery of GPS trajectory data of the tourist's handheld smartphone device described in claim 1; The BLE technology is a low-power Bluetooth technology that can be used on smartphone devices with Android and iOS 2 operating systems as described in claim 1, and is suitable for short-range and low-bandwidth opportunistic network communications; The precision improvement module requires opportunistic communication to obtain the ranging and latest GPS data of neighboring nodes. In this process, the data transmission rate requirement is low. As the GPS sampling frequency increases, it needs to be triggered frequently, and the Android and iOS devices need to cooperate to complete the task better. Therefore, based on BLE opportunistic communication, data is prepared for the precision improvement module. The specific steps are as follows: First, based on BLE opportunistic communication, all neighbor nodes within the communication range are discovered and distance is measured; neighbor discovery can also achieve distance measurement between nodes. BLE uses the received signal strength RSSI value (in dBm) to estimate the distance. The calculation formula is: (1) Where d is the distance (meters); is the reference signal strength; RSSI is the received Bluetooth signal strength; n is the environmental attenuation factor, usually between 2 and 4, usually 3 for indoors and 2 for open areas; Then, based on BLE opportunistic communication, the latest GPS data can be exchanged between neighboring nodes within 1 hop; The WiFi technology is implemented based on WiFiDirect technology in the Android operating system smartphone device described in claim 1, and is implemented based on MultipeerConnectivity technology in the iOS operating system smartphone device described in claim 1; although Multipeer Connectivity is not strictly WiFi Direct, it can discover and connect other devices in the same local area network to achieve opportunistic communication; although cross-platform opportunistic communication between MultipeerConnectivity (iOS) and Wi-Fi Direct (Android) can be achieved, a more complex network architecture is required; The data recovery is more specific in that the tourist's handheld smartphone device node needs to forward the GPS track record within a period of time to the data collector's handheld smartphone device node in a single hop or multi-hop manner; at this time, the data transmission volume is large, and there is no need to realize cross-platform communication between Android and iOS, so the data recovery between the respective systems is realized based on WiFi opportunistic communication. The specific steps are as follows: First, based on the WiFi opportunistic communication, the neighbors of smartphones with the same operating system are discovered and the distance is measured. The distance is calculated according to formula (1), where RSSI is the received WiFi signal strength; Then, a dynamic network topology is constructed according to the discovered neighbor nodes. The system does not need to maintain the global topology structure. The topology is flattened through the Gabriel graph, and unnecessary edges are removed to save topology maintenance and data transmission costs. The construction process of the Gabriel graph is as follows: For any two nodes u and v, the edge (u, v) is retained only if the following conditions are met, that is, no other node w satisfies ,in is the Euclidean distance between nodes u and v, ; Finally, data routing is implemented on the network topology constructed by the Gabriel graph; the data routing adopts GPSR (Greedy Perimeter Stateless Routing) routing based on geographic location; since the system collects GPS data, when the GPS location of the node is known, selecting GPSR routing based on geographic location has certain advantages; GPSR does not need to maintain a complex routing table and is suitable for dynamic topology structures; the steps of GPSR routing include: First, GPSR forwards the data packet to a neighboring node closer to the target node in a greedy forwarding manner; for the current node S, the target node D, and the neighbor node set N(S), the next hop node N is selected. * satisfy: (2) in Represents neighbor nodes The Euclidean distance to the target node D; if the current node has no neighbor node closer to the target than itself, it is called a "local minimum problem"; GPSR then starts perimeter routing to bypass the "holes" (unconnected areas) in the network until a node is found that can be greedily forwarded again; perimeter routing uses the Gabriel graph to flatten the network topology, and to ensure that the network edge can be traversed correctly, the right-hand rule is used to select the next node The angle is: (3) in Representation vector and The angle between them is calculated in the counterclockwise direction; Greedy forwarding can effectively reduce routing overhead, and peripheral routing avoids the local minimum problem, thereby improving the transmission success rate.
4. The method according to claim 2, characterized in that: The step (5) comprises: The polygonal collaborative positioning improves the GPS accuracy of the current node based on the triangulation principle. The specific steps are as follows: First, the neighbor node ranging and current GPS data are obtained by utilizing the opportunistic communication based on BLE technology as described in claim 3; Then, the polygon co-location is performed using the neighbor node data: Assume that the position of the current node T is (x, y), and the neighbor node set is {N i |i=1,2,…,N}, each neighbor node N i The known position of (x i , y i ), the distance obtained by ranging is d i , construct the following nonlinear equations and solve them by the least squares method: (4) The adaptive Kalman filter further improves the GPS data accuracy based on polygon collaborative positioning. The specific steps are as follows: First, use the result of polygon co-localization as the initial state of the Kalman filter , Kalman filter state prediction equation: (5) (6) in is the predicted state, is the predicted state covariance matrix, A is the state transfer matrix, B is the control input matrix, is the control input, Q is the process noise; Then, when updating the measurement, the neighbor node’s distance measurement, GPS data and the polygon co-positioning result are used as the observation vector, and the current state is predicted based on the state at the previous moment. The measurement update equation is: (7) (8) (9) in is the Kalman gain matrix, is the measurement vector, H is the observation matrix, and R is the measurement noise covariance matrix; Finally, according to the current measurement data quality, the values of the process noise covariance matrix Q and the measurement noise covariance matrix R are adjusted to adapt to the complex and dynamic actual environment; the adjustment of Q and R is affected by many factors: for example, when tourists change from slow walking to running, the movement speed of the node changes significantly, so the Q value is increased to reduce the dependence on the state of the previous moment; occlusion and signal interference in the environment will cause RSSI fluctuations to become larger, which indicates that the uncertainty of the measurement increases, and the Q and R values increase with the increase of the RSSI fluctuation range; the accuracy of GPS signals is affected by environmental occlusion, equipment positioning capabilities, etc., and the quality is poor. When the horizontal dilution of precision (HDOP) is high, it indicates that the positioning accuracy is low, and the Q and R values need to be increased to reduce the dependence of state prediction on historical trajectories; if the signal of the neighboring node has a high loss rate, it means that the measurement data may be incomplete, and increasing the value of R can reduce the impact of low-quality data; the specific adjustment formula is: (10) (11) in and are the initial process noise covariance matrix and the measurement noise covariance matrix; is the standard deviation of RSSI, reflecting the degree of signal fluctuation; is the reference threshold of RSSI fluctuation; The change in speed between the previous moment and the previous moment; Speed change reference threshold; HDOP is the current GPS HDOP value, reflecting the quality of GPS signal; is the reference threshold of HDOP; PLR is the data loss rate; is the reference threshold of PLR; α, β, γ are adjustment coefficients, reflecting the influence weight of each parameter.