CN115470382A - Position deviation early warning method and device, electronic equipment and readable storage medium - Google Patents

Position deviation early warning method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115470382A
CN115470382A CN202210971432.1A CN202210971432A CN115470382A CN 115470382 A CN115470382 A CN 115470382A CN 202210971432 A CN202210971432 A CN 202210971432A CN 115470382 A CN115470382 A CN 115470382A
Authority
CN
China
Prior art keywords
specific activity
track
positioning data
clustering
activity 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.)
Pending
Application number
CN202210971432.1A
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210971432.1A priority Critical patent/CN115470382A/en
Publication of CN115470382A publication Critical patent/CN115470382A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The embodiment of the invention provides a position deviation early warning method and device, electronic equipment and a readable storage medium. According to the method, historical position coordinates which are on a specific activity track and are similar to each other in historical positioning data can be clustered into clusters through a clustering algorithm, position coordinates which deviate from a set route are screened out, then the specific activity track is constructed through the position coordinates in the clusters, and further the specific activity track constructed into the segmentation sections is represented through a track function, so that the specific activity track can be quantized through the track function, whether the current position of a target object deviates from the specific activity track of the target object or not can be calculated subsequently, early warning can be automatically sent out under the condition that the position of a student deviates, active participation of parents is omitted in the whole process, and early warning efficiency is improved.

Description

