Note: Descriptions are shown in the official language in which they were submitted.
CA 03162741 2022-05-24
METHOD OF REMOVING FENCE POINTS FROM ELECTRONIC FENCE, DEVICE
AND COMPUTER EQUIPMENT
BACKGROUND OF THE INVENTION
Technical Field
[0001] The present application relates to the field of computer application,
and more particularly
to a method of removing fence points from an electronic fence, and
corresponding device,
computer equipment, and storage medium.
Description of Related Art
[0002] The electronic fence is a virtual fence established on the basis of a
certain geographical
location and a specific application scenario, of which the geographical
location can be a
school, one or more residential area(s) or shops, etc. The specific
application scenario can
be to set up an electronic fence on the basis of a reasonable parking lot
range or to set up
an electronic fence on the basis of a reasonable delivery range, and so on.
[0003] In the prior-art technology, due to scheme restriction in generating an
electronic fence or
due to some invalid lines or invalid areas carried with the process of
generating an
electronic fence, one or more invalid portion(s) easily tend(s) to appear on
the generated
electronic fence, so that the generated electronic fence contains invalid
points, the
presentation effect of the electronic fence is adversely affected, and it is
made difficult to
satisfy the users' requirements.
SUMMARY OF THE INVENTION
[0004] In view of the aforementioned technical problems, there is an urgent
need to provide a
method of removing fence points from an electronic fence, and corresponding
device,
1
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
computer equipment, and storage medium capable of removing invalid fence
points from
the electronic fence.
[0005] There is provided a method of removing fence points from an electronic
fence, and the
method comprises:
[0006] obtaining, on a current electronic fence, longitude and latitude
coordinate values of a
currently traversed starting fence point and longitude and latitude coordinate
values of
various fence points to be detected within a preset traversing range to which
the currently
traversed starting fence point corresponds;
[0007] respectively determining fence length values between the various fence
points to be
detected and the currently traversed starting fence point according to the
longitude and
latitude coordinate values of the currently traversed starting fence point and
the longitude
and latitude coordinate values of the various fence points to be detected;
[0008] respectively determining first straight-line distance values between
the various fence
points to be detected and the currently traversed starting fence point
according to the
longitude and latitude coordinate values of the currently traversed starting
fence point
and the longitude and latitude coordinate values of the various fence points
to be detected;
[0009] screening out those fence points to be detected whose straight-line
distance values are
smaller than a preset distance value and ratios of whose fence length values
to whose
straight-line distance values are greater than a preset specific ratio, and
taking the out-
screened fence points to be detected to serve as candidate fence points;
[0010] determining a target fence point according to first straight-line
distance values between
the various candidate fence points and the currently traversed starting fence
point; and
[0011] removing various fence points between the target fence point and the
currently traversed
starting fence point.
[0012] In one of the embodiments, the step of obtaining, on a current
electronic fence, longitude
and latitude coordinate values of a currently traversed starting fence point
and longitude
and latitude coordinate values of various fence points to be detected within a
preset
2
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
traversing range to which the currently traversed starting fence point
corresponds includes:
[0013] obtaining longitude and latitude coordinate values of various fence
points on the current
electronic fence;
[0014] storing the coordinate values to which the various fence points
correspond respectively
in various nodes of a data link list, so as to create the data link list; and
[0015] obtaining, from the data link list, longitude and latitude coordinate
values of the currently
traversed starting fence point and longitude and latitude coordinate values of
the various
fence points to be detected within the preset traversing range to which the
currently
traversed starting fence point corresponds on the current electronic fence.
[0016] In one of the embodiments, the step of respectively determining fence
length values
between the various fence points to be detected and the currently traversed
starting fence
point according to the longitude and latitude coordinate values of the
currently traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected includes:
[0017] respectively calculating second straight-line distance values between
every two adjacent
fence points to be detected between the currently traversed starting fence
point and the
various fence points to be detected; and
[0018] calculating a summation of the various second straight-line distance
values to obtain the
fence length values between the currently traversed starting fence point and
the various
fence points to be detected.
[0019] In one of the embodiments, the step of determining a target fence point
according to first
straight-line distance values between the various candidate fence points and
the currently
traversed starting fence point includes:
[0020] selecting the candidate fence point with the smallest first straight-
line distance value to
the currently traversed starting fence point to serve as the target fence
point.
[0021] In one of the embodiments, the method further comprises, after the step
of removing
3
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
various fence points between the target fence point and the currently
traversed starting
fence point:
[0022] taking the next node of the currently traversed starting fence point to
serve as a starting
fence point of the next round of traversing, and taking various fence points
within a preset
traversing range after the starting fence point of the next round of
traversing to serve as
fence points to be detected, to execute the next round of traversing, and to
obtain a target
fence point to which the next round of traversing corresponds; and
[0023] removing various fence points between the target fence point to which
the next round of
traversing corresponds and the starting fence point of the next round of
traversing.
[0024] In one of the embodiments, the method further comprises:
[0025] sequentially taking each of the various fence points on the electronic
fence to serve as the
starting fence point of one round of traversing to execute a corresponding
round of
traversing, obtaining target fence points to which the various rounds of
traversing
correspond, and removing various fence points between the target fence points
to which
the various rounds of traversing correspond and the starting fence points to
which the
rounds of traversing correspond; and
[0026] when the various fence points on the electronic fence have been each
taken to serve as a
starting fence point of one round of traversing to have executed a
corresponding round of
traversing, and after various fence points between the target fence points to
which the
various rounds of traversing correspond and the starting fence points to which
the rounds
of traversing correspond have been removed, ending the process.
[0027] In one of the embodiments, the step of obtaining, on a current
electronic fence, longitude
and latitude coordinate values of a starting fence point of a current round of
traversing
and longitude and latitude coordinate values of various fence points to be
detected within
a preset traversing range to which the starting fence point of the current
round of
traversing corresponds includes:
[0028] continuing, while obtaining the longitude and latitude coordinate
values of the various
4
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
fence points to be detected within the preset traversing range to which the
starting fence
point of the current round of traversing corresponds, if the preset traversing
range is still
not reached after the longitude and latitude coordinate values of the last
fence point to be
detected on the electronic fence have been obtained, to start with the first
fence point to
be detected on the electronic fence to obtain longitude and latitude
coordinate values of
various fence points to be detected until the longitude and latitude
coordinate values of
the various fence points to be detected within the preset traversing range are
obtained.
[0029] There is provided a device for eliminating invalid point sets from an
electronic fence, and
the device comprises:
[0030] an obtaining module, for obtaining, on a current electronic fence,
longitude and latitude
coordinate values of a currently traversed starting fence point and longitude
and latitude
coordinate values of various fence points to be detected within a preset
traversing range
to which the currently traversed starting fence point corresponds;
[0031] a first determining module, for respectively determining fence length
values between the
various fence points to be detected and the currently traversed starting fence
point
according to the longitude and latitude coordinate values of the currently
traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected;
[0032] a second determining module, for respectively determining first
straight-line distance
values between the various fence points to be detected and the currently
traversed starting
fence point according to the longitude and latitude coordinate values of the
currently
traversed starting fence point and the longitude and latitude coordinate
values of the
various fence points to be detected;
[0033] a screening module, for screening out those fence points to be detected
whose straight-
line distance values are smaller than a preset distance value and ratios of
whose fence
length values to whose straight-line distance values are greater than a preset
specific ratio,
and taking the out-screened fence points to be detected to serve as candidate
fence points;
[0034] a third determining module, for determining a target fence point
according to first
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
straight-line distance values between the various candidate fence points and
the currently
traversed starting fence point; and
[0035] a removing module, for removing various fence points between the target
fence point and
the currently traversed starting fence point.
[0036] There is provided a computer equipment that comprises a memory, a
processor and a
computer program stored on the memory and operable on the processor, and the
steps of
the method according to any embodiment are realized when the processor
executes the
computer program.
[0037] There is provided a computer-readable storage medium storing a computer
program
thereon, and the steps of the method according to any embodiment are realized
when the
computer program is executed by a processor.
[0038] In the aforementioned method of removing fence points from an
electronic fence, and
corresponding device, computer equipment, and storage medium, by obtaining, on
a
current electronic fence, longitude and latitude coordinate values of a
currently traversed
starting fence point and longitude and latitude coordinate values of various
fence points
to be detected within a preset traversing range to which the currently
traversed starting
fence point corresponds; respectively determining fence length values between
the
various fence points to be detected and the currently traversed starting fence
point
according to the longitude and latitude coordinate values of the currently
traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected; respectively determining first straight-line distance
values between
the various fence points to be detected and the currently traversed starting
fence point
according to the longitude and latitude coordinate values of the currently
traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected; screening out those fence points to be detected whose
straight-line
distance values are smaller than a preset distance value and ratios of whose
fence length
6
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
values to whose straight-line distance values are greater than a preset
specific ratio, and
taking the out-screened fence points to be detected to serve as candidate
fence points;
determining a target fence point according to first straight-line distance
values between
the various candidate fence points and the currently traversed starting fence
point; and
removing various fence points between the target fence point and the currently
traversed
starting fence point, the present application realizes the detection and
removal of invalid
fence points on a generated electronic fence, whereby the generated electronic
fence is
more refined and simplified, more adapted to database storage and index
optimization,
and the presentation effect is rendered more excellent.
BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Fig. 1 is a view illustrating the application environment for the
method of removing fence
points from an electronic fence in an exemplary embodiment of the present
application;
[0040] Fig. 2 is a flowchart schematically illustrating the method of removing
fence points from
an electronic fence provided by an exemplary embodiment of the present
application;
[0041] Fig. 3 is a view schematically illustrating an electronic fence before
fence points are
removed provided by an exemplary embodiment of the present application;
[0042] Fig. 4 is a view schematically illustrating an electronic fence after
fence points have been
removed provided by an exemplary embodiment of the present application;
[0043] Fig. 5 is a block diagram illustrating the structure of a device for
removing fence points
from an electronic fence provided by an exemplary embodiment of the present
application;
and
[0044] Fig. 6 is a view illustrating the internal structure of the computer
equipment provided by
7
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
an exemplary embodiment of the present application.
DETAILED DESCRIPTION OF THE INVENTION
[0045] To make more lucid and clear the objectives, technical solutions and
advantages of the
present application, the present application is described in greater detail
below with
reference to accompanying drawings and embodiments. As should be understood,
the
specific embodiments described here are merely meant to explain the present
application,
rather than to restrict the present application.
[0046] Fig. 1 is a view schematically illustrating the application environment
for the method of
removing fence points from an electronic fence in an exemplary embodiment of
the
present application. As shown in Fig. 1, the method of removing fence points
from an
electronic fence is applied to a system for removing invalid point sets on an
electronic
fence, and the system for removing invalid point sets on an electronic fence
comprises
electronic fence generation server 100 and terminal 101. Server 100
communicates with
terminal 101 through network 102.
[0047] Server 100 is employed for data-processing longitude and latitude
coordinate values of
various fence points on the current electronic fence, obtaining invalid point
sets on the
electronic fence, and removing the invalid point sets. Server 100 can be
embodied as an
independent server or a server cluster consisting of a plurality of servers.
[0048] Terminal 101 is employed for obtaining from the server the electronic
fence from which
invalid point sets have been removed, and presenting the electronic fence on a
terminal
user interface. Terminal 101 can be, but is not limited to be, any of various
personal
computers, notebook computers, smart mobile phones, panel computers, and
desktop
computers, etc.
8
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
[0049] Network 102 is employed for realizing network connection between server
100 and
terminal 101. Specifically, server 100 sends the electronic fence from which
the invalid
point sets have been removed to terminal 101 through network 102, and terminal
101
draws the electronic fence after having received it onto an electronic map.
[0050] In one embodiment, as shown in Fig. 2, there is provided a method of
removing fence
points from an electronic fence, and the method is explained with an example
of its being
applied to the electronic fence generation server in Fig. 1, to comprise the
following steps.
[0051] Sll - obtaining, on a current electronic fence, longitude and latitude
coordinate values of
a currently traversed starting fence point and longitude and latitude
coordinate values of
various fence points to be detected within a preset traversing range to which
the currently
traversed starting fence point corresponds.
[0052] In the present application, the current fence contains plural fence
points, and longitude
and latitude coordinate values of the various fence points on the electronic
fence are
traversed in the present application. When the longitude and latitude
coordinate values of
the various fence points on the electronic fence are traversed in the present
application,
traversing is performed in several rounds.
[0053] At the start of each round of traversing, the starting fence point is
firstly selected, and
various fence points to be detected within a preset traversing range are
selected for
traversing. A preset traversing range is preset in the present application,
and the preset
traversing range is used to characterize the number of fence points to be
detected at each
round of traversing. After a preset number of fence points has been traversed,
the current
round of traversing ends.
[0054] S12 ¨ respectively determining fence length values between the various
fence points to
be detected and the currently traversed starting fence point according to the
longitude and
9
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
latitude coordinate values of the currently traversed starting fence point and
the longitude
and latitude coordinate values of the various fence points to be detected.
[0055] The present application respectively determines fence length values
between the various
fence points to be detected and the currently traversed starting fence point
through the
longitude and latitude coordinate values of the various fence points to be
detected.
[0056] S13 ¨ respectively determining first straight-line distance values
between the various
fence points to be detected and the currently traversed starting fence point
according to
the longitude and latitude coordinate values of the currently traversed
starting fence point
and the longitude and latitude coordinate values of the various fence points
to be detected.
[0057] In the present application, during each round of traversing, it is
required to calculate the
first straight-line distance values between the various fence points to be
detected and the
currently traversed starting fence point.
[0058] S14 - screening out those fence points to be detected whose straight-
line distance values
are smaller than a preset distance value and ratios of whose fence length
values to whose
straight-line distance values are greater than a preset specific ratio, and
taking the out-
screened fence points to be detected to serve as candidate fence points.
[0059] In the present application, fence points to be detected as screened out
through the first
straight-line distances and the specific ratio are taken as candidate fence
points.
[0060] S15 ¨ determining a target fence point according to first straight-line
distance values
between the various candidate fence points and the currently traversed
starting fence point.
[0061] In the present application, after the various candidate fence points
have been obtained,
first straight-line distances between the various candidate fence points and
the currently
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
traversed starting fence point are calculated, and the fence point with the
smallest first
straight-line distance is selected therefrom to serve as the target fence
point of the current
round of traversing. Target fence point is meant to be the terminating point
of one segment
of invalid fence boundary line detected by the current round of traversing,
the starting
point of this segment of invalid fence boundary line is further obtained
through
subsequent steps, and various invalid point sets between the starting point
and the
terminating point are removed.
[0062] S16 ¨ removing various fence points between the target fence point and
the currently
traversed starting fence point.
[0063] In the present application, after the starting point and the
terminating point of one segment
of invalid fence boundary line have been obtained, the point sets on this
segment of
invalid fence boundary line are removed, and the next round of traversing is
executed.
[0064] In one of the embodiments, the step of obtaining, on a current
electronic fence, longitude
and latitude coordinate values of a currently traversed starting fence point
and longitude
and latitude coordinate values of various fence points to be detected within a
preset
traversing range to which the currently traversed starting fence point
corresponds includes:
[0065] obtaining longitude and latitude coordinate values of various fence
points on the current
electronic fence;
[0066] storing the coordinate values to which the various fence points
correspond respectively
in various nodes of a data link list, so as to create the data link list; and
[0067] obtaining, from the data link list, longitude and latitude coordinate
values of the currently
traversed starting fence point and longitude and latitude coordinate values of
the various
fence points to be detected within the preset traversing range to which the
currently
traversed starting fence point corresponds on the current electronic fence.
[0068] Specifically, prior to obtaining the longitude and latitude coordinate
values of the various
11
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
fence points on the electronic fence, the present application further
comprises:
[0069] determining a target region range according to longitude and latitude
coordinate values
of a preset geographical location and a preset radius; employing a preset rule
to create an
electronic fence to which the target region range corresponds; and obtaining
longitude
and latitude coordinate values of various fence points on the electronic fence
from a map
server to which communicative connection was established in advance.
[0070] In the present application, the electronic fence is established in
advance. There can be
plural solutions for establishing the electronic fence in the present
application, and
different electronic fences are specifically established according to
different application
scenarios and different rules. In a possible application scenario, for
instance, it is required
to establish an electronic fence for describing the delivery range of a
certain designated
store. With respect to this application scenario, a solution of establishing
an electronic
fence according to the present application is as follows:
[0071] stipulating longitude and latitude positional values and a preset
radius of a central location
of a designated store;
[0072] taking a point to which the longitude and latitude coordinate values of
the central location
of the designated store as a center of a circle, and taking the preset radius
as a radius to
determine a circular region;
[0073] determining a circumscribed square of the circular region in accordance
with the circular
region, selecting a preset number of equidistant points on the circumscribed
square to
serve as reference points, and determining longitude and latitude coordinates
to which the
plural reference points correspond in accordance with the longitude and
latitude
coordinate values and the preset radius of the store central location;
[0074] invoking a navigation path database in the map server, enquiring the
navigation path
database in accordance with the longitude and latitude coordinates of the
plural reference
points, and obtaining a navigation path between every two adjacent reference
points in
the plural reference points; and
[0075] obtaining the electronic fence to which the delivery range corresponds
by connecting each
12
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
navigation path head to tail.
[0076] In another design solution, with respect to this application scenario,
a solution of
establishing an electronic fence according to the present application is as
follows:
[0077] stipulating longitude and latitude coordinate values and a preset
radius of a central
location of a designated store;
[0078] taking a point to which the longitude and latitude coordinates of the
central location of
the designated store as a center of a circle, and taking the preset radius as
a radius to
determine a circular region;
[0079] selecting a preset number of equidistant points on a boundary line of
the circular region
to serve as reference points, and determining longitude and latitude
coordinates to which
the plural reference points correspond in accordance with the longitude and
latitude
coordinate values and the preset radius of the store central location;
[0080] invoking a navigation path database in the map server, enquiring the
navigation path
database in accordance with the longitude and latitude coordinates of the
plural reference
points, and obtaining a navigation path between every two adjacent reference
points in
the plural reference points; and
[0081] obtaining the electronic fence to which the delivery range corresponds
by connecting each
navigation path head to tail.
[0082] Moreover, the electronic fence generation server in the present
application was
communicatively connected to the designated map server in advance. It is
possible in the
present application to obtain longitude and latitude coordinate values of the
various fence
points on the electronic fence from the map server.
[0083] Moreover, the present application creates a data link list in
accordance with the longitude
and latitude coordinate values of the various fence points, and the data link
list includes,
but is not limited to, marking information of the various fence points and
coordinate
values of the various fence points. It is possible in the present application
to obtain the
13
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
longitude and latitude coordinate values of the various fence points from the
data link list.
[0084] Specifically, the data link list in the present application is a
bidirectional circular link list,
which is one type of link lists. Like the single link list, the double link
list also consists
of a plurality of nodes, and each node of the link list stores three pieces of
information,
which are, respectively, the value of the current node, a precursor pointer of
the precursor
node pointing thereto, and a successor pointer of the successor node pointing
thereto. The
value of the current node is stored in the data domain, and the pointers are
stored in the
pointer domain. Because the list is circular, the successor pointer of the
last node points
to the first node, while the precursor pointer of the first node points to the
last node.
Accordingly, the precursor node and the successor node can be accessed both
very
conveniently starting from any node in the bidirectional circular link list.
[0085] In one of the embodiments, the step of respectively determining fence
length values
between the various fence points to be detected and the currently traversed
starting fence
point according to the longitude and latitude coordinate values of the
currently traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected includes:
[0086] respectively calculating second straight-line distance values between
every two adjacent
fence points to be detected between the currently traversed starting fence
point and the
various fence points to be detected; and
[0087] calculating a summation of the various second straight-line distance
values to obtain the
fence length values between the currently traversed starting fence point and
the various
fence points to be detected.
[0088] In another mode of execution, the step of respectively determining
fence length values
between the various fence points to be detected and the currently traversed
starting fence
point according to the longitude and latitude coordinate values of the
currently traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
14
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
points to be detected according to the present application includes:
[0089] presetting a target starting point on the electronic fence;
[0090] calculating third straight-line distance values between every two
adjacent fence points
between the target starting point and the various fence points;
[0091] summating the various third straight-line distance values to obtain
target fence lengths of
the various fence points to the target starting point; and
[0092] subtracting the target fence length to which the currently traversed
starting fence point
corresponds from the target fence lengths to which the fence points to be
detected
correspond to obtain fence length values between the various fence points to
be detected
and the currently traversed starting fence point.
[0093] Moreover, those fence points to be detected whose straight-line
distance values are
smaller than a preset distance value and ratios of whose fence length values
to whose
straight-line distance values are greater than a preset specific ratio are
screened out, and
the out-screened fence points to be detected are taken to serve as candidate
fence points.
[0094] In the present application, if the straight-line distance values are
all greater than the preset
distance value, and the ratios of the fence length values to the straight-line
distance values
are all smaller than the preset specific ratio, this indicates that there is
no candidate fence
point in the current round of traversing, and the next round of traversing is
directly jumped
to. The next node of the currently traversed starting fence point is taken to
serve as a
starting fence point of the next round of traversing, and various fence points
within a
preset traversing range after the starting fence point of the next round of
traversing are
taken to serve as fence points to be detected to execute the next round of
traversing, and
to obtain a target fence point to which the next round of traversing
corresponds; various
fence points between the target fence point to which the next round of
traversing
corresponds and the starting fence point of the next round of traversing are
removed.
[0095] In one of the embodiments, the step of determining a target fence point
according to first
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
straight-line distance values between the various candidate fence points and
the currently
traversed starting fence point includes:
[0096] selecting the candidate fence point with the smallest first straight-
line distance value
between the currently traversed starting fence point to serve as the target
fence point.
[0097] In the present application, the candidate fence point with the smallest
first straight-line
distance value between the currently traversed starting fence point is
selected to serve as
the target fence point, whereby it is made possible to guarantee that the
selected invalid
point sets are most proper, whereas if other candidate points are selected,
valid point sets
might be selected, so that the valid point sets are removed.
[0098] In one of the embodiments, the method further comprises, after the step
of removing
various fence points between the target fence point and the currently
traversed starting
fence point:
[0099] taking the next node of the currently traversed starting fence point to
serve as a starting
fence point of the next round of traversing, and taking various fence points
within a preset
traversing range after the starting fence point of the next round of
traversing to serve as
fence points to be detected, to execute the next round of traversing, and to
obtain a target
fence point to which the next round of traversing corresponds; and
[0100] removing various fence points between the target fence point to which
the next round of
traversing corresponds and the starting fence point of the next round of
traversing.
[0101] The present application traverses the longitude and latitude coordinate
values of the
various fence points through plural rounds. A preset traversing range is set
in advance, a
starting node is selected to be traversed at each round of traversing,
traversing begins
from the starting node, the current round of traversing completes when the
fence points
to which the preset traversing range corresponds are traversed, and a result
of the current
round of traversing is obtained. Plural candidate fence points can be obtained
after one
round of traversing, the target fence point is further selected from the
candidate fence
16
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
points, and the various fence points between the target fence points to which
the various
rounds of traversing correspond and the starting fence points to which these
rounds of
traversing correspond are removed.
[0102] In one of the embodiments, the method further comprises:
[0103] sequentially taking each of the various fence points on the electronic
fence to serve as the
starting fence point of one round of traversing to execute a corresponding
round of
traversing, obtaining target fence points to which the various rounds of
traversing
correspond, and removing various fence points between the target fence points
to which
the various rounds of traversing correspond and the starting fence points to
which the
rounds of traversing correspond; and
[0104] when the various fence points on the electronic fence have been each
taken to serve as a
starting fence point of one round of traversing to have executed a
corresponding round of
traversing, and after various fence points between the target fence points to
which the
various rounds of traversing correspond and the starting fence points to which
the rounds
of traversing correspond have been removed, ending the process.
[0105] Plural rounds of traversing should be continued in the present
application, the starting
fence point of each round of traversing is different from that of another, and
the starting
fence point of each round of traversing is selected as a fence point after the
starting fence
point of the previous round of traversing. Accordingly, with the incessant
continuation of
the rounds of traversing, the starting fence points as traversed are also
different. In the
current round of traversing, the traversed starting fence point is the last
fence point to be
detected in the electronic fence, alternatively, after the various fence
points on the
electronic fence have been each taken to serve as a starting fence point of
one round of
traversing to have executed a corresponding round of traversing, this
indicates that the
current round of traversing is the last round of traversing, after which
invalid point sets
will be obtained and removed, and the process ends.
17
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
[0106] In one of the embodiments, the step of obtaining, on a current
electronic fence, longitude
and latitude coordinate values of a starting fence point of a current round of
traversing
and longitude and latitude coordinate values of various fence points to be
detected within
a preset traversing range to which the starting fence point of the current
round of
traversing corresponds includes:
[0107] continuing, while obtaining the longitude and latitude coordinate
values of the various
fence points to be detected within the preset traversing range to which the
starting fence
point of the current round of traversing corresponds, if the preset traversing
range is still
not reached after the longitude and latitude coordinate values of the last
fence point to be
detected on the electronic fence have been obtained, to start with the first
fence point to
be detected on the electronic fence to obtain longitude and latitude
coordinate values of
various fence points to be detected until the longitude and latitude
coordinate values of
the various fence points to be detected within the preset traversing range are
obtained.
The first fence point to be detected on the electronic fence specifically
indicates the first
fence point to be detected in the first round of traversing on the electronic
fence.
[0108] In the present application, the electronic fence is a closed graphic,
and there might be
invalid point sets in any line segment region of the closed graphic. It should
be considered
in the present application that there might also be invalid point sets to be
necessarily
removed between the first fence point and the last fence point on the current
fence.
Accordingly, the longitude and latitude coordinate values of the various fence
points are
prestored in the present application in the data link list. Since the data
link list is a
bidirectional circular link list, its head node and its tail node are
connected to each other.
From the tail node can be continuously traversed to the head node. The present
application
makes use of a bidirectional circular link list to realize detection and
removal of invalid
point sets between the preset starting point and terminating point of the
electronic fence,
whereby troubleshooting of invalid point sets is made more thorough.
[0109] Please refer to Fig. 3, which is a view schematically illustrating an
electronic fence before
18
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
fence points are removed in an embodiment. As shown in Fig. 3, the electronic
fence
before removal of invalid point sets includes closed graphic 21 and invalid
point sets 22.
Since the various invalid point sets constitute plural invalid areas, they
should hence be
removed.
[0110] Please refer to Fig. 4, which is a view schematically illustrating an
electronic fence after
fence points have been removed in an embodiment. As shown in Fig. 4, the
electronic
fence from which invalid point sets have been removed includes closed graphic
31, there
is no invalid area on this closed graphic 31, and the presentation effect of
the electronic
fence is enhanced.
[0111] In one embodiment, as shown in Fig. 5, there is provided a device for
removing fence
points from an electronic fence, and the device comprises:
[0112] an obtaining module 11, for obtaining, on a current electronic fence,
longitude and
latitude coordinate values of a currently traversed starting fence point and
longitude and
latitude coordinate values of various fence points to be detected within a
preset traversing
range to which the currently traversed starting fence point corresponds;
[0113] a first determining module 12, for respectively determining fence
length values between
the various fence points to be detected and the currently traversed starting
fence point
according to the longitude and latitude coordinate values of the currently
traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected;
[0114] a second determining module 13, for respectively determining first
straight-line distance
values between the various fence points to be detected and the currently
traversed starting
fence point according to the longitude and latitude coordinate values of the
currently
traversed starting fence point and the longitude and latitude coordinate
values of the
various fence points to be detected;
[0115] a screening module 14, for screening out those fence points to be
detected whose straight-
line distance values are smaller than a preset distance value and ratios of
whose fence
19
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
length values to whose straight-line distance values are greater than a preset
specific ratio,
and taking the out-screened fence points to be detected to serve as candidate
fence points;
[0116] a third determining module 15, for determining a target fence point
according to first
straight-line distance values between the various candidate fence points and
the currently
traversed starting fence point; and
[0117] a removing module 16, for removing various fence points between the
target fence point
and the currently traversed starting fence point.
[0118] In one of the embodiments, the obtaining module 11 includes:
[0119] a first obtaining unit, for obtaining longitude and latitude coordinate
values of various
fence points on the current electronic fence;
[0120] storing the coordinate values to which the various fence points
correspond respectively
in various nodes of a data link list, so as to create the data link list; and
[0121] obtaining, from the data link list, longitude and latitude coordinate
values of the currently
traversed starting fence point and longitude and latitude coordinate values of
the various
fence points to be detected within the preset traversing range to which the
currently
traversed starting fence point corresponds on the current electronic fence.
[0122] In one of the embodiments, the first determining module 12 includes:
[0123] a first determining unit, for respectively calculating second straight-
line distance values
between every two adjacent fence points to be detected between the currently
traversed
starting fence point and the various fence points to be detected; and
[0124] calculating a summation of the various second straight-line distance
values to obtain the
fence length values between the currently traversed starting fence point and
the various
fence points to be detected.
[0125] In one of the embodiments, the second determining module 12 includes:
[0126] a second determining unit, for selecting the candidate fence point with
the smallest first
straight-line distance value between the currently traversed starting fence
point to serve
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
as the target fence point.
[0127] In one of the embodiments, the removing module 16 further includes:
[0128] a traversing unit, for taking the next node of the currently traversed
starting fence point
to serve as a starting fence point of the next round of traversing, and taking
various fence
points within a preset traversing range after the starting fence point of the
next round of
traversing to serve as fence points to be detected, to execute the next round
of traversing,
and to obtain a target fence point to which the next round of traversing
corresponds; and
[0129] removing various fence points between the target fence point to which
the next round of
traversing corresponds and the starting fence point of the next round of
traversing.
[0130] In one of the embodiments, the removing module 16 further includes:
[0131] a removing unit, for sequentially taking each of the various fence
points on the electronic
fence to serve as the starting fence point of one round of traversing to
execute a
corresponding round of traversing, obtaining target fence points to which the
various
rounds of traversing correspond, and removing various fence points between the
target
fence points to which the various rounds of traversing correspond and the
starting fence
points to which the rounds of traversing correspond; and
[0132] when the various fence points on the electronic fence have been each
taken to serve as a
starting fence point of one round of traversing to have executed a
corresponding round of
traversing, and after various fence points between the target fence points to
which the
various rounds of traversing correspond and the starting fence points to which
the rounds
of traversing correspond have been removed, ending the process.
[0133] In one of the embodiments, the obtaining module 11 includes:
[0134] a second obtaining unit, for continuing, while obtaining the longitude
and latitude
coordinate values of the various fence points to be detected within the preset
traversing
range to which the starting fence point of the current round of traversing
corresponds, if
the preset traversing range is still not reached after the longitude and
latitude coordinate
21
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
values of the last fence point to be detected on the electronic fence have
been obtained,
to start with the first fence point to be detected on the electronic fence to
obtain longitude
and latitude coordinate values of various fence points to be detected until
the longitude
and latitude coordinate values of the various fence points to be detected
within the preset
traversing range are obtained.
[0135] In one embodiment, there is provided a computer equipment, the computer
equipment
can be a business processing server, and its internal structure can be as
shown in Fig. 6.
The computer equipment comprises a processor, a memory, a network interface, a
display
screen and an input means connected to each other via a system bus. The
processor of the
computer equipment is used to provide computing and controlling capabilities.
The
memory of the computer equipment includes a nonvolatile storage medium and an
internal memory. The nonvolatile storage medium stores therein an operating
system and
a computer program. The internal memory provides environments for the running
of the
operating system and the computer program in the nonvolatile storage medium.
The
network interface of the computer equipment is used to connect and communicate
with
an external terminal through network. The computer program realizes a method
of
removing fence points from an electronic fence when it is executed by a
processor. The
display screen of the computer equipment can be a liquid crystal display
screen or an
electronic ink display screen, the input means of the computer equipment can
be a touch
layer covering on the display screen, can also be a press button, a track ball
or a touch
control board disposed on the housing of the computer equipment, and can
further be an
externally connected keyboard, touch control board or mouse, etc.
[0136] In one embodiment, there is provided a computer equipment that
comprises a memory, a
processor and a computer program stored on the memory and operable on the
processor,
and the following steps are realized when the processor executes the computer
program:
[0137] obtaining, on a current electronic fence, longitude and latitude
coordinate values of a
currently traversed starting fence point and longitude and latitude coordinate
values of
22
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
various fence points to be detected within a preset traversing range to which
the currently
traversed starting fence point corresponds; respectively determining fence
length values
between the various fence points to be detected and the currently traversed
starting fence
point according to the longitude and latitude coordinate values of the
currently traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected; respectively determining first straight-line distance
values between
the various fence points to be detected and the currently traversed starting
fence point
according to the longitude and latitude coordinate values of the currently
traversed
starting fence point and the longitude and latitude coordinate values of the
various fence
points to be detected; screening out those fence points to be detected whose
straight-line
distance values are smaller than a preset distance value and ratios of whose
fence length
values to whose straight-line distance values are greater than a preset
specific ratio, and
taking the out-screened fence points to be detected to serve as candidate
fence points;
determining a target fence point according to first straight-line distance
values between
the various candidate fence points and the currently traversed starting fence
point; and
removing various fence points between the target fence point and the currently
traversed
starting fence point.
[0138] In one embodiment, when the processor executes the computer program to
realize the
step of obtaining, on a current electronic fence, longitude and latitude
coordinate values
of a currently traversed starting fence point and longitude and latitude
coordinate values
of various fence points to be detected within a preset traversing range to
which the
currently traversed starting fence point corresponds, the following steps are
specifically
realized:
[0139] obtaining longitude and latitude coordinate values of various fence
points on the current
electronic fence;
[0140] storing the coordinate values to which the various fence points
correspond respectively
in various nodes of a data link list, so as to create the data link list; and
[0141] obtaining, from the data link list, longitude and latitude coordinate
values of the currently
23
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
traversed starting fence point and longitude and latitude coordinate values of
the various
fence points to be detected within the preset traversing range to which the
currently
traversed starting fence point corresponds on the current electronic fence.
[0142] In one embodiment, when the processor executes the computer program to
realize the
step of respectively determining fence length values between the various fence
points to
be detected and the currently traversed starting fence point according to the
longitude and
latitude coordinate values of the currently traversed starting fence point and
the longitude
and latitude coordinate values of the various fence points to be detected, the
following
steps are specifically realized:
[0143] respectively calculating second straight-line distance values between
the currently
traversed starting fence point and every two adjacent fence points to be
detected between
the various fence points to be detected; and
[0144] calculating a summation of the various second straight-line distance
values to obtain the
fence length values between the currently traversed starting fence point and
the various
fence points to be detected.
[0145] In one embodiment, when the processor executes the computer program to
realize the
step of determining a target fence point according to first straight-line
distance values
between the various candidate fence points and the currently traversed
starting fence point,
the following step is specifically realized:
[0146] selecting the candidate fence point with the smallest first straight-
line distance value
between the currently traversed starting fence point to serve as the target
fence point.
[0147] In one embodiment, when the processor executes the computer program to
realize the
step of removing various fence points between the target fence point and the
currently
traversed starting fence point, the following steps are specifically realized:
[0148] taking the next node of the currently traversed starting fence point to
serve as a starting
fence point of the next round of traversing, and taking various fence points
within a preset
24
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
traversing range after the starting fence point of the next round of
traversing to serve as
fence points to be detected, to execute the next round of traversing, and to
obtain a target
fence point to which the next round of traversing corresponds; and
[0149] removing various fence points between the target fence point to which
the next round of
traversing corresponds and the starting fence point of the next round of
traversing.
[0150] In one embodiment, when the processor executes the computer program,
the following
steps are specifically realized:
[0151] sequentially taking each of the various fence points on the electronic
fence to serve as the
starting fence point of one round of traversing to execute a corresponding
round of
traversing, obtaining target fence points to which the various rounds of
traversing
correspond, and removing various fence points between the target fence points
to which
the various rounds of traversing correspond and the starting fence points to
which the
rounds of traversing correspond; and
[0152] when the various fence points on the electronic fence have been each
taken to serve as a
starting fence point of one round of traversing to have executed a
corresponding round of
traversing, and after various fence points between the target fence points to
which the
various rounds of traversing correspond and the starting fence points to which
the rounds
of traversing correspond have been removed, ending the process.
[0153] In one embodiment, when the processor executes the computer program to
realize the
step of obtaining, on a current electronic fence, longitude and latitude
coordinate values
of a starting fence point of a current round of traversing and longitude and
latitude
coordinate values of various fence points to be detected within a preset
traversing range
to which the starting fence point of the current round of traversing
corresponds, the
following step is specifically realized:
[0154] continuing, while obtaining the longitude and latitude coordinate
values of the various
fence points to be detected within the preset traversing range to which the
starting fence
point of the current round of traversing corresponds, if the preset traversing
range is still
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
not reached after the longitude and latitude coordinate values of the last
fence point to be
detected on the electronic fence have been obtained, to start with the first
fence point to
be detected on the electronic fence to obtain longitude and latitude
coordinate values of
various fence points to be detected until the longitude and latitude
coordinate values of
the various fence points to be detected within the preset traversing range are
obtained.
[0155] As comprehensible to persons ordinarily skilled in the art, the entire
or partial flows in
the methods according to the aforementioned embodiments can be completed via a
computer program instructing relevant hardware, the computer program can be
stored in
a nonvolatile computer-readable storage medium, and the computer program can
include
the flows as embodied in the aforementioned various methods when executed. Any
reference to the memory, storage, database or other media used in the various
embodiments provided by the present application can all include nonvolatile
and/or
volatile memory/memories. The nonvolatile memory can include a read-only
memory
(ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM),
an electrically erasable and programmable ROM (EEPROM) or a flash memory. The
volatile memory can include a random access memory (RAM) or an external cache
memory. To serve as explanation rather than restriction, the RAM is obtainable
in many
forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM
(SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM),
synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct Rambus dynamic RAM (DRDRAM), and Rambus dynamic RAM
(RDRAM), etc.
[0156] Technical features of the aforementioned embodiments are randomly
combinable, while
all possible combinations of the technical features in the aforementioned
embodiments
are not exhausted for the sake of brevity, but all these should be considered
to fall within
the scope recorded in the Description as long as such combinations of the
technical
features are not mutually contradictory.
26
Date Recue/Date Received 2022-05-24
CA 03162741 2022-05-24
[0157] The foregoing embodiments are merely directed to several modes of
execution of the
present application, and their descriptions are relatively specific and
detailed, but they
should not be hence misunderstood as restrictions to the inventive patent
scope. As should
be pointed out, persons with ordinary skill in the art may further make
various
modifications and improvements without departing from the conception of the
present
application, and all these should pertain to the protection scope of the
present application.
Accordingly, the patent protection scope of the present application shall be
based on the
attached Claims.
27
Date Recue/Date Received 2022-05-24