Distributed GEO fence implementation method and management system based on edge computing

Through dynamic space allocation and edge node collaborative matching, combined with Voronoi graph optimization and spatiotemporal indexing, the load balancing and event consistency problems in edge geofencing solutions are solved, and efficient and low-latency distributed geofen management is achieved, improving the adaptability and stability of the system.

CN120416286APending Publication Date: 2025-08-01GUANGZHOU ZHIHUI NEW TERRITORIES SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510638905.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing edge geofencing scheme has shortcomings in dynamic load balancing, cross-node event consistency management, and spatial resource allocation, resulting in system performance degradation.

Method used

Through the combination of dynamic space allocation, edge node collaborative matching and cloud indicator monitoring, the Voronoi graph optimization algorithm is used to divide the molecular fence, and the device location data is processed through dynamic spatiotemporal indexing and differentiated matching strategies to achieve efficient and low-latency distributed geofence management.

Benefits of technology

It improves the load balancing capability, space utilization and adaptability of the system, solves the problems of event conflicts and repeated reporting across node boundary areas, and ensures the efficient stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416286A_ABST
    Figure CN120416286A_ABST
Patent Text Reader

Abstract

The invention provides a distributed GEO fence implementation method and system based on edge computing, and relates to the technical field of electronic fences, and the method comprises the steps: carrying out the dynamic space distribution of a global fence, and generating a jurisdiction of each edge node; in each edge node, constructing a dynamic spatial-temporal index according to the corresponding sub-fence and the overlapping region, screening a device position reported in the jurisdiction region through the dynamic spatial-temporal index, and generating a to-be-matched data stream with a region label; performing differential matching according to the region label of the to-be-matched data stream, generating a primary event for a non-overlapping region and a secondary event for an overlapping region, and uploading the primary event and the secondary event to a cloud center; the multi-index characteristics of the primary events and the secondary events are counted, when any index characteristic exceeds the corresponding preset condition, dynamic space redistribution is triggered, and the high-efficiency, low-delay and strong-self-adaption distributed geofence is achieved in the mode that dynamic space distribution, edge node collaborative matching and cloud index monitoring are combined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic fences, and particularly to a method and system for implementing a distributed GEO fence based on edge computing. Background Art

[0002] With the rapid development of the Internet of Things (IoT) and edge computing technologies, more and more application scenarios have put forward higher requirements for real-time, low-latency, and highly reliable data processing. As an important part of location-aware services, geographical fences (GEO fences) are widely used in multiple fields such as intelligent transportation, smart logistics, public safety, and environmental monitoring. Traditional center-cloud-based geographical fence systems often face problems such as large network bandwidth pressure, high response latency, and overloaded central nodes when facing large-scale device access and high-frequency location updates, and it is difficult to meet the current complex and changing business requirements.

[0003] To solve the above problems, in recent years, there have emerged methods for implementing geographical fences that combine edge computing with a distributed architecture. By sinking some computing tasks from the cloud to edge nodes close to the data source, this method can effectively reduce communication latency and improve the real-time performance and scalability of the system.

[0004] However, existing edge geographical fence solutions still have deficiencies in dynamic load balancing, cross-node event consistency management, and spatial resource allocation. For example, there is a lack of an effective cooperation mechanism between edge nodes, and event duplicate reporting or missed reporting is likely to occur in the boundary area; at the same time, static spatial partitioning strategies cannot adapt to changing business loads and geographical location characteristics, resulting in a decline in the overall performance of the system.

[0005] Therefore, it is necessary to provide a method and system for implementing a distributed GEO fence based on edge computing to solve the above technical problems. Summary of the Invention

[0006] To solve the above technical problems, the present invention provides a method and system for implementing a distributed GEO fence based on edge computing, which realizes a highly efficient, low-latency, and strongly adaptive distributed geographical fence through a combination of dynamic space allocation, edge node collaborative matching, and cloud metric monitoring.

[0007] The present invention provides a method for implementing a distributed GEO fence based on edge computing, including a cloud center and multiple edge nodes deployed within a target area, and the method includes the following steps: Performing dynamic space allocation on the global fence stored in the cloud center to generate the jurisdiction areas of each edge node, where the jurisdiction area includes sub-fences and overlapping areas between the sub-fences of adjacent edge nodes; In each edge node, a dynamic spatio-temporal index is constructed according to the corresponding sub-fence and overlapping area, and the device locations reported within the jurisdiction area are filtered through the dynamic spatio-temporal index to generate a data stream to be matched with area labels, where the area labels include overlapping areas and non-overlapping areas; Differential matching is performed according to the area labels of the data stream to be matched, generating primary events for non-overlapping areas and secondary events for overlapping areas and uploading them to the cloud center; In the cloud center, multi-index features of the primary events and secondary events are statistically analyzed, and when any index feature exceeds the corresponding preset condition, dynamic space reallocation is triggered.