Position deviation early warning method and device, electronic equipment and readable storage medium
Technical Field
The invention belongs to the technical field of networks, and particularly relates to a position deviation early warning method and device, electronic equipment and a readable storage medium.
Background
Along with the continuous deepening of campus information-based construction, an electronic student's card that can upload student's positional information gets into the campus gradually for the head of a family can realize student's safety precaution through the student's positional information that electronic student's card uploaded.
In the prior art, parents need constantly obtain the student position information that electron student's card was uploaded voluntarily to independently judge student's position safety, this kind of mode inefficiency just need to spend the parents too much energy.
Disclosure of Invention
The invention provides a position deviation early warning method and device, electronic equipment and a readable storage medium, and aims to solve the technical problems that an existing early warning mode is low in efficiency and needs to spend too much energy of parents.
In a first aspect, the present invention provides a method for warning a position deviation, where the method includes:
under the condition of obtaining the first authority, acquiring historical positioning data of the target object, which is recorded by the positioning device within a historical time range;
determining at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data;
constructing each specific activity track into at least one segmentation segment, and obtaining a track function for representing the segmentation segment;
under the condition of obtaining the second authority, obtaining the current positioning data of the target object through the positioning device;
and executing early warning operation under the condition that the deviation of the current position of the target object from the specific activity track is determined according to the current positioning data and the track function.
In a second aspect, the present invention provides a position deviation warning apparatus, including:
the first acquisition module is used for acquiring historical positioning data of the target object recorded by the positioning device in a historical time range under the condition of acquiring the first authority;
the clustering module is used for determining at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data;
the segmentation module is used for constructing each specific activity track into at least one segmentation segment and obtaining a track function for representing the segmentation segment;
the second acquisition module is used for acquiring the current positioning data of the target object through the positioning device under the condition of acquiring a second authority;
and the early warning module is used for executing early warning operation under the condition that the deviation of the current position of the target object and the specific activity track is determined according to the current positioning data and the track function.
In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
In a fourth aspect, the present invention provides a readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to execute the above-mentioned position deviation warning method.
In the embodiment of the invention, historical position coordinates which are on a specific activity track and are similar to each other in historical positioning data can be clustered into clusters through a clustering algorithm, the position coordinates which deviate from a set route are screened out, then the specific activity track is constructed through the position coordinates in the clustering clusters, and the specific activity track constructed into the segmentation sections is further characterized through a track function, so that the specific activity track can be quantized through the track function, whether the current position of a target object deviates from the specific activity track of the target object or not can be calculated subsequently, early warning can be automatically sent out under the condition that the position of a student deviates, active participation of parents is omitted in the whole process, and early warning efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating steps of a method for warning a position deviation according to an embodiment of the present invention;
fig. 2 is a diagram of an implementation scenario provided by the embodiment of the present invention;
FIG. 3 is a diagram illustrating a specific activity track according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a clustering process according to an embodiment of the present invention;
fig. 5 is a structural diagram of a position deviation warning device according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Fig. 1 is a flowchart illustrating steps of a method for warning a position deviation according to an embodiment of the present invention, where as shown in fig. 1, the method may include:
step 101, under the condition of obtaining the first authority, obtaining historical positioning data of the target object recorded by the positioning device in a historical time range.
In the embodiment of the present invention, the process of obtaining historical positioning data of the positioning device and other information, signals or data used by the positioning device is performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
In the embodiment of the present invention, referring to fig. 2, an application scenario diagram of a position deviation early warning method provided in the embodiment of the present invention is shown, where the application scenario of the position deviation early warning method may include: the server can be equipment for positioning data acquired by the positioning device, the position deviation early warning method can be particularly applied to the server, and the client can be a terminal for receiving early warning notification of the server. Exemplarily, the positioning device can be an electronic student certificate with a positioning function, the electronic student certificate realizes positioning through a built-in positioning module, and realizes data interaction with a server through a built-in communication module, the client can be equipment used by parents, under the implementation scene, the server can judge whether the current position of a student is deviated from a normal routing route of the student by acquiring positioning data of the electronic student certificate carried by the student, and send an early warning notice to the client when the student is determined to be deviated, or send an early warning notice at the server when the student is determined to be deviated, so that automatic early warning of the student position deviation is realized, and safety management of the student is improved. Of course, the positioning device may also be other devices, such as a wearable device with a positioning function, a positioning chip integrated in a terminal device, and the like, which is not specifically limited in this embodiment of the present invention.
In this step, the server may obtain historical location data of the target object recorded by the location device within a historical time range under the condition that the first right allowing access to the historical location data is obtained, the historical location data may include historical location coordinates respectively collected according to different historical times, the historical location coordinates and the historical times have a one-to-one correspondence, and the historical time range may be within the last month or the last three months.
And step 102, determining at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data.
In the embodiment of the invention, in the implementation scene of the early warning of the position deviation of the student, the student has regular movement characteristics of going to school and getting down school, so that the historical activity path of the student has stable rules and can be followed, and further, the historical positioning data of the student can be used for extracting regular specific activity tracks (such as the going to school path, the getting down school path and the like) of the student.
In practical applications, there is a certain randomness in the activities of students, for example, students may deviate from the established route to play during the course of going to school and going to school, or take other similar routes. This makes a part of the historical activity path of the student have the position coordinates deviated from the given route, but the rest position coordinates can be used for representing the specific activity track which the student walks frequently, so this step aims to eliminate the position coordinates deviated from the given route in the historical positioning data, and represents the specific activity track which the student walks frequently through the rest position coordinates.
Specifically, the embodiment of the invention can eliminate the position coordinate deviating from the set route in the historical positioning data through a clustering algorithm, and further determine the specific activity track according to the position coordinate in the clustering result.
In the embodiment of the invention, a clustering algorithm is a statistical analysis method for researching the classification problem of objects, and the purpose is to divide an object set into a plurality of categories consisting of objects, wherein the categories can be understood as clustering clusters generated by clustering, the clustering clusters are a set of data objects, the objects are similar to the objects in the same clustering cluster, and based on the clustering algorithm, the embodiment of the invention can cluster historical position coordinates which are on a specific activity track and are similar to each other in historical positioning data into the clustering clusters, screen out the position coordinates deviating from a set route, and further construct the specific activity track by the position coordinates in the clustering cluster.
Step 103, constructing each specific activity track into at least one segmentation segment, and obtaining a track function for representing the segmentation segment.
In the embodiment of the present invention, in order to facilitate the server to quantitatively calculate whether the current position of the student deviates from the specific activity track of the student, the embodiment of the present invention may construct the specific activity track as at least one segment, and obtain a track function for characterizing the segment, where the segment is intended to assume a corresponding section in the specific activity track as a straight line segment, so that the specific activity track can be characterized by a linear function. Therefore, the specific activity track can be quantized through the track function, and whether the current position of the student deviates from the specific activity track of the student or not is calculated conveniently.
In practical applications, the active tracks are usually irregular linear forms, and the active tracks may be straight lines, broken lines, curves, or a combination of these line segments, for example, referring to fig. 3, a specific active track AB is an irregular linear form, and it is difficult to directly quantify the specific active track AB and participate in the calculation.
And 104, acquiring the current positioning data of the target object through the positioning device under the condition of acquiring the second authority.
The embodiment of the invention aims to judge whether the current position of the student deviates from the set activity track of the student, so that the current positioning data of the student, which is acquired by the positioning device, can be acquired under the condition that the server side obtains a second permission which allows the current positioning data to be accessed.
And 105, executing early warning operation under the condition that the deviation of the current position of the target object from the specific activity track is determined according to the current positioning data and the track function.
In the embodiment of the invention, after a specific activity track is quantized through a track function, the distance between the position coordinate of the current positioning data and the segmentation section represented by the track function can be calculated, the distance is determined as the distance of the student deviating from the established activity track, and under the condition that the distance is greater than or equal to a preset deviation distance threshold, the current position of the student is further determined to deviate from the established activity track, and an early warning operation is executed, wherein the early warning operation is specifically to send an early warning notification to a client or directly carry out early warning reminding at a server.
Optionally, in an embodiment, the step 102 may specifically include:
and a substep 1021, removing the noisy point position coordinates in the historical positioning data through a clustering algorithm and obtaining a clustering result.
Sub-step 1022, determining at least one specific activity track of the target object according to the clustering result.
Aiming at substeps 1021-1022, the core idea of the clustering algorithm is to divide an object set into a plurality of clustering clusters (clustering results) composed of objects, the objects in the same clustering cluster are similar to each other, based on the clustering algorithm, the embodiment of the invention can cluster historical position coordinates which are on a specific activity track and are similar to each other in historical positioning data into clustering clusters, so that the historical position coordinates outside the clustering clusters can be considered as excluding position coordinates deviating from a given route for excluding, and finally, the specific activity track can be constructed by the position coordinates in the clustering clusters.
Optionally, the sub-step 1022 may be specifically implemented by determining at least one specific activity track according to a position coordinate in the denoised cluster, where the number of the specific activity tracks is the same as the number of the clusters.
In the embodiment of the present invention, the position coordinates in one cluster may be regarded as coordinates approximately on the same specific activity track, and a specific activity track corresponding to each cluster may be constructed according to the position coordinates in each cluster.
Optionally, sub-step 1021 may specifically include:
and a substep A1, performing normalization processing on all position coordinates in the historical positioning data to obtain first positioning data.
And a substep A2, performing cluster analysis on the first position coordinate in the first positioning data to obtain at least one cluster.
And a substep A3, removing the noisy point position coordinate in the cluster according to the first position coordinate and the cluster center coordinate of the cluster.
For the substeps A1-A3, before clustering starts, normalization processing may be performed on all position coordinates in the historical positioning data to obtain first positioning data, and the normalization processing may unify the value range of the position coordinates, so as to facilitate subsequent unified processing on the position coordinates.
Optionally, the substep A1 may be implemented by normalizing the position coordinate in the historical positioning data according to the position coordinate in the historical positioning data, and the maximum longitude value, the minimum longitude value, the maximum latitude value, and the minimum latitude value of the position coordinate, to obtain the first positioning data.
Specifically, assume that the historical positioning data is N = { N = } 1 ,n 2 ,......n k H, where n is i Is the ith position coordinate, n i In the form of
Figure BDA0003795792380000071
Wherein
Figure BDA0003795792380000072
Which represents the location longitude, indicates the location of the location,
Figure BDA0003795792380000073
a dimension of the positioning is represented and,
Figure BDA0003795792380000074
representing the positioning time, and respectively taking the maximum and minimum values, x, of the longitude and latitude of the position coordinate in the historical positioning data max Is the maximum longitude, x min Is the minimum longitude, y max At the maximum latitude, y min At the minimum latitude, the normalization formula is as follows:
Figure BDA0003795792380000075
Figure BDA0003795792380000076
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003795792380000077
which represents the longitude after the normalization of the received signal,
Figure BDA0003795792380000078
indicating the normalized latitude.
Further, first positioning data N ' = { N ' obtained after normalization processing ' 1 ,n′ 2 ,......n′ k }. The first position coordinates in the first positioning data can be subjected to cluster analysis to obtain at least one cluster, and the cluster meaning is that similar first position coordinates (coordinates which are probably on a specific activity track) are placed in the same cluster, so that the deviated first position coordinates in all the first position coordinates are removed, and the remaining first position coordinates are classified.
Optionally, the sub-step A2 may specifically include:
and a substep A21 of setting a target number of the specific activity traces.
Optionally, the target number is 2.
And a substep A22 of setting the number of the clustering centers of the clustering algorithm according to the target number of the specific activity track, and setting the position coordinates corresponding to the maximum time and the minimum time of the historical time range as the initial clustering centers of the clustering algorithm.
And a substep A23, performing cluster analysis on the position coordinates in the first positioning data according to the number of the cluster centers and the initial cluster centers to obtain a target number of cluster clusters.
For the sub-steps a21-a23, the embodiment of the present invention may provide a function of setting the target number of the specific activity track, so as to improve the flexibility of the position deviation monitoring, and for the scenario that the student position deviates from the monitoring, the target number of the specific activity track may be preferably set to 2 (i.e. one upper school path and one lower school path), so as to cover the activity characteristics of most students.
After the target number of the specific activity track is set, in the process of executing the clustering algorithm, the number of clustering centers (the number of clustering clusters) can be set to be consistent with the target number, and the position coordinates corresponding to the maximum time and the minimum time of the historical time range are set as the initial clustering centers of the clustering algorithm, so that when the clustering clusters are generated, the number of clustering clusters and the center coordinates of the clustering clusters can be determined, and after the position coordinates in the first positioning data are clustered, the target number of clustering clusters can be obtained.
Specifically, referring to fig. 4, a flow diagram of a clustering process provided by the embodiment of the present invention is shown, and in one implementation, a k-means clustering algorithm (k-means clustering algorithm) may be used as the clustering algorithm, where the k-means clustering algorithm is an iterative solution clustering analysis algorithm, and includes steps of dividing data into k (target number) groups in advance, randomly selecting k objects as initial clustering centers, then calculating distances between each object and each seed clustering center, and assigning each object to a clustering center closest to the object. The cluster centers and the objects assigned to them represent a cluster. The cluster center of a cluster is recalculated for each sample assigned based on the objects existing in the cluster. This process will be repeated until some termination condition is met. The termination condition may be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers are changed again, and the sum of squared errors is locally minimal.
Optionally, the sub-step A3 may specifically include:
substep a31, calculating a first distance d1 between said first position coordinate and a cluster center coordinate, and a second distance d2 between different cluster center coordinates.
And a substep A32, taking the first position coordinate which does not meet the preset judgment condition in the cluster as the position coordinate of the noise point for removing.
Wherein the preset judgment condition is as follows: the first distance d1 is greater than 2 times the second distance d2.
For the substeps a31-a32, assume that one cluster C1 and another cluster C2 of the obtained target number of clusters have cluster center coordinates of:
Figure BDA0003795792380000091
a first distance d1 between each first position coordinate and the cluster center coordinate, the first position coordinate, can be determined
Figure BDA0003795792380000092
The calculation formula of the first distance d11 from the cluster center coordinates of the cluster C1 is as follows:
Figure BDA0003795792380000093
first position coordinates
Figure BDA0003795792380000094
The first distance d12 from the cluster center coordinates of the cluster C2 is calculated as follows:
Figure BDA0003795792380000095
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003795792380000096
is the first position coordinate.
The calculation formula of the second distance d2 between the respective cluster center coordinates of the cluster C1 and the cluster C2 is as follows:
Figure BDA0003795792380000101
finally, the first position coordinate which does not accord with the preset judgment condition in the cluster can be taken as the position coordinate of the noise point for removing, wherein the preset judgment condition is as follows: the first distance d11 is greater than 2 times the second distance d2, and the first distance d12 is greater than 2 times the second distance d2.
It should be noted that, for a scenario where the student position deviates from the monitoring, the behavior trace of the student should be a fixed few routes, but since in individual cases, position noise may occur, the reason for the noise is: 1. students may occasionally carry positioning-this way away from the usual path to other locations on the way to school and go, where the deviation distance may be far; 2. positioning drift of the positioning device due to technical problems and the like. In both cases, the more the history is accumulated, the more the noise characteristics become apparent. Therefore, in order to obtain the accurate track result, the first position coordinate which does not meet the preset judgment condition in the cluster can be regarded as the position coordinate which is far away from the common path and reached by the student, and then the position coordinate is screened out, so that the purposes of removing noise data and improving position precision can be achieved.
Optionally, in an embodiment, step 103 may specifically include:
and a substep 1031 of obtaining a preset deviation distance threshold.
And a sub-step 1032 of obtaining an initial trajectory function for characterizing the corresponding segment of the specific active trajectory by using a least square method.
Substep 1033 calculating a third distance from the position coordinate on the particular activity track to the segment.
Substep 1034, when the third distance is greater than the deviation distance threshold, continuing to perform the segmentation operation on the specific motion track, obtaining a track function for representing a plurality of segmented segments after segmentation by adopting a least square method, and entering the step of calculating the third distance from the position coordinate on the specific motion track to the segmented segment; the segments correspond to the trajectory functions one to one.
Substep 1035, until the third distance is less than or equal to the deviation distance threshold, ceasing subsequent slicing operations.
For the sub-steps 1031 to 1034, the embodiment of the present invention firstly supports the user to set a function of a deviation distance threshold according to actual requirements, and the size of the deviation distance threshold reflects the size of the deviation degree allowed by the user, and further, because the specific activity track is a complex path often composed of one or more of straight lines, folded lines and curved lines, which is difficult to be directly quantized and calculated, the embodiment of the present invention can introduce a mathematical differentiation idea to sequentially divide the specific activity track into a plurality of segments within an acceptable range, and after the division sequence is over, the more segments are obtained by the division, and the divided segments can be fitted into a track function by a least square method, thereby realizing the quantization of the path.
Specifically, in the embodiment of the present invention, a specific motion track may be integrally fitted into one segment, an initial track function representing the segment is obtained by a least square method, and then, based on the initial track function, a third distance from a position coordinate on the specific motion track to the segment is calculated, where the third distance may be used to determine whether the specific motion track needs to be subsequently divided into a greater number of segments, and when the third distance is greater than a deviation distance threshold set by a user, it is determined that the specific motion track needs to be subsequently divided into a greater number of segments.
Optionally, the sub-step 1034 may be specifically implemented by taking the position coordinate with the earliest time on the specific active track as a starting point, and performing a slicing operation on the specific active track by using at least one position coordinate subsequent to the specific active track as a dividing point according to a time sequence.
Wherein the number of segmentation points increases as the segmentation order increases.
Specifically, assume that one cluster M = { M ] constituting a specific activity trajectory 1 ,m 2 ,......m k },m i For the ith location point, shaped as
Figure BDA0003795792380000111
Setting a to indicate the number of segments, α =1,2,3.
Firstly, setting alpha =1 (representing a specific activity track and consisting of a segmentation segment), taking a cluster M as an observation object, and fitting a track function of the segmentation segment l by adopting a least square method:
Figure BDA0003795792380000112
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003795792380000121
the position coordinate M in the cluster M can then be traversed i Sequentially find m i Distance to l
Figure BDA0003795792380000122
If there is a position coordinate
Figure BDA0003795792380000123
If the deviation distance is larger than the deviation distance threshold omega, the alpha =1 is considered not to meet the segmentation requirement, and the specific activity track needs to be segmented into a larger number of segments; if there is a position coordinate
Figure BDA0003795792380000124
If the deviation distance is smaller than or equal to the deviation distance threshold ω, α =1 is considered to meet the segmentation requirement, and may be determined by a trajectory function of a segment:
Figure BDA0003795792380000125
to characterize a particular activity track.
In the case where α =1 does not meet the segmentation requirement, α =2 (representing that a specific activity track is composed of 2 segments) is set to cluster in the cluster M
Figure BDA0003795792380000126
The minimum position coordinate (the position coordinate with the earliest time on a specific activity track) is an initial segmentation point, and the clustering cluster M is divided into M 1 And M 2 Wherein M is 1 Comprises (m) 1 ,m 2 ),M 2 Comprises (m) 3 ,......m k ) Fitting the divided 2 segments l 'by least square method' 1 L' 2 Of the trajectory function l' 1 Track function of
Figure BDA0003795792380000127
l′ 2 Track function of
Figure BDA0003795792380000128
Then traverse M 1 And M 2 Finding whether there is a position coordinate
Figure BDA0003795792380000129
If the deviation distance is larger than the deviation distance threshold value omega, if the position coordinate exists
Figure BDA00037957923800001210
If the deviation distance is larger than the deviation distance threshold omega, the fact that alpha =2 does not meet the segmentation requirement is judged, and the specific activity track needs to be segmented into a larger number of segments; if there is a position coordinate
Figure BDA00037957923800001211
If the deviation distance is less than or equal to the deviation distance threshold value omega, the alpha =2 is considered to be in accordance with the segmentation requirement and can pass through the segment l' 1 L' 2 Each corresponding trajectory function characterizes a particular activity trajectory.
In the case where α =2 does not meet the segmentation requirement, α =3 (representing that a specific activity track is composed of 3 segments) is set to cluster in the cluster M
Figure BDA00037957923800001212
The minimum position coordinate (the position coordinate with the earliest time on a specific activity track) is an initial segmentation point, and the clustering cluster M is divided into M 1 、M 2 And M 3 Wherein, M is 1 Comprises (m) 1 ,m 2 ),M 2 Comprises (m) 3 ,m 3 ),M 3 Contains (3.. M.) k ) The segmented 3 segments l 'are fitted by least square method' 1 、l′ 2 L' 3 Track function of l' 1 Track function of
Figure BDA0003795792380000131
l′ 2 Track function of
Figure BDA0003795792380000132
l′ 3 Is/are as follows
Figure BDA0003795792380000133
Then go through M 1 、M 2 And M 3 Finding whether there is a position coordinate
Figure BDA0003795792380000134
Greater than a deviation distance threshold omega, if there is a position coordinate
Figure BDA0003795792380000135
If the deviation distance is larger than the deviation distance threshold omega, the alpha =3 is considered not to meet the segmentation requirement, and the specific activity track needs to be segmented into a larger number of segments; if there is a position coordinate
Figure BDA0003795792380000136
If the deviation distance is less than or equal to the deviation distance threshold value omega, the alpha =3 is considered to be in accordance with the segmentation requirement, and the segmentation segment l 'can be passed' 1 、l′ 2 And l' 3 The specific moving track is represented by the corresponding track function, and the value of α is further increased, which is the same as above, and will not be described herein again.
Preferably, the deviation distance threshold ω is greater than or equal to 50 meters.
Optionally, in an embodiment, step 105 may specifically include:
sub-step 1051, calculating a fourth distance between the position coordinates of the current positioning data and the segment characterized by the trajectory function.
Substep 1052, determining that the current position of the target object deviates from the specific activity track and executing early warning operation when any of the fourth distances is greater than or equal to a preset deviation distance threshold.
For sub-steps 1051-1052, after obtaining the trajectory function for characterizing the segment, the trajectory may be followedThe equation characteristic parameters of the function are stored at the server side and comprise a division point m 1 、m k Intersection of segments
Figure BDA0003795792380000137
And segment l' 1 、l′ 2 Of separately corresponding trajectory functions
Figure BDA0003795792380000138
Wherein the point of intersection
Figure BDA0003795792380000139
The calculation formula of (2) is as follows:
Figure BDA0003795792380000141
further, a position coordinate Q (x) for a current positioning data q ,y q ) The case where the number of segments is 2 is explained, and the problem of determining whether or not the position coordinate Q deviates from the specific trajectory can be quantified as the position coordinate Q (x) q ,y q ) And segment l' 1 、l′ 2 The distance of the target object is greater than or equal to a preset deviation distance threshold value omega, and under the condition that any fourth distance is greater than or equal to the preset deviation distance threshold value omega, the current position of the target object is determined to deviate from the specific activity track, and the server side can execute early warning operation.
Specifically, segment l 'is assumed' 1 End point of
Figure BDA0003795792380000142
Intersection point P (x) P ,y P ) The characteristic parameter is
Figure BDA0003795792380000143
l′ 2 Has an endpoint of P (x) P ,y P ),
Figure BDA0003795792380000144
Characteristic parameter is
Figure BDA0003795792380000145
If it is judged that the position coordinate Q and segment l ' are not deviated, the position coordinate Q and segment l ' are required ' 1 Is less than a deviation distance threshold ω, the process is characterized by the equation:
Figure BDA0003795792380000146
Figure BDA0003795792380000147
and is
Figure BDA0003795792380000148
Determination of Point Q and segment l 'in the same manner' 2 The distance of (2) is just required. Otherwise, determining that the current position of the target object deviates from the specific activity track and executing early warning operation under the condition that any fourth distance is larger than or equal to a preset deviation distance threshold value.
In summary, according to the position deviation early warning method provided by the embodiment of the invention, the historical position coordinates which are on the specific activity track and are similar to each other in the historical positioning data can be clustered into clusters through the clustering algorithm, the position coordinates which deviate from the established route are screened out, then the position coordinates in the clusters are used for constructing the specific activity track, and further the specific activity track constructed into the segmentation segments is represented through the track function, so that the specific activity track can be quantized through the track function, and whether the current position of the target object deviates from the specific activity track of the target object or not can be calculated subsequently.
Fig. 5 is a structural diagram of a position deviation warning apparatus according to an embodiment of the present invention, where the apparatus 20 may include:
a first obtaining module 201, configured to obtain historical positioning data of a target object recorded by a positioning apparatus within a historical time range when a first authority is obtained;
a clustering module 202, configured to determine at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data;
a segmentation module 203, configured to construct each of the specific activity tracks into at least one segment, and obtain a track function for characterizing the segment;
a second obtaining module 204, configured to obtain, by the positioning apparatus, current positioning data of the target object under the condition that a second permission is obtained;
the early warning module 205 is configured to execute an early warning operation when the deviation between the current position of the target object and the specific activity track is determined according to the current positioning data and the track function.
Optionally, the clustering module includes:
the de-noising submodule is used for removing the position coordinates of the noise points in the historical positioning data through a clustering algorithm and obtaining a clustering result;
and the aggregation sub-module is used for determining at least one specific activity track of the target object according to the clustering result.
Optionally, the denoising submodule includes:
the normalization processing unit is used for carrying out normalization processing on all position coordinates in the historical positioning data to obtain first positioning data;
the clustering processing unit is used for carrying out clustering analysis on the first position coordinate in the first positioning data to obtain at least one clustering cluster;
the screening processing unit is used for removing the position coordinates of the noise points in the clustering clusters according to the first position coordinates and the clustering center coordinates of the clustering clusters;
the aggregation submodule includes:
and the aggregation unit is used for determining at least one specific activity track according to the position coordinates in the cluster after denoising, and the number of the specific activity tracks is the same as that of the cluster.
Optionally, the cluster processing unit includes:
a first setting subunit, configured to set a target number of the specific activity tracks;
the second setting subunit is used for setting the number of clustering centers of the clustering algorithm according to the target number of the specific activity track, and setting the position coordinates corresponding to the maximum time and the minimum time of the historical time range as the initial clustering centers of the clustering algorithm;
and the clustering subunit is used for carrying out clustering analysis on the position coordinates in the first positioning data according to the number of the clustering centers and the initial clustering centers to obtain the target number of clustering clusters.
Optionally, the target number is 2.
Optionally, the sifting treatment unit comprises:
the first calculating subunit is used for calculating a first distance d1 between the first position coordinate and the cluster center coordinate, and a second distance d2 between different cluster center coordinates;
the second calculating subunit is used for removing the first position coordinates which do not meet the preset judgment condition in the clustering cluster as the position coordinates of the noise point;
the preset judgment condition is as follows: the first distance d1 is greater than 2 times the second distance d2.
Optionally, the normalization processing unit includes:
and the third calculating subunit is used for carrying out normalization processing on the position coordinate in the historical positioning data according to the position coordinate in the historical positioning data and the maximum longitude value, the minimum longitude value, the maximum latitude value and the minimum latitude value of the position coordinate to obtain first positioning data.
Optionally, the dicing module comprises:
the threshold submodule is used for acquiring a preset deviation distance threshold;
the fitting submodule is used for obtaining an initial track function for representing the corresponding segmentation section of the specific activity track by adopting a least square method;
the first distance submodule is used for calculating a third distance from the position coordinate on the specific activity track to the segmentation section;
a first judgment submodule, configured to continue to perform segmentation on the specific moving trajectory when the third distance is greater than the deviation distance threshold, obtain a trajectory function for characterizing a plurality of segmented segments after segmentation by using a least square method, and perform the step of calculating a third distance from a position coordinate on the specific moving trajectory to the segmented segment; the segmentation sections correspond to the track functions one to one;
and the second judgment submodule is used for stopping subsequent segmentation operation until the third distance is smaller than or equal to the deviation distance threshold.
Optionally, the first determining sub-module includes:
the segmentation unit is used for taking the position coordinate with the earliest time on the specific activity track as a starting point and taking at least one position coordinate subsequent to the specific activity track as a segmentation point to segment the specific activity track according to the time sequence;
wherein the number of segmentation points increases as the segmentation order increases.
Optionally, the early warning module includes:
the second distance submodule is used for calculating a fourth distance between the position coordinate of the current positioning data and the segmentation section represented by the track function;
and the early warning sub-module is used for determining that the current position of the target object deviates from the specific activity track and executing early warning operation under the condition that any fourth distance is greater than or equal to a preset deviation distance threshold value.
In summary, according to the position deviation early warning device provided by the embodiment of the present invention, the historical position coordinates, which are similar to each other and located on the specific activity track in the historical positioning data, can be clustered into clusters through the clustering algorithm, the position coordinates deviating from the predetermined route are screened out, then the specific activity track is constructed from the position coordinates in the cluster clusters, and further the specific activity track constructed into the segments is represented through the track function, so that the specific activity track can be quantized through the track function, and it is convenient to subsequently calculate whether the current position of the target object deviates from the specific activity track of the target object.
The present invention also provides an electronic device, referring to fig. 6, including: a processor 901, a memory 902 and a computer program 9021 stored and executable on the memory, the processor implementing the deviation location warning method of the foregoing embodiment when executing the program.
The present invention also provides a readable storage medium, and when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the position deviation warning method of the foregoing embodiment.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
It should be noted that various information and data acquired in the embodiment of the present invention are acquired under the authorization of the information/data holder.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a sequencing device according to the present invention. The present invention may also be embodied as an apparatus or device program for carrying out a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The user information (including but not limited to the device information of the user, the personal information of the user, etc.), the related data, etc. related to the present invention are all information authorized by the user or authorized by each party.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A position deviation warning method, comprising:
under the condition of obtaining the first authority, acquiring historical positioning data of a target object recorded by a positioning device in a historical time range;
determining at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data;
constructing each specific activity track into at least one segmentation segment, and obtaining a track function for representing the segmentation segment;
under the condition of obtaining the second authority, obtaining the current positioning data of the target object through the positioning device;
and executing early warning operation under the condition that the deviation of the current position of the target object from the specific activity track is determined according to the current positioning data and the track function.
2. The method according to claim 1, wherein said determining at least one specific activity track of the target object by a clustering algorithm based on the historical positioning data comprises:
removing the position coordinates of the noisy points in the historical positioning data through a clustering algorithm and obtaining a clustering result;
and determining at least one specific activity track of the target object according to the clustering result.
3. The method of claim 2, wherein the removing noisy location coordinates from the historical positioning data by a clustering algorithm comprises:
normalizing all position coordinates in the historical positioning data to obtain first positioning data;
performing clustering analysis on a first position coordinate in the first positioning data to obtain at least one clustering cluster;
removing the position coordinates of the noise points in the clustering clusters according to the first position coordinates and the clustering center coordinates of the clustering clusters;
determining at least one specific activity track of the target object according to the clustering result, including:
and determining at least one specific motion track according to the position coordinates in the cluster after denoising, wherein the number of the specific motion tracks is the same as that of the cluster.
4. The method according to claim 3, wherein the performing cluster analysis on the first position coordinate in the first positioning data to obtain at least one cluster comprises:
setting a target number of the specific activity tracks;
setting the number of clustering centers of the clustering algorithm according to the target number of the specific activity track, and setting the position coordinates corresponding to the maximum time and the minimum time of the historical time range as initial clustering centers of the clustering algorithm;
and performing clustering analysis on the position coordinates in the first positioning data according to the number of the clustering centers and the initial clustering centers to obtain the target number of clustering clusters.
5. The method of claim 4, wherein the target number is 2.
6. The method of claim 3, wherein removing noisy location coordinates in said clustered cluster based on said first location coordinates and cluster center coordinates of said clustered cluster comprises:
calculating a first distance d1 between the first position coordinate and a cluster center coordinate and a second distance d2 between different cluster center coordinates;
removing the first position coordinates which do not accord with preset judgment conditions in the cluster as the position coordinates of the noise point;
the preset judgment condition is as follows: the first distance d1 is greater than 2 times the second distance d2.
7. The method according to claim 3, wherein the normalizing all the position coordinates in the historical positioning data to obtain the first positioning data comprises:
and carrying out normalization processing on the position coordinates in the historical positioning data according to the position coordinates in the historical positioning data, and the maximum longitude value, the minimum longitude value, the maximum latitude value and the minimum latitude value of the position coordinates to obtain first positioning data.
8. The method according to claim 1, wherein said constructing each of said specific activity traces as at least one segment and obtaining a trace function for characterizing said segment comprises:
acquiring a preset deviation distance threshold;
obtaining an initial track function for representing a segmentation section corresponding to a specific activity track by adopting a least square method;
calculating a third distance from the position coordinate on the specific activity track to the segment;
when the third distance is larger than the deviation distance threshold, continuously performing segmentation operation on the specific activity track, obtaining a track function for representing a plurality of segmented segments after segmentation by adopting a least square method, and entering the step of calculating the third distance from the position coordinate on the specific activity track to the segmented segments; the segmentation sections correspond to the track functions one by one;
and stopping subsequent splitting operation until the third distance is smaller than or equal to the deviation distance threshold.
9. The method according to claim 8, wherein the continuously performing the slicing operation on the specific activity track comprises:
taking the position coordinate with the earliest time on the specific activity track as a starting point, and taking at least one position coordinate subsequent to the specific activity track as a segmentation point to perform segmentation operation on the specific activity track according to the time sequence;
wherein the number of segmentation points increases as the segmentation order increases.
10. The method of claim 1, wherein in case of determining the deviation of the current position of the target object from the specific activity track according to the current positioning data and the track function, performing an early warning operation, comprises:
calculating a fourth distance between the position coordinate of the current positioning data and the segment represented by the track function;
and under the condition that any fourth distance is larger than or equal to a preset deviation distance threshold value, determining that the current position of the target object deviates from the specific activity track, and executing early warning operation.
11. A positional deviation warning apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring historical positioning data of the target object recorded by the positioning device in a historical time range under the condition of acquiring the first authority;
the clustering module is used for determining at least one specific activity track of the target object through a clustering algorithm according to the historical positioning data;
the segmentation module is used for constructing each specific activity track into at least one segmentation segment and obtaining a track function for representing the segmentation segment;
the second acquisition module is used for acquiring the current positioning data of the target object through the positioning device under the condition of acquiring a second authority;
and the early warning module is used for executing early warning operation under the condition that the deviation of the current position of the target object from the specific activity track is determined according to the current positioning data and the track function.
12. An electronic device, comprising:
a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of claims 1-10 when executing the program.
13. A readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-10.
CN202210971432.1A 2022-08-12 2022-08-12 Position deviation early warning method and device, electronic equipment and readable storage medium Pending CN115470382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210971432.1A CN115470382A (en) 2022-08-12 2022-08-12 Position deviation early warning method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210971432.1A CN115470382A (en) 2022-08-12 2022-08-12 Position deviation early warning method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115470382A true CN115470382A (en) 2022-12-13

