Method and system for cutting disconnected blocks of electronic fence

By cutting the intersection of electronic fences and the sorting method of Turf.js framework, the synchronization problem caused by multiple unconnected blocks is solved, and automated processing and normal synchronization are achieved.

CN119477937APending Publication Date: 2025-02-18DINGDANG KUAIYAO TECH GRP CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411543081.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When cutting electronic fences, the prior art may lead to multiple unconnected closed blocks, resulting in the inability to synchronize to the three-party platform, and it requires manual processing by business personnel.

Method used

By obtaining the intersection of the first and second electronic fence ranges, cropping out-of-range blocks, using the Turf.js framework to sort out closed blocks, retaining the blocks with the largest area, and automatically synchronizing to the three-party platform.

Benefits of technology

It realizes automated processing of multiple unconnected blocks, reducing the workload of business personnel and ensuring that fence data can be synchronized to the three-party platform normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477937A_ABST
    Figure CN119477937A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic fence disconnected block cutting method and system. The method comprises the following steps: acquiring a first electronic fence range and a second electronic fence range; taking an intersection of the first electronic fence range and the second electronic fence range to cut off fence blocks exceeding the first fence range in the second electronic fence range to obtain a plurality of disconnected closed fence blocks; arranging the plurality of closed fence blocks by utilizing a Turf.js framework, so that only one electronic fence with the largest area exists in the plurality of disconnected closed fence blocks within the range of the first electronic fence; and obtaining the coordinate of the closed fence block with the maximum area. Through the scheme of the invention, an automatic interception function can be realized without manual intervention, so that the workload of business personnel is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with application number 202310678829.6, application date June 8, 2023, and invention name "A method and system for clipping unconnected blocks of an electronic fence." Technical Field

[0002] The present invention generally relates to the field of electronic map technology, and more specifically, to a method and system for clipping unconnected blocks of an electronic fence. Background Art

[0003] Since the fence required by the third-party platform cannot exceed 5km from the center of the store, it is necessary to intersect the fence of the service provider itself and the 5km circle to cut off the fence blocks beyond the 5km range.

[0004] After cropping, the merged fence may form multiple closed independent small blocks in the same block, making it impossible to synchronize the fence to the third-party platform. This is because the third-party platform believes that only one closed fence block is allowed in a fence. If there are multiple closed fence blocks, the data will be considered illegal. Figure 1 As shown by the arrows. If the cut fence forms multiple independent blocks, the small blocks are deleted through the front-end algorithm, and the large block fence is retained, which eventually meets the data requirements of the three parties and updates the delivery fence.

[0005] When business personnel are merging the delivery ranges of multiple stores, due to the requirements of the third-party platform, the fence of each store cannot exceed the range of 5km with the store address as the center of the circle. If it exceeds the limit, it is necessary to intercept the limit. The fence block after interception often has multiple discontinuous closed blocks. When calling the fence synchronization to the third-party platform, the platform will return "non-compliant data", resulting in the inability to synchronize the subsequent fence data. Through the current technical solution, calculate whether there are multiple closed blocks in the fence data after merging and intercepting. If there are multiple closed non-adjacent blocks, split them first, delete the small blocks, and retain the large blocks to ensure that the store delivery data can be synchronized to the third-party platform normally.

[0006] The existing technical solutions have the following problems: 1. Changes to the fence at the delivery end may cause the fence to be intercepted and cannot be automatically synchronized to the three parties. 2. Business personnel are required to manually process, delete the problem block, and then manually trigger the synchronization fence. Summary of the invention

[0007] In order to at least solve the technical problems described in the above background technology section, the present invention proposes a method and system for cutting unconnected blocks of an electronic fence. By using the solution of the present invention, the accuracy of restoring the real path of the vehicle is improved when the ETC gantry information is missing. In view of this, the present invention provides solutions in the following aspects.

