Electronic fence alarm method and device, electronic equipment and storage medium
By using accelerometers and orientation sensors in the electronic fence to predict whether positioning or Wi-Fi scanning is needed, the contradiction between power consumption and sensitivity in existing technologies is resolved, and efficient fence alarms are achieved.
Patent Information
- Application Number
- CN202210580562.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-05-25
AI Technical Summary
Existing electronic fence alarm methods increase device power consumption when the timed positioning or scanning interval is too short, and affect the sensitivity of judging entry and exit from the fence when it is too long, resulting in untimely or missed alarms.
By reading device motion data and using acceleration and orientation sensors for prediction, it can determine whether positioning or Wi-Fi scanning is needed to detect fence status, reducing unnecessary detection frequency and improving alarm sensitivity.
Without increasing device power consumption, the sensitivity of fence alarms has been improved, status omissions have been reduced, and the user experience has been enhanced.
Smart Images

Figure CN117177179B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of fence alarm, and particularly relates to an electronic fence alarm method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the development of communication technology and the continuous improvement of the concept of Internet of Things, narrowband Internet of Things devices have more and more applications due to their wide network coverage, low power consumption, large number of access devices, and low module cost, including low-power tracking devices. The existing low-power tracking device products all have electronic fence functions. Among them, the geographic electronic fence alarm method usually judges the electronic fence state by timing positioning, and sends a fence alarm information when the state changes; and the Wi-Fi electronic fence method usually has two methods, 1, setting the SSID and password of the Wi-Fi electronic fence, and judging the in-out situation of the Wi-Fi electronic fence by automatically connecting and disconnecting the set Wi-Fi. 2, setting the SSID of the Wi-Fi electronic fence, and judging the in-out situation of the Wi-Fi electronic fence by timing scanning the set Wi-Fi.
[0003] For the processing of geographic electronic fence, if the timing interval is too short, the power consumption of the device is relatively large, and if the timing interval is too long, the in-out judgment of the fence is not sensitive, and state omission is easy to occur. For the processing of Wi-Fi electronic fence, the first method is relatively sensitive, but the Wi-Fi module needs to be in working state all the time, increasing the power consumption. The second method, if the timing scanning time interval is too short, the power consumption of the device will be affected, and if the timing scanning time interval is too long, the response of the device to the in-out of the Wi-Fi electronic fence is not sensitive enough, affecting the user experience.
[0004] That is, whether it is a geographic electronic fence or a Wi-Fi electronic fence, the device performs positioning or Wi-Fi scanning at a timing to judge the in-out state of the electronic fence, and alarms when entering or leaving the fence is detected. The following defects exist: if the timing time interval is too short, the power consumption of the device per unit time will be increased, and the device usage time will be shortened under the same battery power state; if the set time interval is too long, the in-out judgment of the device to the fence will be affected, and state omission is easy to occur, resulting in that the user cannot receive the electronic fence alarm, and affecting the user experience. SUMMARY
[0005] To at least solve the technical problems of electronic fence alarm omission or high power consumption, the present application provides an electronic fence alarm method, device, electronic equipment and storage medium.
[0006] The technical scheme of the present application is implemented as follows:
[0007] The electronic fence alarm method provided by the embodiment of the present application comprises the following steps: reading device motion data; predicting the state of the device entering or leaving the electronic fence according to the motion data, and obtaining a prediction result; and starting the detection of the state of the device entering or leaving the electronic fence according to the prediction result.
[0008] The electronic fence alarm device provided by the embodiment of the present application comprises the following modules: an obtaining module for reading device motion data; a predicting module for predicting the state of the device entering or leaving the electronic fence according to the motion data, and obtaining a prediction result; and a starting module for starting the detection of the state of the device entering or leaving the electronic fence according to the prediction result.
[0009] The electronic device provided by the embodiment of the present application comprises a processor and a memory for storing a computer program capable of running on the processor; when the processor runs the computer program, the steps of any of the above methods are executed.
[0010] The storage medium provided by the embodiment of the present application stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.
[0011] The electronic fence alarm method, device, electronic device and storage medium provided by the embodiment of the present application read device motion data; predict the state of the device entering or leaving the electronic fence according to the motion data, and obtain a prediction result; and start the detection of the state of the device entering or leaving the electronic fence according to the prediction result. The scheme provided by the present application can improve the fence alarm sensitivity and does not affect the power consumption of the device. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 It is a flowchart of the electronic fence alarm method of the embodiment of the present application;
[0013] Figure 2 It is another flowchart of the electronic fence alarm method of the embodiment of the present application;
[0014] Figure 3 It is another flowchart of the electronic fence alarm method of the embodiment of the present application;
[0015] Figure 4 It is another flowchart of the electronic fence alarm method of the embodiment of the present application;
[0016] Figure 5 It is a structural diagram of the low-power tracking device of the application embodiment;
[0017] Figure 6 It is a training process diagram of the application embodiment;
[0018] Figure 7 FIG. 1 is a schematic diagram of a geographic electronic fence alarm process according to an embodiment of the present application;
[0019] Figure 8 FIG. 2 is a schematic diagram of a Wi-Fi electronic fence alarm process according to an embodiment of the present application;
[0020] Figure 9 FIG. 3 is a schematic diagram of an electronic fence alarm device according to an embodiment of the present application;
[0021] Figure 10 FIG. 4 is a schematic diagram of the internal structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0023] An electronic fence alarm method is provided according to an embodiment of the present application, as shown in FIG. 1, which can include, but is not limited to, the following operations. Figure 1
[0024] Step 101: Obtain device motion data.
[0025] Step 102: According to the motion data, predict the state of the device entering or exiting an electronic fence, and obtain a prediction result.
[0026] Step 103: According to the prediction result, start detection of the state of the device entering or exiting an electronic fence.
[0027] In an exemplary embodiment, the method of the present embodiment can be applied to the electronic fence alarm function of a low-power tracking device.
[0028] Further, the present embodiment mainly uses acceleration sensor and direction sensor data to predict the state of the device entering or exiting an electronic fence, and according to the inference prediction result, judges whether positioning or Wi-Fi scanning is needed to detect the state of the device entering or exiting an electronic fence. The acceleration sensor and direction sensor are used to sense acceleration information and motion direction information of the device. The geographic electronic fence uses positioning to detect the state of the device entering or exiting an electronic fence, and the Wi-Fi electronic fence uses Wi-Fi scanning to detect the state of the device entering or exiting an electronic fence.
[0029] In the prior art, if the timing positioning or timing scanning interval is too short, the impact on the power consumption of the device is relatively large, and if the timing interval is too long, the judgment of entering or exiting the fence is not sensitive, and state omission is prone to occur. The present embodiment calculates and analyzes the data of timing positioning and the data collected by the acceleration sensor and direction sensor to judge whether fence state checking is needed, and in the case of not shortening the interval time of positioning and Wi-Fi scanning, the user can be timely notified of the fence state.
[0030] Further, in an embodiment, before acquiring the motion data collected by the acceleration sensor and the direction sensor of the device, the method can further comprise:
[0031] performing positioning detection on the device to obtain position information of the device;
[0032] determining whether the position information of the device is within a preset position range;
[0033] acquiring the motion data of the device when the position information of the device is within the preset position range.
[0034] In an exemplary embodiment, the preset position range can be set as an electronic fence range, or can be set as the electronic fence range and a range close to the periphery of the electronic fence. In actual application, when the device is within the electronic fence range, or the device is close to the periphery of the electronic fence range, the motion data collected by the acceleration sensor and the direction sensor of the device is acquired for prediction, which can reduce unnecessary calculation of the device.
[0035] Further, the present embodiment can provide two methods for predicting the in-and-out fence state of the device.
[0036] The first method is:
[0037] Referring to Figure 2 In an embodiment, the method for predicting the in-and-out fence state of the device according to the motion data and obtaining a prediction result comprises:
[0038] Step 201: calculating the number of steps and the direction of walking of the device according to the motion data;
[0039] Step 202: predicting the in-and-out fence state of the device according to the number of steps and the direction of walking of the device, and obtaining a prediction result.
[0040] The present embodiment calculates the number of steps and the direction of walking according to the data collected by the acceleration sensor and the direction sensor, and determines whether positioning or Wi-Fi scanning is needed to detect the in-and-out fence state according to the calculation result.
[0041] The second method is:
[0042] In an embodiment, the method for predicting the in-and-out fence state of the device according to the motion data and obtaining a prediction result comprises:
[0043] inputting the motion data into a trained prediction model to obtain a prediction result of the in-and-out fence state of the device.
[0044] The embodiment takes the acceleration sensor and direction sensor data as the input layer of the convolutional neural network, takes whether to leave or enter the electronic fence coverage as the output layer of the convolutional neural network, performs deep learning training, converts the trained model into a model suitable for a microcontroller, and embeds the model into a tracking device. When the low-power tracking device is in or close to the electronic fence, the data collected by the acceleration sensor and the direction sensor are inferred by the model, and whether positioning or Wi-Fi scanning is needed to detect the in-out fence state is determined according to the inference result.
[0045] Further, in an embodiment, the detecting the in-out fence state of the device according to the prediction result comprises:
[0046] When the prediction result is that the device enters the electronic fence or the device leaves the electronic fence, the detection of the in-out fence state of the device is started.
[0047] In an exemplary embodiment, when the prediction result is that the device leaves the electronic fence, the detection of the in-out fence state of the device is started; or when the prediction result is that the device enters the electronic fence, the detection of the in-out fence state of the device is started.
[0048] In addition, when the prediction result is that the in-out fence state of the device does not change, that is, when the device continues to be in the electronic fence, the detection of the in-out fence state of the device is performed according to the original setting. For example, the device is positioned or scanned at a preset time interval to detect the in-out fence state of the device. Or the detection of the in-out fence state of the device is not performed. Or when the device continues to be outside the electronic fence, the process is executed, as described in the following embodiment:
[0049] In addition, since the electronic fence includes a geographic electronic fence and a Wi-Fi electronic fence, in actual detection, different ways can be used to detect the in-out fence state of the device for different types of electronic fences.
[0050] Further, referring to Figure 3 In an embodiment, when the prediction result is that the device leaves the electronic fence and the electronic fence is a geographic electronic fence, the detection of the in-out fence state of the device comprises:
[0051] Step 301: positioning the device to obtain the position information of the device;
[0052] Step 302: determining whether the device has left the electronic fence according to the position information;
[0053] Step 303: sending a device leaving the electronic fence alarm when it is judged according to the position information that the device has left the electronic fence.
[0054] In actual use, when the low-power tracking device is in the geographic electronic fence, the data collected by the acceleration sensor and the direction sensor are predicted, and if it is predicted that the device leaves the geographic electronic fence, a positioning is performed to confirm whether the device has left the electronic fence, and if the device has left the electronic fence, an alarm notification is sent to the user.
[0055] In an embodiment, when it is judged according to the position information that the device has left the electronic fence, the method further comprises:
[0056] According to the position information, the distance and the relative direction of the device from the center of the electronic fence are obtained;
[0057] It is judged whether the distance is greater than the radius of the electronic fence and less than a first preset threshold;
[0058] When it is judged that the distance is greater than the radius of the electronic fence and less than the first preset threshold, the motion data of the device is obtained, the state of the device entering or leaving the electronic fence is predicted according to the motion data, and a prediction result is obtained;
[0059] When the prediction result is that the device enters the electronic fence, the device is positioned and detected to obtain the position information of the device; it is judged according to the position information whether the device has entered the electronic fence; when it is judged according to the position information that the device has entered the electronic fence, a device entering the electronic fence alarm is sent; when it is judged according to the position information that the device has not entered the electronic fence, the operation of obtaining the motion data of the device and predicting the state of the device entering or leaving the electronic fence according to the motion data is continuously performed.
[0060] In this embodiment, when the low-power tracking device is outside the geographic electronic fence, the distance and the relative direction from the center of the fence are calculated every time the positioning is performed, when the distance is greater than the radius of the fence and less than a first preset threshold, the data collected by the acceleration sensor and the direction sensor are predicted, when the prediction result is that the device enters the fence range, a positioning is performed, if the device has entered the fence range, an entering the fence alarm notification is sent, and if the device has not entered the fence, the next prediction and positioning are continuously performed by the above method.
[0061] Further, referring to Figure 4 In an embodiment, when the prediction result is that the device leaves the electronic fence, and the electronic fence is a Wi-Fi electronic fence, the detection of the state of the device entering or leaving the electronic fence comprises:
[0062] Step 401: performing Wi-Fi scanning to detect whether the device has left the electronic fence;
[0063] Step 402: when it is detected that the device has left the electronic fence, sending a device-leaving-electronic-fence alarm.
[0064] In actual use, when the low-power tracking device is in a Wi-Fi electronic fence, if it enters the fence for the first time, a positioning is performed once, and data are recorded. Prediction is performed by using data collected by the acceleration sensor and the direction sensor. If the prediction result is that the device leaves the Wi-Fi electronic fence, Wi-Fi scanning is performed to detect whether the device has left the fence. If the device has left the fence, an alarm notification of leaving the Wi-Fi electronic fence is sent to the user. If the device has not left the fence, the next prediction and Wi-Fi scanning are continued by using the above method.
[0065] In an embodiment, when it is detected that the device has left the electronic fence, the method further comprises:
[0066] acquiring positioning data when the device enters the electronic fence for the first time;
[0067] calculating a distance and a direction between the device and the positioning data;
[0068] when the distance is greater than a coverage range of the electronic fence and less than a second preset threshold, acquiring motion data of the device, predicting a state of the device entering or leaving the electronic fence according to the motion data, and acquiring a prediction result;
[0069] when the prediction result is that the device enters the electronic fence, performing Wi-Fi scanning to detect whether the device has entered the electronic fence; when it is detected that the device has entered the electronic fence, sending a device-entering-electronic-fence alarm; and when it is detected that the device has not entered the electronic fence, continuing to perform the operation of acquiring the motion data of the device and predicting the state of the device entering or leaving the electronic fence according to the motion data.
[0070] In this embodiment, when the low-power tracking device is outside the Wi-Fi electronic fence, if there is positioning data in the fence, a distance and a relative direction to the positioning data in the fence are calculated each time positioning is performed. When the distance is greater than a coverage range of the fence and less than a second preset threshold, prediction is performed by using data collected by the acceleration sensor and the direction sensor. When the prediction result is that the device enters the fence range, Wi-Fi scanning is performed once. If the device has entered the fence range, an entering-fence alarm notification is sent. If the device has not entered the fence, the next inference and Wi-Fi scanning are continued by using the above method.
[0071] The electronic fence alarm method provided by the embodiment of the application comprises the following steps: reading device motion data; predicting the state of the device entering or leaving the electronic fence according to the motion data, and obtaining a prediction result; and starting detection of the state of the device entering or leaving the electronic fence according to the prediction result. The scheme provided by the application can improve the sensitivity of the fence alarm without affecting the power consumption of the device.
[0072] The application will be further described in detail below in combination with application examples.
[0073] The application example provides an electronic fence alarm method for a low-power tracking device, which is used for solving the problem that the low-power tracking device is not timely alarmed in the processing of the electronic fence, and even the fence state is missed. The fence alarm method provided by the embodiment can improve the sensitivity of the fence alarm without affecting the power consumption of the device.
[0074] In an exemplary embodiment, referring to Figure 5 , the low-power tracking device can include, but is not limited to, an acceleration sensor 501, a direction sensor 502, an MCU control module 503, a GPS module 504, and a Wi-Fi module 505. Here, the acceleration sensor is used to collect acceleration information, and the direction sensor is used to collect device running direction information. Of course, other components with the same function can also be used in the embodiment.
[0075] Figure 5 The structure shown is only schematic, and does not limit the structure of the low-power tracking device described above. For example, the low-power tracking device can include more or fewer components than those shown in Figure 5 , or have a different configuration from Figure 5 .
[0076] Further, referring to Figure 6 , the model training process of the low-power tracking device can include the following operations.
[0077] Step 601: The low-power tracking device is moved and data of the acceleration sensor and the direction sensor entering or leaving the range of the electronic fence is collected.
[0078] Step 602: The collected data is used as the input layer of the convolutional neural network, and whether leaving or entering the coverage range of the electronic fence is used as the output layer of the convolutional neural network, and deep learning training is performed.
[0079] Step 603: The trained model is converted into a model suitable for microcontrollers and embedded in the tracking device.
[0080] In addition, referring to Figure 7 , when the electronic fence of the low-power tracking device is a geographic electronic fence, the alarm process is as follows:
[0081] Step 701: After the low-power tracking device completes positioning, it determines whether the device is in the same electronic fence state as the previous electronic fence state.
[0082] Step 702: If the device is in a different electronic fence state than the previous electronic fence state, the device sends a fence state alarm notification to the user.
[0083] Step 703: The low-power tracking device determines whether it is in the electronic fence.
[0084] Step 704: If the device is in the electronic fence, the device predicts the data collected by the acceleration sensor and the direction sensor.
[0085] Step 705: The device determines whether the prediction result is to leave the fence.
[0086] Step 706: If the prediction result is to leave the fence, the device performs positioning and checks the fence state. If the device has left the fence, the device sends a geographic electronic fence alarm. Otherwise, the device repeats steps 704 and 705.
[0087] Step 707: If the device is outside the electronic fence, the device determines whether the distance between the last positioning and the center of the fence is greater than the radius of the fence and does not exceed a preset threshold.
[0088] Step 708: If the device is outside the fence and the distance between the device and the center of the fence is greater than the radius of the fence and does not exceed a preset threshold, the device predicts the data collected by the acceleration sensor and the direction sensor.
[0089] Step 709: The device determines the prediction result.
[0090] Step 710: If the prediction result is to enter the fence, the device performs positioning and checks the fence state. If the device has entered the fence, the device sends an electronic fence alarm. Otherwise, the device repeats steps 708 and 709.
[0091] In addition, referring to Figure 8 , when the electronic fence of the low-power tracking device is a Wi-Fi electronic fence, the alarm process is as follows:
[0092] Step 801: After the low-power tracking device completes Wi-Fi scanning, it determines whether the device is in the same Wi-Fi fence state as the previous fence state.
[0093] Step 802: If the device is in a different Wi-Fi electronic fence state than the previous electronic fence state, the device sends a fence state alarm notification to the user.
[0094] Step 803: The device determines whether it is in the Wi-Fi electronic fence.
[0095] Step 804: Determine whether the device has fence location information.
[0096] Step 805: If the device is within a Wi-Fi electronic fence and there is no fence location information, then perform a positioning and record the fence location information.
[0097] Step 806: Make predictions based on the data collected by the accelerometer and orientation sensor.
[0098] Step 807: Predict whether the device will leave the fence.
[0099] Step 808: If the prediction result is that the fence has been left, perform a Wi-Fi scan and check the fence status. If the fence has been left, send a Wi-Fi electronic fence alarm. Otherwise, repeat steps 806 and 807.
[0100] Step 809: Determine that the device is outside the Wi-Fi electronic fence and has saved the fence location information.
[0101] Step 810: Determine whether the distance between the device and the fence location exceeds a preset threshold.
[0102] Step 811: If the distance between the device and the fence does not exceed a preset distance threshold, make a prediction based on the data collected by the acceleration sensor and the orientation sensor.
[0103] Step 812: If the prediction result is that the fence has been entered, perform a Wi-Fi scan and check the fence status. If the fence has been entered, send an electronic fence alarm; otherwise, repeat steps 811 and 812.
[0104] This embodiment can improve the sensitivity of fence alarms without affecting the power consumption of the device.
[0105] To implement the method of this embodiment of the invention, this embodiment also provides an electronic fence alarm device, such as... Figure 9 As shown, the electronic fence alarm device 900 includes: an acquisition module 901, a prediction module 902, and an activation module 903; wherein,
[0106] The acquisition module 901 is used to read device motion data;
[0107] Prediction module 902 is used to predict the state of the device entering or leaving the electronic fence based on the motion data and obtain the prediction result;
[0108] The activation module 903 is used to activate the detection of the device's entry or exit from the electronic fence based on the prediction result.
[0109] In actual application, the acquisition module 901, the prediction module 902 and the opening module 903 can be implemented by a processor in the electronic fence alarm device.
[0110] It should be noted that, when the above device provided by the above embodiment is executed, only the division of the above program modules is exemplified, and in actual application, the above processing can be completed by different program modules according to needs, that is, the internal structure of the terminal is divided into different program modules to complete all or part of the above processing. In addition, the above device provided by the above embodiment and the above method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described here.
[0111] In order to implement the method of the embodiment of the application, the embodiment of the application further provides a computer program product. The computer program product includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the steps of the above method.
[0112] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the application, the embodiment of the application further provides an electronic device (computer device). In an exemplary embodiment, in one embodiment, the computer device can be a terminal, and its internal structure diagram can be as shown in Figure 10 The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a storage (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capability. The storage of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor A01 to implement the method of any one of the above embodiments. The display screen A04 of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device A05 of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0113] Those skilled in the art can understand that, Figure 10The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] The device provided by the embodiment of the present application comprises a processor, a memory, and a program stored in the memory and executable on the processor. The processor implements the method of any one of the above embodiments when executing the program.
[0115] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0116] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices generate a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the function specified in one or more flows and / or blocks.
[0117] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the function specified in one or more flows and / or blocks.
[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1steps of a function specified in one or more blocks.
[0119] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0120] Memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. Memory is an example of computer readable media.
[0121] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0122] It can be understood that the memory of the embodiments of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not be limited to, the memory of these and any other suitable type of memory.
[0123] It should also be noted that the terms "comprising", "comprises", "including", "includes" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0124] The above only describes the embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. An electronic fence alerting method, characterized by, The method comprises: reading device motion data; predicting the state of the device entering or leaving the electronic fence according to the motion data, obtaining a prediction result; starting detection of the state of the device entering or leaving the electronic fence according to the prediction result, comprising: when the prediction result is that the device leaves the electronic fence, and the electronic fence is a geographic electronic fence, starting detection of the state of the device entering or leaving the electronic fence, comprising: performing positioning detection on the device to obtain position information of the device; judging whether the device has left the electronic fence according to the position information; and when it is judged according to the position information that the device has left the electronic fence, sending a device-leaving-electronic-fence alarm; wherein, when it is judged according to the position information that the device has left the electronic fence, the method further comprises: obtaining the distance and relative direction between the device and the center of the electronic fence according to the position information; judging whether the distance is greater than the radius of the electronic fence and less than a first preset threshold; when it is judged that the distance is greater than the radius of the electronic fence and less than the first preset threshold, obtaining the motion data of the device, predicting the state of the device entering or leaving the electronic fence according to the motion data, and obtaining a prediction result; when the prediction result is that the device enters the electronic fence, performing positioning detection on the device to obtain position information of the device; judging whether the device has entered the electronic fence according to the position information; when it is judged according to the position information that the device has entered the electronic fence, sending a device-entering-electronic-fence alarm; or when it is judged according to the position information that the device has not entered the electronic fence, continuing to perform the operation of obtaining the motion data of the device and predicting the state of the device entering or leaving the electronic fence according to the motion data; when the prediction result is that the device leaves the electronic fence, and the electronic fence is a Wi-Fi electronic fence, starting detection of the state of the device entering or leaving the electronic fence comprises: performing Wi-Fi scanning to detect whether the device has left the electronic fence; and when it is detected that the device has left the electronic fence, sending a device-leaving-electronic-fence alarm; wherein, when it is detected that the device has left the electronic fence, the method further comprises: obtaining positioning data when the device enters the electronic fence for the first time; calculating the distance and direction between the device and the positioning data; when the distance is greater than the coverage range of the electronic fence and less than a second preset threshold, obtaining the motion data of the device, predicting the state of the device entering or leaving the electronic fence according to the motion data, and obtaining a prediction result; when the prediction result is that the device enters the electronic fence, performing Wi-Fi scanning to detect whether the device has entered the electronic fence; when it is detected that the device has entered the electronic fence, sending a device-entering-electronic-fence alarm; and when it is detected that the device has not entered the electronic fence, continuing to perform the operation of obtaining the motion data of the device and predicting the state of the device entering or leaving the electronic fence according to the motion data.
2. The method of claim 1, wherein, Before obtaining the device motion data, the method further comprises: Positioning detection is performed on the device to obtain position information of the device; It is judged whether the position information of the device is within a preset position range; When the position information of the device is within the preset position range, device motion data is read.
3. The method of claim 1, wherein, The method for predicting the in-or-out state of the electronic fence of the device according to the motion data and obtaining a prediction result comprises: The number of steps and the direction of the device walking are calculated according to the motion data; The in-or-out state of the electronic fence of the device is predicted according to the number of steps and the direction of the device walking, and a prediction result is obtained.
4. The method of claim 1, wherein, The method for predicting the in-or-out state of the electronic fence of the device according to the motion data and obtaining a prediction result comprises: The motion data is input into a trained prediction model to obtain a prediction result of the in-or-out state of the electronic fence of the device.
5. The method of claim 1, wherein, The method for starting the detection of the in-or-out state of the electronic fence of the device according to the prediction result comprises: When the prediction result is that the device enters the electronic fence or the device leaves the electronic fence, the detection of the in-or-out state of the electronic fence of the device is started.
6. An electronic device, comprising: It comprises: A processor and a memory for storing a computer program capable of running on the processor; wherein, The processor is used to run the computer program, and the steps of the method in any one of claims 1 to 5 are executed.
7. A storage medium having stored therein a computer program, characterized in that The computer program is executed by the processor, and the steps of the method in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Adaptive geo-fence detection method, apparatus, electronic device and management method
CN108318902A