[0008] Preferably, the dynamic space allocation includes: According to the physical locations of the edge nodes and the geometry of the global fence, the global fence is divided into several sub-fences through the Voronoi diagram optimization algorithm, and each sub-fence is assigned to the edge node closest to its geometric centroid; An overlapping area is generated between adjacent sub-fences, where the calculation formula for the width of the overlapping area is: Where, is the width of the overlapping area, is the convexity parameter of the global fence, is the real-time load rate of the edge node, and are the weight coefficients of the convexity parameter and the real-time load rate respectively.

[0009] Preferably, the specific steps of dividing the global fence into several sub-fences through the Voronoi diagram optimization algorithm include: Calculate the geometric centroid of each polygon area of the global fence as the reference point for generating the Voronoi diagram, where the calculation of the geometric centroid introduces the real-time load rate of the edge node as a weight factor; Associate the physical location of the edge node with the geometric centroid to generate Voronoi diagram cells; Perform boundary fusion on the polygon areas of the global fence that intersect with the same Voronoi diagram cell to form continuous sub-fences.

[0010] Preferably, the step of constructing a dynamic spatio-temporal index according to the corresponding sub-fence and overlapping area in each edge node and filtering the device locations reported within the jurisdiction area through the dynamic spatio-temporal index to generate a data stream to be matched with area labels includes: Based on the overlapping area between the sub-fence and its adjacent edge nodes, a dynamic spatio-temporal index with time stamps and spatial coordinates as dimensions is constructed for each edge node; The location information reported by the device is mapped to the dynamic spatio-temporal index in real time, the type of the sub-fence area it falls into is judged, and corresponding area labels are generated according to whether it is in the overlapping area; Classify and output the data with area labels to form data streams to be matched corresponding to non-overlapping areas and overlapping areas respectively.

[0011] Preferably, the specific steps of performing differential matching according to the area labels of the data streams to be matched include: For the data stream marked as a non-overlapping area, match the geometric boundary of its sub-fence by the ray method to generate a primary event including the device ID, fence ID and trigger time; For the data stream marked as an overlapping area, perform the following operations: a) Request the real-time status of the associated sub-fences in the overlapping area from adjacent edge nodes through the gRPC protocol, where the real-time status includes the sub-fence activation status and the device entry / exit event queue; b) Perform timing arbitration on the real-time status returned by multiple edge nodes based on the logical clock, and generate a secondary event after resolving conflicts; Upload the primary event and the secondary event to the cloud center.

[0012] Preferably, multi-metric features of the primary event and the secondary event are statistically analyzed, including: Statistically analyze the first metric for the primary event, where the first metric is the trigger frequency of the primary event; Statistically analyze the second metric for the secondary event, where the second metric is the trigger frequency of the secondary event; Statistically analyze the resource load metrics for each edge node, where the resource load metrics include CPU utilization rate, memory occupancy rate and network throughput.

[0013] Preferably, when any metric feature exceeds the corresponding preset condition, dynamic space reallocation is triggered, including: If the first metric and / or the second metric exceeds the limit, adjust the convexity parameter of the overlapping area and the weight coefficient of the real-time load rate; If the resource load metric exceeds the limit, adjust the weight factor of the Voronoi diagram unit.

[0014] Preferably, the adjustment of the weight coefficient includes: For the primary event, when the trigger frequency exceeds the first threshold, adjust the weight coefficient according to the following rules: ; Wherein, is the trigger frequency per unit time in the non-overlapping area, is the first threshold, is the adjustment coefficient, and are the weight coefficient of the adjusted convexity parameter and the weight coefficient of the real-time load rate, respectively; For secondary events, when the trigger frequency exceeds the second threshold, the weight coefficient is adjusted according to the following rules: ; wherein, is the trigger frequency per unit time in the overlapping area, is the second threshold, is the adjustment coefficient, and are the weight coefficient of the adjusted convexity parameter and the weight coefficient of the real-time load rate, respectively; If the trigger frequencies of both the primary event and the secondary event exceed the limit, the weight coefficient in the secondary event is preferentially adjusted.

[0015] Preferably, the adjustment of the weight factor includes: When any resource load index exceeds its preset threshold, it is determined that the resource load exceeds the limit; According to the exceeded resource load index, the weight factor for calculating the geometric centroid is adjusted according to the following rules, ; wherein, is the weight factor of the th edge node, is the comprehensive load rate of the th edge node, , and are the weight coefficients of the CPU utilization rate U, the memory occupancy rate and the network throughput respectively, is the anti-zero constant.

