Geofence detection method and device, electronic equipment, chip and medium
By introducing a combination of buffer areas and countdown time in geofen detection, the frequent detection and error detection problems of users when moving or staying near fence boundaries are solved, achieving higher detection accuracy and user experience.
Patent Information
- Application Number
- CN202311414918.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
Geo-fence detection in the prior art is prone to the problem of frequent detection or error detection, especially when a user moves or stays near the boundary of the geofence.
By introducing a combination of buffer area and countdown time, the user's geographical location information is monitored. If the user enters the buffer area, the event state is triggered, and the countdown time is turned on after the user leaves the buffer area. If the user completely leaves the buffer area and the time is greater than or equal to the countdown time, the event state is cancelled.
It effectively avoids frequent detection and error detection when users move or stay near geofence boundaries, reduces message push, thereby reducing power consumption, and improving detection accuracy and user experience.
Smart Images

Figure CN119906954A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of location services, and in particular to a geo-fence detection method, device, electronic device, chip and medium. Background Art
[0002] In the field of contemporary mobile application development, geo-fencing is widely used in multiple application scenarios, such as location reminders, location tracking, and security alarms. Geofencing uses technologies such as the mobile phone's GPS, Wi-Fi, or cellular network to monitor the user's location in real time and trigger corresponding events or reminders when the user enters or leaves a specified area.
[0003] Most of the related geo-fence detection technologies use accurate fence boundaries and fixed event notification delays. Once the behavior of crossing the fence boundary is detected, the event will be triggered and the corresponding function will be completed. When the user moves or stays near the boundary of the geo-fence, the related technology's "trigger-and-report" is prone to frequent detection or false detection problems. Summary of the invention
[0004] The present disclosure provides a geo-fence detection method, device, electronic device, chip and medium to solve the problems of frequent detection and false detection in related technologies. By utilizing the characteristics of the buffer area and combining the countdown time, frequent detection and false detection when the first object moves or stays near the boundary of the geo-fence are avoided, and message push is reduced during the detection process, thereby reducing power consumption, while ensuring the accuracy of detection, improving user experience and detection efficiency.
[0005] A first aspect of the present disclosure provides a geo-fence detection method, the method comprising: monitoring the geographic location information of a first object, if the first object passes through the fence boundary of the geo-fence and is located within the buffer area of the geo-fence, determining that the first object has performed a first event, triggering the first event state of the geo-fence, and pushing first information corresponding to the first event; under the first event, if the first object leaves the buffer area of the geo-fence, starting a countdown time; if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, releasing the first event state.
[0006] In some embodiments of the present disclosure, the method further includes: if the first object does not leave the buffer area of the geo-fence under the first event, maintaining the first event state.
[0007] In some embodiments of the present disclosure, under the first event, if the first object leaves the buffer area of the geo-fence, starting the countdown time includes: under the first event, if the first object passes through the buffer boundary of the buffer area in the geo-fence, determining that the first object leaves the buffer area of the geo-fence within the countdown time, and starting the countdown time.
[0008] In some embodiments of the present disclosure, the buffer boundary includes a first buffer boundary and a second buffer boundary. In a first event, if the first object passes through the buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence within a countdown time, and starting the countdown time includes: in the first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, or the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence, and the countdown time is started, wherein the first buffer boundary and the second buffer boundary are located on both sides of the fence boundary, and the distance between the first buffer boundary and the first object is less than the distance between the second buffer boundary and the first object.
[0009] In some embodiments of the present disclosure, if the departure time of the first object leaving the buffer area of the geo-fence is greater than or equal to the countdown time, releasing the first event state includes: under the first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, and the departure time of the first object passing through the first buffer boundary is greater than or equal to the countdown time, releasing the first event state; under the first event, if the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, and the departure time of the first object passing through the second buffer boundary is greater than or equal to the countdown time, determining that the first object performs a second event, and pushing second information corresponding to the second event, and releasing the first event state, the second event includes a relative event of the first event.
[0010] In some embodiments of the present disclosure, the method further includes: if the departure time of the first object from the buffer area of the geo-fence is less than the countdown time, and the first object is located in the buffer area, maintaining the first event state and closing the countdown time.
[0011] The second aspect of the present disclosure provides a geo-fence detection device, which includes: a trigger unit, which is used to monitor the geographic location information of a first object, and if the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, determine that the first object has performed a first event, trigger the first event state of the geo-fence, and push first information corresponding to the first event; a judgment unit, which is used to start a countdown time if the first object leaves the buffer area of the geo-fence under the first event; and a release unit, which is used to release the first event state if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time.
[0012] In some embodiments of the present disclosure, the geo-fence detection device further includes: a maintaining unit, configured to maintain a first event state if the first object does not leave a buffer area of the geo-fence under the first event.
[0013] In some embodiments of the present disclosure, the judgment unit is used to: under a first event, if the first object passes through a buffer boundary of a buffer area in a geo-fence, determine that the first object leaves the buffer area of the geo-fence within a countdown time, and start the countdown time.
[0014] In some embodiments of the present disclosure, the buffer boundary includes a first buffer boundary and a second buffer boundary, and the judgment unit is used to: under a first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, or the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, determine that the first object leaves the buffer area of the geo-fence within the countdown time, and start the countdown time, wherein the first buffer boundary and the second buffer boundary are located on both sides of the fence boundary, and the distance between the first buffer boundary and the first object is less than the distance between the second buffer boundary and the first object.
[0015] In some embodiments of the present disclosure, the release unit is used to: under a first event, if the first object passes through a first buffer boundary of a buffer area in a geo-fence, and the departure time of the first object passing through the first buffer boundary is greater than or equal to the countdown time, release the first event state; under a first event, if the first object passes through a fence boundary and a second buffer boundary of a buffer area in a geo-fence, and the departure time of the first object passing through the second buffer boundary is greater than or equal to the countdown time, determine that the first object has a second time, and push second information corresponding to the second event, release the first event state, and the second event includes a relative event of the first event.
[0016] In some embodiments of the present disclosure, the geo-fence detection device also includes: a closing unit, which is used to maintain the first event state and close the countdown time if the departure time of the first object leaving the buffer area of the geo-fence is less than the countdown time and the first object is located in the buffer area.
[0017] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.
[0018] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0019] The fifth aspect embodiment of the present disclosure proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals and send signals to the processor, the signals include computer instructions stored in the memory, when the processor executes the computer instructions, the chip executes the method described in the first aspect embodiment of the present disclosure.
[0020] In summary, according to the geo-fence detection method proposed in the present invention, by monitoring the geographic location information of the first object, if the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, it is determined that the first object has performed a first event, the first event state of the geo-fence is triggered, and the first information corresponding to the first event is pushed; under the first event, if the first object leaves the buffer area of the geo-fence, the countdown time is started; if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, the first event state is released, and the characteristics of the buffer area are utilized in combination with the countdown time to avoid frequent detection and false detection when the first object moves or stays near the boundary of the geo-fence, reduce message push during the detection process, thereby reducing power consumption, while ensuring the accuracy of detection, improving user experience and detection efficiency.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0023] Figure 1 A schematic diagram of a fence boundary of a geographic fence in a related technology provided by an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of a geo-fence detection method provided in an embodiment of the present disclosure;
[0025] Figure 3 A flowchart of a geo-fence detection method provided in an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of a buffer area provided in an embodiment of the present disclosure;
[0027] Figure 5A schematic diagram of a buffer area-based fence boundary crossing detection strategy provided by an embodiment of the present disclosure;
[0028] Figure 6 A schematic diagram of a fence boundary crossing detection strategy based on countdown time provided in an embodiment of the present disclosure;
[0029] Figure 7 A schematic diagram of a specific geo-fence detection provided by an embodiment of the present disclosure;
[0030] Figure 8 A schematic diagram of the structure of a geo-fence detection device provided in an embodiment of the present disclosure;
[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure;
[0032] Fig.10 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] The embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions.
[0034] In the field of contemporary mobile application development, geo-fencing is widely used in multiple application scenarios, such as location reminders, location tracking, and security alarms. Geo-fencing is an application of location-based services (LBS), which is to use a virtual fence to enclose a virtual geographic boundary. When a smart terminal device such as a mobile phone enters, leaves, or stays in a specific geographic area, the smart terminal device can receive automatic notifications and warnings. Geofencing requires constant monitoring of the user's location, and by paying attention to the distance between the user's current location and the target geographic area, the user is ensured to receive timely notifications.
[0035] Most of the related geo-fence detection technologies use accurate fence boundaries and fixed event notification delays. Once a behavior of crossing the fence boundary is detected, an event will be triggered and the corresponding function will be completed. Figure 1The schematic diagram of the fence boundary of the geo-fence in the related art shown in the figure, the related art performs geo-fence detection through only one fence boundary. In actual application, due to insufficient positioning accuracy and a single detection strategy, it is easy to cause complex frequent detection or false detection problems, which reduces the user experience. In particular, when the user moves or stays near the fence boundary of the geo-fence, relying on the single detection strategy in the related art, when the user moves or stays near the fence boundary of the geo-fence, the positioning technology may produce some slight position changes due to signal fluctuations or other factors, which may cause the system to mistakenly determine that the user has crossed the fence boundary, causing the user to frequently receive reminders of entering and leaving the geo-fence.
[0036] In order to solve the problems existing in the related art, the present disclosure proposes a fence boundary crossing detection strategy based on a buffer zone, which reduces the misjudgment when the user crosses the geo-fence, avoids the frequent detection and event repetitive triggering problems caused by the user moving or staying near the fence boundary, reduces information push, improves the user experience, and reduces power consumption. Compared with the related art, the geo-fence detection result of the present disclosure is more accurate and the detection efficiency is higher.
[0037] The geo-fence detection method proposed in the present disclosure can be applied to various services or marketing activities that require location information, and can be specifically applied to actual scenarios such as marketing promotion, security management, health management, smart cities, social applications, etc., and is not limited in the embodiments of the present disclosure.
[0038] The geo-fence detection method provided in this application is described in detail below with reference to the accompanying drawings.
[0039] Figure 2 Flow chart of a geo-fence detection method provided by an embodiment of the present disclosure. Figure 2 As shown, the geo-fence detection method includes steps 101-103.
[0040] Step 101, monitor the geographic location information of the first object. If the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, determine that the first object performs a first event, trigger the first event state of the geo-fence, and push the first information corresponding to the first event.
[0041] In the embodiments of the present disclosure, the method shown in the present disclosure can be executed by smart terminals such as mobile phones, tablets and wearable devices.
[0042] In the embodiments of the present disclosure, the first object may include a user using a smart terminal device, and the user may be a dynamic person or animal, or a static object, etc., which is not limited in the embodiments of the present disclosure. The first object may be one or more, that is, the position information of one first object is monitored, or the position information of multiple first objects is monitored simultaneously. The position information specifically includes the motion trajectory of the first object, and the motion trajectory of the first object is obtained through the position coordinates of the first object.
[0043] In an embodiment of the present disclosure, monitoring the location information of the first object includes monitoring the geographic location information of the first smart terminal. In an embodiment of the present disclosure, the first smart terminal executes the method described in the present disclosure, and the first smart terminal is such as a mobile phone. The first smart terminal can obtain the geographic location information of the first object by detecting the geographic location information of the first smart terminal.
[0044] In an embodiment of the present disclosure, monitoring the location information of the first object includes the first smart terminal obtaining the geographic location information of the first object sent by the second smart terminal. In this embodiment, the first smart terminal executes the method described in the present disclosure, and the first smart terminal is such as a mobile phone. The second smart terminal (such as a wearable device) obtains the geographic location information of the first object, and reports the geographic location information to the first smart terminal, so that the first smart terminal can monitor the geographic location information of the first object. In order to realize the geo-fence function, it is first necessary to obtain the geographic location information of the first object. The geo-fence can realize real-time monitoring of the location information of the first object by using technologies such as GPS, Wi-Fi or cellular network in the smart terminal device. The GPS module can determine the location coordinates of the first object by receiving signals from satellites. In addition, Wi-Fi and cellular networks can also estimate the location coordinates of the first object through the location of the access point (AP) and the base station.
[0045] The location information of the first object can be compared with the pre-set geo-fence to determine whether the first object passes through the fence boundary of the geo-fence. The geo-fence can be a fixed area of a circle, rectangle or any other shape, and its location and size can be set according to the specific application scenario, which is not limited in the embodiments of the present disclosure.
[0046] In geo-fence applications, the buffer area refers to a strip area with a certain width surrounding the geo-fence boundary. When a device enters or leaves this area, corresponding actions can also be triggered.
[0047] The width of the buffer area can be adjusted according to the needs of the application. For example, if an application needs to trigger an action when the device approaches the geofence, the width of the buffer area can be increased. On the contrary, if an application only needs to trigger an action when the device explicitly enters or leaves the geofence, the width of the buffer area can be reduced.
[0048] The first event state refers to the most recent trigger state triggered when the first object performs the first event, and the first event refers to the event that the first object enters the buffer area of the geo-fence for the first time. In the present disclosure, the purpose of triggering the first event only when the first object enters the cache area of the geo-fence for the first time is to improve the sensitivity and accuracy of the system. By immediately responding to and reporting the first detected event of entering the buffer area of the geo-fence, delays and errors can be reduced, and the accuracy and sensitivity of geo-fence inspection can be improved. It helps to accurately and timely identify and handle related activities or abnormal situations, thereby reducing false positives or missed positives and improving the reliability and efficiency of geo-fence detection.
[0049] The first information corresponding to the first event may specifically refer to notification information corresponding to the first event, that is, notification of the first object entering the buffer area. The first information may be pushed in the form of voice broadcast, SMS push, etc., which is not limited in the embodiments of the present disclosure.
[0050] Step 102, under the first event, if the first object leaves the buffer area of the geo-fence, start the countdown time.
[0051] In the embodiment of the present disclosure, when the first event is triggered, it is necessary to determine whether the first object leaves the buffer area of the geo-fence. According to the determination result, if the first object leaves the buffer area of the geo-fence, the countdown time is started. On the contrary, if the first object does not leave the buffer area of the geo-fence, the countdown time is not started at this time. The countdown time can be set according to the actual application scenario and is not limited in the embodiment of the present disclosure.
[0052] Whether the first object leaves the buffer area of the geo-fence can be determined by monitoring whether the location information of the first object passes through the buffer boundary of the buffer area. The countdown time can be turned on by setting a timer. When the timer changes from a preset countdown time to 0, it is determined that the current countdown time ends. In the present disclosure, the buffer boundary includes a first buffer boundary and a second buffer boundary.
[0053] Step 103: If the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, the first event state is released.
[0054] In an embodiment of the present disclosure, if the first event is triggered and the first object passes through the buffer boundary of the buffer area, and the departure time of the first object passing through the buffer boundary is greater than or equal to the countdown time, the first event state is released at this time. The departure time refers to the time period when the first object passes through the buffer boundary of the buffer area and leaves the buffer area, and does not enter the buffer area again. In other words, the departure time is a specific time range, starting from the moment the first object leaves the buffer area until the object enters the buffer area again or meets other specific conditions.
[0055] It should be noted that in the present disclosure, whether the first object performs a second event can be determined specifically based on the buffer boundary passed by the first object, and information corresponding to the second event can be pushed. The second event refers to a relative event of the first event.
[0056] If, when the first event is triggered, the first object does not leave the buffer area of the geo-fence or the departure time of the first object from the buffer area is less than the countdown time, the first event state is maintained.
[0057] In addition, in the present disclosure, the location information of the first object needs to be monitored in real time. If, under the first event, the time when the first object leaves the buffer area of the geo-fence is less than the countdown time, and the first object is located in the buffer area, the countdown time is turned off, and the countdown time is turned on again when the first object leaves the buffer area next time. In other words, if the first object returns to the buffer area before the countdown time ends, the countdown time is turned off.
[0058] In summary, according to the geo-fence detection method proposed in the present invention, by monitoring the geographic location information of the first object, if the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, it is determined that the first object has performed a first event, the first event state of the geo-fence is triggered, and the first information corresponding to the first event is pushed; under the first event, if the first object leaves the buffer area of the geo-fence, the countdown time is started; if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, the first event state is released, and the characteristics of the buffer area are utilized in combination with the countdown time to avoid frequent detection and false detection when the first object moves or stays near the boundary of the geo-fence, reduce message push during the detection process, thereby reducing power consumption, while ensuring the accuracy of detection, improving user experience and detection efficiency.
[0059] based on Figure 2 The embodiment shown, Figure 3 A flow chart of a geo-fence detection method proposed in the present disclosure is further shown. Figure 3 based on Figure 2In the embodiment shown, step 102 and step 103 are further defined. Figure 3 In the embodiment shown, step 102 includes step 202, and step 103 includes step 203 and step 204. Figure 3 As shown, the method comprises the following steps:
[0060] Step 201, monitor the geographic location information of the first object. If the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, determine that the first object performs a first event, trigger the first event state of the geo-fence, and push the first information corresponding to the first event.
[0061] In an embodiment of the present disclosure, the location information of the first object can be monitored within the fence boundary and buffer area of the pre-set geo-fence. The distance from the first object to the geo-fence boundary is calculated based on the location information of the first object, and it is determined whether the first object is within the buffer area. If the first object is within the buffer area, it is determined that the first object has performed a first event, the first event state of the geo-fence is triggered, and the first information corresponding to the first event is pushed.
[0062] In the present disclosure, the first event state of the geo-fence is triggered only when the first object passes through the fence boundary of the geo-fence for the first time and is located within the buffer area of the geo-fence.
[0063] Step 202, under the first event, if the first object passes through the buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence within the countdown time, and the countdown time is started.
[0064] In the embodiments of the present disclosure, Figure 4 The schematic diagram of the buffer area shown, the buffer boundary includes a first buffer boundary and a second buffer boundary. In the first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, or the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence within the countdown time, and the countdown time is started at this time, wherein the first buffer boundary and the second buffer boundary are located on both sides of the fence boundary, and the distance between the first buffer boundary and the first object is less than the distance between the second buffer boundary and the first object. The first buffer boundary and the second buffer boundary can be the inner buffer boundary or the outer buffer boundary, which is not limited in the present embodiment.
[0065] In addition, in the first event, if the first object does not pass through the buffer boundary of the buffer area in the geo-fence, it is determined that the first object does not leave the buffer area of the geo-fence within the countdown time, and the first event state is maintained.
[0066] Specifically, if the first object does not pass through the first buffer boundary of the buffer area in the geofence, or the first object does not pass through the fence boundary and the second buffer boundary of the buffer area in the geofence, it is determined that the first object has not left the buffer area of the geofence, and the first event state is maintained.
[0067] The first buffer boundary may be a near boundary, that is, with the fence boundary as a reference, after crossing the geofence from the outside to the inside, the inner boundary of the buffer area is a closer boundary, which is called the near boundary; similarly, after crossing the geofence from the inside to the outside, the outer boundary of the buffer area is a closer boundary, which is also called the near boundary. The second buffer boundary may be a far boundary, that is, with the fence boundary as a reference, after crossing the geofence from the outside to the inside, the outer boundary of the buffer area is a farther boundary, which is called the far boundary; similarly, after crossing the geofence from the inside to the outside, the inner boundary of the buffer area is a farther boundary, which is also called the far boundary.
[0068] Step 203, under the first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, and the departure time of the first object passing through the first buffer boundary is greater than or equal to the countdown time, the first event state is released.
[0069] In the embodiment of the present disclosure, when it is determined that the first object leaves the buffer area, it is also necessary to determine whether the countdown time has ended. If the countdown time has ended and the first object has left the buffer area and has been outside the buffer area, the first event state is released. Since the buffer boundary of the buffer area includes the first buffer boundary and the second buffer boundary, it is necessary to perform corresponding operations according to the buffer boundary that the first object specifically passes through.
[0070] In an optional embodiment of the present disclosure, when the first object passes through the first buffer boundary and the exit event of the first object passing through the first buffer boundary and leaving the buffer area is greater than or equal to the countdown time, the first event state is released, that is, the geo-fence is in a non-"recently triggered" state at this time.
[0071] Step 204, under the first event, if the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geographic fence within the countdown time, and the departure time of the first object passing through the second buffer boundary is greater than or equal to the countdown time, it is determined that the first object performs the second event, and the second information corresponding to the second event is pushed, and the first event status is released.
[0072] In the present disclosure, the second event includes a relative event of the first event.
[0073] In an optional embodiment of the present disclosure, when the first object turns back and passes through the fence boundary and the second buffer boundary again, and the first object does not return to the buffer area again when the countdown time ends, the first event state is released, that is, the geo-fence is in a non-"recent trigger" state at this time. Since the first object turns back and passes through the fence boundary and the second buffer boundary, it is determined that the first object has performed a second event corresponding to the first event, and a second information push is performed.
[0074] In an optional embodiment of the present disclosure, if the departure time of the first object from the buffer area of the geo-fence is less than the countdown time, and the first object is located in the buffer area, the first event state is maintained and the countdown time is turned off.
[0075] Specifically, if the first object leaves the buffer area through the first buffer boundary or the second buffer boundary, but enters the buffer area through the first buffer boundary or the second buffer boundary within the countdown time, it is determined that the departure time of the first object is less than the countdown time, and the countdown time is turned off, that is, the countdown time is reset.
[0076] In an optional embodiment of the present disclosure, Figure 5 A schematic diagram of a fence boundary crossing detection strategy based on a buffer area is shown. When the geo-fence does not trigger the first event, that is, the geo-fence is in a non-"recent trigger" state, the fence boundary (i.e., the original boundary) of the fence is used as the judgment basis, and the event of the first object crossing the geo-fence is detected for the first time. At this time, the first object performs the first event and pushes the first information; at this time, the geo-fence triggers the first event state, that is, the geo-fence enters the "recent trigger" state, at this time, the first object has crossed the fence boundary, but still stays in the buffer area; at this time, it is detected whether the first object crosses the first buffer boundary (i.e., the near boundary), if so, the first object crosses the near boundary, completes the complete crossing event, and releases the "recent trigger" state of the fence. If the first object does not cross the first buffer boundary (i.e., the near boundary), it is detected whether the first object crosses the second buffer boundary (i.e., the far boundary), if so, the first object crosses the far boundary, that is, the first object turns back and crosses the fence again and travels farther, at this time, the second event is triggered and the second information is pushed, and the first event state is released, that is, the "recent trigger" state of the geo-fence is released. If the first object does not cross the far boundary, the "nearest trigger" state is maintained, and after a certain time interval, that is, the countdown time ends, the buffer boundary detection is performed again.
[0077] In an optional embodiment of the present disclosure, Figure 6The schematic diagram of a fence boundary crossing detection strategy based on countdown time is shown. When the geo-fence does not trigger the first event, that is, the geo-fence is in a non-"recent trigger" state, the fence boundary (i.e., the original boundary) of the fence is used as the judgment basis, and the event of the first object crossing the geo-fence is detected for the first time. At this time, the first event is triggered, and the first information is pushed, and the preset countdown time, such as 2 minutes, is started; at this time, the geo-fence triggers the first event state, that is, the geo-fence enters the "recent trigger" state, at this time, the first object has crossed the fence boundary, but is still in the buffer area; at this time, it is detected whether the countdown time is over, if so, the first object completes the complete crossing event, the first event state is released, and the geo-fence is in a non-"recent trigger" state. If the countdown time has not ended, it is detected whether the first object crosses the fence boundary again, if so, it is determined that the first object crosses the fence boundary, at this time, the first event state is still maintained, and the countdown time is reset. If the crossing event is a relative event of the first event at this time, it is determined that the first object performs the second event, and the first information is updated to the second information corresponding to the second event, and the first event state is released, that is, the "recent trigger" state of the geo-fence is released. If the first object does not cross the fence boundary, the first event state is maintained, and after a certain time interval, that is, the countdown time ends, the boundary detection is performed again.
[0078] This disclosure will be Figure 5 , Figure 6 The fence crossing detection strategy shown is combined with a buffer boundary and a countdown time to avoid frequent detection and false detection when the first object moves or stays near the boundary of the geographic fence, reduce information push, reduce power consumption, ensure detection accuracy, and improve detection efficiency and user experience.
[0079] It should be noted that step 203 and step 204 are two parallel steps, and the corresponding steps are executed according to the actual position information of the first object, which is not limited in the present disclosure.
[0080] In summary, through the method provided by the present disclosure, by judging whether the first object has left the buffer area, and combining the judgment of the countdown time on and off, when the first object leaves the buffer area and does not enter the buffer area again within the countdown time, the most recent trigger state can be released, the notification to be issued can be updated, and the countdown time can be reset, without determining the notification to be received when crossing the fence boundary for the first time. At the same time, buffer areas extending to the inside and outside of the fence boundary are set respectively, and a more complex and detailed detection strategy is formulated, which effectively avoids the frequent detection and false detection problems when the first object stays at the fence boundary. Secondly, the definition of the buffer zone helps the geographic fence system to complete accurate and non-redundant boundary crossing detection. Setting the "most recent trigger" state helps to distinguish between the first detection and subsequent detections, thereby ensuring the accuracy of the first detection.
[0081] based on Figure 2 , Figure 3 In the embodiment shown, the present disclosure provides a schematic diagram of a specific geo-fence detection, such as Figure 7 shown.
[0082] In some embodiments of the present disclosure, when the geo-fence does not trigger the first event, that is, when the geo-fence is in a non-"recently triggered" state, the fence boundary of the fence (that is, the original boundary) is used as a judgment basis, and an event of a first object crossing the geo-fence is detected for the first time. At this time, it is determined that the first object has performed the first event, and a first information push is performed; at this time, the geo-fence triggers the first event state, that is, the geo-fence enters the "recently triggered" state, at which time the first object has crossed the fence boundary but is still in the buffer area; at this time, it is detected whether the first object has left the buffer area.
[0083] If the first object does not leave the buffer area, the first event is maintained, that is, the "most recently triggered" state is maintained.
[0084] If the first object leaves the buffer area, the countdown time is started, and the first event state is released or the countdown time is reset by determining the departure time and countdown time of the first object leaving the buffer area. If the departure time is greater than or equal to the countdown time, the first time state is released, wherein releasing the first event state includes performing corresponding operations on the buffer boundary that the first object specifically passes through when leaving the buffer area. If the first object crosses the first buffer boundary (near boundary), the first event is released, that is, the "recent trigger" state is released. If the first object does not cross the first buffer boundary, that is, it crosses the second buffer boundary (far boundary), it is determined that the first object performs the second event, pushes the second information, and releases the first event state.
[0085] If the leaving time is less than the countdown time and the first object is in the buffer area at this time, the countdown time is reset. The next time the first object leaves the buffer area again, the countdown time is started.
[0086] In summary, frequent detection and false detection when the first object stays at the edge of the geographic fence are avoided, information push is reduced, power consumption is reduced, and system work efficiency and user experience are improved.
[0087] Figure 8 FIG. 8 is a schematic diagram of a geo-fence detection device 800 provided in an embodiment of the present disclosure. Figure 8 As shown, the geo-fence detection device includes:
[0088] The trigger unit 810 is used to monitor the geographic location information of the first object, and if the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, determine that the first object performs a first event, trigger the first event state of the geo-fence, and push the first information corresponding to the first event;
[0089] The judgment unit 820 is used to start a countdown time if the first object leaves the buffer area of the geo-fence under the first event;
[0090] The releasing unit 830 is configured to release the first event state if the leaving time of the first object leaving the buffer area of the geo-fence is greater than or equal to the countdown time.
[0091] In some embodiments of the present disclosure, the geo-fence detection device further includes: a maintaining unit, configured to maintain the first event if the first object does not leave the buffer area of the geo-fence under the first event.
[0092] In some embodiments of the present disclosure, the judgment unit 820 is used to: under a first event, if the first object passes through a buffer boundary of a buffer area in a geo-fence, determine that the first object leaves the buffer area of the geo-fence within a countdown time, and start a countdown time.
[0093] In some embodiments of the present disclosure, the buffer boundary includes a first buffer boundary and a second buffer boundary, and the judgment unit 820 is used to: under a first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, or the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, determine that the first object leaves the buffer area of the geo-fence within the countdown time, and start the countdown time, wherein the first buffer boundary and the second buffer boundary are located on both sides of the fence boundary, and the distance between the first buffer boundary and the first object is less than the distance between the second buffer boundary and the first object.
[0094] In some embodiments of the present disclosure, the release unit 830 is used to: under a first event, if the first object passes through a first buffer boundary of a buffer area in a geo-fence within a countdown time, and the departure time of the first object passing through the first buffer boundary is greater than or equal to the countdown time, release the first event state; under a first event, if the first object passes through a fence boundary and a second buffer boundary of a buffer area in a geo-fence within a countdown time, and the departure time of the first object passing through the second buffer boundary is greater than or equal to the countdown time, determine that the first object has performed a second time, and push second information corresponding to the second event, and release the first event state, and the second event includes a relative event of the first event.
[0095] In some embodiments of the present disclosure, the geo-fence detection device also includes: a closing unit, which is used to maintain the first event state and close the countdown time if the departure time of the first object leaving the buffer area of the geo-fence is less than the countdown time and the first object is located in the buffer area.
[0096] In summary, through the geo-fence detection device, by monitoring the geographic location information of the first object, if the first object passes through the fence boundary of the geo-fence and is located in the buffer area of the geo-fence, it is determined that the first object has performed a first event, the first event state of the geo-fence is triggered, and the first information corresponding to the first event is pushed; under the first event, if the first object leaves the buffer area of the geo-fence, the countdown time is started; if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, the first event state is released, and the characteristics of the buffer area are utilized in combination with the countdown time to avoid frequent detection and false detection when the first object moves or stays near the boundary of the geo-fence, reduce message push during the detection process, thereby reducing power consumption, while ensuring the accuracy of detection, improving user experience and detection efficiency.
[0097] Corresponding to the methods provided in the above-mentioned embodiments, the present disclosure also provides a geo-fence detection device. Since the device provided in the embodiments of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation method is also applicable to the device provided in this embodiment and will not be described in detail in this embodiment.
[0098] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.
[0099] Fig. 9 1 is a block diagram of an electronic device 900 for implementing the above-mentioned geo-fence detection method according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0100] Reference Fig. 9 , the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0101] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0102] The memory 904 is configured to store various types of data to support operations on the electronic device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0103] The power supply component 906 provides power to the various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 900.
[0104] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the electronic device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0105] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0106] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0107] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the electronic device 900, the relative positioning of components, such as the display and keypad of the electronic device 900, and the sensor assembly 914 can also detect the position change of the electronic device 900 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0109] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0110] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the electronic device 900 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0111] An embodiment of the present disclosure further proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the geo-fence detection method described in the above embodiment of the present disclosure.
[0112] An embodiment of the present disclosure further provides a computer program product, including a computer program, which executes the geo-fence detection method described in the above embodiment of the present disclosure when a processor executes the computer program.
[0113] The embodiment of the present disclosure also provides a chip, such as Fig.10 As shown, the chip includes one or more interface circuits 1001 and one or more processors 1002; the interface circuit is used to receive signals and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the chip executes the geo-fence detection method described in the above embodiments of the present disclosure.
[0114] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0115] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0116] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0117] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0118] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0119] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0121] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A geographic fence detection method, characterized in that: The method comprises: Monitoring geographic location information of a first object, if the first object passes through a fence boundary of a geo-fence and is located within a buffer area of the geo-fence, determining that the first object has performed a first event, triggering a first event state of the geo-fence, and pushing first information corresponding to the first event; Under the first event, if the first object leaves the buffer area of the geo-fence, start the countdown time; If the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, the first event state is released.
2. The method according to claim 1, characterized in that: The method further comprises: If, under the first event, the first object does not leave the buffer area of the geo-fence, the first event state is maintained.
3. The method according to claim 1, characterized in that In the first event, if the first object leaves the buffer area of the geo-fence, starting the countdown time includes: Under the first event, if the first object passes through a buffer boundary of a buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence, and a countdown time is started.
4. The method according to claim 3, characterized in that The buffer boundary includes a first buffer boundary and a second buffer boundary. Under the first event, if the first object passes through the buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence, and the countdown time is started, including: Under the first event, if the first object passes through the first buffer boundary of the buffer area in the geo-fence, or the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geo-fence, it is determined that the first object leaves the buffer area of the geo-fence and a countdown time is started, wherein the first buffer boundary and the second buffer boundary are located on both sides of the fence boundary, and the distance between the first buffer boundary and the first object is less than the distance between the second buffer boundary and the first object.
5. The method according to claim 4, characterized in that If the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time, releasing the first event state includes: Under the first event, if the first object passes through a first buffer boundary of a buffer area in the geo-fence, and the departure time of the first object passing through the first buffer boundary is greater than or equal to the countdown time, the first event state is released; Under the first event, if the first object passes through the fence boundary and the second buffer boundary of the buffer area in the geographic fence, and the departure time of the first object passing through the second buffer boundary is greater than or equal to the countdown time, it is determined that the first object performs a second event, and the second information corresponding to the second event is pushed, and the first event state is released. The second event includes a relative event of the first event.
6. The method according to claim 1, characterized in that The method further comprises: If the departure time of the first object from the buffer area of the geo-fence is less than the countdown time, and the first object is located in the buffer area, the first event state is maintained, and the countdown time is closed.
7. A geographic fence boundary detection device, characterized in that: The device comprises: a trigger unit, configured to monitor geographic location information of a first object, and if the first object passes through a fence boundary of a geo-fence and is located within a buffer area of the geo-fence, determine that the first object has performed a first event, trigger a first event state of the geo-fence, and push first information corresponding to the first event; a judgment unit, configured to start a countdown time if the first object leaves the buffer area of the geo-fence under the first event; A releasing unit is used to release the first event state if the departure time of the first object from the buffer area of the geo-fence is greater than or equal to the countdown time.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.
10. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 6.