Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for position monitoring, so as to improve the efficiency of monitoring.
Mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a location monitoring method, where the method includes:
acquiring current position information of a target object;
judging whether the position corresponding to the position information meets the alarm condition of the electronic fence or not according to the relative position relation between the position corresponding to the position information and the electronic fence set for the target object, wherein the electronic fence comprises: the electronic fence prevents the target object from invading and limits the moving range of the target object;
and if the alarm condition is met, sending alarm information to the target client.
Optionally, the alarm information includes at least one of the following information: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object.
Optionally, when the electronic fence is the electronic fence for preventing the target object from invading, the determining whether the position corresponding to the position information satisfies the alarm condition of the electronic fence includes:
when the target object enters the area defined by the electronic fence, the target object passes through a first position on the electronic fence and a second position corresponding to the current position information of the target object; calculating a first distance between the first location and the second location; judging whether the first distance is larger than a preset threshold value or not; if the first distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence which limits the moving range of the target object, the judging whether the position corresponding to the position information meets the alarm condition of the electronic fence includes:
when the target object leaves the area defined by the electronic fence, the target object passes through a third position on the electronic fence and a fourth position corresponding to the current position information of the target object; calculating a second distance between the third location and the fourth location; judging whether the second distance is greater than the preset threshold value; and if the second distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence.
Optionally, when the electronic fence is the electronic fence for preventing the target object from invading, the determining whether the position corresponding to the position information satisfies the alarm condition of the electronic fence includes:
acquiring a first moment when the target object passes through the electronic fence when entering the area defined by the electronic fence, and a second moment corresponding to the current position information of the target object; calculating a first duration between the first time and the second time; judging whether the first time length is longer than a preset time length and/or whether the position of the target object is always in the area within the first time length; if the first time length is longer than the preset time length and/or the position of the target object is always in the area within the first time length, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence which limits the moving range of the target object, the judging whether the position corresponding to the position information meets the alarm condition of the electronic fence includes:
acquiring a third moment when the target object leaves the area defined by the electronic fence and a fourth moment corresponding to the current position information of the target object when the target object passes through the electronic fence; calculating a second duration between the third time and the fourth time; judging whether the second time length is longer than the preset time length and/or whether the position of the target object is always outside the area in the second time length; if the second time length is longer than the preset time length, and/or the position of the target object is always outside the area in the second time length, the position corresponding to the position information meets the alarm condition of the electronic fence.
Optionally, the method further includes:
obtaining keywords of the alarm information input by the target client, wherein the keywords include at least one of the following: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object;
and displaying the moving track of the target object corresponding to the keyword and the working condition information of the target object corresponding to the keyword on an electronic map of the target client.
Optionally, before sending the alert information to the target client, the method further includes: receiving a subscription request of the target object sent by the target client;
the sending of the alarm information to the target client includes:
and sending alarm information of the target object corresponding to the subscription request to the target client.
In a second aspect, an embodiment of the present application provides a position monitoring apparatus, including:
the acquisition module is used for acquiring the current position information of the target object;
a judging module, configured to judge whether a position corresponding to the position information meets an alarm condition of the electronic fence according to a relative position relationship between the position corresponding to the position information and the electronic fence set for the target object, where the electronic fence includes: the electronic fence prevents the target object from invading and limits the moving range of the target object;
and the sending module is used for sending alarm information to the target client if the alarm condition is met.
Optionally, the alarm information includes at least one of the following information: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object.
Optionally, when the electronic fence is the electronic fence for preventing the target object from invading, the configuration of the determining module when being used for determining whether the position corresponding to the position information meets the alarm condition of the electronic fence includes:
when the target object enters the area defined by the electronic fence, the target object passes through a first position on the electronic fence and a second position corresponding to the current position information of the target object; calculating a first distance between the first location and the second location; judging whether the first distance is larger than a preset threshold value or not; if the first distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence which limits the moving range of the target object, the configuration of the determining module, when being used for determining whether the position corresponding to the position information meets the alarm condition of the electronic fence, includes:
when the target object leaves the area defined by the electronic fence, the target object passes through a third position on the electronic fence and a fourth position corresponding to the current position information of the target object; calculating a second distance between the third location and the fourth location; judging whether the second distance is greater than the preset threshold value; and if the second distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence.
Optionally, when the electronic fence is the electronic fence for preventing the target object from invading, the configuration of the determining module when being used for determining whether the position corresponding to the position information meets the alarm condition of the electronic fence includes:
acquiring a first moment when the target object passes through the electronic fence when entering the area defined by the electronic fence, and a second moment corresponding to the current position information of the target object; calculating a first duration between the first time and the second time; judging whether the first time length is longer than a preset time length and/or whether the position of the target object is always in the area within the first time length; if the first time length is longer than the preset time length and/or the position of the target object is always in the area within the first time length, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence which limits the moving range of the target object, the configuration of the determining module, when being used for determining whether the position corresponding to the position information meets the alarm condition of the electronic fence, includes:
acquiring a third moment when the target object leaves the area defined by the electronic fence and a fourth moment corresponding to the current position information of the target object when the target object passes through the electronic fence; calculating a second duration between the third time and the fourth time; judging whether the second time length is longer than the preset time length and/or whether the position of the target object is always outside the area in the second time length; if the second time length is longer than the preset time length, and/or the position of the target object is always outside the area in the second time length, the position corresponding to the position information meets the alarm condition of the electronic fence.
Optionally, the apparatus further comprises:
an execution module, configured to obtain a keyword of the alarm information input by the target client, where the keyword includes at least one of the following: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object;
and the display module is used for displaying the moving track of the target object corresponding to the keyword and the working condition information of the target object corresponding to the keyword on the electronic map of the target client.
Optionally, before the sending module is configured to send the alarm information to the target client, the sending module further includes: receiving a subscription request of the target object sent by the target client;
when the sending module is configured to send alarm information to a target client, the sending module includes:
and sending alarm information of the target object corresponding to the subscription request to the target client.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the location monitoring method according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the location monitoring method in any one of the above first aspects.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
according to the position monitoring method provided by the embodiment of the application, after the current position information of a target object is obtained, whether the position meets the alarm condition of an electronic fence or not is judged according to the relative position relation between the position corresponding to the position information and the electronic fence set for the target object, and when the alarm condition is met, alarm information is sent to a target client; in the prior art, safety protection is performed by using a guardrail construction mode, and the guardrail can prevent peripheral invasion and outgoing inside a site area so as to realize supervision on the site area, but the mode cannot discover invasion behaviors or outgoing behaviors in time under the condition of unattended operation, so that the supervision efficiency is reduced; compared with the method for building the guardrail in the prior art, the position monitoring method sends the alarm information to the client of the user when the position of the target object meets the alarm condition of the electronic fence, realizes remote alarm, can know the alarm information of the electronic fence in time even if the user is not near the target object, and is favorable for improving the supervision efficiency of the electronic fence.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The position monitoring method is based on the Internet of things, the Internet of things is a network which is further extended and expanded on the basis of the Internet, various information sensing devices are connected with the Internet to form a huge communication network, interconnection and intercommunication between people, between people and objects and between objects at different places and at different moments can be realized through the Internet of things, and the position monitoring method is beneficial to centralizing scattered information and has a very wide application market.
The method and the system have the advantages that the user client and the cloud platform server for controlling the electronic fence are connected through the internet of things gateway, real-time transmission of data is achieved, the internet of things gateway is an industrial internet data remote transmission terminal, a Programmable Logic Controller (PLC) of the user client is connected through the Ethernet, the cloud platform server is connected through an MQTT (Message queue telemeasuring transmission) protocol, and functions of data monitoring, local Logic control, remote upgrading, fault alarm and the like are achieved in a data transmission mode.
When the position monitoring method is applied to an actual scene, a Software-as-a-service (SaaS) framework is adopted, application Software is uniformly installed on a server of a SaaS platform provider, a customer can order required application Software services from a manufacturer through the Internet according to actual working requirements, the cost is paid to the manufacturer according to the amount and time of the ordered services, and the services provided by the SaaS platform provider are obtained through the Internet.
Based on this, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for position monitoring, which are described below by way of embodiments.
Example one
Fig. 1 is a flowchart illustrating a location monitoring method according to a first embodiment of the present application, where as shown in fig. 1, the method includes the following steps:
step S101: and acquiring the current position information of the target object.
Specifically, the target object refers to an object with a locator, and the position information refers to longitude and latitude coordinates.
And a positioner on the target object detects the longitude and latitude coordinates of the target object in real time, and sends the longitude and latitude coordinates to the platform, and the platform receives the longitude and latitude coordinates sent by the positioner in real time.
It should be noted that, after the platform receives the longitude and latitude coordinates sent by the locator, the longitude and latitude coordinates are stored.
Step S102: judging whether the position corresponding to the position information meets the alarm condition of the electronic fence or not according to the relative position relation between the position corresponding to the position information and the electronic fence set for the target object, wherein the electronic fence comprises: the electronic fence is used for preventing the target object from invading and limiting the moving range of the target object.
Specifically, the position corresponding to the position information refers to a coordinate point corresponding to the longitude and latitude coordinate on the electronic map, and the relative position relationship includes that the position is in the electronic fence and the position is outside the electronic fence; the electronic fence is an electronic fence with an effective time period, and when the electronic fence is classified according to functions of the electronic fence, the electronic fence comprises an electronic fence for preventing a target object from invading and an electronic fence for limiting the moving range of the target object, wherein the electronic fence for preventing the target object from invading aims at the condition that the initial position of the target object is outside the electronic fence, the electronic fence for limiting the moving of the target object aims at the condition that the initial position of the target object is inside the electronic fence, and the electronic fence for preventing the target object inside the electronic fence from leaving the range limited by the electronic fence.
When the area to be defined is a closed polygonal area, the edge of the closed area is used as the polygonal fence on the electronic map, when the area to be defined is an administrative area, the boundary of the administrative area is used as the regional fence, when the driving route of a certain vehicle needs to be defined, a drivable route is provided for a driver of the vehicle, a route selected by the driver is used as the route fence, and when the specified range of a certain information point needs to be defined, a circular fence with a preset radius is defined on the electronic map by taking the position of the information point as the center of a circle.
After acquiring the longitude and latitude coordinates sent by the target object, finding a coordinate point corresponding to the longitude and latitude coordinates on an electronic map for matching with an electronic fence set for the target object, wherein the electronic fence set for the target object exists on the electronic map, determining the relative position relation between the coordinate point and the electronic fence on the electronic map after finding the coordinate point, and then judging whether the position coordinate point meets the alarm condition of the electronic fence according to the relative position relation.
For example, the relative positional relationship is denoted as R, and when the coordinate point is located in the area range defined by the electronic fence, R is 1, and when the coordinate point is located outside the area range defined by the electronic fence, R is-1.
It should be noted that, regarding the electronic fence set for the target object, the electronic fence may be set according to actual application scene requirements, for example, the application scene requirements set for a restricted area of a factory, the factory prohibits the entry of the delivery wagon of the factory in order to ensure the safety of materials in the restricted area, and according to the application scene requirements, a polygonal fence may be set according to the edge of the restricted area, and the polygonal fence has a function of preventing the delivery wagon from invading; for example, the application scene requirement is set for the construction range of a certain mechanical device, in order to prevent the loss of the mechanical device, the construction range of the mechanical device needs to be monitored, according to the application scene requirement, a circular fence with a preset radius can be set by taking the initial position of the mechanical device as a circle, and the circular fence has the function of limiting the mechanical device to work in a working area defined by the circular fence; for example, the application scenario is used for planning the driving route of a vehicle, in order to enable the vehicle to run without hindrance, a selectable driving route can be provided for a driver of the vehicle according to an urban road network running in a city, and after the driver selects a certain driving route, the driving route is used as a route fence of the vehicle to prevent the vehicle from driving away from the route fence; the specific setting method is not particularly limited.
Step S103: and if the alarm condition is met, sending alarm information to the target client.
Specifically, when the position corresponding to the target object meets the alarm condition, in order to enable the user to know that the target object meets the alarm condition, alarm information needs to be sent to the target client to prompt the user.
The manner of sending the alarm information may be set according to actual conditions, for example, the alarm information is sent in a form of a short message or a mail, and the specific setting manner is not specifically limited herein.
In the position monitoring method provided in fig. 1, after current position information of a target object is obtained, whether the position meets an alarm condition of an electronic fence according to a relative position relationship between the position corresponding to the position information and the electronic fence set for the target object is determined, and when the alarm condition is met, alarm information is sent to a target client; in the prior art, safety protection is performed by using a guardrail construction mode, and the guardrail can prevent peripheral invasion and outgoing inside a site area so as to realize supervision on the site area, but the mode cannot discover invasion behaviors or outgoing behaviors in time under the condition of unattended operation, so that the supervision efficiency is reduced; compared with the method for building the guardrail in the prior art, the position monitoring method sends the alarm information to the client of the user when the position of the target object meets the alarm condition of the electronic fence, realizes remote alarm, can know the alarm information of the electronic fence in time even if the user is not near the target object, and is favorable for improving the supervision efficiency of the electronic fence.
In a possible embodiment, the alarm information includes at least one of the following information: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object.
Taking the polygonal fence set in the factory exclusion area as an example, the target object is a delivery truck, the name of the target object is the number plate of the delivery truck entering the exclusion area, the name of the electronic fence is the factory exclusion area fence, the delivery truck meeting the alarm condition with the number plate enters the factory exclusion area, the moment when the alarm condition is met is the moment when the delivery truck enters the factory exclusion area, and the current position information of the target object is the current position of the delivery truck.
In one possible embodiment, when step S102 is executed, the following two cases are included:
the first condition is as follows: when the electronic fence is the electronic fence for preventing the target object from invading, whether the position corresponding to the position information meets the alarm condition of the electronic fence can be judged, and the following modes are adopted:
when the target object enters the area defined by the electronic fence, the target object passes through a first position on the electronic fence and a second position corresponding to the current position information of the target object; calculating a first distance between the first location and the second location; judging whether the first distance is larger than a preset threshold value or not; if the first distance is larger than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence.
Specifically, when the target object enters the area defined by the electronic fence, the relative position relationship between the position corresponding to the target object and the electronic fence is changed from the position outside the electronic fence to the position inside the electronic fence, because the area defined by the electronic fence needs to pass through the electronic fence, the passing position on the electronic fence is taken as a first position, the position corresponding to the current position information of the target object acquired in real time is taken as a second position, the first distance between the first position and the second position is calculated, the preset threshold value represents the allowable distance deviation, in order to know whether the first distance is within the allowable distance deviation, the first distance needs to be compared with a preset threshold value, if the first distance is larger than the preset threshold value, the first distance is not within the allowable distance deviation, and the position corresponding to the current position information of the target object meets the alarm condition of the electronic fence.
Taking the above-mentioned relative position relationship as R as an example, when the target object enters the area defined by the electronic fence, the value of R is changed from-1 to 1; if the first distance is d and the allowable distance deviation is r, the preset threshold value is r, and when the first distance is not within the allowable distance deviation, d > r.
Case two: when the electronic fence is the electronic fence which limits the moving range of the target object, the judgment of whether the position corresponding to the position information meets the alarm condition of the electronic fence can be realized by the following modes:
when the target object leaves the area defined by the electronic fence, the target object passes through a third position on the electronic fence and a fourth position corresponding to the current position information of the target object; calculating a second distance between the third location and the fourth location; judging whether the second distance is greater than the preset threshold value; and if the second distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence.
In the case two, the description of the implementation step of determining whether the position corresponding to the position information satisfies the alarm condition of the electronic fence is given in the description of the case one, and the repetition is not repeated herein, where the target object leaves the area defined by the electronic fence, and the relative position relationship between the position corresponding to the target object and the electronic fence is changed from the position in the electronic fence to the position outside the electronic fence.
Taking the above-mentioned relative position relationship as R as an example, when the target object leaves the area defined by the electronic fence, the value of R is changed from 1 to-1; if the first distance is h and the allowable distance deviation is r, the preset threshold value is r, and if the second distance is not within the allowable distance deviation, h > r.
By the mode, when the distance between the electronic fence and the entrance or the exit of the electronic fence is not within the allowable distance variation, the alarm condition of the electronic fence is met, and the alarm accuracy of the electronic fence is improved.
In one possible embodiment, when step S102 is executed, the following two cases are included:
the first condition is as follows: when the electronic fence is the electronic fence for preventing the target object from invading, whether the position corresponding to the position information meets the alarm condition of the electronic fence can be judged, and the following modes are adopted:
acquiring a first moment when the target object passes through the electronic fence when entering the area defined by the electronic fence, and a second moment corresponding to the current position information of the target object; calculating a first duration between the first time and the second time; judging whether the first time length is longer than a preset time length and/or whether the position of the target object is always in the area within the first time length; if the first time length is longer than the preset time length and/or the position of the target object is always in the area within the first time length, the position corresponding to the position information meets the alarm condition of the electronic fence.
Specifically, when a target object enters an area defined by an electronic fence, the moment when the target object passes through the electronic fence is taken as a first moment, the current moment corresponding to the current position information of the target object is taken as a second moment, then a first time length between the first moment and the second moment is calculated, if the first time length is longer than a preset time length, but the position of the target object is not always in the area defined by the electronic fence within the first time length, the position corresponding to the current position information of the target object meets the alarm condition of the electronic fence; if the first time length is less than or equal to the preset time length, but the position of the target object is always in the area defined by the electronic fence within the first time length, and the position corresponding to the current position information of the target object meets the alarm condition of the electronic fence; if the first time length is longer than the preset time length, and the position of the target object is always in the area defined by the electronic fence within the first time length, the position corresponding to the current position information of the target object meets the alarm condition of the electronic fence; and if the first time length is less than or equal to the preset time length and the position of the target object is not always in the area defined by the electronic fence in the first time length, the position corresponding to the current position information of the target object does not meet the alarm condition of the electronic fence.
Case two: when the electronic fence is the electronic fence which limits the moving range of the target object, the judgment of whether the position corresponding to the position information meets the alarm condition of the electronic fence can be realized by the following modes:
acquiring a third moment when the target object leaves the area defined by the electronic fence and a fourth moment corresponding to the current position information of the target object when the target object passes through the electronic fence; calculating a second duration between the third time and the fourth time; judging whether the second time length is longer than the preset time length and/or whether the position of the target object is always outside the area in the second time length; if the second time length is longer than the preset time length, and/or the position of the target object is always outside the area in the second time length, the position corresponding to the position information meets the alarm condition of the electronic fence.
For the description of the implementation step of determining whether the position corresponding to the position information satisfies the alarm condition of the electronic fence in the second embodiment, reference is made to the description of the first embodiment, and repeated parts are not described herein again; for the description of the target object entering or leaving the area defined by the electronic fence, refer to the description of the target object entering or leaving the area defined by the electronic fence in the above feasible real-time scheme, and the repeated parts are not repeated herein; by the mode, the accuracy of electronic fence alarming is improved.
In a possible implementation, fig. 2 shows a flowchart of another location monitoring method provided in an embodiment of the present application, and as shown in fig. 2, the location monitoring method further includes the following steps:
step S201: obtaining keywords of the alarm information input by the target client, wherein the keywords include at least one of the following: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object.
Step S202: and displaying the moving track of the target object corresponding to the keyword and the working condition information of the target object corresponding to the keyword on an electronic map of the target client.
Specifically, after receiving the alarm information, a user inputs at least one keyword of the alarm information in a webpage of the platform of the target client or a search box in the APP, the target client sends the input keyword to the platform in real time, after the platform obtains the keyword, the platform finds a target object corresponding to the keyword, and displays a moving track and working condition information of the target object on the webpage of the platform of the target client or an electronic map in the APP, wherein the moving track is formed by the position of the object at each moment, the working condition information refers to a working condition of the target object, for example, the target object is a vehicle, and the working condition includes information such as a moving speed of the vehicle, a rotating speed of an engine, and an oil temperature of the vehicle.
The display mode of the moving track and the working condition information of the target object may be set according to actual conditions, for example, a color-thickened line is used to depict the moving track of the target object on the electronic map, each point existing on the line represents the position of the target object at each moment, when a user clicks a certain point on the line, an annotation frame is displayed on the upper left of the electronic map, the annotation frame includes the longitude and latitude coordinates of the point, the working condition of the target object, and other contents, and the specific display mode is not specifically limited herein.
By the method, the user can inquire the moving track and the real-time working condition information of the target object through the target client, and convenience is provided for the user to know the information of the target object.
In a possible embodiment, before sending the alert information to the target client, the location monitoring method further includes: and receiving a subscription request of the target object sent by the target client.
The sending of the alarm information to the target client includes:
and sending alarm information of the target object corresponding to the subscription request to the target client.
Specifically, before sending the alarm information to the target client, the user may set the alarm information corresponding to the target object that only accepts attention in the webpage or APP of the platform of the target client, after the user sets the alarm information, the target client sends a subscription request for the target object to the platform, and after receiving the subscription request sent by the target client, the platform sends the alarm information of the target object corresponding to the subscription request to the target client.
For example, the target objects to be monitored by the electronic fence include a vending machine a and a vending machine B, but holders of the two vending machines only pay attention to the vending machine a, so that the holder sets an alarm message only accepting the vending machine a in the APP of the electronic fence of the mobile phone, the mobile phone feeds the subscription request back to the platform, and after receiving the subscription request, the platform sends alarm information of the vending machine a to the mobile phone of the holder through a short message or an email when the position of the vending machine a meets the alarm condition of the electronic fence.
Example two
Fig. 3 is a schematic structural diagram of a position monitoring device according to a second embodiment of the present application, and as shown in fig. 3, the position monitoring device includes:
an obtainingmodule 301, configured to obtain current position information of a target object;
a determiningmodule 302, configured to determine whether a position corresponding to the position information meets an alarm condition of an electronic fence according to a relative position relationship between the position corresponding to the position information and the electronic fence set for the target object, where the electronic fence includes: the electronic fence prevents the target object from invading and limits the moving range of the target object;
and the sendingmodule 303 is configured to send alarm information to the target client if the alarm condition is met.
In a possible embodiment, the alarm information includes at least one of the following information: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object.
In a possible embodiment, when the electronic fence is the electronic fence for preventing the target object from invading, the configuration of the determiningmodule 302 when configured to determine whether the location corresponding to the location information satisfies the alarm condition of the electronic fence includes:
when the target object enters the area defined by the electronic fence, the target object passes through a first position on the electronic fence and a second position corresponding to the current position information of the target object; calculating a first distance between the first location and the second location; judging whether the first distance is larger than a preset threshold value or not; if the first distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence that limits the moving range of the target object, the configuration of the determiningmodule 302, when being configured to determine whether the position corresponding to the position information satisfies the alarm condition of the electronic fence, includes:
when the target object leaves the area defined by the electronic fence, the target object passes through a third position on the electronic fence and a fourth position corresponding to the current position information of the target object; calculating a second distance between the third location and the fourth location; judging whether the second distance is greater than the preset threshold value; and if the second distance is greater than the preset threshold value, the position corresponding to the position information meets the alarm condition of the electronic fence.
In a possible embodiment, when the electronic fence is the electronic fence for preventing the target object from invading, the configuration of the determiningmodule 302 when configured to determine whether the location corresponding to the location information satisfies the alarm condition of the electronic fence includes:
acquiring a first moment when the target object passes through the electronic fence when entering the area defined by the electronic fence, and a second moment corresponding to the current position information of the target object; calculating a first duration between the first time and the second time; judging whether the first time length is longer than a preset time length and/or whether the position of the target object is always in the area within the first time length; if the first time length is longer than the preset time length and/or the position of the target object is always in the area within the first time length, the position corresponding to the position information meets the alarm condition of the electronic fence;
when the electronic fence is the electronic fence that limits the moving range of the target object, the configuration of the determiningmodule 302, when being configured to determine whether the position corresponding to the position information satisfies the alarm condition of the electronic fence, includes:
acquiring a third moment when the target object leaves the area defined by the electronic fence and a fourth moment corresponding to the current position information of the target object when the target object passes through the electronic fence; calculating a second duration between the third time and the fourth time; judging whether the second time length is longer than the preset time length and/or whether the position of the target object is always outside the area in the second time length; if the second time length is longer than the preset time length, and/or the position of the target object is always outside the area in the second time length, the position corresponding to the position information meets the alarm condition of the electronic fence.
In a possible implementation, fig. 4 shows a schematic structural diagram of another position monitoring apparatus provided in example two of the present application, and as shown in fig. 4, the position monitoring apparatus further includes:
an executingmodule 401, configured to obtain a keyword of the alarm information input by the target client, where the keyword includes at least one of: the name of the target object, the name of the electronic fence, the content of the alarm condition, the moment when the alarm condition is met, and the current position information of the target object;
adisplay module 402, configured to display the movement trajectory of the target object corresponding to the keyword and the working condition information of the target object corresponding to the keyword on the electronic map of the target client.
In a possible embodiment, before the configuration of the sendingmodule 303 is used to send the alert information to the target client, the configuration further includes: receiving a subscription request of the target object sent by the target client;
the configuration of the sendingmodule 303, when configured to send alarm information to a target client, includes:
and sending alarm information of the target object corresponding to the subscription request to the target client.
The apparatus provided in the embodiments of the present application may be specific hardware on a device, or software or firmware installed on a device, etc. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
According to the position monitoring method provided by the embodiment of the application, after the current position information of a target object is obtained, whether the position meets the alarm condition of an electronic fence or not is judged according to the relative position relation between the position corresponding to the position information and the electronic fence set for the target object, and when the alarm condition is met, alarm information is sent to a target client; in the prior art, safety protection is performed by using a guardrail construction mode, and the guardrail can prevent peripheral invasion and outgoing inside a site area so as to realize supervision on the site area, but the mode cannot discover invasion behaviors or outgoing behaviors in time under the condition of unattended operation, so that the supervision efficiency is reduced; compared with the method for building the guardrail in the prior art, the position monitoring method sends the alarm information to the client of the user when the position of the target object meets the alarm condition of the electronic fence, realizes remote alarm, can know the alarm information of the electronic fence in time even if the user is not near the target object, and is favorable for improving the supervision efficiency of the electronic fence.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a computer device provided in a third embodiment of the present application, and as shown in fig. 5, the device includes amemory 501, aprocessor 502, and a computer program stored in thememory 501 and executable on theprocessor 502, where theprocessor 502 implements the position monitoring method when executing the computer program.
Specifically, thememory 501 and theprocessor 502 can be general memories and processors, which are not limited in particular, and when theprocessor 502 runs a computer program stored in thememory 501, the position monitoring method can be executed, which is beneficial to improving the efficiency of electronic fence supervision.
Example four
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the position monitoring method are performed.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the position monitoring method can be executed, which is beneficial to improving the efficiency of monitoring the electronic fence.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.