Family

ID=84368147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210971432.1A Pending CN115470382A (en) 2022-08-12 2022-08-12 Position deviation early warning method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115470382A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094685A (en) * 2023-10-18 2023-11-21 深圳市智慧建筑创新有限公司 Intelligent campus monitoring data management system based on Internet of things technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094685A (en) * 2023-10-18 2023-11-21 深圳市智慧建筑创新有限公司 Intelligent campus monitoring data management system based on Internet of things technology
CN117094685B (en) * 2023-10-18 2024-01-12 深圳市智慧建筑创新有限公司 Intelligent campus monitoring data management system based on Internet of things technology

Similar Documents

Publication Publication Date Title
US9763055B2 (en) Travel and activity capturing
CN106767772B (en) Method and device for constructing geomagnetic fingerprint distribution map and positioning method and device
JP2019512668A (en) Root deviation recognition method, terminal, and storage medium
CN111666971A (en) Event identification method, device and equipment based on position location and storage medium
CN110413905B (en) Method, device and equipment for acquiring road alignment and storage medium
WO2017113706A1 (en) Personalized navigation method and system
TWI581207B (en) Computing method for ridesharing path, computing apparatus and recording medium using the same
JP6787624B2 (en) Methods for collating voice fingerprints, machine-readable media and systems
CN113239089B (en) Path identification method, path identification device, electronic device, storage medium, and program product
CN110969092B (en) Pulse signal denoising method and device and terminal equipment
US20170184410A1 (en) Method and electronic device for personalized navigation
US9787557B2 (en) Determining semantic place names from location reports
CN115470382A (en) Position deviation early warning method and device, electronic equipment and readable storage medium
US20160358090A1 (en) Method and system for obtaining and analyzing information from a plurality of sources
CN110807068A (en) Equipment switching user identification method and device, computer equipment and storage medium
CN110826623B (en) Classification method and device based on meteorological data, computer equipment and storage medium
CN112232311A (en) Face tracking method and device and electronic equipment
CN110057355B (en) Indoor positioning method, device and system and computing equipment
CN107895103B (en) Track data cleaning method
CN108629980B (en) Method for improving air quality by controlling traffic flow
WO2022193665A1 (en) Detour path determination method and apparatus, and storage medium
CN113887590B (en) Target typical track and area analysis method
JP2016045538A (en) Information processing apparatus, image determination method, and program
CN111242723B (en) User child and child condition judgment method, server and computer readable storage medium
CN116824924A (en) Method and device for predicting approach flight mode of aircraft and storage medium

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