[0016] The present invention also provides a distributed GEO fence implementation system based on edge computing for executing the described distributed GEO fence implementation method based on edge computing, including a cloud center and multiple edge nodes deployed within a target area, and the system includes: A global fence dynamic allocation module for dynamically allocating the global fence stored in the cloud center in terms of space to generate the jurisdiction areas of each edge node, where the jurisdiction area includes a sub-fence and an overlapping area between the sub-fences of adjacent edge nodes; A spatio-temporal index construction module for constructing a dynamic spatio-temporal index in each edge node according to the corresponding sub-fence and overlapping area, and screening the device locations reported within the jurisdiction area through the dynamic spatio-temporal index to generate a data stream to be matched with area tags, where the area tags include overlapping areas and non-overlapping areas; A differential event matching module, which is used to perform differential matching according to the area tags of the data stream to be matched, generate primary events for non-overlapping areas and secondary events for overlapping areas, and upload them to the cloud center; A reallocation trigger module, which is used to count the multi-index features of the primary events and secondary events in the cloud center, and trigger dynamic space reallocation when any index feature exceeds the corresponding preset condition.

[0017] Compared with related technologies, a distributed GEO fence implementation method and system based on edge computing provided by the present invention have the following beneficial effects: By introducing a dynamic space allocation mechanism and a Voronoi diagram optimization algorithm, the present invention can intelligently divide the global fence into multiple sub-fences according to the physical positions and real-time load conditions of edge nodes, and construct reasonable overlapping areas between adjacent sub-fences, thereby improving the load balancing ability and space utilization rate of the system. At the same time, each edge node efficiently filters and tags device positions based on a dynamic spatio-temporal index, and combines a differential matching strategy to effectively solve the problems of event conflicts and duplicate reports in cross-node boundary areas. The cloud center triggers dynamic space reallocation when the system performance or load is abnormal by statistically analyzing the multi-dimensional features of primary events and secondary events, further enhancing the self-adaptability and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flowchart of a distributed GEO fence implementation method based on edge computing provided by the present invention; Figure 2 It is a module structure diagram of a distributed GEO fence implementation system based on edge computing provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all structures. In addition, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0020] It should also be noted that, for ease of description, only the parts related to the present invention rather than all the content are shown in the drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, and so on.

[0021] Embodiment 1 The present invention adopts a two - layer distributed architecture of cloud - edge collaboration to achieve efficient geofence management through clear division of responsibilities. The cloud center is deployed as a global management node on the central cloud platform, mainly responsible for four core functions: First, maintaining the versioned storage and on - demand distribution of global fence data, storing in GeoJSON / WKT format and only pushing the changed parts to reduce bandwidth consumption; Second, performing dynamic spatial allocation scheduling, generating sub - fence and overlapping area allocation schemes through the Voronoi diagram optimization algorithm, and dynamically adjusting weight parameters according to real - time metrics; Third, analyzing event data in real - time through the Flink engine to count key metrics such as trigger frequency and conflict rate; Fourth, monitoring the health status of the system to achieve automatic isolation of faulty nodes and data persistent backup. The edge nodes are distributed in each target area, mainly undertaking tasks such as real - time data processing, local fence matching, resource load monitoring, and edge collaboration, including filtering invalid device data, coordinate transformation, building an efficient spatio - temporal index, executing a differential fence matching algorithm, and real - time monitoring and reporting resource usage.

[0022] It achieves efficient operation through a clear collaboration mechanism: The edge nodes collect CPU, memory, and network metrics per second and report to the cloud immediately when detecting resource overload; The cloud center comprehensively analyzes the status of each node and event characteristics, dynamically adjusts the spatial allocation strategy and issues execution instructions. This architecture design not only ensures the overall optimization of global resources by the cloud but also fully utilizes the real - time advantage of edge computing, enabling the system to support million - level fence management while ensuring millisecond - level response for local event processing. Through the organic combination of centralized data analysis and distributed computing, the system realizes the maximization of resource efficiency, reduces the cloud bandwidth consumption, ensures the reliability and scalability of the service, and new edge nodes can be seamlessly connected to the existing architecture without affecting the overall performance.

[0023] Specifically, the present invention provides a distributed GEO fence implementation method based on edge computing, referring to Figure 1 as shown, the method includes the following steps: S1: Dynamically allocate the global fence stored in the cloud center to generate the jurisdiction areas of each edge node, where the jurisdiction area includes sub-fences and the overlapping areas between adjacent edge node sub-fences.