[0008] A first aspect of the present invention provides a method for clipping unconnected blocks of an electronic fence, comprising: obtaining a first electronic fence range and a second electronic fence range; taking the intersection of the first electronic fence range and the second electronic fence range to clip off fence blocks in the second electronic fence range that exceed the first fence range, thereby obtaining a plurality of unconnected closed fence blocks; using the Turf.js framework to organize the plurality of closed fence blocks so that there is only one closed fence block with the largest area within the first electronic fence range; and obtaining the coordinates of the closed fence block with the largest area.

[0009] In one embodiment, the closed fence block is organized using the Turf.js framework, including: calculating multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and calculating a line from the multiple lines that is completely non-intersecting with the closed fence block graphic as a reference line; cropping the reference line and the closed fence block to obtain multiple different cropping blocks; calculating the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and clearing the non-intersecting cropping blocks.

[0010] In one embodiment, the closed fence block is sorted using the Turf.js framework, including: applying the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and applying the booleanDisjoint function of the turf.js framework to calculate a line that is completely non-intersecting with the closed fence block graphic from the multiple lines as a reference line; applying the difference function of the turf.js framework to crop the reference line and the closed fence block to obtain multiple different cropping blocks; applying the area function of the turf.js framework to calculate the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and removing the non-intersecting cropping blocks.

[0011] In one embodiment, the first electronic fence range is an electronic fence range defined according to a preset rule.

[0012] In one embodiment, the second electronic fence range is an inherent electronic fence range defined according to business conditions.

[0013] The second aspect of the present invention provides an electronic fence unconnected block clipping system, comprising: an acquisition module, which acquires a first electronic fence range and a second electronic fence range; a clipping module, which takes the intersection of the first electronic fence range and the second electronic fence range to clip off the fence blocks in the second electronic fence range that exceed the first fence range, and obtain multiple unconnected closed fence blocks; a sorting module, which uses the Turf.js framework to sort the multiple closed fence blocks so that there is only one closed fence block with the largest area within the first electronic fence range; and a synchronization module, which obtains the coordinates of the closed fence block with the largest area.

[0014] In one embodiment, the closed fence block is organized using the Turf.js framework, including: calculating multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and calculating a line from the multiple lines that is completely non-intersecting with the closed fence block graphic as a reference line; cropping the reference line and the closed fence block to obtain multiple different cropping blocks; calculating the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and clearing the non-intersecting cropping blocks.

[0015] In one embodiment, the closed fence block is sorted using the Turf.js framework, including: applying the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and applying the booleanDisjoint function of the turf.js framework to calculate a line that is completely non-intersecting with the closed fence block graphic from the multiple lines as a reference line; applying the difference function of the turf.js framework to crop the reference line and the closed fence block to obtain multiple different cropping blocks; applying the area function of the turf.js framework to calculate the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and removing the non-intersecting cropping blocks.

[0016] In one embodiment, the first electronic fence range is an electronic fence range defined according to a preset rule.

[0017] In one embodiment, the second electronic fence range is an inherent electronic fence range defined according to business conditions.

[0018] Using the solution provided by the present invention, an algorithm is used to determine whether the fence to be merged and intercepted will have multiple non-adjacent blocks, and the multiple non-adjacent blocks are divided, and the block area is calculated, and the largest block is retained, and automatically synchronized to the three parties. The present invention fully considers the automatic interception function, does not require manual intervention, and reduces the workload of business personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0021] Figure 1 It is a diagram showing a method for cutting out unconnected blocks of an electronic fence according to an embodiment of the present invention;

[0022] Figure 2 It is a diagram showing a method for arranging blocks using the turf.js framework according to an embodiment of the present invention;

[0023] Figure 3 1 is a diagram showing a first block clipping process according to an embodiment of the present invention;

[0024] Figure 4 1 is a diagram showing a second block clipping process according to an embodiment of the present invention;

[0025] Figure 5 1 is a diagram showing a third block clipping process according to an embodiment of the present invention;

