CN113891240A - Geo-fence generation method and apparatus, positioning method and apparatus, medium, and device - Google Patents

Geo-fence generation method and apparatus, positioning method and apparatus, medium, and device Download PDF

Info

Publication number
CN113891240A
CN113891240A CN202111289249.5A CN202111289249A CN113891240A CN 113891240 A CN113891240 A CN 113891240A CN 202111289249 A CN202111289249 A CN 202111289249A CN 113891240 A CN113891240 A CN 113891240A
Authority
CN
China
Prior art keywords
data set
data
geofence
geo
determining
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.)
Granted
Application number
CN202111289249.5A
Other languages
Chinese (zh)
Other versions
CN113891240B (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.)
Shanghai Jinsheng Communication Technology Co ltd
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Shanghai Jinsheng Communication Technology Co ltd
Guangdong Oppo Mobile Telecommunications 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 Shanghai Jinsheng Communication Technology Co ltd, Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Shanghai Jinsheng Communication Technology Co ltd
Priority to CN202111289249.5A priority Critical patent/CN113891240B/en
Publication of CN113891240A publication Critical patent/CN113891240A/en
Application granted granted Critical
Publication of CN113891240B publication Critical patent/CN113891240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure provides a geo-fence generation method, a geo-fence positioning method, a geo-fence generation device, a geo-fence positioning device, a computer readable storage medium and an electronic device, and relates to the technical field of computers based on positions. The geo-fence generation method includes: collecting an environment wireless data set in an undetermined area according to a preset sampling frequency; determining a target data set according to the occurrence frequency of WiFi signal data in the environment wireless data set; and determining data with the same identifier from the environmental wireless data set according to the identifier of the WiFi signal in the target data set to form a geo-fence data set. The problem of the indoor positioning stability of geofence is poor can be solved to this disclosure.

Description