[0024] Specifically, in step S1, the dynamic space allocation includes: S11: Divide the global fence into several sub-fences through the Voronoi diagram optimization algorithm according to the physical positions of the edge nodes and the geometric shape of the global fence, and allocate each sub-fence to the edge node closest to its geometric centroid.

[0025] In the technical solution of this application, the purpose of step S11 is to generate sub-fences with reasonable spatial distribution according to the shape characteristics of the global fence; reduce the jurisdiction pressure of high-load nodes by dynamically adjusting the centroid offset; eliminate the internal boundaries of the sub-fences and avoid jurisdiction blind spots.

[0026] Specifically, in step S11, the specific steps of dividing the global fence into several sub-fences through the Voronoi diagram optimization algorithm include: First, calculate the geometric centroid of each polygon area of the global fence as the reference point for generating the Voronoi diagram, where the calculation of the geometric centroid introduces the real-time load rate of the edge node as a weight factor.

[0027] In this embodiment, calculate the geometric centroid of each global fence polygon and introduce the real-time load rate of the edge node as a weight factor for correction, so that the centroid coordinates shift towards the low-load node. Exemplarily, when the actual area of a certain polygon is 5000 square meters and the convex hull area is 6000 square meters, the convexity parameter is calculated as 0.17; when the node load rate is 0.8, the centroid coordinates are corrected by a preset offset (such as 10 meters) to ( ).

[0028] Second, associate the physical positions of the edge nodes with the geometric centroid to generate Voronoi diagram cells.

[0029] In this embodiment, then associate the corrected weighted centroid with the edge node positions, and use the Fortune algorithm to generate Voronoi diagram cells to ensure that the distance from any point in each cell to the associated node is the smallest.

[0030] More specifically, the specific process of generating Voronoi diagram cells using the Fortune algorithm is as follows: First, based on the set of corrected weighted centroid coordinates and the physical positions of the edge nodes, dynamically construct the Voronoi diagram using the sweep line algorithm (Fortune algorithm). Gradually generate Voronoi cells by maintaining a vertical sweep line (moving from left to right) and an event queue (including site events and circle events).

[0031] When the scan line moves to a weighted centroid point, a site event is triggered, generating a parabola perpendicular to the scan line. This parabola represents the boundary where the distances to the current centroid point and the scan line are equal. As the scan line continues to move, the parabolas generated by adjacent centroid points intersect to form breakpoints, and the breakpoints are connected to form Voronoi edges. When three adjacent parabolas form a closable circle event, the algorithm generates new Voronoi vertices and updates the boundary. Finally, after all events are processed, Voronoi diagram cells are formed based on the weighted centroid points, and the weighted distance (considering both physical distance and load rate) from any point within each cell to the corresponding edge node is minimized.

[0032] Exemplarily, for 3 weighted centroid points (the corrected coordinates are P1, P2, and P3), the algorithm generates 3 Voronoi cells, and the cell boundaries accurately reflect the weighted spatial competition relationship among the centroids, ensuring that the jurisdiction range of high-load nodes shrinks towards low-load areas.

[0033] Finally, boundary fusion is performed on the polygon areas of the global fences that intersect with the same Voronoi diagram cell to form continuous sub-fences.

[0034] In this embodiment, for multiple fence polygons that intersect with the same Voronoi cell, the Clipper library is used to perform polygon merging operations to eliminate internal boundaries and form continuous sub-fences. Exemplarily, a certain Voronoi cell intersects with two polygons, and a continuous sub-fence of 2000 square meters is generated after merging.

[0035] S12: Generate an overlapping area between adjacent sub-fences, where the calculation formula for the width of the overlapping area is: Where, is the width of the overlapping area, is the convexity parameter of the global fence, is the real-time load rate of the edge node, and are the weight coefficients of the convexity parameter and the real-time load rate respectively.

[0036] In the technical solution of this application, the purpose of step S12 is to provide a buffer for multi-node collaborative matching, reduce cross-node communication conflicts; dynamically adjust the range of the overlapping area according to the fence complexity and node load; and ensure that the union of the overlapping area and the sub-fence covers the global fence.

[0037] Specifically, step S12 includes the following content: When generating the overlapping area between adjacent sub-fences, first calculate the convexity parameter of the global fence, and quantify the shape complexity by the ratio of the actual area to the convex hull area. When the actual area of a concave polygon is 800 square meters and the convex hull area is 1000 square meters, the convexity parameter is 0.2. At the same time, the CPU utilization rate, memory occupancy rate, and network throughput of the edge nodes are collected in real time, and the comprehensive load rate is calculated according to the weight coefficients (default CPU 0.6, memory 0.3, network 0.1). For example, when the node CPU is 85%, memory is 70%, and network is 60%, the comprehensive load rate is 0.81.

