CN116414817B - Track point processing method, electronic equipment and storage medium - Google Patents

Track point processing method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116414817B
CN116414817B CN202310670790.3A CN202310670790A CN116414817B CN 116414817 B CN116414817 B CN 116414817B CN 202310670790 A CN202310670790 A CN 202310670790A CN 116414817 B CN116414817 B CN 116414817B
Authority
CN
China
Prior art keywords
track points
abnormal
points
position information
abnormal track
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310670790.3A
Other languages
Chinese (zh)
Other versions
CN116414817A (en
Inventor
朱廷锴
朱静涛
陈天辉
孙井川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310670790.3A priority Critical patent/CN116414817B/en
Publication of CN116414817A publication Critical patent/CN116414817A/en
Application granted granted Critical
Publication of CN116414817B publication Critical patent/CN116414817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Remote Sensing (AREA)
  • Quality & Reliability (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The embodiment of the application provides a track point processing method, electronic equipment and a storage medium, and relates to the technical field of data processing, wherein the method is applied to the electronic equipment and comprises the following steps: and determining a stay time interval of the electronic equipment in a specified time period based on the motion state of the electronic equipment, and then acquiring track point data acquired in the stay time interval, wherein the track point data comprises position information of a plurality of track points arranged according to the acquisition time sequence. And then, based on the position information of the plurality of track points, determining the central positions of the plurality of track points, and taking the track points, of which the distances between the track points and the central positions are larger than an error threshold value, as abnormal track points. And modifying the position information of the abnormal track points based on the position information of the non-abnormal track points of the appointed number before and after the abnormal track points. The accuracy of the track point data is improved.

Description

Track point processing method, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a track point processing method, an electronic device, and a storage medium.
Background
Currently, some services provided by an electronic device rely on track point data of a user when the user stays at a specific place, for example, track point data collected by the electronic device when the user stays at home or a company, where the track point data includes position information of a plurality of track points arranged in chronological order of collection time. In order to provide higher quality service, the accuracy of the track point data is particularly important, and because the positioning accuracy of the electronic device is affected by factors such as environmental signal strength, chip performance, positioning mode accuracy and the like, the track point data acquired by the electronic device may include track points with inaccurate position information, so that the track point data can be cleaned before the track point data are used.
For the track point data with uniform acquisition intervals, the track point cleaning method is to identify whether abnormal track points exist in adjacent track points by utilizing a speed threshold value, an acceleration threshold value and/or a distance threshold value, and reject the abnormal track points. For example, it may be determined whether the distance between two adjacent track points is greater than a preset distance threshold, and if so, the track point that is located later in the two adjacent track points is determined to be an abnormal track point, and the position information of the abnormal track point is removed from the track point data.
However, due to factors such as power consumption factors or user permission settings, the electronic device cannot collect the track point data in real time, so that the collection time interval of the collected track point data of the electronic device is uneven. For collecting the track point data with uneven time intervals, the track point cleaning method is not applicable, so that the electronic equipment cannot obtain accurate track point data.
Disclosure of Invention
In view of the above, the present application provides a track point processing method, an electronic device, and a storage medium, so as to solve the problem that the electronic device cannot obtain accurate track point data with non-uniform distribution.
In a first aspect, an embodiment of the present application provides a track point processing method, which is applied to an electronic device, where the method includes:
Determining a residence time interval of the electronic equipment in a specified time period based on the motion state of the electronic equipment;
acquiring track point data acquired in the residence time interval, wherein the track point data comprises position information of a plurality of track points arranged according to the acquisition time sequence;
determining center positions of the plurality of track points based on the position information of the plurality of track points;
Taking the track points, of which the distances between the track points and the central position are larger than an error threshold value, as abnormal track points;
And modifying the position information of the abnormal track points based on the position information of the non-abnormal track points of each appointed number before and after the abnormal track points.
In one possible implementation manner, the determining, based on the motion state of the electronic device, a residence time interval of the electronic device in the specified time period includes:
acquiring a motion state score of the electronic equipment at each time point in the appointed time period;
Carrying out median smoothing treatment on the motion state score of each time point to obtain a median smoothing score of each time point;
determining a continuous time period consisting of continuous time points with a median smooth fraction equal to a preset stay fraction in the appointed time period;
and if the time length of the continuous time period is longer than the preset time length, taking the continuous time period as the residence time interval.
In one possible implementation manner, the obtaining manner of the error threshold value includes:
Receiving a group distance threshold value issued by cloud equipment, wherein the group distance threshold value is a distance threshold value calculated by the cloud equipment based on track point data of a plurality of sample data, and each sample data comprises track point data of one sample equipment in a sample stay time interval;
the error threshold is determined based on the population distance threshold.
In one possible implementation, the determining the error threshold based on the population distance threshold includes:
taking the group distance threshold value as the error threshold value; or alternatively
Acquiring track point data of the electronic equipment in at least one sample residence time interval;
Calculating a personal distance threshold based on trajectory point data within the at least one sample dwell time interval;
And taking the average value of the group distance threshold value and the personal distance threshold value as the error threshold value.
In one possible implementation, the calculating the personal distance threshold based on the trajectory point data within the at least one sample residence time interval includes:
Calculating a sample center position for each sample residence time interval based on the track point data in the sample residence time interval, and calculating a distance deviation between the position of each track point in the sample residence time interval and the sample center position;
calculating to obtain a mean value and a variance based on the distance deviation corresponding to each track point in the at least one sample residence time interval;
And calculating a preset fractional number of the lognormal distribution based on the mean value and the variance to obtain the personal distance threshold, wherein the distance deviation corresponding to each track point in the at least one sample residence time interval accords with the lognormal distribution.
In one possible implementation manner, the determining the center positions of the plurality of track points based on the position information of the plurality of track points includes:
clustering the plurality of track points based on the position information of the plurality of track points;
determining each track point included in the largest cluster obtained by clustering;
and taking the average position of each track point included in the maximum cluster as the center position of the track points.
In one possible implementation manner, the modifying the location information of the abnormal track point based on the location information of each specified number of non-abnormal track points before and after the abnormal track point includes:
Acquiring position information of a specified number of non-abnormal track points before the abnormal track point and position information of a specified number of non-abnormal track points after the abnormal track point;
Calculating average position information of the acquired position information of the non-abnormal track points;
And modifying the position information of the abnormal track points into the average position information.
In a second aspect, an embodiment of the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method according to the first aspect.
In a third aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where when the program runs, the program controls a device in which the computer readable storage medium is located to execute the method described in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising executable instructions which, when executed on a computer, cause the computer to perform the method of the first aspect.
By adopting the technical scheme, firstly, track point data acquired in a residence time interval of the electronic equipment is acquired, a central position is determined from a plurality of track points in the residence time interval, then the track points with the distance between the central position and the central position being larger than an error threshold value are used as abnormal track points, and the position information of the abnormal track points is modified by utilizing the position information of a specified number of non-abnormal track points before and after the abnormal track points. In the stay time interval, the movement range of the electronic equipment is smaller and even still, so that all the collected track points are not uniformly distributed, and the distribution is concentrated, so that if track points which deviate from the central positions of the track points further exist, the track points are likely to be caused by false detection of the electronic equipment, and the position information of the position points can be corrected by utilizing the position information of non-abnormal track points before and after the track points. Therefore, the embodiment of the application realizes the correction of the abnormal points of the unevenly distributed track points and improves the accuracy of the track point data.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a software structural block diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is an exemplary schematic diagram of an electronic fence provided by an embodiment of the present application;
fig. 4 (a) is an exemplary schematic diagram of a mobile phone display interface according to an embodiment of the present application;
FIG. 4 (b) is an exemplary schematic diagram of another mobile phone display interface according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for processing trace points according to an embodiment of the present application;
FIG. 6 is an exemplary schematic diagram of a trace point before and after processing according to an embodiment of the present application;
FIG. 7 is an exemplary schematic diagram of a determination of a residence time interval provided by an embodiment of the present application;
FIG. 8 is a plot of motion state scores over a period of time provided by an embodiment of the present application;
FIG. 9 is an exemplary diagram of a log-normal distribution curve fitted to a distance deviation according to an embodiment of the present application;
FIG. 10 (a) is an exemplary diagram of a log-normal distribution curve corresponding to a residential area according to an embodiment of the present application;
FIG. 10 (b) is an exemplary diagram of a log-normal distribution curve corresponding to an office area according to an embodiment of the present application;
fig. 11 (a) -11 (c) are exemplary diagrams of log-normal distribution curves fitted to the distance deviations of different numbers of track points according to embodiments of the present application.
Detailed Description
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first instruction and the second instruction are for distinguishing different user instructions, and the sequence of the instructions is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The track point processing method provided by the embodiment of the application can be applied to electronic equipment, for example, the electronic equipment can be a mobile phone, a tablet personal computer, a notebook computer, an ultra-mobile personal computer (UMPC), a personal digital assistant (personaldigital assistant, PDA), a smart watch, a wearable device and the like, and the embodiment of the application does not limit the type of the electronic equipment.
As shown in fig. 1, fig. 1 is a schematic diagram of an electronic device according to an embodiment of the present application, where the electronic device shown in fig. 1 may include a processor 110, an external memory 121, a universal serial bus (Universal Serial Bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 170, cameras 1 to n 180, and display screens 1 to n 190. Wherein the sensor module 170 may include: a gyro sensor 170A, an acceleration sensor 170B, a distance sensor 170C, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the Processor 110 may include an application Processor (Application Processor, AP), a Graphics Processor (Graphics ProcessingUnit, GPU), an image signal Processor (IMAGE SIGNAL Processor, ISP), and/or a controller, among others. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 110 may generate operation control signals according to the instruction operation code and the timing signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G or the like for use on the first electronic device.
The wireless Communication module 160 may provide solutions for wireless Communication including WLAN (Wireless Local Area Networks, wireless local area network), BT (Bluetooth), GNSS (GlobalNavigation SATELLITE SYSTEM ), FM (Frequency Modulation, frequency modulation), NFC (NEAR FIELD Communication technology), and/or IR (infrared technology) applied on an electronic device.
In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (Global System for Mobile Communications, GSM), general packet radio service (GENERALPACKET RADIO SERVICE, GPRS), code Division multiple access (Code Division Multiple Access, CDMA), wideband code Division multiple access (Wideband Code DivisionMultiple Access, WCDMA), time Division synchronous code Division multiple access (Time-Division-Synchronous Code Division Multiple Access, TD-SCDMA), long term evolution (LongTerm Evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (Global Positioning System, GPS), a global navigation satellite system (Global NavigationSatellite System, GLONASS), a Beidou satellite navigation system (Beidou Navigation SATELLITE SYSTEM, BDS), a Quasi-Zenith satellite system (Quasi-Zenith SATELLITESYSTEM, QZSS), and/or a satellite based augmentation system (SatelliteBased Augmentation System, SBAS), among others.
The display screen 190 is used to display images, videos, and the like.
The external memory interface 120 may be used to interface with an external memory card, such as a Micro secure digital (Secure Digital Memory, SD) card, to enable expansion of the memory capabilities of the electronic device. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. Files such as music, video, audio files, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code, where the executable program code includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, and application programs (such as a GPS positioning function, etc.) required for at least one function, among others. The storage data area may store data created during use of the electronic device (e.g., trajectory point data, motion state scores, etc.), and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110.
The software system of the electronic device may adopt a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, an Android (Android) system with a layered architecture is taken as an example, and a software system of electronic equipment is exemplified. As shown in fig. 2, the hierarchical architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, a hardware abstraction layer, and a hardware layer.
As shown in fig. 2, the application layer may be provided with a plurality of applications, for example, may include an office APP, a smart home APP, an express APP, a take-away APP, and the like.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 2, the application framework layer may include: a location information management module, a content provider, a view system, etc.
As an example of the present application, the location information management module is used to clean the trajectory point data.
The content provider is used to store and retrieve data, which may include track point data, motion state scores, group distance thresholds, personal distance thresholds, etc., and make such data accessible to applications.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to construct a display interface for an application, which may be composed of one or more views, such as a view that includes displaying APP icons and popups, a view that includes displaying text, and a view that includes displaying pictures.
The hardware abstraction layer (Hardware Abstraction Layer, HAL) is an interface layer between the operating system kernel and the hardware circuitry, which aims at abstracting the hardware. The hardware interface details of a specific platform are hidden, a virtual hardware platform is provided for an operating system, so that the operating system has hardware independence, and can be transplanted on various platforms.
Hardware layers including, but not limited to, positioning components, acceleration sensors, gyroscopic sensors, and display screens. Wherein the positioning means is for realizing a positioning function, the positioning means may be a GPS positioning means as an example. Acceleration sensors and gyroscopic sensors may be used to determine the state of an electronic device, i.e. whether the electronic device is in motion or in a stationary state.
For easy understanding, an application scenario of the embodiment of the present application will be described first. The embodiment of the application can be applied to an APP intelligent recommendation scene, in which the electronic equipment can provide a place-based recommendation service, and if a user frequently uses some APPs in a fixed place, the APPs can be recommended to the user when the user is detected to enter the range of a global positioning system (global positioning system, GPS) corresponding to the fixed place.
Taking an APP to be recommended as an example, in order to implement a location-based recommendation service, the electronic device needs to collect track points passed by a user when using the APP, so as to determine at which fixed locations the user uses the APP, and construct a GPS range corresponding to the determined fixed locations as an electronic fence range. Further, when the electronic device enters the electronic fence range, the electronic device can recommend the APP to the user.
For example, as shown in fig. 3, assuming that the electronic fence 1 is located in an electronic industrial park, the electronic fence 1 is an electronic fence of an office APP. The electronic fence 2 is positioned in a certain district, and the electronic fence 2 is an electronic fence of the express APP.
As shown in fig. 4 (a) and fig. 4 (b), it is assumed that an office APP and an express APP are installed on a user's mobile phone at the same time, when the user's mobile phone moves into the electronic fence 1, a card punching service that the office APP can provide is displayed on the mobile phone, that is, in fig. 4 (a), an "instant card punching" and a confirmation button and a cancel button are displayed on the screen of the mobile phone through a pop-up window.
When the mobile phone of the user moves into the electronic fence 2, express information display service which can be provided by the express APP is displayed on the mobile phone, namely, in fig. 4 (b), express information is displayed on a screen of the mobile phone through a popup window, and a confirmation button and a cancel button are displayed. Other APP's may be installed on the user's mobile phone, such as the camera, address book, phone, album, etc. in fig. 4 (a) and fig. 4 (b).
The embodiment of the application can also be applied to an intelligent home scene, in which the electronic equipment can provide a location-based intelligent home control service, and if a user frequently uses the intelligent home control APP to control home appliances at a fixed location, the user can be reminded to open the intelligent home control APP when the user is detected to enter a GPS range corresponding to the fixed location, namely an electronic fence of the intelligent home control APP.
It can be seen that the accuracy of the trace point data directly affects the accuracy of the constructed electronic fence, which affects the accuracy of the subsequent APP recommendation and APP wakeup. Moreover, due to factors such as authority setting of the APP, the electronic device may not be able to acquire the geographical position of the user when using the APP each time, so that the track data of the user when using the APP may be missing.
It should be noted that the above two application scenarios are only examples, and the track point processing method provided by the embodiment of the present application can obtain processed track point data, and the application of the processed track point data is not limited to building an electronic fence.
In view of the foregoing, in order to improve accuracy of track point data, an embodiment of the present application provides a track point processing method, which is applied to the electronic device. As shown in fig. 5, the track point processing method provided by the embodiment of the application may include the following steps:
S501, determining a residence time interval of the electronic device in a specified time period based on the motion state of the electronic device.
In the embodiment of the application, the preset time period can be set in advance according to the use requirement of the track point data. For example, for an APP recommended scenario, a residence time interval of the electronic device per day may be determined, and accordingly, the specified time period may be 0 point to 24 points of the previous day.
Wherein the stay time interval is a time period for a user using the electronic device to stay at a fixed location.
For example, if the user is not going out during a company shift from 9 am to 12 am of the day, the time period between 9 am and 12 am of the day is a stay time interval.
For another example, if the user is not at home from 3 pm to 5 pm of the day, the period of time between 3 pm to 5 pm of the day is a stay time interval.
S502, acquiring track point data acquired in a stay time interval.
The track point data includes position information of a plurality of track points arranged according to the acquisition time sequence, and specifically may include an acquisition time stamp and position information of each track point. For example, the position information of each track point is the longitude and latitude of the track point.
The electronic equipment records the track point data collected in history, and after the residence time interval is determined, the track point data with the time stamp in the residence time stamp can be obtained.
In the case where a plurality of stay time intervals are determined, the trajectory point data acquired in each stay time interval may be acquired separately.
S503, determining the center positions of the track points based on the position information of the track points.
Alternatively, a locus point having the smallest sum of distances from other locus points may be determined from among the plurality of locus points, and the locus point may be set as the center position of the plurality of locus points.
Alternatively, an average value of the positional information of the plurality of track points may be calculated, and the average value may be used as the center position of the plurality of track points.
Alternatively, the center positions of the plurality of track points may be determined by a method described below.
S504, taking the track points with the distance from the central position being larger than the error threshold value as abnormal track points.
Alternatively, the region type where the plurality of track points are located may be obtained, and an error threshold corresponding to the region type may be obtained, and then, among the plurality of track points, a track point whose distance from the center position is greater than the error threshold corresponding to the region type is used as an abnormal track point. For example, the region type may include: office areas, residential areas, business areas, and the like.
Or the region types where the plurality of track points are located, namely the error threshold value corresponding to each region type is the same, so that the track points with the distance larger than the error threshold value from the central position among the plurality of track points can be directly used as the abnormal track points.
It is understood that among the plurality of track points, track points other than the abnormal track point are all non-abnormal track points.
S505, modifying the position information of the abnormal track points based on the position information of the non-abnormal track points of the appointed number before and after the abnormal track points.
The specified number of non-abnormal track points before the abnormal track point and the specified number of non-abnormal track points after the abnormal track point may be selected in order of the acquisition time difference from the abnormal track point from small to large. And then calculating the average position information of the selected non-abnormal track points, and modifying the position information of the abnormal track points into the average position information.
For example, when the designated number is 1, the position information of 1 non-abnormal track point before the abnormal track point and having the shortest acquisition time difference from the abnormal track point and the position information of 1 non-abnormal track point after the abnormal track point and having the shortest acquisition time difference from the abnormal track point are acquired, and then the two pieces of position information are averaged as the position information of the abnormal track point.
It can be understood that for each specified number of non-abnormal track points before and after the abnormal track point, the non-abnormal track points are closer to the center position, so that the non-abnormal track points are more accurate; and the acquisition time of the non-abnormal track points is similar to that of the abnormal track points, so that the distance between the abnormal track points and the non-abnormal track points is relatively short, and the position information of the abnormal track points can be modified based on the position information of the non-abnormal track points.
Referring to fig. 6, the location mark point of each droplet shape in the left part of fig. 6 represents one track point, and it can be seen that the track points are distributed in a circular area in a concentrated manner, and the track points exist outside the circular area. Since most of these trace points are located in the circular area, and a small part of these trace points are located in the circular area but are located closer to the circular area, the uppermost trace point is significantly deviated from the circular area, and is not in conformity with the normal, and a large probability is generated by false detection. The track points are processed in the above manner, and each track point after the processing is shown in the right part of fig. 6. By comparing the left part and the right part in fig. 6, it can be seen that the track point processing method provided by the embodiment of the application can obviously correct the positions of track points with errors, thereby improving the accuracy of the positions of the track points.
By adopting the technical scheme, firstly, track point data acquired in a residence time interval of the electronic equipment is acquired, a central position is determined from a plurality of track points in the residence time interval, then the track points with the distance between the central position and the central position being larger than an error threshold value are used as abnormal track points, and the position information of the abnormal track points is modified by utilizing the position information of a specified number of non-abnormal track points before and after the abnormal track points. In the stay time interval, the movement range of the electronic equipment is smaller and even still, so that all the collected track points are not uniformly distributed, and the distribution is concentrated, so that if track points which deviate from the central positions of the track points further exist, the track points are likely to be caused by false detection of the electronic equipment, and the position information of the position points can be corrected by utilizing the position information of non-abnormal track points before and after the track points. Therefore, the embodiment of the application realizes the correction of the abnormal points of the unevenly distributed track points and improves the accuracy of the track point data.
After determining the abnormal track points in S504, if the number of non-abnormal track points before the abnormal track points is less than the specified number, each non-abnormal track point before the abnormal track point may be selected; if the number of non-abnormal track points after the abnormal track point is smaller than the specified number, each non-abnormal track point after the abnormal track point can be selected. And then modifying the position information of the abnormal track points based on the position information of the non-abnormal track points selected from the front and the back of the abnormal track points. For example, the position information of the abnormal track point is modified as follows: average position information of each non-abnormal track point selected from the front and the back of the abnormal track point.
For example, a specified number of 2, assume that the trajectory points included in the dwell time interval are: non-abnormal track point 1, non-abnormal track point 2, non-abnormal track point 3, non-abnormal track point 4. The number of non-abnormal track points preceding the abnormal track point 1 is 1< the specified number 2, and thus 1 non-abnormal track point preceding the abnormal track point 1, i.e., non-abnormal track point 1, is selected. The number of non-abnormal track points after the abnormal track point 1 is 3> the designated number 2, so 2 non-abnormal track points after the abnormal track point 1, namely, the non-abnormal track point 2 and the non-abnormal track point 3 are selected in the order from the near to the far with the acquisition time of the abnormal track point 1. And then modifying the position information of the abnormal track point 1 into: average position information of the non-abnormal trajectory point 1, the non-abnormal trajectory point 2, and the non-abnormal trajectory point 3.
In the embodiment of the present application, after determining the abnormal track point in S504, if there is no non-abnormal track point in each track point before the abnormal track point and/or there is no non-abnormal track point in each track point after the abnormal track point, the position information of the abnormal track point may be modified to be the center position.
For example, assume that the locus points included in the stay time interval are: abnormal trajectory point 1, non-abnormal trajectory point 2, non-abnormal trajectory point 3. Since the abnormal trajectory point 1 is not preceded by a non-abnormal trajectory point, the position information of the abnormal trajectory point 1 may be modified to the center position at this time.
When the position of one abnormal track point is corrected, if the position information of other abnormal track points is used, new errors are brought to the position of the abnormal track point, so if no non-abnormal track point exists before and/or after the abnormal track point, the position information of the abnormal track point can be directly corrected to be the center position.
Compared with a mode of deleting the abnormal track points directly, the method reduces the number of the track points, so that the number of the track points which can be used subsequently is reduced, and the accuracy of positioning service based on the track points can be reduced. The embodiment of the application can correct the positions of the abnormal track points, thereby improving the accuracy of the positions of the track points and the accuracy of the positioning service on the basis of not reducing the number of the acquired track points.
Referring to fig. 7, the manner of determining the residence time interval of the electronic device based on the motion state of the electronic device in S501 includes the following steps:
s701, acquiring the motion state score of the electronic device at each time point in a specified time period.
The electronic equipment stores the motion state of each time point in a designated time period, and the electronic equipment can periodically detect the motion state of the current time point. When the motion state score of each time point needs to be obtained, the motion state score corresponding to the motion state of the time point can be obtained according to the preset corresponding relation between each motion state and the motion state score. The motion state score may represent a moving speed or acceleration of the electronic device, or the like.
For example, when the motion state is walking, the corresponding motion state score is 1; when the exercise state is running, the corresponding exercise state score is 1; when the motion state is riding, the corresponding motion state score is 1; when the motion state is stationary, the corresponding motion state score is 0.
S702, performing median smoothing processing on the motion state score of each time point to obtain a median smoothing score of each time point.
The median smoothing process may also be referred to as a median filtering process. That is, for each time point, the median value of the motion state scores of the time points within the neighborhood window of the time point is updated to the motion state score of the time point. The size of the neighborhood window can be preset according to actual requirements, for example, the neighborhood window is 3 minutes or 4 minutes.
For example, referring to fig. 8, the upper line diagram in fig. 8 is a motion state score of an electronic device at each time point in a time period of 22:48-01:22, the horizontal axis represents time, the vertical axis represents the motion state score, and the text above the line diagram represents the area in which the electronic device is located or the action performed by the user using the electronic device in each time period. For example, in the period of 0:00-08:24, the electronic equipment is in the home of the user; in the 08:24-09:36 time period, the user carries the electronic equipment to the company, and the company can be simply referred to as going to work.
The motion state score at each time point shown in fig. 8 is median smoothed to obtain a line graph in the lower part of fig. 8. As can be seen by comparing the line graph above in fig. 8 with the line graph below in fig. 8, there is a time point at which the originally detected motion state score is not zero, and the motion state score is 0 after the median smoothing process. The median smoothing can eliminate isolated points, wherein the isolated points are the motion state scores which have larger phase difference with the motion state scores of all time points in the neighborhood window, and the isolated points are generated by detection errors in a large probability, so that the accuracy of determining the stay time period can be improved by correcting the isolated motion state scores through median smoothing.
In addition, if the motion state score of each time point is subjected to the mean value filtering process, although the mean value filtering can eliminate a certain isolated point, the degree of eliminating the isolated point is lower than that of median smoothing process, so that the embodiment of the application can obtain a more accurate residence time interval by adopting the median smoothing process.
The electronic device can detect the motion state of each time point by adopting a motion state identification algorithm, and the detection result of the motion state is accurate under the condition that the electronic device is at rest or the motion speed is low, but when the electronic device is in a short-time high-speed motion condition, such as the mobile phone falls off a table or is rapidly shaken by a user, the electronic device can be identified as the high-speed motion state, so that the motion state score of each time point is large, the motion state scores before and after the time point are low, namely the phenomenon of the motion state protruding in the rest process appears, and the problem of the motion state protruding in the rest process can be eliminated by adopting a median smoothing processing mode.
S703, determining a continuous time period consisting of continuous time points with a median smooth fraction equal to a preset stay fraction in the specified time period.
Wherein, preset stay fraction is: a motion state score for an electronic device in a stationary state.
And S704, if the duration of the continuous time period is longer than the preset duration, taking the continuous time period as a residence time interval.
If the duration of the continuous time period is longer than the preset duration, the electronic equipment is in an motionless state for a long time, and the user stays in one area in the continuous time period, so that the continuous time period can be used as a stay time interval.
Otherwise, if the duration of the continuous time period is less than or equal to the preset duration, the continuous time period is shorter, which means that the user using the electronic device does not actually stay, so that the continuous time period with shorter time can not be used as the stay time interval.
The preset time period may be set based on an empirical value, and as an example, the preset time period may be 10 minutes.
Through the method, the embodiment of the application can carry out median smoothing processing on the motion state scores of all time points in the appointed time period, thereby reducing the isolated value in the motion state scores, namely reducing the error of the motion state scores, so as to determine a more accurate stay time interval by using a more accurate motion state score. Through testing, the accuracy of the residence time interval determined by the method is high.
In the embodiment of the present application, the method for determining the center positions of the plurality of track points by the electronic device in S503 based on the position information of the plurality of track points includes:
step one, clustering a plurality of track points based on the position information of the track points.
Alternatively, the clustering algorithm used for clustering the plurality of track points may be: k-means, mean shift (MEAN SHIFT), gaussian mixture, or the like, which are not particularly limited in this embodiment of the application.
Step two, determining each track point included in the largest cluster obtained by clustering.
Wherein the largest cluster is: the cluster containing the most track points.
And step three, taking the average position of each track point included in the maximum cluster as the center position of a plurality of track points.
Taking the position information of each track point as the longitude and latitude as an example, the average longitude of each track point included in the maximum cluster may be used as the longitude of the center position, and the average latitude of each track point included in the maximum cluster may be used as the latitude of the center position.
Since isolated points caused by detection errors may exist in each track point, the embodiment of the disclosure clusters a plurality of track points and screens the largest cluster, that is, the influence of the isolated points on the determination of the center position can be eliminated, thereby obtaining a more accurate center position.
The manner of obtaining the error threshold used in the above-described embodiments is described below.
The acquisition mode of the error threshold value comprises the following steps: and receiving a group distance threshold value issued by the cloud device, and determining an error threshold value based on the group distance threshold value.
The group distance threshold is a distance threshold calculated by the cloud device based on track point data of a plurality of sample data, and each sample data comprises track point data of one sample device in a sample stay time interval.
Trace point data of the sample device in one sample residence time interval may be collected in advance for each sample device as one sample data. Wherein the sample residence time may be preset or determined in the manner of fig. 7.
The sample device may be a conventional electronic device and/or a test (beta) device, among others. For example, 3000 sample data may be acquired for a common electronic device and 40 sample data for a beta device.
Aiming at common electronic equipment, such as a mobile phone used by a user, the mobile phone can be continuously connected with the same WiFi time period, and the acquired track point data is used as sample data. For example, track point data collected during a period when a user is continuously connected to home WiFi, company WiFi or restaurant WiFi is used as one sample data.
Aiming at beta equipment, such as a test mobile phone, a tester or a robot can hold the test mobile phone, simulate the activities of a user in a fixed place, and take track point data acquired by the test mobile phone in a test time period as one sample of data.
The method for determining the error threshold based on the group distance threshold comprises the following two modes:
mode one uses the group distance threshold as an error threshold.
And secondly, acquiring track point data of the electronic equipment in at least one sample residence time interval, calculating a personal distance threshold based on the track point data in the at least one sample residence time interval, and taking the average value of the group distance threshold and the personal distance threshold as an error threshold.
The manner in which the electronic device calculates the personal distance threshold may include the steps of:
Step 1, calculating a sample center position for each sample residence time interval based on track point data in the sample residence time interval, and calculating a distance deviation between the position of each track point in the sample residence time interval and the sample center position.
The manner of calculating the sample center position of each track point in the sample residence time interval is the same as the manner of determining the center positions of the plurality of track points in the above-mentioned S503, and the description related to S503 may be referred to, and will not be repeated here.
And 2, calculating to obtain a mean value and a variance based on the distance deviation corresponding to each track point in at least one sample residence time interval.
Wherein the average valueThe method comprises the following steps:
;
variance of The method comprises the following steps:
;
Wherein, Is the distance deviation of the track point k,/>For the number of trace points within at least one sample dwell interval,/>Representing the natural logarithm.
And step 3, calculating preset fractional numbers of the lognormal distribution based on the mean value and the variance to obtain a personal distance threshold.
The distance deviation corresponding to each track point in at least one sample residence time interval accords with the lognormal distribution.
In order to analyze the distribution of the distance deviation coincidence corresponding to each track point in the sample residence time interval, the embodiment of the application can obtain the distribution curves of different distribution types by fitting the obtained distance deviation to different distributions, such as fitting a log-normal distribution, lognorm, a chi-square distribution, chi2, an exponential power exponpow, an exponential expon and a cauchy cauchy distribution respectively. And the log-normal distribution curve obtained by fitting is more in accordance with the distribution of the distance deviation through comparison, so that the distribution type of the distance deviation can be determined to be the log-normal distribution.
Referring to fig. 9, in fig. 9, the horizontal axis represents the distance deviation between the position of the track point and the center position, the vertical axis represents the percentage of the number of track points of the same distance deviation to the total number of track points in the sample residence time interval, the solid line straight line represents the distribution of different distance deviations, and the dotted line curve represents the log-normal distribution curve obtained by fitting the distance deviation.
The difference between the preset bit and 100 bits is smaller than the preset bit difference, i.e. the preset bit is close to 100 bits. For example, the preset split is 95 split.
Taking a preset bit of 95 bits as an example, the 95 bits of the lognormal distributionThe method comprises the following steps:
;
Where e represents the base of the natural logarithm.
Because the distance deviation exceeding the preset quantile has larger difference with most distance deviations, the large probability is the distance deviation of the track points which are detected by mistake, and the personal distance threshold value obtained by the method can enable the subsequent abnormal points which are determined based on the personal distance threshold value to be more accurate.
The group distance threshold value can reflect the error condition of the collected track points and the central position of a plurality of electronic devices in the stay time interval, and has universality. The personal distance threshold value can reflect the error condition between each collected track point and the central position of the electronic equipment applied to the track point processing method in the sample stay time interval, so that the personal movement condition of the electronic equipment is more met. Therefore, the average value of the group distance threshold value and the personal distance threshold value is used as an error threshold value, so that the obtained error threshold value can be more accurate.
Meanwhile, because hardware configurations of different electronic devices are different and are influenced by the positioning signal intensity of the geographical area, the personal distance threshold values calculated by the different electronic devices may be different. For example, among the personal distance thresholds calculated by 10 electronic devices, 2 personal distance thresholds are less than 10 meters, and the remaining personal distance thresholds are 40 meters. Therefore, the embodiment of the disclosure combines the personal distance threshold and the group distance threshold to obtain an error threshold, so that the error of the personal distance threshold is reduced, and the individuality of the electronic device is considered, so that the obtained error threshold is more suitable for the electronic device.
It will be appreciated that a personal distance threshold may be calculated using steps 1 to 3 above. In another implementation manner, the embodiment of the application can determine the personal distance threshold corresponding to different types of areas. That is, before step 2, for each sample residence time interval, the type of region corresponding to the trajectory point data acquired within that sample residence interval is identified. And then, when the step 2 is executed, fitting the log normal distribution to the calculated distance deviation according to the track point data of the same region type, and calculating to obtain the mean value and the variance. And then, calculating a preset score of the lognormal distribution based on the mean value and the variance to obtain a personal distance threshold corresponding to the region type.
As an example, assuming that 5 sample residence time intervals are acquired for one electronic device, it is determined that the trajectory point data included in 2 sample residence time intervals is in an office area and the trajectory point data included in 3 sample residence time intervals is in a residential area by the trajectory point position information included in the trajectory point data.
And calculating the center position of the sample and the distance deviation between the position of each track point and the center position of the sample according to track point data included in 2 sample residence time intervals of the office area, fitting the calculated distance deviation to log-normal distribution, and calculating to obtain the mean value and the variance. And then, calculating a preset score of the lognormal distribution based on the mean value and the variance to obtain a personal distance threshold corresponding to the office area.
And calculating the center position of the sample and the distance deviation between the position of each track point and the center position of the sample according to track point data included in 3 sample residence time intervals of the residential area, fitting the calculated distance deviation to log-normal distribution, and calculating to obtain the mean value and the variance. And then, calculating a preset score of the lognormal distribution based on the mean value and the variance to obtain a personal distance threshold corresponding to the residential area.
Referring to fig. 10 (a) and 10 (b), the horizontal axis represents the distance deviation between the positions of the trace points and the center position, and the vertical axis represents the percentage of the number of trace points of the same distance deviation to the total number of trace points in the sample residence time interval. The solid line straight line in fig. 10 (a) shows the distribution of different distance deviations obtained for the trace points in the residential area, and the broken line curve is a log-normal distribution curve obtained by fitting. The solid line straight line in fig. 10 (b) shows the distribution of the different distance deviations obtained for the track points in the office area, and the broken line curve is a log-normal distribution curve obtained by fitting. As can be seen from fig. 10 (a) and 10 (b), the 95 th percentile of the log-normal distribution curve of the residential area is 98 meters, and the 95 th percentile of the log-normal distribution curve of the office area is 101 meters. Since the movable ranges of the users within the different types of regions are different, it is more accurate to determine different personal distance thresholds for the different types of regions.
Similarly, the cloud device can calculate the group distance threshold corresponding to each region type according to the sample data collected in the region of the region type in the mode.
In the embodiment of the present disclosure, if the group distance threshold and the individual distance threshold each distinguish an area type, the target area type where each track point data is located in the residence time interval acquired in S502 may be identified, and then the average value of the individual distance threshold and the group distance threshold of the target area type is calculated as the error threshold in S504.
Since it is difficult to stably fit the lognormal distribution when the number of trace points is small, sample data in which the number N of trace points in the sample residence time interval is greater than 300 can be selected in order to improve the accuracy of the determined personal distance threshold.
Referring to fig. 11 (a) to 11 (c), each horizontal axis represents a distance deviation between a position of a trace point and a center position, and the vertical axis represents a percentage of the number of trace points of the same distance deviation to the total number of trace points in a sample residence time interval. Fig. 11 (a) to 11 (c) sequentially show different distance deviation distribution conditions, namely, a solid line straight line in the graph, and a log-normal distribution curve obtained by fitting, namely, a dotted line curve in the graph, when the number N of track points in the sample residence time interval is 22, 410 or 799. As can be seen from fig. 11 (a) to 11 (c), when the number N of track points is greater than 300, a relatively accurate lognormal distribution can be obtained by fitting.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, where when the program runs, the program controls a device where the computer readable storage medium is located to execute some or all of the steps in the foregoing embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (randomaccess memory RAM), or the like.
In a specific implementation, an embodiment of the present application further provides a computer program product, where the computer program product contains executable instructions, where the executable instructions when executed on a computer cause the computer to perform some or all of the steps in the above method embodiments.
Embodiments of the disclosed mechanisms may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the application may be implemented as a computer program or program code that is executed on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of the present application, a processing system includes any system having a Processor such as, for example, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), microcontroller, application specific integrated circuit (ApplicationSpecific Integrated Circuit, ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in the present application are not limited in scope by any particular programming language. In either case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy diskettes, optical disks, optical disk read-only memories (Compact Disc Read Only Memory, CD-ROMs), magneto-optical disks, read-only memories (ReadOnly Memory, ROMs), random Access Memories (RAMs), erasable programmable read-only memories (Erasable Programmable Read Only Memory, EPROMs), electrically erasable programmable read-only memories (ElectricallyErasable Programmable Read Only Memory, EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the internet in an electrical, optical, acoustical or other form of propagated signal. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the drawings of the specification. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the present application, each unit/module mentioned in each device is a logic unit/module, and in physical terms, one logic unit/module may be one physical unit/module, or may be a part of one physical unit/module, or may be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logic unit/module itself is not the most important, and the combination of functions implemented by the logic unit/module is only a key for solving the technical problem posed by the present application. Furthermore, in order to highlight the innovative part of the present application, the above-described device embodiments of the present application do not introduce units/modules that are less closely related to solving the technical problems posed by the present application, which does not indicate that the above-described device embodiments do not have other units/modules.
It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the application.

Claims (6)

1. A method for processing a trace point, the method being applied to an electronic device, the method comprising:
Acquiring a motion state score of the electronic equipment at each time point in a specified time period, wherein the motion state score is used for representing the moving speed or the acceleration of the electronic equipment;
Carrying out median smoothing treatment on the motion state score of each time point to obtain a median smoothing score of each time point;
determining a continuous time period consisting of continuous time points with a median smooth score equal to a preset stay score in the specified time period, wherein the preset stay score is 0, and the motion state of the electronic equipment is represented as a static state when the median smooth score is 0;
If the time length of the continuous time period is longer than the preset time length, taking the continuous time period as a residence time interval;
acquiring track point data acquired in the residence time interval, wherein the track point data comprises position information of a plurality of track points arranged according to the acquisition time sequence;
determining center positions of the plurality of track points based on the position information of the plurality of track points;
Taking the track points, of which the distances between the track points and the central position are larger than an error threshold value, as abnormal track points;
If the number of the non-abnormal track points before and after the abnormal track point is larger than or equal to the specified number, acquiring the position information of the specified number of the non-abnormal track points before the abnormal track point and the position information of the specified number of the non-abnormal track points after the abnormal track point;
If the number of non-abnormal track points before and after the abnormal track points is smaller than the specified number, acquiring all the abnormal track points before and after the abnormal track points;
If the number of non-abnormal track points before the abnormal track points is smaller than the specified number, the number of non-abnormal track points after the abnormal track points is larger than or equal to the specified number, acquiring the position information of all the non-abnormal track points before the abnormal track points, and acquiring the position information of the non-abnormal track points after the abnormal track points;
if the number of the non-abnormal track points before the abnormal track point is larger than or equal to the specified number, and the number of the non-abnormal track points after the abnormal track point is smaller than the specified number, acquiring the position information of the non-abnormal track points of the specified number before the abnormal track point, and acquiring the position information of all the non-abnormal track points after the abnormal track point;
Calculating the average position information of the acquired position information of the non-abnormal track points, and modifying the position information of the abnormal track points into the average position information;
If no non-abnormal track points exist before and/or after the abnormal track points, modifying the position information of the abnormal track points to the central position, wherein the position information of the non-abnormal track points and the modified position information of the abnormal track points are used for constructing an electronic fence;
The method for acquiring the error threshold value comprises the following steps:
Receiving a group distance threshold value issued by cloud equipment, wherein the group distance threshold value is a distance threshold value calculated by the cloud equipment based on track point data of a plurality of sample data, and each sample data comprises track point data of one sample equipment in a sample stay time interval;
taking the group distance threshold value as the error threshold value; or alternatively
Acquiring track point data of the electronic equipment in at least one sample residence time interval;
Calculating a personal distance threshold based on trajectory point data within the at least one sample dwell time interval;
And taking the average value of the group distance threshold value and the personal distance threshold value as the error threshold value.
2. The method of claim 1, wherein the calculating the personal distance threshold based on trajectory point data within the at least one sample residence time interval comprises:
Calculating a sample center position for each sample residence time interval based on the track point data in the sample residence time interval, and calculating a distance deviation between the position of each track point in the sample residence time interval and the sample center position;
calculating to obtain a mean value and a variance based on the distance deviation corresponding to each track point in the at least one sample residence time interval;
And calculating a preset fractional number of the lognormal distribution based on the mean value and the variance to obtain the personal distance threshold, wherein the distance deviation corresponding to each track point in the at least one sample residence time interval accords with the lognormal distribution.
3. The method of claim 1, wherein the determining the center position of the plurality of trajectory points based on the position information of the plurality of trajectory points comprises:
clustering the plurality of track points based on the position information of the plurality of track points;
determining each track point included in the largest cluster obtained by clustering;
and taking the average position of each track point included in the maximum cluster as the center position of the track points.
4. An electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method of any of claims 1-3.
5. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer readable storage medium is located to perform the method of any one of claims 1-3.
6. A computer program product comprising executable instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1-3.
CN202310670790.3A 2023-06-08 2023-06-08 Track point processing method, electronic equipment and storage medium Active CN116414817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310670790.3A CN116414817B (en) 2023-06-08 2023-06-08 Track point processing method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310670790.3A CN116414817B (en) 2023-06-08 2023-06-08 Track point processing method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116414817A CN116414817A (en) 2023-07-11
CN116414817B true CN116414817B (en) 2024-06-07

Family

ID=87054604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310670790.3A Active CN116414817B (en) 2023-06-08 2023-06-08 Track point processing method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116414817B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3312765A1 (en) * 2016-10-21 2018-04-25 Tata Consultancy Services Limited Anomaly detection by self-learning of sensor signals
CN110766937A (en) * 2019-05-22 2020-02-07 北京嘀嘀无限科技发展有限公司 Parking spot identification method and device, electronic equipment and readable storage medium
KR20220047132A (en) * 2020-10-08 2022-04-15 한국과학기술원 Method and System for Enhancing Trust of Supply Chain Using Blockchain Platform with Robust Data Model and Verification Mechanisms
CN114509076A (en) * 2022-02-16 2022-05-17 平安科技(深圳)有限公司 Moving track data processing method, device and equipment and storage medium
CN115616642A (en) * 2022-09-30 2023-01-17 中汽创智科技有限公司 Correction processing method, device, equipment and storage medium for position data
CN116109320A (en) * 2023-03-07 2023-05-12 上海华兴数字科技有限公司 Order violation monitoring method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3312765A1 (en) * 2016-10-21 2018-04-25 Tata Consultancy Services Limited Anomaly detection by self-learning of sensor signals
CN110766937A (en) * 2019-05-22 2020-02-07 北京嘀嘀无限科技发展有限公司 Parking spot identification method and device, electronic equipment and readable storage medium
KR20220047132A (en) * 2020-10-08 2022-04-15 한국과학기술원 Method and System for Enhancing Trust of Supply Chain Using Blockchain Platform with Robust Data Model and Verification Mechanisms
CN114509076A (en) * 2022-02-16 2022-05-17 平安科技(深圳)有限公司 Moving track data processing method, device and equipment and storage medium
CN115616642A (en) * 2022-09-30 2023-01-17 中汽创智科技有限公司 Correction processing method, device, equipment and storage medium for position data
CN116109320A (en) * 2023-03-07 2023-05-12 上海华兴数字科技有限公司 Order violation monitoring method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于轨迹信息熵分布的异常轨迹检测方法;蒋华;郑依龙;王鑫;;计算机应用研究;20170614(06);全文 *

Also Published As

Publication number Publication date
CN116414817A (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US9880604B2 (en) Energy efficient location detection
US9706364B2 (en) Accounting for indoor-outdoor transitions during position determination
EP2936884B1 (en) Low power always-on determination of indoor versus outdoor state
US20130212094A1 (en) Visual signatures for indoor positioning
US10477506B2 (en) Electronic device and method for determining position
CN111316673B (en) Electronic fence updating method and communication device
US20120058782A1 (en) Method and apparatus for generating and using location information
CN107113568A (en) Mass-rent Network Synchronization state
CN109211259B (en) Display method, device, terminal and storage medium of track route
CN113794987B (en) Electronic device and method for providing location data
EP3917175B1 (en) Positioning information creation method, vehicle-mounted terminal, server device, and positioning system
CN110619027B (en) House source information recommendation method and device, terminal equipment and medium
EP2426460B1 (en) Method and Apparatus for Generating and Using Location Information
CN114510542B (en) Method for generating motion trail, electronic equipment and server
US11438861B2 (en) Using motion state of mobile device for position estimate
CN116414817B (en) Track point processing method, electronic equipment and storage medium
EP2751704B1 (en) Method and apparatus for determining environmental context utilizing features obtained by multiple radio receivers
Lin et al. A deep learning‐based indoor‐positioning approach using received strength signal indication and carrying mode information
CN116432090B (en) Scene recognition method, system and terminal equipment
US20190310343A1 (en) Processing apparatus, computer program code, and method
CN116668951B (en) Method for generating geofence, electronic equipment and storage medium
CN107976171A (en) A kind of information processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant