CN112383959A - Positioning method, positioning device, computer equipment and storage medium - Google Patents
Positioning method, positioning device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112383959A CN112383959A CN202011279589.5A CN202011279589A CN112383959A CN 112383959 A CN112383959 A CN 112383959A CN 202011279589 A CN202011279589 A CN 202011279589A CN 112383959 A CN112383959 A CN 112383959A
- Authority
- CN
- China
- Prior art keywords
- fence
- geo
- application program
- position information
- operation state
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000002159 abnormal effect Effects 0.000 claims abstract description 9
- 238000010276 construction Methods 0.000 claims abstract description 6
- 238000004590 computer program Methods 0.000 claims description 23
- 230000001960 triggered effect Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000002618 waking effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000474 nursing effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/021—Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/029—Location-based management or tracking services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention relates to a positioning method, a positioning device, computer equipment and a storage medium, wherein the method comprises the steps of obtaining current position information; constructing a geo-fence according to the location information; judging whether the position information triggers a set event of a geo-fence or not; if yes, judging whether the application program is in a normal operation state; if the application program is in an abnormal operation state, awakening the application program; clearing the geo-fence and performing the acquiring current location information. The invention awakens the application program in the quitting or hanging state by utilizing the function of the geo-fence, realizes uninterrupted geo-location service, can continuously acquire the location information when the application program is closed or hung, does not need to run the application program between the construction of the previous geo-fence and the next geo-fence, avoids consuming a large amount of electric quantity and flow and saves the electric quantity.
Description
Technical Field
The embodiment of the invention relates to a positioning method, in particular to a positioning method, a positioning device, computer equipment and a storage medium.
Background
Many personal safety risks can be met in the growth process of children, parents are required to take close care of the children before the children do not have self-protection capability, but the children also have independent places such as learning, going out to play and the like in many times. In order to obtain the position information of the child in real time, the position of the child is generally obtained in real time and fed back to the parent.
In the related technology, electronic equipment based on a watch or a mobile phone and the like is adopted to obtain a GPS position, report the GPS position and check the GPS position at home; corresponding position information can be acquired by adopting a fence positioning mode, but the position cannot be continuously acquired by adopting the fence positioning mode, the application program at a user end fails when the application program is closed or suspended, and a large amount of electric quantity and flow can be consumed if the application program is always kept in the foreground for running.
Therefore, it is necessary to design a new method for continuously obtaining the location information when the application is turned off or suspended, so as to avoid consuming a large amount of power and traffic and save power.
Disclosure of Invention
Embodiments of the present invention provide a positioning method, an apparatus, a computer device, and a storage medium, which are used to overcome the defects of the prior art.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme: the positioning method comprises the following steps:
acquiring current position information;
constructing a geo-fence according to the location information;
judging whether the position information triggers a set event of a geo-fence or not;
if yes, judging whether the application program is in a normal operation state;
if the application program is in an abnormal operation state, awakening the application program;
clearing the geo-fence and performing the acquiring current location information.
The further technical scheme is as follows: after judging whether the application program is in a normal operation state, the method further comprises the following steps:
and if the application program is in a normal running state, acquiring a real-time geographic position, and feeding back the real-time geographic position to a server.
The further technical scheme is as follows: the constructing the geo-fence according to the location information comprises:
determining a fence by taking the position information as a center and a preset length as a radius;
and identifying the fence to construct a geo-fence.
The further technical scheme is as follows: after the identifying the fence and constructing the geo-fence, the method further comprises:
the identification number is saved.
The further technical scheme is as follows: after the constructing the geo-fence according to the location information, the method includes:
adding the geofence to a list of fences currently listening.
The further technical scheme is as follows: the clearing the geofence, comprising:
acquiring a fence list which is monitored currently;
taking the identification number of the geographic fence triggering the set event as a search condition, and searching in a currently monitored fence list to obtain a corresponding geographic fence;
stopping listening to the geofence;
deleting the geofence from the list of fences currently listening.
An embodiment of the present invention further provides a positioning apparatus, including:
an information acquisition unit for acquiring current position information;
the fence construction unit is used for constructing a geo-fence according to the position information;
the event judging unit is used for judging whether the position information triggers a set event of the geo-fence or not;
the state judgment unit is used for judging whether the application program is in a normal operation state or not if the application program is in the normal operation state;
the awakening unit is used for awakening the application program if the application program is in an abnormal operation state;
a fence clearing unit configured to clear the geo-fence and perform the acquiring of the current location information.
The further technical scheme is as follows: further comprising:
and the real-time position acquisition unit is used for acquiring the real-time geographical position and feeding back the real-time geographical position to the server if the application program is in a normal running state.
The embodiment of the invention also provides computer equipment, which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor executes the computer program to realize the method.
An embodiment of the present invention further provides a storage medium, where the storage medium stores a computer program, and the computer program, when executed by a processor, can implement the method described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: according to the embodiment of the invention, the geo-fence is constructed according to the current position information, the set event of the geo-fence is monitored, the set event is triggered to serve as the application program which is in the quitting or hanging state, so that the application program works, the real-time position information is further read, the triggered geo-fence is eliminated, the application program in the quitting or hanging state is awakened by utilizing the function of the geo-fence, the uninterrupted geo-position service is realized, the position information can be continuously obtained when the application program is closed or hung, the application program does not need to be operated between the construction of the previous geo-fence and the next geo-fence, a large amount of electric quantity and flow are avoided being consumed, and the electric quantity is saved.
Embodiments of the invention are further described below with reference to the drawings and the detailed description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a positioning method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a positioning method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow chart of a positioning method according to an embodiment of the present invention;
fig. 4 is a schematic sub-flow chart of a positioning method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a positioning method according to another embodiment of the present invention;
FIG. 6 is a schematic block diagram of a positioning device provided by an embodiment of the present invention;
fig. 7 is a schematic block diagram of a fence constructing unit of the positioning device provided by the embodiment of the present invention;
fig. 8 is a schematic block diagram of a fence clearing unit of the positioning device provided in the embodiment of the present invention;
FIG. 9 is a schematic block diagram of a positioning device provided in another embodiment of the present invention;
FIG. 10 is a schematic block diagram of a computer device provided by 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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a positioning method according to an embodiment of the present invention. Fig. 2 is a schematic flowchart of a positioning method according to an embodiment of the present invention. The positioning method is applied to a terminal, the terminal and a server perform data interaction, when an application program of the terminal is started, current position information is obtained and a geo-fence is constructed, whether a set event of the geo-fence is triggered or not is monitored, when the set event is triggered, the state of the application program is judged, when the application program is in a dormant state such as hanging or exiting, the application program is awakened to obtain the real-time position and rebuild a new geo-fence, a subsequent monitoring event is entered, if the application program is in a normal running state, the position is fed back to the server after being obtained again, and a parent terminal can obtain the position information of the current terminal from the server. The continuous geographic position function can be realized in the mobile terminal, and by adopting the system fence technology, no application program can be operated from the last fence to the next fence, so that the electric quantity can be saved.
Fig. 2 is a schematic flow chart of a positioning method according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S110 to S170.
And S110, acquiring current position information.
In this embodiment, when the application is started or awakened, the current location information of the terminal is obtained by using GPS positioning.
In this embodiment, the current location information includes location information such as latitude and longitude.
In practical application, when the current position information is acquired each time, the current position information is fed back to the server, so that the home terminal can conveniently acquire the position information of the current terminal from the server in real time to monitor the current terminal in real time.
And S120, constructing the geo-fence according to the position information.
In this embodiment, the geofence refers to a virtual geofence that is defined by a virtual fence, specifically, the geofence refers to a virtual circular boundary that is constructed by using the current location information as a center and using a set numerical value as a radius, and when a terminal leaves the circular boundary, the terminal is considered to leave the geofence; of course, in other embodiments, the geofence may also be a circular boundary from the terminal, and if the terminal enters the circular boundary, the geofence may be set to trigger a set event.
In an embodiment, referring to fig. 3, step S120 may include steps S121 to S123.
And S121, determining the fence by taking the position information as a center and a preset length as a radius.
In this embodiment, the fence refers to a virtual location area constructed by taking the current location information as a center and a preset length as a radius.
Specifically, a circle boundary is drawn by taking the longitude and latitude of the current position as the center and taking the preset length as the radius, and a fence is formed in the circle boundary. The predetermined length may be 200m or other values.
And S122, identifying the fence and constructing the geo-fence.
In this embodiment, the fence is identified so that the fence that has been triggered to set the event can be quickly found out subsequently.
And S123, storing the identification number.
When the Application is started for the first time, a first geo-fence is created using an API (Application Programming Interface) provided by a system of the terminal, in this embodiment, the API employs a clcircuitryregion, and the incoming key parameters include: and marking by taking the current longitude and latitude as a center, taking a preset length as a radius and using the unique identifier ws-geolenses-xxxx, and storing the identifier to the hard disk. Then, the system API is used to start monitoring the exit event of the fence, and the API used for monitoring is startMonitoringForRegion.
And S130, judging whether the position information triggers a setting event of the geo-fence.
In this embodiment, the setting event of the geo-fence may be an event of leaving the geo-fence or an event of entering the geo-fence, and the setting event of the geo-fence is set to serve as a condition for waking up the application program, and only when the event is started, the wake-up operation may be performed when the application program is suspended or exited.
If the setting event of the geo-fence is not triggered currently, the step S130 is executed.
S140, if yes, judging whether the application program is in a normal running state;
s150, if the application program is in the abnormal operation state, the application program is awakened.
In this embodiment, the application is woken up by using the existing wake-up mechanism.
S160, clearing the geo-fence, and executing the step S110.
Clearing the geofence triggered by the set event is beneficial to clearing invalid geofences in time and avoiding occupying memory. According to the geo-fence awakening scheme, the application program is awakened in a geo-fence set event triggering mode, so that a user can continuously acquire the geographic position on the mobile terminal, the geographic position is reported to the server to be checked by a parent, the parent is helped to acquire the position information of the child in real time, potential dangers are avoided, and the purpose of nursing the child in real time is achieved.
The geo-fence function is an area location function provided by the terminal, if the terminal leaves a geo-fence area, a fence leaving event is triggered, and the terminal wakes up the application program from a suspended or closed state and enters a normal operation state, so that the opportunity of code execution is acquired.
In an embodiment, referring to fig. 4, the step S160 may include steps S161 to S164.
S161, acquiring a fence list which is monitored currently.
In this embodiment, the fence list refers to a list including geo-fence information and corresponding identification numbers.
And S162, searching in the currently monitored fence list by taking the identification number of the geo-fence triggering the set event as a search condition to obtain the corresponding geo-fence.
In this embodiment, the corresponding geo-fence refers to the geo-fence that has triggered the set event.
S163, stopping monitoring the geo-fence;
s164, deleting the geo-fence from the fence list currently being monitored.
When the departure event of the first geo-fence is triggered, the terminal wakes up the application program, and then the latest current position, the precision of the current position and a new unique identifier ws-geolenses-yyyy are taken as parameters, wherein the precision of the current position refers to that the position precision and the GPS information of the position are obtained from the system together, and the data is data with the meter as a unit and represents the deviation range of the current position; a second geofence is created using the system API, namely clcircularrection, and then monitored for exit events for the geofence. Using the system API, monitoredRegions, obtains a list of all the currently listening fences and finds the fence identified as ws-geolenses-xxxx, the first geo-fence, from which to stop listening to the fence and remove it from the list. By analogy, the system awakening application program is triggered through the leaving event of the previous fence, and the GPS position acquisition and the next fence creation are completed by utilizing the awakening time, so that the continuous acquisition of the GPS position can be realized.
S170, if the application program is in a normal operation state, acquiring a real-time geographic position, and feeding back the real-time geographic position to a server.
When the application program is not suspended or quitted, the real-time geographic position can be directly acquired and fed back to the server so as to be convenient for the parent end to view.
According to the positioning method, the geo-fences are constructed according to the current position information, the set events of the geo-fences are monitored, the set events are triggered to serve as the application programs which are in the quitting or hanging state, so that the application programs work, the real-time position information is read, the triggered geo-fences are cleared, the application programs in the quitting or hanging state are awakened by utilizing the functions of the geo-fences, uninterrupted geo-position service is achieved, the position information can be continuously obtained when the application programs are closed or hung, the application programs do not need to be operated between the construction of the previous geo-fence and the next geo-fence, a large amount of electric quantity and flow are prevented from being consumed, and electric quantity is saved.
Fig. 5 is a flowchart illustrating a positioning method according to another embodiment of the present invention. As shown in fig. 5, the positioning method of the present embodiment includes steps S210-S280. Steps S210 to S20 are similar to steps S110 to S120 in the above embodiment, and steps S240 to S80 are similar to steps S130 to S170 in the above embodiment, and are not repeated herein. The added step S230 in the present embodiment is explained in detail below.
And S230, adding the geo-fence into a fence list which is monitored currently.
Once a geofence is constructed, it needs to be added to the list of currently listening fences for listening to the geofence.
Fig. 6 is a schematic block diagram of a positioning apparatus 300 according to an embodiment of the present invention. As shown in fig. 6, the present invention also provides a positioning apparatus 300 corresponding to the above positioning method. The positioning apparatus 300 includes a unit for performing the above positioning method, and the apparatus may be configured in a terminal such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. Specifically, referring to fig. 6, the positioning apparatus 300 includes an information obtaining unit 301, a fence constructing unit 302, an event determining unit 304, a state determining unit 305, a waking unit 306, and a fence clearing unit 307.
An information acquisition unit 301 configured to acquire current location information; a fence construction unit 302, configured to construct a geo-fence according to the location information; an event determining unit 304, configured to determine whether the location information triggers a set event of a geo-fence; a state determining unit 305, configured to determine whether the application is in a normal operation state if the application is in a normal operation state; a wake-up unit 306, configured to wake up the application program if the application program is in an abnormal operation state; a fence clearing unit 307, configured to clear the geo-fence and perform the acquiring of the current location information.
In one embodiment, as shown in FIG. 6, the positioning device 300 includes a position feedback unit 308.
The position feedback unit 308 is configured to acquire a real-time geographic position and feed back the real-time geographic position to the server if the application program is in a normal operation state.
In an embodiment, as shown in fig. 7, the fence constructing unit 302 includes a fence determining subunit 3021, a marking subunit 3022, and a holding subunit 3023.
A fence determining subunit 3021, configured to determine a fence using the position information as a center and a preset length as a radius; a marking subunit 3022, configured to identify the fence and construct a geo-fence. A holding subunit 3023 configured to hold the identification number.
In one embodiment, as shown in fig. 8, the fence clearing unit 307 includes a list acquiring sub-unit 3071, a searching sub-unit 3072, a stop listening sub-unit 3073, and a deleting sub-unit 3074.
A list obtaining subunit 3071, configured to obtain a fence list currently being monitored; the search subunit 3072 is configured to search in the currently monitored fence list by using the identification number of the geo-fence that has triggered the set event as a search condition, so as to obtain a corresponding geo-fence; a stop listening subunit 3073 for stopping listening to the geofence; a delete subunit 3074 to delete the geofence from the list of fences currently listening.
Fig. 9 is a schematic block diagram of a positioning apparatus 300 according to another embodiment of the present invention. As shown in fig. 9, the positioning apparatus 300 of the present embodiment is the addition of the adding unit 303 to the above embodiment.
A joining unit 303, configured to join the geo-fence into a fence list currently being listened to.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the positioning apparatus 300 and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.
The positioning apparatus 300 may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 10.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal, wherein the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
Referring to fig. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 comprise program instructions that, when executed, cause the processor 502 to perform a positioning method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to perform a positioning method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 10 is a block diagram of only a portion of the configuration relevant to the present teachings and is not intended to limit the computing device 500 to which the present teachings may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
acquiring current position information; constructing a geo-fence according to the location information; judging whether the position information triggers a set event of a geo-fence or not; if yes, judging whether the application program is in a normal operation state; if the application program is in an abnormal operation state, awakening the application program; clearing the geo-fence and performing the acquiring current location information.
In an embodiment, after the step of determining whether the application is in a normal operation state is implemented, the processor 502 further implements the following steps:
and if the application program is in a normal running state, acquiring a real-time geographic position, and feeding back the real-time geographic position to a server.
In an embodiment, when the processor 502 implements the step of constructing the geo-fence according to the location information, the following steps are specifically implemented:
determining a fence by taking the position information as a center and a preset length as a radius; and identifying the fence to construct a geo-fence.
In an embodiment, the processor 502, after implementing the identifying the fence and constructing the geofence step, further implements the steps of:
the identification number is saved.
In an embodiment, the processor 502, after implementing the step of constructing a geo-fence from the location information, further implements the steps of:
adding the geofence to a list of fences currently listening.
In an embodiment, when the processor 502 performs the step of clearing the geofence, the following steps are specifically performed:
acquiring a fence list which is monitored currently; taking the identification number of the geographic fence triggering the set event as a search condition, and searching in a currently monitored fence list to obtain a corresponding geographic fence; stopping listening to the geofence; deleting the geofence from the list of fences currently listening.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:
acquiring current position information; constructing a geo-fence according to the location information; judging whether the position information triggers a set event of a geo-fence or not; if yes, judging whether the application program is in a normal operation state; if the application program is in an abnormal operation state, awakening the application program; clearing the geo-fence and performing the acquiring current location information.
In an embodiment, after the step of determining whether the application program is in a normal operation state is implemented by the processor executing the computer program, the following steps are further implemented:
and if the application program is in a normal running state, acquiring a real-time geographic position, and feeding back the real-time geographic position to a server.
In an embodiment, when the processor executes the computer program to implement the step of constructing the geo-fence according to the location information, the processor specifically implements the following steps:
determining a fence by taking the position information as a center and a preset length as a radius; and identifying the fence to construct a geo-fence.
In an embodiment, the processor, after executing the computer program to implement the identifying the fence and constructing the geofence, further implements the steps of:
the identification number is saved.
In an embodiment, the processor, after executing the computer program to perform the step of constructing a geofence from the location information, further performs the steps of:
adding the geofence to a list of fences currently listening.
In one embodiment, when the processor executes the computer program to implement the clearing the geofence, the processor implements the following steps:
acquiring a fence list which is monitored currently; taking the identification number of the geographic fence triggering the set event as a search condition, and searching in a currently monitored fence list to obtain a corresponding geographic fence; stopping listening to the geofence; deleting the geofence from the list of fences currently listening.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A positioning method, comprising:
acquiring current position information;
constructing a geo-fence according to the location information;
judging whether the position information triggers a set event of a geo-fence or not;
if yes, judging whether the application program is in a normal operation state;
if the application program is in an abnormal operation state, awakening the application program;
and clearing the fence management and executing the acquisition of the current position information.
2. The method according to claim 1, wherein after determining whether the application program is in a normal operation state, the method further comprises:
and if the application program is in a normal running state, acquiring a real-time geographic position, and feeding back the real-time geographic position to a server.
3. The method of claim 1, wherein the constructing a geo-fence according to the location information comprises:
determining a fence by taking the position information as a center and a preset length as a radius;
and identifying the fence to construct a geo-fence.
4. The method of claim 3, wherein the identifying the fence, after constructing the geo-fence, further comprises:
the identification number is saved.
5. The method of claim 1, wherein after constructing the geofence from the location information, further comprising:
adding the geofence to a list of fences currently listening.
6. The method of claim 1, wherein the clearing the geofence comprises:
acquiring a fence list which is monitored currently;
taking the identification number of the geographic fence triggering the set event as a search condition, and searching in a currently monitored fence list to obtain a corresponding geographic fence;
stopping listening to the geofence;
deleting the geofence from the list of fences currently listening.
7. A positioning device, comprising:
an information acquisition unit for acquiring current position information;
the fence construction unit is used for constructing a geo-fence according to the position information;
the event judging unit is used for judging whether the position information triggers a set event of the geo-fence or not;
the state judgment unit is used for judging whether the application program is in a normal operation state or not if the application program is in the normal operation state;
the awakening unit is used for awakening the application program if the application program is in an abnormal operation state;
a fence clearing unit configured to clear the geo-fence and perform the acquiring of the current location information.
8. The positioning device of claim 7, further comprising:
and the real-time position acquisition unit is used for acquiring the real-time geographical position and feeding back the real-time geographical position to the server if the application program is in a normal running state.
9. A computer device, characterized in that the computer device comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program implements the method according to any of claims 1 to 6.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011279589.5A CN112383959A (en) | 2020-11-16 | 2020-11-16 | Positioning method, positioning device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011279589.5A CN112383959A (en) | 2020-11-16 | 2020-11-16 | Positioning method, positioning device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112383959A true CN112383959A (en) | 2021-02-19 |
Family
ID=74585454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011279589.5A Pending CN112383959A (en) | 2020-11-16 | 2020-11-16 | Positioning method, positioning device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112383959A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12150012B2 (en) | 2022-08-05 | 2024-11-19 | Honda Motor Co., Ltd. | Enabling location-based services based on geofence data and privacy settings |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104798417A (en) * | 2012-12-14 | 2015-07-22 | 英特尔公司 | Geo-fencing based upon semantic location |
CN105264456A (en) * | 2013-06-07 | 2016-01-20 | 苹果公司 | Motion fencing |
CN105308567A (en) * | 2013-06-06 | 2016-02-03 | 苹果公司 | Category-based fence |
CN105764027A (en) * | 2015-01-05 | 2016-07-13 | Sk普兰尼特有限公司 | Automatic Activating Device And Method Used For Wireless Communication Function Of Geo-fence And System Comprising Same |
CN109379712A (en) * | 2018-12-29 | 2019-02-22 | 北京创鑫旅程网络技术有限公司 | Mobile device passive tracking method and device |
CN109522105A (en) * | 2018-10-22 | 2019-03-26 | 平安科技(深圳)有限公司 | APP running background method, system, terminal device and can storage medium |
CN111328020A (en) * | 2018-12-17 | 2020-06-23 | 华为技术有限公司 | Service processing method and device based on indoor positioning system |
-
2020
- 2020-11-16 CN CN202011279589.5A patent/CN112383959A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104798417A (en) * | 2012-12-14 | 2015-07-22 | 英特尔公司 | Geo-fencing based upon semantic location |
CN105308567A (en) * | 2013-06-06 | 2016-02-03 | 苹果公司 | Category-based fence |
CN105264456A (en) * | 2013-06-07 | 2016-01-20 | 苹果公司 | Motion fencing |
CN105764027A (en) * | 2015-01-05 | 2016-07-13 | Sk普兰尼特有限公司 | Automatic Activating Device And Method Used For Wireless Communication Function Of Geo-fence And System Comprising Same |
CN109522105A (en) * | 2018-10-22 | 2019-03-26 | 平安科技(深圳)有限公司 | APP running background method, system, terminal device and can storage medium |
CN111328020A (en) * | 2018-12-17 | 2020-06-23 | 华为技术有限公司 | Service processing method and device based on indoor positioning system |
CN109379712A (en) * | 2018-12-29 | 2019-02-22 | 北京创鑫旅程网络技术有限公司 | Mobile device passive tracking method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12150012B2 (en) | 2022-08-05 | 2024-11-19 | Honda Motor Co., Ltd. | Enabling location-based services based on geofence data and privacy settings |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11683396B2 (en) | Efficient context monitoring | |
CN103823543B (en) | Portable electronic device and the method operated wherein | |
US8369837B2 (en) | Task management based on travel distance | |
KR102374438B1 (en) | Method for managing geo-fence and electronic device thereof | |
TWI656439B (en) | Application program wake-up method and device | |
US10834698B2 (en) | Systems and methods for optimizing message notification based on geographic location and time | |
EP3576036A1 (en) | Service execution method and device | |
CN101180517A (en) | Systems and methods for indicating reminders via portable computing devices | |
CN104915283B (en) | Method and device for measuring power consumption of mobile terminal | |
CN106569585A (en) | Method and terminal of managing application program process | |
CN111024264A (en) | A monitoring method, device, equipment and storage medium based on body temperature of many people | |
WO2021136206A1 (en) | Message reminding method and apparatus, control device, and storage medium | |
US9692876B2 (en) | Suppress and resume notifications based on motion | |
CN112383959A (en) | Positioning method, positioning device, computer equipment and storage medium | |
US20190364036A1 (en) | Systems, apparatus, and methods for low-power, intermittently-connected, security devices and other devices | |
CN108509541B (en) | Message reading method, message reading device and mobile terminal | |
CN111290565A (en) | Doze mode control method, device, terminal and storage medium | |
WO2017206318A1 (en) | Mobile device, and method and apparatus for sharing location thereof | |
CN105354491B (en) | Intelligent terminal standby state detection method and device | |
US20140211597A1 (en) | Electronic device and method of controlling alarm clock function | |
US20200112849A1 (en) | Nomination of a primary cell phone from a pool of cell phones | |
US11323956B2 (en) | Method for operating a device during an unavailability time period | |
CN107547742B (en) | Wake-up lock release method and device for mobile terminal | |
CN117111985A (en) | Application updating method and related device | |
CN112673611B (en) | Mobile terminal control method, mobile terminal control device and mobile terminal |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211123 Address after: 518000 1001, block D, building 5, software industry base, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province Applicant after: Shenzhen Wanxing Software Co.,Ltd. Address before: 518000 1002, block D, building 5, software industry base, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province Applicant before: SHENZHEN SIBO TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210219 |