[0038] Calculate the width of the overlapping area based on the above formula. When C = 0.2, L = 0.8, and α = 0.6, β = 0.4, an overlapping area with a width of 440 meters is generated. Finally, buffer and calculate the width outward along the boundary of the sub-fence, and use the GEOS library to verify the global coverage integrity to ensure there is no jurisdictional blind area. Exemplarily, when the distance between adjacent sub-fences is 500 meters, a 440-meter overlapping area is generated and 100% coverage is verified, achieving the optimization goal of cross-node collaboration and load balancing.

[0039] S2: In each edge node, construct a dynamic spatio-temporal index according to the corresponding sub-fence and overlapping area, and filter the device positions reported within the jurisdiction area through the dynamic spatio-temporal index to generate a data stream to be matched with area tags, where the area tags include overlapping areas and non-overlapping areas.

[0040] Specifically, step S2 includes the following steps: S21: Based on the overlapping area between the sub-fence and its adjacent edge nodes, construct a dynamic spatio-temporal index with time stamps and spatial coordinates as dimensions for each edge node.

[0041] In this embodiment, based on the overlapping area between the sub-fence and adjacent nodes, construct a spatio-temporal R-tree index with time stamps and spatial coordinates as dimensions for each edge node. This index combines the time range (such as the UTC time window) with the spatial range (such as the minimum bounding rectangle MBR of the sub-fence boundary) to support efficient multi-dimensional data queries.

[0042] Exemplarily, the index of a certain node includes the non-overlapping area MBR (longitude 116.3, 116.5, latitude 39.8, 40.0) and the overlapping area MBR (longitude 116.45, 116.55, latitude 39.85, 40.05). When the sub-fence is adjusted due to dynamic reallocation, the index is synchronized in real time through an incremental update strategy (such as deleting the old MBR and inserting the new MBR), and the update time is controlled within 50 milliseconds. To improve performance, the location data reported by the device is batch inserted into the index according to a 1-second time window, and at the same time, the index nodes of the hot spots with high-frequency access (such as the alarm-intensive area) are cached in memory to reduce the disk I / O overhead, achieving a throughput of 100,000 queries per second.

[0043] S22: Map the location information reported by the device to the dynamic spatio-temporal index in real time, determine the type of the sub-fence area it falls into, and generate corresponding area labels according to whether it is in the overlapping area.

[0044] In this embodiment, subsequently, the location information reported by the device undergoes data preprocessing, including coordinate system conversion (GCJ-02 to WGS84) and data cleaning (filtering out invalid data with positioning accuracy > 10 meters or timestamp deviation > 5 seconds). For example, the original coordinates (116.407526, 39.904030) are converted to WGS84 standard coordinates (116.410000, 39.906000), and the data is retained when the error is 2 meters. The cleaned data is used for spatial range query through the spatio-temporal R-tree index to determine the type of the area it falls into: if the coordinates hit both the non-overlapping area and the MBR of the overlapping area, it is marked as overlapping area data (such as the coordinates 116.48, 39.95 hitting both non-overlapping area A and overlapping area AB), otherwise it is marked as non-overlapping area data, and the data that does not hit any area is directly discarded.

[0045] S23: Classify and output the data with area labels to form data streams to be matched corresponding to non-overlapping areas and overlapping areas respectively.

[0046] In this embodiment, the data stream with area labels is classified and output through a dual-queue mechanism: the data in the non-overlapping area enters the FIFO queue and is directly pushed to the local rule engine to trigger a low-latency response (latency < 50ms); the data in the overlapping area is stored in a priority queue sorted by timestamp and waits for cross-node collaborative processing (latency < 200ms).

[0047] Exemplarily, Apache Kafka is used to send non-overlapping data to Topic_A and overlapping data to Topic_B. To ensure stability, when the queue load exceeds 80%, a backpressure mechanism is enabled to dynamically reduce the speed, and the unprocessed data during abnormal interruption is persisted to the local SSD and replayed after recovery.

[0048] S3: Perform differential matching according to the area labels of the data streams to be matched, generate primary events for non-overlapping areas and secondary events for overlapping areas, and upload them to the cloud center.

[0049] Specifically, the execution process of the differential matching in step S3 includes: First, for the data stream marked as the non-overlapping area, match the geometric boundary of its affiliated sub-fence through the ray method to generate primary events including device ID, fence ID, and trigger time.