[0026] Figure 6 FIG. 4 is a diagram showing a fourth block cropping process according to an embodiment of the present invention;

[0027] Figure 7 1 is a diagram showing a fifth block cropping process according to an embodiment of the present invention;

[0028] Figure 8 2 is a diagram showing a block cropping process 6 according to an embodiment of the present invention;

[0029] Fig. 9 FIG. 4 is a diagram showing a system for cutting out disconnected blocks of an electronic fence according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0031] It should be understood that the terms "first", "second", "third" and "fourth" etc. in the claims, specifications and drawings of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0032] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the claims, the singular forms of "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in the specification of the present invention and the claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0033] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0034] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0035] In a first aspect of the present invention, a method for cutting out unconnected blocks of an electronic fence is provided. Figure 1 FIG. 2 is a diagram showing a method for clipping unconnected blocks according to an embodiment of the present invention. The method for clipping unconnected blocks according to an embodiment of the present invention can be summarized as comprising steps S100-S400:

[0036] Step S100: Acquire a first electronic fence range and a second electronic fence range;

[0037] Step S200: taking the intersection of the first electronic fence range and the second electronic fence range to cut off the fence blocks in the second electronic fence range that are beyond the first fence range, so as to obtain a plurality of unconnected closed fence blocks;

[0038] Step S300: using the Turf.js framework to sort out the multiple closed fence blocks, so that there is only one electronic fence with the largest area among the multiple unconnected closed fence blocks within the range of the first electronic fence;

[0039] Step S400: obtaining the coordinates of the electronic fence with the largest area.

[0040] In one embodiment of the present invention, the first electronic fence range is an electronic fence range defined according to a preset rule; and the second electronic fence range is a fixed electronic fence range defined according to business conditions.

[0041] In a preferred embodiment of the present invention, the first electronic fence range is a third-party platform, such as a food delivery platform, and is defined according to a preset rule, such as Figure 3 As shown in the figure, the first electronic fence range is a circular range with the target store as the center and a radius of 5km; the second electronic fence range is the business scope of the supplier platform itself, such as Figure 3 The irregular fence range in the upper left corner is an irregular fence range centered on the target store and within the business scope.

[0042] Since the fence required by the third-party platform cannot exceed 5km from the center of the store, and only one closed fence block is allowed in a fence, if there are multiple, the data will be considered illegal. When suppliers need to expand their business to third-party platforms, they need to intersect the electronic fence range specified by the third-party platform with the supplier's own fence to cut off the fence blocks that exceed the range specified by the third-party platform. However, after cutting, the merged fence may form multiple closed independent small blocks in the same block, for example Figure 3 In addition to the large block in the upper left corner, there is also a small block indicated by the arrow. The fence coordinates cannot be synchronized to the third-party platform because they do not comply with the regulations of the third-party platform.

[0043] It is understandable that the first electronic fence range is not limited to the third-party platform, but can also be defined by its own needs; the second electronic fence range is not limited to the inherent electronic fence range defined by business conditions, but can also be an electronic fence range generated by other means. Any situation involving cutting two electronic fences to generate multiple unconnected blocks should be included in the protection scope of the present invention.

[0044] Turf.js used in the above steps is a spatial geometry calculation library launched by mapbox, which is often used for geometric relationship analysis in geographic space and has powerful functions. However, Turf.js currently does not provide a method for clipping unconnected blocks that appear in electronic fences. Although Turf.js provides a variety of methods for determining the positional relationship between points, lines, and surfaces, and graphic operation methods based on this, it cannot solve the problem of clipping unconnected blocks well in practical applications. Therefore, the present invention realizes the unconnected block clipping function that meets business needs by itself on the basis of Turf.

[0045] In one embodiment of the present invention, the following steps are implemented by Turf.js framework to complete the clipping of unconnected blocks:

[0046] Calculating multiple intersection points of the closed fence block itself;