Geo-fence generation method and apparatus, positioning method and apparatus, medium, and device
Technical Field
The present disclosure relates to the field of location-based computer technologies, and in particular, to a geo-fence generating method, a geo-fence positioning method, a geo-fence generating apparatus, a geo-fence positioning apparatus, a computer-readable storage medium, and an electronic device.
Background
Geo-fencing is an application of Location Based Service (LBS) that uses a virtual fence to enclose a virtual geographic boundary and can receive social services such as automatic notification or warning when a mobile terminal enters or leaves the virtual geographic boundary or is active within the virtual geographic boundary.
In the existing geofence determination process, data collection, processing and fence determination are mostly performed by taking a Global Navigation Satellite System (GNSS) as a core position reference, and the geofence technology cannot be used for scenes with serious signal degradation such as indoors or basements.
Disclosure of Invention
The disclosure provides a geo-fence generation method, a geo-fence positioning method, a geo-fence generation device and a geo-fence positioning device, which solve the problem of poor indoor positioning stability of the existing geo-fences.
According to a first aspect of the present disclosure, there is provided a geo-fence generation method, comprising: collecting an environment wireless data set in an undetermined area according to a preset sampling frequency; determining a target data set according to the occurrence frequency of WiFi signal data in the environment wireless data set; and determining data with the same identifier from the environmental wireless data set according to the identifier of the WiFi signal in the target data set to form a geo-fence data set.
According to a second aspect of the present disclosure, there is provided a geo-fence positioning method, comprising: determining the distance between the wireless data vector of the position to be detected and each vector in the geofence data set; when the distance meets a preset condition, determining that the position to be detected is in the geo-fence; wherein the geofence dataset is determined according to the geofence generation method described above. .
According to a third aspect of the present disclosure, there is provided a geo-fence generation apparatus, the apparatus comprising: the data acquisition module is used for acquiring an environment wireless data set in the region to be determined according to a preset sampling frequency; the target data set determining module is used for determining a target data set according to the occurrence frequency of WiFi signal data in the environment wireless data set; and the geo-fence determining module is used for determining data with the same identifier from the environmental wireless data set according to the identifier of the WiFi signal in the target data set to form a geo-fence data set.
According to a fourth aspect of the present disclosure, there is provided a geo-fence positioning device, the device comprising: the distance determining module is used for determining the distance between the wireless data vector of the position to be detected and each vector in the geo-fence data set; the position determining module is used for determining that the position to be detected is in the geographic fence when the distance meets a preset condition; wherein the geofence dataset is determined according to the geofence generation method described above.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the geofence generation method of the first aspect described above and its possible implementations, or implements the geofence location method of the second aspect described above and its possible implementations.
According to a sixth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the geofence generation method of the first aspect above and possible implementations thereof, or to perform the geofence location method of the second aspect above and possible implementations thereof, via execution of the executable instructions.
The technical scheme of the disclosure has the following beneficial effects:
on the one hand, by collecting the environment wireless data set in the area to be determined, the target data set can be determined based on WiFi signals in the environment wireless data set, the geo-fence data set is determined based on the target data set, and the geo-fence can be generated based on the geo-fence data set, so that the geo-fence positioning method and the geo-fence positioning system are used for geo-fence positioning and other schemes. On the other hand, for indoor and other scenes, the geo-fence generation method generates the geo-fence based on the WiFi signals, obviously improves the stability and accuracy of geo-fence determination for the indoor environment generally using the WiFi signals, and provides a foundation for the stability of indoor positioning.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained from those drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment of a geo-fence generation method and apparatus in the present exemplary embodiment;
FIG. 2 is a schematic structural diagram of a computer system of an electronic device in the exemplary embodiment;
fig. 3 shows a flowchart of a geo-fence generation method in the present exemplary embodiment;
FIG. 4 illustrates a flow chart of a method of geofence location in this exemplary embodiment;
FIG. 5 illustrates a local density and local minimum distance coordinates for each vector in a geo-fencing dataset in accordance with the present exemplary embodiment;
FIG. 6 illustrates a schematic distribution of vectors in the geofence dataset illustrated in FIG. 5 in this exemplary embodiment;
fig. 7 shows a block diagram of a geo-fence generation apparatus in the present exemplary embodiment;
fig. 8 shows a block diagram of a geo-fencing positioning device of the present exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation. In addition, all of the following terms "first" and "second" are used for distinguishing purposes only and should not be construed as limiting the present disclosure.
In order to meet the requirements of mobile social software or merchants, a geo-fence is set according to the store areas of the merchants, users entering the merchants are positioned based on the geo-fence, and corresponding discount information or sign-in information and the like are sent, so that the merchants are facilitated to maintain the users, and the sales volume is increased.
Based on the situation that wireless network communication devices such as fixed WiFi are mostly arranged around existing merchants or merchants to provide free communication networks for the merchants or customers, the embodiment of the disclosure provides a geo-fence generation method based on WiFi signals. Fig. 1 shows a schematic diagram of a system architecture of an exemplary application environment to which embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture may include at least one of terminal devices 101, a network 102, and a server 103. Network 102 is a medium for providing a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal device 101 may be various electronic devices having a display screen, and various APPs or browsers are installed on the terminal device 101.
The terminal device 101 includes, but is not limited to, a portable computer, a smart phone, a tablet computer, and other devices having a display function. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 103 may be a server cluster composed of a plurality of servers.
During the actual operation of the terminal device 101, the server 103 may monitor the process operation condition on the terminal device 101, and obtain the wireless data information and the like.
As will be readily understood by those skilled in the art, in the solution provided in the embodiment of the present disclosure regarding the geofence, the terminal device 101 belongs to the geofence application end, and may deploy the automatic wireless signal acquisition tool, while having the capabilities of storing and processing data in a small batch; server 103 can then do large data storage and processing and can manage and update all public geofences.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure. In the exemplary embodiment of the present disclosure, at least the terminal device 101 of the terminal device 101 and the server 103 may be configured in the form of fig. 2. It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for system operation are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input section 206 including a wireless signal acquisition module, a sound acquisition device, a video acquisition device, a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
With respect to the geofence scheme of the present disclosure, the terminal device 101 transmits the obtained environment wireless data set to the central processing unit of the server 103, and the central processing unit may determine the geofence data set by using the relevant data, and may determine whether the location to be measured is located within the geofence together with the geofence data set, so as to achieve the purpose of positioning according to the geofence.
Based on this, the embodiments of the present disclosure provide a geo-fence generating method and a geo-fence positioning method, and the following will explain technical solutions of the embodiments of the present disclosure in detail:
the geofence generation method provided in this exemplary embodiment may be the terminal device 101 acquiring the environmental wireless data, or the deployed wireless signal automatic acquisition tool acquiring the environmental wireless data to provide to the server 103 for generating the geofence. In the geofence positioning method provided in this exemplary embodiment, the terminal device 101 to be measured may acquire the wireless data of the position to be measured, upload the wireless data to the server 103, and the server 103 performs positioning based on the generated geofence to determine whether the position to be measured is within the geofence.
A geofence generation method of an exemplary embodiment of the present disclosure is specifically described below in conjunction with fig. 3. As shown in fig. 3, the geo-fence generation method may include:
step S310, collecting an environment wireless data set in an undetermined area according to a preset sampling frequency;
step S330, determining a target data set according to the frequency of WiFi signal data in the environmental wireless data set;
step S350, according to the identifier of the WiFi signal data in the target data set, data with the same identifier are determined from the environment wireless data set, and a geo-fence data set is formed.
The geo-fence generation method achieves the following technical effects: on the one hand, by collecting the environment wireless data set in the area to be determined, the target data set can be determined based on WiFi signals in the environment wireless data set, the geo-fence data set is determined based on the target data set, and the geo-fence can be generated based on the geo-fence data set, so that the geo-fence positioning method and the geo-fence positioning system are used for geo-fence positioning and other schemes. On the other hand, for indoor and other scenes, the geo-fence generation method generates the geo-fence based on the WiFi signals, obviously improves the stability and accuracy of geo-fence determination for indoor environments generally using the WiFi signals, and provides a foundation for indoor positioning.
The following describes the implementation process of each step:
in step S310, an ambient wireless data set in the region to be determined is collected according to a preset sampling frequency.
In an exemplary implementation manner of the embodiment of the present disclosure, the pending area may be various large or small indoor areas such as a home, a hotel, a cafe, an airport, a shop, etc. covered with WiFi signals, and one WiFi system is composed of Access Points (APs) which are deployed at some convenient locations in a room, and a system or a network administrator usually knows the locations of the APs. The terminal apparatuses 101 to which WiFi can be connected can communicate directly or indirectly (through the AP).
In practical application, a wireless signal automatic acquisition tool can be arranged at a position, close to the AP, of the undetermined area, and the wireless signal automatic acquisition tool can also be arranged at the central position of the undetermined area, so as to acquire environmental wireless signals such as WiFi signals in the undetermined area. The wireless signal automatic acquisition tool may be a device dedicated for signal acquisition, or may be a terminal device 101 having a signal acquisition function, which is not particularly limited in this exemplary embodiment.
In the actual signal acquisition process, the acquisition may be performed according to a preset acquisition frequency, for example, data is acquired every 5 minutes, and the time for acquiring data every time is 3 minutes; alternatively, signals may be collected once per second for a predetermined period of time, and all collected signals may be combined into an ambient wireless data set.
It should be noted that, in the actual acquisition process, the number of times, frequency, duration, and the like of acquiring signals may be set according to actual needs, and this is not particularly limited in the exemplary embodiment of the present disclosure.
In the exemplary embodiment of the present disclosure, the collected environmental wireless data set may further include, in addition to the identifier of the WiFi signal, the signal strength of the WiFi signal, the time point of collection, and the like, and referring to table 1, the format and corresponding information of the data in the collected environmental wireless data set are shown.
TABLE 1
Figure BDA0003334020390000071
Figure BDA0003334020390000081
It should be noted that, in the data acquisition process, the acquired data is not limited to the data format described above, and may be flexibly adjusted according to the actual situation, and the exemplary embodiment of the present disclosure is not particularly limited in this regard. Additionally, the collected data may be stored in the form of a vector, for example,
Figure BDA0003334020390000082
representing the signal strength of the kth WiFi signal at the s-th sampling time point.
In practical application, the collected data in the environment wireless data set can be cleaned according to needs, and in the specific cleaning process, the data corresponding to the WiFi signals recorded in the white list can be reserved on the basis of the white list, or the data corresponding to the WiFi signals recorded in the black list can be removed on the basis of the black list. The white list may include identifiers such as names of WiFi signals actually existing, listed by the user according to actual situations, and the black list includes WiFi signals transmitted by the mobile phone or the pseudo base station. In addition, in the data cleaning process, data in the environment wireless data set can be identified according to the characteristics of the mobile phone or the pseudo base station so as to determine the data from the mobile phone or the pseudo base station, the WiFi signal data are removed, and the data corresponding to the WiFi signals sent by the fixed AP are reserved.
In step S330, a target data set is determined according to the frequency of WiFi signal data in the environmental wireless data set.
In the exemplary embodiment of the present disclosure, after the environmental wireless data set is collected, the same WiFi signal may be counted to determine the number num of times of occurrence of the data related to the WiFi signal in the whole sampling number, so as to determine the frequency prob of occurrence of the WiFi signal data.
Taking the data shown in table 2 as an example, if the sampling times of the whole data are 50 times, and the number of occurrences of the first WiFi signal W1 is 10 times, the frequency prob of occurrence is 0.2; if the second WiFi signal W2 occurs 15 times, its frequency of occurrence prob is 0.3; if the third WiFi signal W3 occurs 25 times, its frequency prob is 0.5.
TABLE 2
station ssid bssid num prob mean(rssi) mean(rssi*rssi)
S1 W1 00:00:00:00:01 10 0.2 0.5 0.25
S1 W2 00:00:00:00:02 15 0.3 0.6 0.36
S1 W3 00:00:00:00:03 25 0.5 0.4 0.16
In practical applications, the target data set may be determined based on only the occurrence frequency of the WiFi signal data, that is, the WiFi signal data whose occurrence frequency of the WiFi signal data is greater than the frequency threshold is added to the target data set to determine the target data set.
In the exemplary embodiments of the present disclosure, in addition to determining the target dataset based on frequency, the target dataset needs to be determined based on variance, thereby improving the accuracy of the final generated geo-fence. Specifically, firstly, WiFi signal data with a frequency greater than a frequency threshold is determined as an initial signal data set; then, in the initial signal data set, determining the WiFi signal with the signal intensity variance smaller than the variance threshold value as a target WiFi signal, and adding data corresponding to the target WiFi signal into the target data set to determine the target data set. That is to say, on the basis of frequency judgment, by combining variance judgment, data with relatively large volatility can be eliminated on the basis of improving the accuracy of the determined target data set, and the stability of the determined target data set is improved.
In practical applications, the probability threshold and the variance threshold may be determined according to practical situations, for example, the probability threshold may be any value between 0.5 and 1.0, the variance threshold may be any value between 0.8 and 1.2, for example, the variance threshold may be 1, and specific values of the probability threshold and the variance threshold are not particularly limited in the exemplary embodiments of the present disclosure.
In step S350, data with the same identifier is determined from the environmental wireless data set according to the identifier of the WiFi signal data in the target data set, and a geo-fence data set is formed.
In practical application, after the target data set is obtained according to the provided method, WiFi signal data with the same identifier can be determined from the environmental wireless data set according to the identifier of the target WiFi signal in the target data set, so as to form a geo-fence data set. That is, the data corresponding to the target WiFi signal is selected from the environmental wireless data set as the geofence data set, so as to complete the determination of the geofence data set. On the basis that the determined target WiFi signal in the target data set has higher accuracy and stability, the determined geofence data set also naturally has higher accuracy and stability, which can be used as a reliable basis for geofence positioning.
In practical application, the signal strength corresponding to the WiFi signal in the geofence data set may also be normalized, and the signal strength is normalized to be between [0,1 ]. In the process of determining the geofence data set, if a certain time point in the environmental wireless data set does not match the target WiFi signal, the signal strength of the target WiFi signal corresponding to the time point is determined to be 0, so as to ensure that all time points in the geofence data set correspond to the relevant data of the target WiFi signal.
In an exemplary implementation manner of the embodiment of the present disclosure, after the geofence data set is determined, positioning may be performed based on the geofence data set, that is, the embodiment of the present disclosure further provides a geofence positioning method. Referring to fig. 4, a geofence location method provided by an embodiment of the present disclosure may include:
step S410, determining the distance between the wireless data vector of the position to be detected and the vector in the geo-fence data set;
step S430, when the distance meets a preset condition, determining that the position to be detected is in the geo-fence;
wherein the geofence dataset is determined according to the geofence generation method described above.
As can be seen from the above description of the embodiments, the WiFi signal data in the determined geofence data set may exist in the form of a vector, and the collected wireless data of the location to be measured may also be stored in the form of a vector, for example, Y ═ x (x ═ Y-1,x2,…,xF) Wherein x isFIs the signal strength of the WiFi signal acquired at the current sampling point.
It should be noted that, generally, the data acquisition of the position to be detected is data acquired by the mobile terminal where the position to be detected is located, and is used for positioning the mobile terminal to determine whether the mobile terminal is in the area corresponding to the geo-fence. And, the data acquisition of this position to be measured can only gather once, as long as can fix a position.
As can be seen from the above description, the wireless data vector of the position to be measured is a single vector, the geofence data set usually includes a plurality of vectors, the number of vectors corresponding to each target WiFi signal is the same as the sampling frequency, that is, one sampling time point corresponds to one vector of a target WiFi signal.
In an exemplary implementation manner of the embodiment of the present disclosure, in a process of determining a distance between a wireless data vector of a location to be measured and a vector in a geofence data set, different determination manners may be adopted according to a size of a data amount in the geofence data set. That is, different manners can be determined based on the number of sample points in the geofence data set. If a sample is taken three minutes in a given sampling process, with a sample interval of 1 second, which corresponds to 180 samples, the amount of data in the geofence data set consisting of the 180 samples is 180.
When the data volume in the geo-fence data set is smaller than the preset data volume, determining the intersection of the identifier in the wireless data vector of the position to be detected and the identifier in the geo-fence data set; i.e. the target WiFi signal contained in the wireless data vector that determines the location to be measured. And determining the distance between the wireless data vector corresponding to the intersection and the corresponding vector in the geofence data set only when the number of the intersections is greater than the preset number, that is, only when the number of the target WiFi signals contained in the wireless data vector is greater than or equal to the preset number.
Suppose that the geofence data set includes 5 target WiFi signals W1, W2, W3, W4, and W5, and the wireless data vector of the location to be measured includes 3 target WiFi signals W1, W2, and W3, that is, the number of intersections is 3. If the preset number is 3, distances between vectors corresponding to the 3 target WiFi signals W1, W2, W3 in the wireless data vector of the position to be measured and vectors corresponding to the 3 target WiFi signals W1, W2, W3 in the geo-fence data set can be directly determined, and a specific value in the vectors may be signal strength.
The distance between the vectors may adopt an algorithm of euclidean distance, or may also adopt an algorithm of cosine distance, etc., and the specific algorithm of the distance is not particularly limited in the exemplary embodiment of the present disclosure.
In practical applications, the preset data amount may also be determined according to practical situations, for example, the preset data amount may be any value between 1000 and 10000. When the data volume in the geofence data set is too large, the method for determining the intersection has a very large calculation amount, which increases the calculation cost and also brings too large calculation burden to the calculation devices such as the server.
Based on this, in the exemplary embodiment of the present disclosure, when the data amount in the geo-fence data set is greater than or equal to the preset data amount, the data in the geo-fence data set may be clustered, and the class center point may be determined. The specific clustering method can be various, and different clustering methods can be selected according to actual conditions in practical application.
In an exemplary embodiment of the present disclosure, in clustering data in the geofence dataset, the centroid point may be determined according to the local density and the local minimum distance of each vector in the geofence dataset.
In particular, the local density of each vector in the geofence dataset may be calculated first, i.e.
Figure BDA0003334020390000111
Wherein n is the number of vectors, di,jAs the distance between vector i and vector j, χ () is the logical decision function, dcTo control the distance.
If the distance d is controlledc0.2, if di,jIs less than dcHas a distance of 20, then the local density p i20. The assumption here is merely an explanation of equation 1 and has no practical limiting meaning.
Then, the local minimum distance can be calculated, i.e.
Figure BDA0003334020390000121
The meaning of equation 2 is to determine the minimum in the distance between vector i and vector j, where the local density ρ of vector j isjLocal density p greater than vector ii
At local density piAs the horizontal axis, by the local minimum distance δiA coordinate system is established for the vertical axis as shown in fig. 5. From FIG. 5, the local density ρ is selectediAnd local minimum distance deltaiWhile larger points are used as the centroid points, for example, data 1 and 10 in fig. 5 can be used as the centroid points.
At the same time, has a higher local minimum distance deltaiBut local density ρiSmaller data points, e.g., 26, 27, and 28 in fig. 5, belong to outlier data points, which require outlier data to be removed from the geofence data set; the anomaly data may be, for example, target WiFi signal data corresponding to the three anomaly data points 26, 27, and 28 identified in fig. 5.
After the outlier data is culled, the remaining geofence data sets may be classified as cluster data according to the class center points. As shown in fig. 6, which is a schematic distribution diagram of vectors in a geofence data set, taking data 1 and 10 as class center points, dividing all vectors into clusters taking data 1 as a center, where data 1 corresponds to vector 1, and further determining clusters taking data 10 as a center. As can be seen from fig. 6, after culling data 26, 27, and 28, data 13, 15, 19, and 22 are clearly clusters centered at 10, and the rest of the data are clusters centered at 1. This time is only an example of clustering and is not a limitation to the present solution.
After classifying the vectors in the geofence data set as distinct cluster data, the distance of the wireless data vector from each vector in the cluster data may be determined in units of cluster data. The method is equivalent to dividing the data in the geofence data set with larger data volume into the data sets with smaller data volume, so that the subsequent distance calculation and analysis are facilitated, and the operation speed is improved.
After different cluster data are determined, the distance between the wireless data vector of the position to be measured and the cluster data set vector can be determined according to the above manner, and a specific method for determining the distance may be an euclidean distance algorithm, a cosine distance algorithm, or the like.
After the distance between the wireless data vector of the position to be measured and the vector in the geofence data set is determined, or the distance between the wireless data vector and each vector in each cluster data is determined, whether the distance meets a preset condition or not can be judged, and the position to be measured is determined to be in the geofence only under the condition that the distance meets the preset condition.
In practical applications, the preset condition may vary according to actual conditions, and in the exemplary embodiment of the present disclosure, the preset condition may be a condition that a ratio of the distance less than the preset distance is greater than or equal to the preset ratio. The preset distance can be any value between 0.1 and 0.3m, and the preset proportion is any value between 85 and 95 percent. Taking the preset distance as 0.2m and the preset proportion as 90% as an example, only when the determined distance is smaller than 0.2m and the proportion is greater than or equal to 90%, the distance is determined to meet the preset condition, and the position to be detected is in the geo-fence.
That is, if the ratio of the number of distances smaller than the preset distance to all the distances among the distances between the wireless data vector of the location to be measured and each vector in the geofence data set is greater than or equal to the preset ratio, it may be determined that the location to be measured is within the geofence.
It should be further noted that, when it is determined that the position to be measured is within the geofence, the wireless data of the position to be measured may be added to the geofence data set, and the wireless data of the position to be measured is used to update the geofence data set, so as to expand the data volume in the geofence data set, thereby improving the accuracy of positioning in the subsequent geofence positioning process.
To sum up, the geofence positioning method provided in the embodiment of the present disclosure selects different ways to determine the distance between the wireless data vector of the position to be measured and each vector in the geofence data set according to the size of the data volume in the geofence data set on the basis of the geofence data set determined by the geofence generation method, so as to improve the operation rate, reduce the operation cost, and also reduce the operation burden of the operation devices such as the server. In addition, when the position to be detected is determined to be in the geo-fence, the wireless data of the position to be detected can be added into the geo-fence data set, and the geo-fence data set is updated by using the wireless data of the position to be detected, so that the data volume in the geo-fence data set can be enlarged, and the positioning accuracy is improved.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Exemplary embodiments of the present disclosure also provide a geo-fence generating apparatus. As shown in fig. 7, the geo-fence generating apparatus 700 may include:
the data acquisition module 710 is used for acquiring an environmental wireless data set in the region to be determined according to a preset sampling frequency;
a target data set determining module 730, configured to determine a target data set according to a frequency of occurrence of WiFi signal data in the environmental wireless data set;
and a geo-fence determining module 750, configured to determine, according to the identifier of the WiFi signal in the target data set, data having the same identifier from the environmental wireless data set, and form a geo-fence data set.
In an exemplary embodiment of the present disclosure, the ambient wireless data set further comprises: signal strength of WiFi signal.
In an exemplary embodiment of the present disclosure, the target data set determining module 730 is configured to determine WiFi signal data with a frequency greater than a frequency threshold as an initial signal data set; in the initial signal data set, the WiFi signals with the signal intensity variance smaller than the variance threshold value are determined as target WiFi signals, and data corresponding to the target WiFi signals are added into the target data set.
In an exemplary embodiment of the disclosure, the geo-fence determination module 750 is configured to determine WiFi signal data having the same identifier from the environmental wireless data set according to the identifier of the target WiFi signal in the target data set, and form the geo-fence data set.
In an exemplary embodiment of the disclosure, the geo-fence determination module 750 is configured to determine the signal strength of the target WiFi signal corresponding to a time point in the geo-fence data set to be 0 if the target WiFi signal is not matched at the time point in the environmental wireless data set.
In an exemplary embodiment of the disclosure, before determining the target data set, the target data set determination module 730 is further configured to purge data in the ambient wireless data set.
Exemplary embodiments of the present disclosure also provide a geo-fence positioning device. As shown in fig. 8, the geo-fence locating device 800 can include:
a distance determining module 810, configured to determine a distance between a wireless data vector of the location to be measured and each vector in the geofence data set;
the position determining module 830 is configured to determine that the position to be detected is within the geo-fence when the distance meets a preset condition;
wherein the geofence dataset is determined according to the geofence generation method described above.
In an exemplary embodiment of the present disclosure, the distance determining module 810 is configured to determine, when a data amount in the geofence data set is less than a preset data amount, an intersection of an identifier in the wireless data vector of the location to be measured and the identifier in the geofence data set; and when the number of the intersections is larger than or equal to the preset number, determining the distance between the wireless data vector corresponding to the intersections and the corresponding vector in the geofence data set.
In an exemplary embodiment of the present disclosure, the distance determining module 810 is configured to cluster data in the geo-fence data set when the data amount in the geo-fence data set is greater than or equal to a preset data amount, and determine a class center point; removing abnormal data from the geofence dataset; classifying the remaining geo-fence data sets into cluster data according to class center points; the distance of the wireless data vector from each vector in the cluster data is determined.
In an exemplary embodiment of the disclosure, the distance determination module 810 is configured to determine the isocenter based on the local density and the local minimum distance for each vector in the geofence dataset.
In an exemplary embodiment of the present disclosure, the preset condition is that a ratio of the distance less than the preset distance is greater than or equal to a preset ratio.
In an exemplary embodiment of the present disclosure, the preset distance is any value between 0.1 and 0.3m, and the preset ratio is any value between 85% and 95%.
In an exemplary embodiment of the present disclosure, the geo-fence locating device 800 may further include:
a data update module 850 for updating the geofence data set using the wireless data of the location under test when it is determined that the location under test is within the geofence.
The specific details of each part in the above device have been described in detail in the method part embodiments, and thus are not described again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the following claims.