[0050] In this embodiment, the device location data in the non-overlapping area is quickly geometrically matched by the ray method: a horizontal ray is emitted from the device coordinate point, and the number of intersections with the sub-fence boundary is counted. If the number is odd, it is determined to enter the fence; if even, it is to leave. For example, after the device coordinate (116.410000, 39.906000) hits the minimum bounding rectangle (MBR) of sub-fence A, the number of intersections is calculated 3 times (odd) by the ray method, triggering an "enter" event. To improve efficiency, pre-computed bounding box screening and parallel computing optimization are adopted, supporting 100,000 matches per second. The local rule engine realizes a response within 30 milliseconds through the Redis caching strategy (such as generating an alarm or a device control instruction). The event format includes the device ID, fence ID, timestamp, and action type.

[0051] Secondly, for the data stream marked as the overlapping area, the following operations are performed: For the data stream in the overlapping area, the real-time status is requested from adjacent nodes through the gRPC protocol. For example, a request containing the overlapping area ID, the list of adjacent nodes, and the local logical clock is sent (such as the OverlapRequest message body).

[0052] The adjacent node returns the sub-fence activation status and the device entry / exit event queue (such as OverlapResponse contains the "active" status and the event queue), and performs timing arbitration based on the Lamport logical clock: if node A returns a logical clock = 5 and a status = "active", and node B returns a clock = 6 and a status = "inactive", then the status of the higher clock node B is taken as the standard, and secondary events are generated after merging and the conflict resolution result is marked. The conflict resolution process sorts the event queue by timestamp and uses the majority voting mechanism to reduce 90% of the status inconsistency problems.

[0053] Finally, the primary event and the secondary event are uploaded to the cloud center.

[0054] In this embodiment, after the event generation is completed, 1000 events per batch are packed through the ZSTD compression algorithm (compression rate ≥ 50%) and transmitted to the cloud center using HTTP / 2 streaming. If the network is abnormal, the unconfirmed events are persisted to the local SSD and retained for 7 days, and retransmitted after recovery. The cloud stores the events through the InfluxDB time series database and statistically calculates the trigger frequency metrics in real time based on the Flink engine (such as an alarm is triggered when the frequency in the non-overlapping area exceeds 100 times per minute).

[0055] S4: In the cloud center, multi-metric features of the primary event and the secondary event are statistically calculated. When any metric feature exceeds the corresponding preset condition, dynamic space reallocation is triggered.

[0056] Specifically, in step S4, multi-index features of the primary events and secondary events are statistically analyzed, including: Statistical analysis is performed on the primary events for a first index, where the first index is the trigger frequency of the primary events.

[0057] In this embodiment, for the data stream in the non-overlapping region, a 5-minute sliding time window is adopted to calculate the number of events per unit time in real time. For example, if 900 primary events are captured within the window, the trigger frequency . When the frequency exceeds the first threshold ( =2 times / second), the convexity weight coefficient α is dynamically adjusted according to the formula. The specific adjustment rule is , where the adjustment coefficient is set to 0.2 through experiments. For example, when α = 0.5 originally, =3 times / second will result in =0.6, thereby expanding the overlapping region range to share the pressure in the non-overlapping region. Since , the adjusted is obtained.

[0058] Statistical analysis is performed on the secondary events for a second index, where the second index is the trigger frequency of the secondary events.

[0059] In this embodiment, for the data stream in the overlapping region, the same sliding time window is adopted to calculate the number of events per unit time in real time. For example, if 720 sub-primary events are counted within the window, the trigger frequency . When this frequency exceeds the second threshold (such as =2 times / second), the weight coefficient of the real-time load rate is preferentially adjusted, and the convexity weight coefficient is dynamically adjusted according to the formula. The specific adjustment rule is , where the adjustment coefficient is set to 0.3 through experiments. For example, when originally =0.5, the adjusted =0.56. Since , the adjusted is obtained, thereby reducing the overlapping region to reduce the collaborative overhead. If both the primary and secondary frequencies exceed the limit, the secondary events are preferentially processed to ensure the system cooperation efficiency.

[0060] Statistical analysis is performed on each edge node for a resource load index, where the resource load index includes CPU utilization rate, memory occupancy rate, and network throughput.

[0061] Specifically, this step is as follows: If the resource load index exceeds the limit, the weight factor of the Voronoi diagram unit is adjusted.

[0062] Specifically, the adjustment of the weight factor includes: When any resource load indicator exceeds its preset threshold, it is determined that the resource load is overlimit.

[0063] According to the overlimit resource load indicator, adjust the weight factor for calculating the geometric centroid according to the following rules, ; Wherein, is the weight factor of the th edge node, is the comprehensive load rate of the th edge node, , and are the weight coefficients of CPU utilization rate U, memory occupancy and network throughput respectively, is the anti-zero constant.