[0047] The plurality of intersection points are formed into a plurality of lines in pairs, and a line which does not completely intersect with the closed fence block graphic is calculated from the plurality of lines as a reference line;

[0048] Clipping the reference line and the closed fence block to obtain a plurality of different clipping blocks;

[0049] A clipping block with a maximum area is calculated from the multiple different clipping blocks; clipping blocks intersecting with the clipping block with the maximum area are merged together to obtain the electronic fence with the largest area; and non-intersecting clipping blocks are cleared.

[0050] In a preferred embodiment of the present invention, Figure 2 FIG. 2 is a diagram showing a method for arranging blocks using Turf.js according to an embodiment of the present invention. The method for arranging blocks using Turf.js according to the present invention can be summarized as comprising steps S301-S304:

[0051] Step S301: Apply the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself;

[0052] Step S302: The plurality of intersection points are formed into a plurality of lines in pairs, and the booleanDisjoint function of the turf.js framework is applied to calculate a line from the plurality of lines that is completely disjoint with the closed fence block graphic as a reference line;

[0053] Step S303: using the difference function of the turf.js framework to crop the reference line and the closed fence block, and obtaining a plurality of different cropped blocks;

[0054] Step S304: Apply the area function of the turf.js framework to calculate the largest area of ​​the cropping block from the multiple different cropping blocks; merge the cropping blocks intersecting with the largest area to obtain the electronic fence with the largest area; and remove the non-intersecting cropping blocks.

[0055] Specifically, Figure 4 As shown, after the first electronic fence range and the second electronic fence range are intersected as described above, two unconnected closed fence blocks are obtained. Figure 4 The large closed fence block in the lower left corner and the small closed fence block in the upper right corner are not connected to each other. Figure 4 Although a line appears between the lower left and upper right blocks, it is not necessary to draw the line. It is caused by jumping to point 23 (overlapping with point 26) after point 22 (overlapping with point 27) is drawn. In order to meet the data requirements of the three parties and update the delivery fence, it is necessary to delete the small blocks through the front-end algorithm for the multiple independent closed fence blocks formed by the cut fences, and retain the large block fences. The specific method is as follows:

[0056] The first step is to use the "kinks" method of the turf.js framework to find the set of intersection points of the block itself. Figure 5 As shown, the intersection points of the blocks are calculated by the kinks function of the turf.js framework, and the intersection points of each block are shown as multiple arrow marks in the figure.

[0057] The second step is to combine these intersection points into lines, and use the booleanDisjoint function to calculate a line that does not intersect with the existing block graphics. Figure 6 The line obtained by the calculation in (the line indicated by the arrow) is a non-intersecting line. It should be noted that two non-intersecting lines are actually generated in this calculation, coordinate 0 and coordinate 2, and coordinate 1 and coordinate 3. Here, only one line needs to be randomly obtained.

[0058] In the third step, the difference function is used to cut the two unconnected closed fence blocks obtained by intersecting the line obtained in the second step with the first electronic fence range and the second electronic fence range to obtain multiple different blocks. Figure 7 As shown, a total of two non-adjacent blocks are separated.

[0059] The fourth step is to Figure 7The two non-adjacent blocks obtained in the calculation are used to calculate the block with the largest area through the area function. If other blocks are cut out due to the cutting line, the blocks adjacent to the block with the largest area will be merged together. Finally, the non-adjacent blocks are cleared. The blocks obtained after this processing are as follows Figure 8 As shown. Get Figure 8 The coordinate points of the large and medium blocks can be pushed normally to third-party platforms.

[0060] Furthermore, the kinks function, boolean Disjoint function, difference function, and area function of the turf.js framework used in the above steps are used as follows:

[0061] 1. Kinks function: used to take a line string, multi-line string, multi-polygon or polygon and return all the points where they intersect.

[0062] Its parameters, types, and descriptions are as follows:

[0063] featureInFeature<(LineString|MultiLineString|MultiPolygon|Polygon)>inp utfeature