Claims (16)

1. A geo-fencing generation method, comprising:
collecting an environment wireless data set in an undetermined area according to a preset sampling frequency;
determining a target data set according to the occurrence frequency of WiFi signal data in the environment wireless data set;
and determining data with the same identifier from the environmental wireless data set according to the identifier of the WiFi signal in the target data set to form a geo-fence data set.
2. The geofence generation method of claim 1, wherein the ambient wireless data set further comprises: signal strength of WiFi signal.
3. The method of claim 2, wherein determining a target data set based on the frequency of WiFi signal data in the ambient wireless data set comprises:
determining the WiFi signal data with the frequency greater than a frequency threshold value as an initial signal data set;
in the initial signal data set, the WiFi signals with the signal intensity variance smaller than a variance threshold value are determined as target WiFi signals, and data corresponding to the target WiFi signals are added into the target data set.
4. The method of claim 1, wherein said determining data from the ambient wireless data set having the same identifier as an identifier of data in the target data set to form a geofence data set comprises:
and according to the identifier of the target WiFi signal in the target data set, determining WiFi signal data with the same identifier from the environment wireless data set to form the geo-fence data set.
5. The geofence generation method of claim 4, further comprising:
determining the signal strength of the target WiFi signal corresponding to a time point in the geofence data set to be 0 if the target WiFi signal is not matched at the time point in the ambient wireless data set.
6. A geo-fencing method, comprising:
determining the distance between the wireless data vector of the position to be detected and each vector in the geofence data set;
when the distance meets a preset condition, determining that the position to be detected is in the geo-fence;
wherein the geofence data set is determined according to the geofence generation method of any of claims 1-5.
7. The method of claim 6, wherein determining the distance between the wireless data vector for the location to be measured and each vector in the set of geofence data comprises:
when the data volume in the geofence data set is smaller than a preset data volume, determining the intersection of the identifier in the wireless data vector of the position to be detected and the identifier in the geofence data set;
and when the number of the intersections is greater than or equal to a preset number, determining the distance between the wireless data vector corresponding to the intersection and the corresponding vector in the geofence data set.
8. The method of claim 6, wherein determining the distance between the wireless data vector for the location to be measured and each vector in the set of geofence data comprises:
when the data volume in the geo-fence data set is greater than or equal to the preset data volume, clustering the data in the geo-fence data set to determine a class center point;
culling anomalous data from the geofence dataset;
classifying the remaining geo-fence data sets into cluster data according to the class center points;
determining a distance of the wireless data vector from each vector in the cluster data.
9. The method of claim 8, wherein clustering data in the geofence dataset to determine a centroid point comprises:
determining the class center point according to the local density and the local minimum distance of each vector in the geofence dataset.
10. The method of claim 6, wherein the predetermined condition is that the distance is less than a predetermined distance by a predetermined ratio or greater.
11. The method of claim 10, wherein the predetermined distance is any value between 0.1 and 0.3m and the predetermined ratio is any value between 85% and 95%.
12. The geofence positioning method of claim 6, wherein upon determining that the location under test is within the geofence, updating the geofence data set with wireless data for the location under test.
13. A geo-fencing generation apparatus, the apparatus comprising:
the data acquisition module is used for acquiring an environment wireless data set in the region to be determined according to a preset sampling frequency;
the target data set determining module is used for determining a target data set according to the occurrence frequency of WiFi signal data in the environment wireless data set;
and the geo-fence determining module is used for determining data with the same identifier from the environmental wireless data set according to the identifier of the WiFi signal in the target data set to form a geo-fence data set.
14. A geo-fencing positioning device, the device comprising:
the distance determining module is used for determining the distance between the wireless data vector of the position to be detected and each vector in the geo-fence data set;
the position determining module is used for determining that the position to be detected is in the geographic fence when the distance meets a preset condition;
wherein the geofence data set is determined according to the geofence generation method of any of claims 1-5.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the geofence generation method of any one of claims 1-5, or carries out the geofence location method of any one of claims 6-12.
16. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the geofence generation method of any of claims 1-5, or to perform the geofence location method of any of claims 6-12, via execution of the executable instructions.
CN202111289249.5A 2021-11-02 2021-11-02 Geofence generation method and device, positioning method and device, medium and equipment Active CN113891240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111289249.5A CN113891240B (en) 2021-11-02 2021-11-02 Geofence generation method and device, positioning method and device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111289249.5A CN113891240B (en) 2021-11-02 2021-11-02 Geofence generation method and device, positioning method and device, medium and equipment