[0064] In this embodiment, the edge node collects CPU utilization rate, memory occupancy and network throughput per second. When any resource indicator (CPU, memory, network) exceeds the preset threshold, it indicates that the edge node is in an overloaded state. If not adjusted in time, it will lead to: The event processing delay increases (for example, the fence matching response deteriorates from 50ms to 500ms) The collaborative matching failure rate rises (for example, the gRPC request timeout rate exceeds 20%) The risk of node cascading failure (the overloaded node may cause chain overload of adjacent nodes) Therefore, it will trigger the dynamic adjustment of the weight factor and optimize the sub-fence allocation.

[0065] During dynamic adjustment, first calculate the comprehensive load rate of the edge node in real time using the above formula, and then calculate the weight factor of the edge node according to the formula.

[0066] Embodiment Two The present invention also provides a distributed GEO fence implementation system based on edge computing for executing the described distributed GEO fence implementation method based on edge computing, including a cloud center and multiple edge nodes deployed within a target area. Referring to Figure 2 shown, the system includes: A global fence dynamic allocation module 100 for dynamically allocating the global fence stored in the cloud center in space to generate the jurisdiction areas of each edge node, where the jurisdiction area includes sub-fences and the overlapping areas between sub-fences of adjacent edge nodes.

[0067] The spatio-temporal index construction module 200 is used to construct a dynamic spatio-temporal index in each edge node according to the corresponding sub-fence and overlapping area, and filter the device positions reported within the jurisdiction area through the dynamic spatio-temporal index to generate a data stream to be matched with area labels, where the area labels include overlapping areas and non-overlapping areas.

[0068] The differential event matching module 300 is used to perform differential matching according to the area labels of the data stream to be matched, generate primary events for non-overlapping areas and secondary events for overlapping areas, and upload them to the cloud center.

[0069] The reallocation trigger module 400 is used to count the multi-index features of the primary events and secondary events in the cloud center, and trigger dynamic space reallocation when any index feature exceeds the corresponding preset condition.

[0070] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0071] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.

[0072] It should also be noted that the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the element.

Claims

1. A distributed GEO fence implementation method based on edge computing, including a cloud center and multiple edge nodes deployed inside the target area, characterized in that, The method comprises the following steps: Dynamically allocating space on the global fence stored in the cloud center to generate a jurisdiction of each edge node, wherein the jurisdiction includes sub-fences and overlapping areas between sub-fences of adjacent edge nodes; In each edge node, a dynamic spatiotemporal index is constructed based on the corresponding sub-fences and overlapping areas. The dynamic spatiotemporal index is used to filter the reported device locations within the jurisdiction to generate a data stream with a region label to be matched, where the region label includes overlapping and non-overlapping areas. Perform differential matching based on the regional labels of the data stream to be matched, generate primary events for non-overlapping areas and secondary events for overlapping areas, and upload them to the cloud center; In the cloud center, multi-index features of the primary events and secondary events are counted, and when any of the index features exceeds the corresponding preset conditions, dynamic space reallocation is triggered.

2. The method for implementing a distributed GEO fence based on edge computing according to claim 1, wherein The dynamic space allocation includes: According to the physical location of the edge nodes and the geometric shape of the global fence, the global fence is divided into several sub-fences through the Voronoi diagram optimization algorithm, and each sub-fence is assigned to the edge node closest to its geometric centroid; An overlapping area is generated between adjacent sub-fences, where the width of the overlapping area is calculated as follows: Among them, is the width of the overlapping area, is the convexity parameter of the global fence, is the real-time load rate of the edge node, and are the weight coefficients of the convexity parameter and the real-time load rate respectively.

3. The distributed GEO fence implementation method based on edge computing according to claim 2, characterized in that The specific steps of dividing the global fence into several sub-fences by the Voronoi diagram optimization algorithm include: Calculate the geometric centroid of each polygonal area of the global fence as the reference point for generating the Voronoi diagram, wherein the calculation of the geometric centroid introduces the real-time load rate of the edge node as a weight factor; Associating the physical location of the edge node with the geometric centroid to generate a Voronoi diagram cell; The polygonal areas of the global fence that intersect with the same Voronoi diagram cell are merged to form continuous sub-fences.

4. A method for implementing a distributed GEO fence based on edge computing according to claim 3, characterized in that, In each edge node, a dynamic spatiotemporal index is constructed based on the corresponding sub-fences and overlapping areas, and the device locations reported within the jurisdiction are filtered using the dynamic spatiotemporal index to generate a data stream to be matched with a regional tag, including: Based on the overlapping area between the sub-fence and its adjacent edge nodes, a dynamic spatiotemporal index with timestamp and spatial coordinates as dimensions is constructed for each edge node; Mapping the location information reported by the device to the dynamic spatiotemporal index in real time, determining the type of sub-fence area it falls into, and generating a corresponding area label based on whether it is in an overlapping area; The data with region labels are classified and output to form data streams to be matched corresponding to non-overlapping regions and overlapping regions respectively.