[0064] The following are examples of the application of the kinks function:

[0065] varpoly = turf.polygon([[

[0066] [-12.034835,8.901183],

[0067] [-12.060413,8.899826],

[0068] [-12.03638,8.873199],

[0069] [-12.059383,8.871418],

[0070] [-12.034835,8.901183] ]]);

[0072] varkinks=turf.kinks(poly);

[0073] / / addToMap

[0074] varaddToMap = [poly,kinks]

[0075] ReturnsFeatureCollection<point>self-intersections

[0076] 2. BooleanDisjoint function: returns (TRUE) if the intersection of two geometric figures is an empty set.

[0077] The parameters, types, and descriptions of the BooleanDisjoint function are as follows:

[0078] feature1(Geometry|Feature <any>)GeoJSONFeatureorGeometryfeature2(Geometry|Feature <any>)The following is an example of using the GeoJSONFeatureorGeometryBooleanDisjoint function:

[0079] varpoint=turf.point([2,2]);

[0080] varline=turf.lineString([[1,1],[1,2],[1,3],[1,4]]);

[0081] turf.booleanDisjoint(line,point);

[0082] / / =true

[0083] 3. Difference function: used to calculate the part that belongs to face 1 but not to face 2.

[0084] The parameters, types, and descriptions of the difference function are as follows:

[0085] polygon1Feature<(Polygon, MultiPolygon)>inputPolygon feature

[0086] polygon2Feature<(Polygon, MultiPolygon)>Polygonfeaturetodifferencefrompolygon1

[0087] The difference function is used as follows:

[0088] varpolygon1 = turf.polygon([[

[0089] [128,-26],

[0090] [141,-26],

[0091] [141,-21],

[0092] [128,-21],

[0093] [128,-26]

[0094] ]],{

[0095] "fill":"#F00",

[0096] "fill-opacity":0.1

[0097] });

[0098] varpolygon2=turf.polygon([[[126,-28],

[0099] [140,-28],

[0100] [140,-20],

[0101] [126,-20],

[0102] [126,-28]

[0103] ]],{

[0104] "fill":"#00F",

[0105] "fill-opacity":0.1

[0106] });

[0107] vardifference=turf.difference(polygon1,polygon2);

[0108] 4. Area function: used to get one or more features and return their area in square meters. The parameters, types, and descriptions of the area function are as follows:

[0109] geojsonGeoJSONinputGeoJSONfeature(s)

[0110] The following are some examples of the area function:

[0111] varpolygon = turf.polygon([[

[0112] [108.09876,37.200787], / / Note: The first and last coordinates of the polygon must be consistent [106.398901,33.648651],

[0113] [114.972103,33.340483],

[0114] [113.715685,37.845557],

[0115] [108.09876,37.200787] ]]);

[0117] vararea=turf.area(polygon).

[0118] It can be understood that the kinks function, booleanDisjoint function, difference function, and area function of the turf.js framework used in the above method are only used as examples, and any method that can achieve the function function through the turf.js framework should be included in the protection scope of the present invention.

[0119] based on Figure 1-Figure 8 The second aspect of the present invention further provides a system for cutting out unconnected blocks of an electronic fence; the system can be implemented Figure 1 Figure 1-Figure 8 The method described can achieve effective cutting of electronic fences; Fig. 9 As shown, the electronic fence unconnected block clipping system of the present invention includes:

[0120] An acquisition module 100 acquires a first electronic fence range and a second electronic fence range;

[0121] The clipping module 200 takes the intersection of the first electronic fence range and the second electronic fence range to clip the fence blocks in the second electronic fence range that are beyond the first fence range, thereby obtaining a plurality of unconnected closed fence blocks;

[0122] The sorting module 300 sorts the multiple closed fence blocks by using the Turf.js framework so that there is only one electronic fence with the largest area among the multiple unconnected closed fence blocks within the range of the first electronic fence;