Publications (2)

Publication Number Publication Date
CN113891240A true CN113891240A (en) 2022-01-04
CN113891240B CN113891240B (en) 2024-07-23

Family

ID=79016388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111289249.5A Active CN113891240B (en) 2021-11-02 2021-11-02 Geofence generation method and device, positioning method and device, medium and equipment

Country Status (1)

Country Link
CN (1) CN113891240B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115357813A (en) * 2022-10-20 2022-11-18 荣耀终端有限公司 Sampling method and device and electronic equipment
CN116033344A (en) * 2022-06-13 2023-04-28 荣耀终端有限公司 Geofence determination method, equipment and storage medium
CN116668951A (en) * 2022-10-26 2023-08-29 荣耀终端有限公司 Method for generating geofence, electronic equipment and storage medium
CN116709191A (en) * 2022-11-29 2023-09-05 荣耀终端有限公司 Positioning method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130238366A1 (en) * 2008-12-12 2013-09-12 Gordon*Howard Associates, Inc. Methods and systems related to activating geo-fence boundaries and collecting location data
US20160198295A1 (en) * 2015-01-05 2016-07-07 Sk Planet Co., Ltd. Apparatus and method for activating wireless communication function automatically for geo-fence, system comprising the same and non-transitory computer readable storage medium having computer program recorded thereon
US20170188188A1 (en) * 2015-12-29 2017-06-29 Sk Planet Co., Ltd. Method, apparatus, and recording medium for radio fingerprint map construction and location tracking
US20190369858A1 (en) * 2017-05-30 2019-12-05 Palantir Technolohies Inc. Systems and methods for geo-fenced dynamic dissemination
CN110679133A (en) * 2017-05-17 2020-01-10 微软技术许可有限责任公司 Alert based on evacuation or entry intent
CN110765219A (en) * 2019-08-05 2020-02-07 上海晶赞融宣科技有限公司 Geo-fence generation method and device, computer equipment and storage medium
CN111787485A (en) * 2020-06-02 2020-10-16 Oppo广东移动通信有限公司 Electronic fence creating method and device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130238366A1 (en) * 2008-12-12 2013-09-12 Gordon*Howard Associates, Inc. Methods and systems related to activating geo-fence boundaries and collecting location data
US20160198295A1 (en) * 2015-01-05 2016-07-07 Sk Planet Co., Ltd. Apparatus and method for activating wireless communication function automatically for geo-fence, system comprising the same and non-transitory computer readable storage medium having computer program recorded thereon
US20170188188A1 (en) * 2015-12-29 2017-06-29 Sk Planet Co., Ltd. Method, apparatus, and recording medium for radio fingerprint map construction and location tracking
CN110679133A (en) * 2017-05-17 2020-01-10 微软技术许可有限责任公司 Alert based on evacuation or entry intent
US20190369858A1 (en) * 2017-05-30 2019-12-05 Palantir Technolohies Inc. Systems and methods for geo-fenced dynamic dissemination
CN110765219A (en) * 2019-08-05 2020-02-07 上海晶赞融宣科技有限公司 Geo-fence generation method and device, computer equipment and storage medium
CN111787485A (en) * 2020-06-02 2020-10-16 Oppo广东移动通信有限公司 Electronic fence creating method and device and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116033344A (en) * 2022-06-13 2023-04-28 荣耀终端有限公司 Geofence determination method, equipment and storage medium
CN116033344B (en) * 2022-06-13 2023-09-26 荣耀终端有限公司 Geofence determination method, equipment and storage medium
CN115357813A (en) * 2022-10-20 2022-11-18 荣耀终端有限公司 Sampling method and device and electronic equipment
CN116668951A (en) * 2022-10-26 2023-08-29 荣耀终端有限公司 Method for generating geofence, electronic equipment and storage medium
CN116668951B (en) * 2022-10-26 2024-04-23 荣耀终端有限公司 Method for generating geofence, electronic equipment and storage medium
CN116709191A (en) * 2022-11-29 2023-09-05 荣耀终端有限公司 Positioning method and electronic equipment
CN116709191B (en) * 2022-11-29 2024-05-03 荣耀终端有限公司 Positioning method and electronic equipment