5. A method for implementing a distributed GEO fence based on edge computing according to claim 4, characterized in that The specific steps of performing differentiated matching according to the region labels of the data stream to be matched include: For data streams marked as non-overlapping areas, the geometric boundaries of the sub-fences to which they belong are matched using the ray method to generate primary events containing device ID, fence ID and trigger time; For data streams marked as overlapping areas, do the following: a) Requesting the real-time status of associated sub-fences in the overlapping area from adjacent edge nodes via the gRPC protocol, including the sub-fence activation status and device entry and exit event queues; b) Perform timing arbitration on the real-time status returned by multiple edge nodes based on logical clocks, and generate secondary events after resolving conflicts; Upload the primary events and secondary events to the cloud center.

6. A method for implementing a distributed GEO fence based on edge computing according to claim 5, characterized in that, Statistically analyze multi-metric features of the primary events and secondary events, including: Statistically analyze a first metric for the primary events, where the first metric is the trigger frequency of the primary events; Statistically analyze a second metric for the secondary events, where the second metric is the trigger frequency of the secondary events; Statistically analyze the resource load metrics for each edge node, where the resource load metrics include CPU utilization rate, memory occupancy rate, and network throughput.

7. A method for implementing a distributed GEO fence based on edge computing according to claim 6, characterized in that, When any metric feature exceeds the corresponding preset condition, trigger dynamic space reallocation, including: If the first metric and / or the second metric exceeds the limit, adjust the convexity parameter of the overlapping area and the weight coefficient of the real-time load rate; If the resource load metric exceeds the limit, adjust the weight factor of the Voronoi diagram unit.

8. A method for implementing a distributed GEO fence based on edge computing according to claim 7, characterized in that, The adjustment of the weight coefficient includes: For primary events, when the trigger frequency exceeds the first threshold, adjust the weight coefficient according to the following rules: ; wherein, is the trigger frequency within a unit time of the non-overlapping region, is the first threshold, is the adjustment coefficient, and are the weight coefficients of the adjusted convexity parameter and the weight coefficient of the real-time load rate, respectively; For secondary events, when the trigger frequency exceeds the second threshold, adjust the weight coefficient according to the following rules: ; Among them, is the trigger frequency within the overlapping area per unit time, is the second threshold, is the adjustment coefficient, and are the weight coefficients of the adjusted convexity parameter and the weight coefficient of the real-time load rate respectively; If the trigger frequencies of both primary events and secondary events exceed the limit, preferentially adjust the weight coefficient in the secondary events.

9. A method for implementing a distributed GEO fence based on edge computing according to claim 8, characterized in that, The adjustment of the weight factor includes: When any resource load metric exceeds its preset threshold, it is determined that the resource load exceeds the limit; According to the exceeded resource load metric, adjust the weight factor for geometric centroid calculation according to the following rules, ; Among them, is the weight factor of the edge node, is the comprehensive load ratio of the edge node, , and are the weight coefficients of the CPU utilization rate U, the memory occupancy rate and the network throughput respectively, is the anti-zero constant.

10. A distributed GEO fence implementation system based on edge computing, which is used to execute a distributed GEO fence implementation method based on edge computing as described in any one of claims 1 to 9, including a cloud center and multiple edge nodes deployed inside the target area, characterized in that, The system includes: A global fence dynamic allocation module for dynamically allocating space for the global fence stored in the cloud center to generate the jurisdiction areas of each edge node, where the jurisdiction area includes a sub-fence and an overlapping area between the sub-fences of adjacent edge nodes; A spatio-temporal index construction module for constructing a dynamic spatio-temporal index in each edge node according to the corresponding sub-fence and overlapping area, and screening the device locations reported within the jurisdiction area through the dynamic spatio-temporal index to generate a data stream to be matched with area tags, where the area tags include overlapping areas and non-overlapping areas; A differential event matching module for performing differential matching according to the area tags of the data stream to be matched, generating primary events for non-overlapping areas and secondary events for overlapping areas and uploading them to the cloud center; A reallocation trigger module for statistically analyzing multi-metric features of the primary events and secondary events in the cloud center, and triggering dynamic space reallocation when any metric feature exceeds the corresponding preset condition.

Citation Information

Cited By

  • Mine vehicle scheduling method, device and equipment and storage medium

    CN122311797A

  • A mine vehicle scheduling method, device and equipment and storage medium

    CN122311797B