[0123] The synchronization module 400 obtains the coordinates of the electronic fence with the largest area.

[0124] In one embodiment, the closed fence block is organized using the Turf.js framework, including: calculating multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and calculating a line from the multiple lines that is completely non-intersecting with the closed fence block graphic as a reference line; cropping the reference line and the closed fence block to obtain multiple different cropping blocks; calculating the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and clearing the non-intersecting cropping blocks.

[0125] In one embodiment, the closed fence block is sorted using the Turf.js framework, including: applying the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself; forming multiple lines by pairing the multiple intersection points, and applying the booleanDisjoint function of the turf.js framework to calculate a line that is completely non-intersecting with the closed fence block graphic from the multiple lines as a reference line; applying the difference function of the turf.js framework to crop the reference line and the closed fence block to obtain multiple different cropping blocks; applying the area function of the turf.js framework to calculate the cropping block with the largest area from the multiple different cropping blocks; merging the cropping blocks that intersect with the cropping block with the largest area together to obtain the electronic fence with the largest area; and removing the non-intersecting cropping blocks.

[0126] In one embodiment, the first electronic fence range is an electronic fence range defined according to a preset rule.

[0127] In one embodiment, the second electronic fence range is an inherent electronic fence range defined according to business conditions.

[0128] Although this specification has shown and described a plurality of embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will appreciate many changes, modifications and alternatives without departing from the thought and spirit of the present invention. It should be understood that in the process of practicing the present invention, various alternatives to the embodiments of the present invention described herein may be adopted. The attached claims are intended to define the scope of protection of the present invention, and therefore cover the modular compositions, equivalents or alternatives within the scope of these claims.< / any> < / any> < / point>

Claims

1. A method for cutting out disconnected blocks of an electronic fence, characterized in that: include: Acquire a first electronic fence range and a second electronic fence range; wherein the first electronic fence range is a third-party platform, and the second electronic fence range is a business scope of the supplier platform itself; Taking the intersection of the first electronic fence range and the second electronic fence range to cut off the fence blocks in the second electronic fence range that are beyond the first fence range, to obtain a plurality of unconnected closed fence blocks; Arrange the plurality of closed fence blocks by using the Turf.js framework so that only one electronic fence with the largest area exists among the plurality of unconnected closed fence blocks within the range of the first electronic fence; Get the coordinates of the largest geo-fence.

2. The method for cutting out unconnected blocks of an electronic fence according to claim 1, characterized in that: The method of using the Turf.js framework to organize the closed fence block includes: Calculating multiple intersection points of the closed fence block itself; The plurality of intersection points are formed into a plurality of lines in pairs, and a line which does not completely intersect with the closed fence block graphic is calculated from the plurality of lines as a reference line; Clipping the reference line and the closed fence block to obtain a plurality of different clipping blocks; A clipping block with a maximum area is calculated from the multiple different clipping blocks; clipping blocks intersecting with the clipping block with the maximum area are merged together to obtain the electronic fence with the largest area; and non-intersecting clipping blocks are cleared.

3. The method for cutting out unconnected blocks of an electronic fence according to claim 1, characterized in that: The use of the Turf.js framework to organize the closed fence block specifically includes: Applying the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself; The plurality of intersection points are formed into a plurality of lines in pairs, and a boolean Disjoint function of the turf.js framework is applied to calculate a line from the plurality of lines that is completely disjoint with the closed fence block graphic as a reference line; Applying the difference function of the turf.js framework to crop the reference line and the closed fence block, obtaining a plurality of different cropped blocks; The area function of the turf.js framework is applied to calculate the largest clipping block from the multiple different clipping blocks; the clipping blocks intersecting with the clipping block with the largest area are merged together to obtain the electronic fence with the largest area; and the non-intersecting clipping blocks are cleared.