Also Published As

Publication number Publication date
CN113891240B (en) 2024-07-23

Similar Documents

Publication Publication Date Title
CN113891240B (en) Geofence generation method and device, positioning method and device, medium and equipment
CN110166943B (en) Method for processing terminal position information
CN110719568B (en) Indoor positioning method, device, medium and equipment
CN106792992B (en) Method and equipment for providing wireless access point information
CN108450060B (en) Positioning method and device based on WI-FI access point
CN109698934B (en) Region monitoring method and device
CN107172209B (en) Information pushing method and device
EP3036557B1 (en) System and method for selecting a wi-fi access point for position determination
JP2016105620A (en) Method and device for analyzing user traffic in predetermined region
CN109068272B (en) Similar user identification method, device, equipment and readable storage medium
CN110213714B (en) Terminal positioning method and device
WO2007001660A2 (en) Positioning service utilizing existing radio base stations
CN108667693B (en) Throughput testing system and method
CN109429330B (en) Indoor positioning method, device, equipment and medium
CN114189806B (en) Method and device for generating wireless signal fingerprint database and electronic equipment
CN113645625B (en) Pseudo base station positioning method, pseudo base station positioning device, electronic equipment and readable medium
JP2015040749A (en) Position estimation device and position estimation program
CN110740418A (en) Method and device for generating user visit information
CN107071778A (en) Pseudo-base station recognition methods and data analysing method
CN110320493B (en) Indoor positioning method, device, electronic equipment and computer storage medium
CN113905438B (en) Scene identification generation method, positioning method and device and electronic equipment
CN111861526A (en) Method and device for analyzing object source
CN111294820B (en) Method and device for acquiring scene cell information
KR102174127B1 (en) Apparatus and method in radio communications system
CN105722216B (en) Distance detection method, terminal device 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
GR01 Patent grant
GR01 Patent grant