4. The method for cutting out unconnected blocks of an electronic fence according to claim 1, characterized in that: The method further comprises: Use the "kinks" method of the turf.js framework to find the intersection point set of the block itself; The intersection points in the intersection point set are combined into lines in pairs, and a line that does not intersect the current block graph is calculated by the booleanDisjoint function; Using the difference function, a line that does not intersect the current block graphic is intersected with the first electronic fence range and the second electronic fence range to obtain two unconnected closed fence blocks, thereby separating two non-adjacent blocks; The two non-adjacent blocks are obtained by using the area function to calculate the block with the largest area, the non-adjacent blocks are cleared, the coordinate points of the large block are obtained, and the coordinate points of the large block are pushed to the third-party platform.

5. A system for cutting disconnected blocks of an electronic fence, characterized in that: include: An acquisition module is configured to acquire a first electronic fence range and a second electronic fence range; wherein the first electronic fence range is a third-party platform, and the second electronic fence range is a business range of the supplier platform itself; A clipping module, taking the intersection of the first electronic fence range and the second electronic fence range to clip the fence blocks in the second electronic fence range that are beyond the first fence range, to obtain a plurality of unconnected closed fence blocks; a sorting module, using the Turf.js framework to sort the multiple closed fence blocks, so that there is only one electronic fence with the largest area among the multiple unconnected closed fence blocks within the range of the first electronic fence; The synchronization module obtains the coordinates of the electronic fence with the largest area.

6. The electronic fence unconnected block cutting system according to claim 5, characterized in that: The collating module is further used for: Calculating multiple intersection points of the closed fence block itself; The plurality of intersection points are formed into a plurality of lines in pairs, and a line which does not completely intersect with the closed fence block graphic is calculated from the plurality of lines as a reference line; Clipping the reference line and the closed fence block to obtain a plurality of different clipping blocks; Calculate a clipping block with the largest area from the multiple different clipping blocks; Merge the clipping blocks intersecting with the clipping block with the largest area together to obtain the electronic fence with the largest area; Clear the non-intersecting clipping blocks.

7. The electronic fence unconnected block cutting system according to claim 6, characterized in that: The collating module is further used for: Applying the kinks function of the turf.js framework to calculate multiple intersection points of the closed fence block itself; The plurality of intersection points are formed into a plurality of lines in pairs, and a boolean Disjoint function of the turf.js framework is applied to calculate a line from the plurality of lines that is completely disjoint with the closed fence block graphic as a reference line; Applying the difference function of the turf.js framework to crop the reference line and the closed fence block, obtaining a plurality of different cropped blocks; Applying the area function of the turf.js framework to calculate the largest area of ​​the clipping block from the multiple different clipping blocks; merging the clipping blocks intersecting with the largest area of ​​the clipping block to obtain the largest area of ​​the electronic fence; Clear the non-intersecting clipping blocks.

8. The electronic fence unconnected block cutting system according to claim 6 or 7, characterized in that: The first electronic fence range is an electronic fence range defined according to preset rules.

9. The electronic fence unconnected block cutting system according to claim 6 or 7, characterized in that: The second electronic fence range is an inherent electronic fence range defined according to business conditions.

10. The electronic fence unconnected block cutting system according to claim 6, characterized in that: The collating module is further used for: Use the "kinks" method of the turf.js framework to find the intersection point set of the block itself; The intersection points in the intersection point set are combined into lines in pairs, and a line that does not intersect the current block graph is calculated by the booleanDisjoint function; Using the difference function, a line that does not intersect the current block graphic is intersected with the first electronic fence range and the second electronic fence range to obtain two unconnected closed fence blocks, thereby separating two non-adjacent blocks; The two non-adjacent blocks are obtained by using the area function to calculate the block with the largest area, the non-adjacent blocks are cleared, the coordinate points of the large block are obtained, and the coordinate points of the large block are pushed to the third-party platform.

Citation Information

Cited By

  • Method and system for cutting disconnected blocks of electronic fence

    CN116805321A

  • An electronic fence non-connected block clipping method and system

    CN116805321B