An electronic fence risk early warning method, system, device and readable storage medium

CN123016662APending Publication Date: 2026-10-30CHERY NEW ENERGY AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611495345.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0002]当前新能源汽车规模化运营过程中,资产防侵占场景风险始终是行业核心痛点:传统远程监控系统仅能对孤立的超阈值异常事件做单点报警,无法识别由多步低风险试探性操作串联形成的渐进式侵占行为,预警完全滞后于风险演变;常规电子围栏应用仅停留在“进/出”二元判定的初级阶段,既无法识别围栏内的可疑徘徊行为,也不能对越界动作做风险分级,应用深度严重不足;通用车辆行为分析模型多面向驾驶安全、金融信用评估场景设计,核心数据维度与资产防侵占诉求错配,且未与电子围栏场景深度耦合,脱离地理语境的异常判断会产生海量误报;传统资产防侵占场景方案存在明显的响应机制断层,要么是事后被动报警,要么直接执行远程熄火等硬拦截操作,完全缺失风险早期的“预警缓冲窗口”,留给运营方柔性处置的时间极短

Benefits of technology

通过T-Box实时数据流与DMS运营状态数据的双流关联动态筛选重点监控车辆,前置过滤大部分无效监控数据流,大幅降低全量车辆实时监控的计算资源消耗;依托Flink流式计算框架实现内存级空间预过滤、结合自主射线法的两级围栏判定逻辑,完全摆脱对第三方空间计算API的依赖,将单条数据围栏判断平均耗时压缩至毫秒级以内,计算性能较传统方案实现大幅提升;结合带时间衰减的多维度动态风险分模型与三类规则补偿逻辑,将电子围栏预警误报率大幅降低,同时支持告警处置反馈驱动的模型自学习迭代,可广泛适配新能源汽车防飞车场景下的高精准、低延迟车辆资产安全风控需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016662A_ABST
    Figure CN123016662A_ABST
Patent Text Reader

Abstract

The application discloses an electronic fence risk early warning method, system and device and a readable storage medium, and belongs to the technical field of vehicle safety monitoring and risk early warning. Through a technical link of dynamic screening of key monitoring objects, fence pre-filtering, autonomous point-surface judgment, three-dimensional feature weighted scoring and closed-loop alarm self-optimization, the technical link solves the pain points of lagging early warning, high false alarm rate and insufficient performance of a traditional scheme, can realize risk perception several hours in advance, significantly improves alarm response efficiency, and supports high-throughput low-latency concurrent processing of large-scale real-time vehicle data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle safety monitoring and risk warning technology, and in particular relates to an electronic fence risk warning method, system, device and readable storage medium. Background Technology

[0002] In the current large-scale operation of new energy vehicles, asset misappropriation risks remain a core pain point for the industry: traditional remote monitoring systems can only issue single-point alarms for isolated abnormal events exceeding thresholds, failing to identify gradual misappropriation behavior formed by multiple low-risk exploratory operations, with early warnings lagging far behind the evolution of risks; conventional electronic fence applications are only at the rudimentary stage of binary "entry / exit" judgment, unable to identify suspicious loitering behavior within the fence or to classify the risk of boundary crossings, resulting in a severe lack of application depth; general vehicle behavior analysis models are mostly designed for driving safety and financial credit assessment scenarios, with core data dimensions mismatched with asset misappropriation requirements and not deeply coupled with electronic fence scenarios, leading to massive false alarms due to anomaly judgments detached from geographical context; traditional asset misappropriation prevention solutions have obvious gaps in response mechanisms, either passively alarming after the fact or directly executing hard interception operations such as remote engine shutdown, completely lacking an early "early warning buffer window" for risks, leaving operators with very little time for flexible handling.

[0003] In existing technologies, remote monitoring platforms for new energy vehicles generally rely on third-party map APIs to determine electronic fence points and areas. This not only results in high call costs and strong service dependencies, but also leads to interface response latency and insufficient data processing throughput in scenarios with hundreds of thousands of vehicles operating concurrently in real time. This completely fails to meet the real-time early warning needs of large-scale fleets. In summary, the industry currently lacks a comprehensive asset-based anti-intrusion early warning solution that deeply integrates vehicle behavior, spatial fencing, and operational status. The bottlenecks of traditional technologies in early warning accuracy, processing performance, and response efficiency remain unresolved, making it difficult to meet the core need of large-scale fleets for early detection and handling of potential intrusion risks. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an electronic fence risk warning solution for new energy vehicle anti-flying scenarios. Through the combined innovation of "three-dimensional fusion risk scoring model, dual-layer autonomous electronic fence computing architecture, and closed-loop alarm self-optimization mechanism", the false alarm rate is significantly reduced while ensuring a high risk detection rate. At the same time, the warning performance is improved by a hundredfold, providing operators with sufficient early risk verification window and filling the gap in the existing technology in the field of preventing the encroachment of new energy vehicle assets.

[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: A first aspect of the present invention provides a method for risk warning of electronic fences, the method comprising: S1. Access the real-time multi-dimensional data stream of vehicles, complete the standardized cleaning process, and connect to the vehicle operation status data of the driver management system (DMS) to dynamically generate a list of key monitored vehicles. S2. Perform spatial pre-filtering on the vehicle data in the key monitored vehicle list, and directly mark the vehicle data that is far from the outer circular buffer area of ​​the electronic fence as safe. S3. For the pre-filtered vehicle data, the ray casting method is used to determine the point-to-surface relationship between the coordinate points and the electronic fence polygon, and dynamic risk scores are generated by combining multi-dimensional vehicle features. S4. When the vehicle's dynamic risk score exceeds the preset threshold, associate the information of the organization to which the vehicle's VIN code belongs, generate structured alarm information, and push it.

[0006] Furthermore, the real-time multidimensional vehicle data stream in step S1 includes three categories: spatiotemporal trajectory data, vehicle status data, and alarm and fault data, among which: The spatiotemporal trajectory data includes VIN identifier, positioning coordinates, positioning time, velocity, orientation angle, and positioning accuracy parameters; Vehicle status data includes power status, charging status, door lock status, and total mileage on the instrument panel; Alarm and fault data include T-Box power failure alarm, GPS antenna open circuit alarm, and unauthorized entry alarm.

[0007] Specifically, in step S1 of this embodiment, the purpose of step S1 is to perform data access and dynamic target filtering. The overall process steps include: S101. Through the communication interface of the vehicle-mounted telematics processor (T-Box), the multi-dimensional data stream reported by the vehicle is accessed in real time, including three categories: spatiotemporal trajectory data, vehicle status data, and alarm and fault data. The real-time multi-dimensional data stream is buffered and distributed through the Apache Kafka message queue to ensure stable and reliable transmission under high concurrency data. Furthermore, the spatiotemporal trajectory data includes: vehicle identification number (VIN), GPS / BeiDou coordinates (longitude, latitude), positioning time, speed, direction angle, and positioning accuracy (such as HDOP value); vehicle status data includes: vehicle power status (ON / OFF), charging status, door lock status, and total mileage on the instrument panel; alarm and fault data includes: T-Box power failure alarm, GPS antenna open circuit alarm, unauthorized entry alarm, etc.

[0008] S102. Input the real-time multidimensional data stream into the Flink stream processing job for standardization and cleaning, including coordinate correction, invalid value filtering, data completion and time alignment. S103. Based on the spatiotemporal trajectory data and alarm and fault data in the real-time multidimensional data stream after standardized cleaning, a location reporting validity verification mark is generated synchronously. The mark serves as the prerequisite for determining "location reporting validity" when dynamically generating a list of key monitored vehicles. S104. Connect with the Driver Management System (DMS) in real time via the RESTful API interface (Representative State Transmission Application Programming Interface) to retrieve the latest operational status of all vehicles from the Driver Management System (DMS) periodically or based on order status change events. Furthermore, the latest operational status of the vehicle includes being in operation, idle and available, booked, undergoing maintenance, or out of contact.

[0009] S105. Based on a configurable monitoring strategy mapping table, map the vehicle operation status obtained by the driver management system (DMS) to a preset monitoring level. S106 and Flink stream processing jobs dynamically maintain a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Vehicles that simultaneously meet the criteria of "valid location reporting" and "meeting the preset monitoring level" are included in the key monitoring list. Data of vehicles not included in the list are only archived and do not participate in the subsequent real-time risk calculation process.

[0010] Furthermore, the Flink stream processing job dynamically maintains a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Specifically, this includes: S106-1. Load the output full vehicle monitoring level mapping results into Flink's resident memory broadcast state, covering the binding relationship between the VIN code and the corresponding monitoring level of all connected vehicles. S106-2. The output standardized real-time multidimensional data stream is associated with the broadcast status in memory level using the vehicle VIN code as the primary key, and the corresponding monitoring level tag is attached to each piece of real-time vehicle data. S106-3. Perform dual verification on the fused data after association: verify that the real-time location field on the standardized real-time multidimensional data stream side is not empty and the positioning accuracy is within the preset effective range, and at the same time verify that the attached monitoring level belongs to the preset monitoring range. S106-4. Vehicles that pass both verifications are updated to the dynamically maintained list of key monitored vehicles in memory. Vehicle data that fails verification is directly routed to the offline archiving link and does not flow into the subsequent real-time risk calculation process.

[0011] Furthermore, the spatial pre-filtering operation of the vehicle data in the key monitored vehicle list in step S2 is performed in the Apache Flink (distributed message queue) streaming computing framework. Before execution, all electronic fence polygons are pre-loaded into memory, the minimum circumcircle center and circumcircle radius of each electronic fence polygon are pre-calculated, and these are kept in the memory of the computing node as metadata.

[0012] Furthermore, the spatial pre-filtering determination logic in step S2 is as follows: For each vehicle in the list of key monitored vehicles, the planar distance between the real-time coordinates of the vehicle and the center of the outer circle of all electronic fences is calculated using the planar coordinate distance formula. If the distance is greater than the sum of the corresponding circumscribed circle radius and the preset safety buffer distance, then the vehicle is determined to be absolutely far away from all monitored fence areas.

[0013] Furthermore, the execution logic of using the ray method in step S3 to determine the point-to-surface relationship between the coordinate point and the electronic fence polygon includes: drawing a ray from the coordinate point to be measured in a horizontal eastward direction, counting the total number of intersections between the ray and each side of the electronic fence polygon, determining that the coordinate point is inside the polygon when the total number of intersections is odd, and determining that the coordinate point is outside the polygon when the total number of intersections is even.

[0014] Furthermore, the optimization operations of the ray method include: using polygon bounding boxes to complete a rapid initial screening, handling boundary scenes where the ray passes through polygon vertices and coincides with polygon edges, using R-tree spatial indexing to manage a large number of electronic fence polygons, and locating associated polygons to complete the judgment.

[0015] Furthermore, the calculation process of the dynamic risk score in step S3 includes: maintaining the vehicle behavior sequence based on a preset sliding time window, extracting spatial dimension features, time and behavior dimension features, and equipment and state dimension features to form a feature vector, applying rule compensation logic to the original trigger signal, and calculating the risk score by combining the dynamic weight of each feature and the time decay factor.

[0016] Furthermore, the spatial dimension features include whether the vehicle is currently within the fence, the duration of entering / leaving the fence, the rate of change of distance from the fence boundary, and the frequency of boundary crossings within the past 72 hours; the time and behavior dimension features include whether the current time is a high-risk period at night (e.g., 0:00-6:00), the speed pattern of the vehicle moving without orders, the frequency of abnormal power switching of the vehicle, and the duration and pattern of GPS signal loss; the equipment and status dimension features include whether there are records of T-Box power failure and abnormal door opening.

[0017] Furthermore, the rule-based compensation logic includes three categories: short-term stay compensation, location drift compensation, and whitelist compensation. Short-term stay compensation marks a vehicle as passing by if it leaves within a preset time threshold after entering the fence. Location drift compensation determines that a vehicle is considered to be in a position drift and ignores entry and exit events when it is stationary in a small area near the fence boundary and the positioning accuracy meets the threshold. Whitelist compensation adjusts the weight or exempts vehicles, areas, or time periods from inspection for abnormal behavior.

[0018] Furthermore, the risk score is calculated by combining the dynamic weights of each feature with the time decay factor, and the specific calculation expression is as follows:

[0019] In the formula, Indicates the vehicle's time Dynamic risk score; This represents the total number of anomaly feature dimensions, with a value of 3, corresponding to spatial dimension features, temporal and behavioral dimension features, and device and state dimension features, respectively. Indicates the first Anomaly features at time The dynamic weights are initially preset by business rules and are subsequently dynamically adjusted based on the self-learning results of alarm handling feedback. All weights satisfy... ; Indicates the first Anomaly features at time The trigger flag value is 0 when not triggered and 1 when triggered. If the trigger rule compensation logic is applied, the value is taken according to the compensation rule: 0 for short-term stay compensation / point drift compensation, and the value range for whitelist compensation is within the specified range. Configure as needed between them; This represents the time decay coefficient, which is a fixed positive real number. The larger the value, the faster the weight of historical anomalies decays. The default value is [value missing]. (unit: (The weight corresponding to the abnormal behavior decays to 1 / e of the initial value after 2 hours). Indicates the first The abnormal feature from the trigger time to the current time Time difference, in seconds. ,in For the first The triggering time of an abnormal feature; Indicates time Compliance behavior deduction points: When a vehicle is in the whitelist area, in normal operation status, and has a continuous period without abnormalities exceeding the threshold, the accumulated risk points will be deducted according to preset rules, with a default value of 0.

[0020] Furthermore, the structured alarm information generated in step S4 includes vehicle location snapshot, speed, dynamic risk score, abnormal feature trigger list, a simplified trajectory map of the past hour, as well as the name, responsible person information, and contact number of the vehicle's dealer or operator. The push channels cover operation monitoring screens, SMS, and enterprise office robots.

[0021] Furthermore, the electronic fence risk warning method provided by the present invention also includes step S5, which involves collecting alarm handling results as feedback data, adjusting the weight values ​​of each abnormal feature through machine learning algorithms, adjusting the tolerance parameters of point drift compensation in combination with long-term GPS signal quality data of the region, and completing model iterative optimization.

[0022] In a second aspect, based on the same inventive concept as the first aspect, an electronic fence risk warning system is also provided. The system includes a data access filtering module, a spatial pre-filtering module, a core risk calculation module, an alarm generation and push module, and a model self-learning iteration module, wherein: The data access and filtering module is used to access the multi-dimensional data stream of vehicles to complete standardized cleaning, connect to the driver management system (DMS) to obtain the vehicle operation status, and dynamically generate a list of key monitored vehicles. The spatial pre-filtering module is used to mark vehicle data that is far from the outer circle buffer zone of the electronic fence as safe, based on the outer circle metadata pre-calculated by the electronic fence. The core risk calculation module is used to use the ray method to determine the point-surface relationship of the pre-filtered vehicle data and calculate and generate the vehicle dynamic risk score. The alarm generation and push module is used to generate and push structured alarm messages when the vehicle's dynamic risk score exceeds a preset threshold, by associating the information of the organization to which the vehicle's VIN code belongs. The model self-learning iteration module is used to collect alarm handling results as feedback data, adjust the weight values ​​of each abnormal feature and the point drift compensation tolerance parameter, and complete the model iteration optimization.

[0023] A third aspect of the present invention provides an electronic fence risk warning device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements all steps of the electronic fence risk warning method provided in the first aspect of the present invention.

[0024] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements all the steps of the electronic fence risk warning method provided in the first aspect of the present invention.

[0025] Compared with the prior art, the beneficial effects of the present invention are as follows: By dynamically filtering key monitored vehicles through the dual-stream correlation of T-Box real-time data stream and DMS operational status data, most invalid monitoring data streams are pre-filtered, significantly reducing the computational resource consumption for real-time monitoring of all vehicles. Relying on the Flink streaming computing framework to implement memory-level spatial pre-filtering and combining a two-level fence determination logic with an autonomous ray-mapping method, it completely eliminates the dependence on third-party spatial computing APIs, compressing the average time for single data fence determination to within milliseconds, and significantly improving computational performance compared to traditional solutions. Combined with a multi-dimensional dynamic risk classification model with time decay and three-class rule compensation logic, the false alarm rate of electronic fence warnings is significantly reduced. At the same time, it supports alarm handling feedback-driven model self-learning iteration, which can be widely adapted to the high-precision, low-latency vehicle asset security risk control needs in the scenario of preventing runaway vehicles in new energy vehicles.

[0026] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of a method for risk warning of electronic fences according to an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Example 1: In this embodiment, as Figure 1 As shown in the figure, this embodiment provides a method for risk warning of electronic fences, the method including the following steps: Step S1: Access the real-time multi-dimensional data stream of the vehicle, complete the standardized cleaning process, and connect to the vehicle operation status data of the driver management system (DMS) to dynamically generate a list of key monitored vehicles. Step S2: Perform spatial pre-filtering on the vehicle data in the list of key monitored vehicles, and directly mark the vehicle data that is far away from the outer circular buffer area of ​​the electronic fence as safe. Step S3: For the pre-filtered vehicle data, use the ray casting method to determine the point-to-surface relationship between the coordinate points and the electronic fence polygon, and generate a dynamic risk score by combining multi-dimensional vehicle features. Step S4: When the vehicle's dynamic risk score exceeds the preset threshold, associate the information of the organization to which the vehicle's VIN code belongs, generate structured alarm information, and push it.

[0031] Furthermore, the real-time multidimensional vehicle data stream in step S1 of this embodiment includes three categories: spatiotemporal trajectory data, vehicle status data, and alarm and fault data, wherein: The spatiotemporal trajectory data includes VIN identifier, positioning coordinates, positioning time, velocity, orientation angle, and positioning accuracy parameters; Vehicle status data includes power status, charging status, door lock status, and total mileage on the instrument panel; Alarm and fault data include T-Box power failure alarm, GPS antenna open circuit alarm, and unauthorized entry alarm.

[0032] Furthermore, in step S1, the method of connecting to the Driver Management System (DMS) is to periodically retrieve the latest operating status of all vehicles, or to trigger data synchronization based on order status change events, and map the DMS-returned statuses of "operating," "idle and available," "booked," "under maintenance," and "out of contact" to preset monitoring levels.

[0033] Furthermore, the rule for dynamically generating the list of key monitored vehicles in step S1 is as follows: only vehicles that meet the preset monitoring level are included in the key monitoring list, and the data of vehicles not included in the list are only archived and do not participate in the subsequent real-time risk calculation process.

[0034] Specifically, in step S1 of this embodiment, the purpose of step S1 is to perform data access and dynamic target filtering. The overall process steps include: S101. Through the communication interface of the vehicle-mounted telematics processor (T-Box), the system receives real-time multi-dimensional data streams reported by the vehicle, including three categories: spatiotemporal trajectory data, vehicle status data, and alarm and fault data. Spatiotemporal trajectory data includes vehicle identification number (VIN), GPS / BeiDou coordinates (longitude, latitude), positioning time, speed, direction angle, and positioning accuracy (such as HDOP value). Vehicle status data includes vehicle power status (ON / OFF), charging status, door lock status, and total mileage on the instrument panel. Alarm and fault data includes T-Box power failure alarms, GPS antenna open circuit alarms, and unauthorized entry alarms. The real-time multi-dimensional data streams reported by the vehicle are buffered and distributed via an Apache Kafka message queue to ensure stable and reliable transmission under high concurrency.

[0035] S102. The multidimensional data stream enters the Flink stream processing job for standardization and cleaning, including coordinate correction (such as using the GCJ-02 coordinate system), invalid value filtering (such as negative velocity or coordinates outside the country), data completion and time alignment.

[0036] S103. Based on the spatiotemporal trajectory data and alarm and fault data in the real-time multidimensional data stream after standardized cleaning, a location reporting validity verification mark is generated synchronously. The mark serves as the prerequisite for determining "location reporting validity" when dynamically generating a list of key monitored vehicles. Furthermore, specifically, based on the GPS / BeiDou coordinates, positioning time, and HDOP positioning accuracy fields in the spatiotemporal trajectory data, as well as the T-Box power failure alarm and GPS antenna open circuit alarm fields in the alarm and fault data, a location reporting validity verification mark is generated synchronously. This mark serves as the prerequisite for determining "valid location reporting" when dynamically generating a list of key monitored vehicles.

[0037] S104. Connect in real time with the Driver Management System (DMS) (or Vehicle Dispatch Platform) via RESTful API (Representative State Transmission Application Programming Interface) to retrieve the latest operational status of all vehicles from the Driver Management System (DMS) on a timed basis (e.g., every 30 seconds) or based on events (e.g., order status changes). Furthermore, the latest operational status of the vehicle includes being in operation, idle and available, booked, undergoing maintenance, or out of contact.

[0038] S105. Based on a configurable monitoring strategy mapping table, map the vehicle operation status obtained by the driver management system (DMS) to a preset monitoring level. S106 and Flink stream processing jobs dynamically maintain a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Vehicles that simultaneously meet the criteria of "valid location reporting" and "meeting the preset monitoring level" are included in the key monitoring list. Data of vehicles not included in the list are only archived and do not participate in the subsequent real-time risk calculation process.

[0039] Furthermore, in step S106, the Flink stream processing job dynamically maintains a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Specifically, this includes: S106-1. Load the full vehicle monitoring level mapping results output by S105 into Flink's resident memory broadcast state, covering the binding relationship between the VIN codes and corresponding monitoring levels of all connected vehicles. S106-2. Take the standardized T-Box real-time data stream output from S101-S103, use the VIN code as the association key, and perform memory-level real-time association with the above broadcast status to attach the corresponding monitoring level tag to each vehicle real-time data. S106-3. Perform dual verification on the fused data after association: verify that the real-time location field on the T-Box side is not empty and the positioning accuracy is within the preset effective range, and at the same time verify that the mounted monitoring level belongs to the preset monitoring range. S106-4. Vehicles that pass both verifications are updated to the dynamically maintained list of key monitored vehicles in memory. Vehicle data that fails verification is directly routed to the offline archiving link and does not flow into the subsequent real-time risk calculation process.

[0040] The above methods significantly reduce computational load: By dynamically filtering monitored targets, in actual business operations (for example, on a platform with 10,000 vehicles, only about 20%-30% of vehicles are idle daily), 70%-80% of invalid data streams can be filtered out. This allows the core computing engine to process only a small portion of high-risk target data, reducing overall system computing resource consumption by more than 60%. Improved management accuracy and reduced interference: It avoids a large number of invalid alarms caused by the compliant movement of normally operating vehicles (such as ride-hailing vehicles fulfilling orders), allowing operations personnel to focus on truly risky idle vehicles. Management target clarity is improved by more than 300%, effectively reducing operational interference.

[0041] Furthermore, in step S2 of this embodiment, when performing spatial pre-filtering on the vehicle data in the list of key monitored vehicles, the operation is performed in the Apache Flink (distributed message queue) streaming computing framework. Before execution, all electronic fence polygons are pre-loaded into memory, the minimum circumcircle center and circumcircle radius of each electronic fence polygon are pre-calculated, and these are kept in the memory of the computing node as metadata.

[0042] Furthermore, the spatial pre-filtering determination logic in step S2 is as follows: For each vehicle in the list of key monitored vehicles, the planar distance between the real-time coordinates of the vehicle and the center of the outer circle of all electronic fences is calculated using the planar coordinate distance formula. If the distance is greater than the sum of the corresponding circumscribed circle radius and the preset safety buffer distance, then the vehicle is determined to be absolutely far away from all monitored fence areas.

[0043] Specifically, in this embodiment, step S2, which performs spatial pre-filtering on the vehicle data within the list of key monitored vehicles, mainly includes two processes: First, polygon metadata loading and center point calculation are performed: when filtering starts, all defined geofence polygons (usually defined by a series of latitude and longitude coordinates) are loaded from the geofence configuration library. For each polygon, the center (as an approximate center point) and radius of its smallest circumcircle are pre-calculated. This metadata resides in the memory of the computing node. Then, distance calculation and filtering are performed: that is, for each incoming real-time data point of a "key monitored" vehicle, the Flink job will perform the following calculations in parallel: a. Calculate the distance between the vehicle's coordinates and the centers of all the circumcircle circles of the geofence (using a simplified planar coordinate distance formula, with extremely low computational overhead); b. Compare this distance with the radius of the circumcircle of the corresponding fence: c. If the distance from the vehicle's coordinates to the center of all the perimeter circles of the fences is greater than the radius of the corresponding perimeter circle plus a safety buffer distance (e.g., 500 meters), then the vehicle is determined to be "absolutely far away from all fenced areas that need to be monitored" at this moment; this data for the vehicle will be directly marked as "safe" and all subsequent complex calculations will be skipped. d. Only when the vehicle coordinates point enters the "circumcircle buffer area" of at least one fence will this data be marked as "pending precise judgment" and flow into the next precise judgment process.

[0044] Step S2 in this embodiment achieves an order-of-magnitude performance improvement. In real-world city-level applications, a vehicle spends most of its time far from pre-defined high-risk fenced areas (such as parking lots and logistics parks). This pre-filtering step can filter out over 90% of "absolutely safe" data with microsecond overhead. This drastically reduces the amount of data requiring subsequent complex geometric calculations, ensuring that the system can process data streams from millions of vehicles per day with extremely low latency (within hundreds of milliseconds), laying the foundation for real-time early warning.

[0045] Furthermore, in step S3 of this embodiment, the execution logic for determining the point-to-surface relationship between the coordinate point and the electronic fence polygon using the ray method includes: drawing a ray from the coordinate point to be measured in a horizontal eastward direction, counting the total number of intersections between the ray and each side of the electronic fence polygon, determining that the coordinate point is inside the polygon when the total number of intersections is odd, and determining that the coordinate point is outside the polygon when the total number of intersections is even.

[0046] Specifically, in this embodiment, the ray casting algorithm in step S3 is the core algorithm improvement of this invention, replacing the high-cost, high-latency third-party API. For the pre-filtered vehicle data, the self-implemented ray casting algorithm is called to accurately determine whether the real-time coordinates of the vehicle are inside the corresponding electronic fence polygon. Specifically, this includes: a. Draw a ray from the coordinate point to be measured in a horizontal eastward direction; b. Count the total number of intersections between the ray and each side of the electronic fence polygon; c. If the total number of intersections is odd, determine that the coordinate point is inside the polygon; if the total number of intersections is even, determine that the coordinate point is outside the polygon.

[0047] Furthermore, the optimization operations of the ray method include: using polygon bounding boxes to complete a rapid initial screening, handling boundary scenes where the ray passes through polygon vertices and coincides with polygon edges, using R-tree spatial indexing to manage a large number of electronic fence polygons, and locating associated polygons to complete the judgment.

[0048] In this embodiment, the ray casting algorithm eliminates external dependencies, achieving both superior performance and cost: the autonomous ray casting algorithm reduces the single-process judgment time from 100-300 milliseconds for third-party APIs that rely on network requests to less than 1 millisecond. This not only eliminates risks such as network jitter, service rate limiting, and interface changes, but also completely avoids the high costs of billing based on the number of calls. Based on an estimate for a medium-sized platform processing tens of millions of judgments per day, this could save hundreds of thousands of yuan in API call fees annually.

[0049] Furthermore, the calculation process of the dynamic risk score in step S3 includes: maintaining the vehicle behavior sequence based on a preset sliding time window, extracting spatial dimension features, time and behavior dimension features, and equipment and state dimension features to form a feature vector, applying rule compensation logic to the original trigger signal, and calculating the risk score by combining the dynamic weight of each feature and the time decay factor.

[0050] Furthermore, the spatial dimension features include whether the vehicle is currently within the fence, the duration of entering / leaving the fence, the rate of change of distance from the fence boundary, and the frequency of boundary crossings within the past 72 hours; the time and behavior dimension features include whether the current time is a high-risk period at night (e.g., 0:00-6:00), the speed pattern of the vehicle moving without orders, the frequency of abnormal power switching of the vehicle, and the duration and pattern of GPS signal loss; the equipment and status dimension features include whether there are records of T-Box power failure and abnormal door opening.

[0051] Furthermore, the rule-based compensation logic includes three categories: short-term stay compensation, location drift compensation, and whitelist compensation. Short-term stay compensation marks a vehicle as passing by if it leaves within a preset time threshold after entering the fence. Location drift compensation determines that a vehicle is considered to be in a position drift and ignores entry and exit events when it is stationary in a small area near the fence boundary and the positioning accuracy meets the threshold. Whitelist compensation adjusts the weight or exempts vehicles, areas, or time periods from inspection for abnormal behavior.

[0052] Furthermore, the risk score is calculated by combining the dynamic weights of each feature with the time decay factor, and the specific calculation expression is as follows:

[0053] In the formula, Indicates the vehicle's time Dynamic risk score; This represents the total number of anomaly feature dimensions, with a value of 3, corresponding to spatial dimension features, temporal and behavioral dimension features, and device and state dimension features, respectively. Indicates the first Anomaly features at time The dynamic weights are initially preset by business rules and are subsequently dynamically adjusted based on the self-learning results of alarm handling feedback. All weights satisfy... ; Indicates the first Anomaly features at time The trigger flag value is 0 when not triggered and 1 when triggered. If the trigger rule compensation logic is applied, the value is taken according to the compensation rule: 0 for short-term stay compensation / point drift compensation, and the value range for whitelist compensation is within the specified range. Configure as needed between them; This represents the time decay coefficient, which is a fixed positive real number. The larger the value, the faster the weight of historical anomalies decays. The default value is [value missing]. (unit: (The weight corresponding to the abnormal behavior decays to 1 / e of the initial value after 2 hours). Indicates the first The abnormal feature from the trigger time to the current time Time difference, in seconds. ,in For the first The triggering time of an abnormal feature; Indicates time Compliance behavior deduction points: When a vehicle is in the whitelist area, in normal operation status, and has a continuous period without abnormalities exceeding the threshold, the accumulated risk points will be deducted according to preset rules, with a default value of 0.

[0054] In this embodiment, all The range of values ​​is , The range of values ​​is The attenuation factor ranges from 100 to 100. Therefore, the range of values ​​for the weighted cumulative term is... ; The range of values ​​is Therefore, in the end The range of values ​​is , with threshold The magnitude matches perfectly, with no unit or decimal point errors; self-test consistency: when no abnormal features are triggered, all... , This aligns with a risk-free scenario; when all features are triggered simultaneously without compensation or attenuation, This represents the highest risk value.

[0055] Furthermore, the structured alarm information generated in step S4 includes vehicle location snapshot, speed, dynamic risk score, abnormal feature trigger list, a simplified trajectory map of the past hour, as well as the name, responsible person information, and contact number of the vehicle's dealer or operator. The push channels cover operation monitoring screens, SMS, and enterprise office robots.

[0056] Specifically, the generation of the warning in step S4 involves threshold triggering and intelligent alarm: when a vehicle's risk score exceeds a preset dynamic threshold, the system triggers the warning generation process, that is, when... An alarm is triggered. At this time, the system does not simply push a "vehicle abnormality" message, but instead performs the following intelligent synthesis: Contextual information: The system automatically queries the internal or external integrated vehicle-dealer / leasing company database based on the vehicle's VIN code to obtain detailed information such as the affiliated organization, responsible contact person, contact number, and city.

[0057] Generate a structured alarm work order: The above information is automatically stitched together with the current vehicle snapshot (location, speed, risk score, list of main triggering abnormal features, and a simplified trajectory map of the past hour) to generate a structured alarm work order. The work order is pushed to the operation monitoring dashboard and simultaneously sent to the designated responsible person via multiple channels such as SMS, WeChat / DingTalk robot.

[0058] This invention achieves "one-click handling" in early warning: The traditional alarm process is: monitoring system alarm → operations personnel record VIN → log in to the CRM system to query the vehicle owner → contact by phone. This improvement compresses the process to: receiving the alarm message → clicking the contact number embedded in the message to make a direct call. Actual testing shows that the average response time is reduced from 5-10 minutes to less than 30 seconds, improving handling efficiency by 10-20 times.

[0059] Furthermore, the electronic fence risk warning method provided by the present invention also includes step S5, which involves collecting alarm handling results as feedback data, adjusting the weight values ​​of each abnormal feature through machine learning algorithms, adjusting the tolerance parameters of point drift compensation in combination with long-term GPS signal quality data of the region, and completing model iterative optimization.

[0060] Specifically, the processing results of each alarm, such as "verified as a false alarm," "successfully stopped on-site," and "vehicle lost," will be recorded and used for continuous optimization of the risk scoring model, including: Feature weight optimization: By analyzing the handling results of a large number of historical alarms, machine learning algorithms (such as logistic regression) are used to periodically and automatically adjust the weights of each abnormal feature, making the model closer to real business risks.

[0061] Rule parameter optimization: For example, dynamically adjust the "point drift compensation" tolerance distance of a certain area based on long-term GPS signal quality data.

[0062] By introducing a feedback loop, the accuracy of early warnings can be continuously improved over time, forming a self-optimizing positive cycle. This reduces the long-term dependence on expert experience configuration and enhances the system's adaptability.

[0063] The method in this embodiment dynamically filters key monitored vehicles through dual-stream correlation of T-Box real-time data stream and DMS operational status data. This filters out most invalid monitoring data streams, significantly reducing the overall system's computational resource consumption. Simultaneously, it avoids generating numerous invalid alarms from the compliant movement of normally operating vehicles, allowing operators to focus on vehicles with genuine risks and greatly reducing operational interference. Utilizing the Flink streaming computing framework, it achieves memory-level spatial pre-filtering, directly marking the vast majority of vehicle data far from the monitored fence area as safe with extremely low computational overhead. This drastically reduces the amount of data requiring subsequent complex geometric calculations, ensuring low-latency performance throughout the entire data processing chain. Furthermore, it achieves accurate determination of point-surface relationships through a self-implemented ray tracing method, completely eliminating dependence on third-party spatial computing APIs. This system not only significantly reduces the time required to determine a single data fence and eliminates external dependency risks such as network jitter and service throttling, but also saves on the high interface costs charged per call. Combined with a multi-dimensional dynamic risk scoring model with time decay and three types of rule compensation logic, it can significantly reduce the false alarm rate of traditional electronic fence warnings. At the same time, it generates structured alarm work orders with full associated context information, greatly compressing the alarm handling process and significantly improving operational response efficiency. The subsequent alarm handling feedback closed-loop mechanism can continuously optimize feature weights and rule parameters based on actual business results, allowing the warning accuracy to continuously improve with the system's usage time, reducing long-term reliance on manual experience configuration. Overall, it can be widely adapted to the high-precision, low-latency vehicle asset security risk control needs in the scenario of preventing runaway vehicles in new energy vehicles.

[0064] Example 2: In a second aspect, based on the same inventive concept as the first aspect, an electronic fence risk warning system is also provided. The system includes a data access filtering module, a spatial pre-filtering module, a core risk calculation module, an alarm generation and push module, and a model self-learning iteration module, wherein: The data access and filtering module is used to access the multi-dimensional data stream of vehicles to complete standardized cleaning, connect to the driver management system (DMS) to obtain the vehicle operation status, and dynamically generate a list of key monitored vehicles. The spatial pre-filtering module is used to mark vehicle data that is far from the outer circle buffer zone of the electronic fence as safe, based on the outer circle metadata pre-calculated by the electronic fence. The core risk calculation module is used to use the ray method to determine the point-surface relationship of the pre-filtered vehicle data and calculate and generate the vehicle dynamic risk score. The alarm generation and push module is used to generate and push structured alarm messages when the vehicle's dynamic risk score exceeds a preset threshold, by associating the information of the organization to which the vehicle's VIN code belongs. The model self-learning iteration module is used to collect alarm handling results as feedback data, adjust the weight values ​​of each abnormal feature and the point drift compensation tolerance parameter, and complete the model iteration optimization.

[0065] The system in this embodiment 2 adopts a modular and decoupled architecture design. The functional modules work together to cover the entire early warning chain from data access and screening, spatial pre-filtering, core risk calculation, alarm generation and push to model self-learning iteration. It integrates and encapsulates the scattered vehicle asset security risk control capabilities, and can independently complete the entire process of risk early warning without relying on external third-party spatial computing services. The overall system stability is greatly improved and the operation and maintenance costs are significantly reduced. At the same time, the computing power can be flexibly expanded according to the business needs of large-scale fleets, adapting to asset anti-tampering risk control scenarios of different-sized new energy vehicle operators.

[0066] Example 3: A third aspect of the present invention provides an electronic fence risk warning device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements all steps of the electronic fence risk warning method provided in the first aspect of the present invention.

[0067] The device in this embodiment can run the complete electronic fence risk warning method logic based on general-purpose processor and storage hardware. It can realize real-time risk calculation of high-concurrency vehicle data streams without the need for customized dedicated computing hardware. It has a low deployment threshold and strong adaptability. It can directly connect to the data stream of existing new energy vehicle remote monitoring platforms, quickly access and implement the upgrade of risk warning capabilities, and does not require major modifications to the original monitoring system.

[0068] Example 4: In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements all the steps of the electronic fence risk warning method provided in the first aspect of the present invention.

[0069] The storage medium of this embodiment contains complete electronic fence risk warning program code, which can be loaded and executed by any general computing device with running permissions, enabling flexible portability and deployment of warning capabilities. It can be adapted to various operating environments such as vehicle edge computing nodes, cloud monitoring platforms, and local private deployment servers, and is not limited by specific hardware or deployment scenarios, which greatly reduces the cost of implementing and reusing this risk warning solution.

[0070] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for risk warning of electronic fences, characterized in that, include: S1. Access the real-time multi-dimensional data stream of vehicles, complete the standardized cleaning process, and connect to the vehicle operation status data of the driver management system (DMS) to dynamically generate a list of key monitored vehicles. S2. Perform spatial pre-filtering on the vehicle data in the key monitored vehicle list, and directly mark the vehicle data that is far from the outer circular buffer area of ​​the electronic fence as safe. S3. For the pre-filtered vehicle data, the ray casting method is used to determine the point-to-surface relationship between the coordinate points and the electronic fence polygon, and dynamic risk scores are generated by combining multi-dimensional vehicle features. S4. When the vehicle's dynamic risk score exceeds the preset threshold, associate the information of the organization to which the vehicle's VIN code belongs, generate structured alarm information, and push it.

2. The electronic fence risk warning method as described in claim 1, characterized in that, The accessed vehicle real-time multidimensional data stream, after undergoing standardized cleaning processing, is connected to the vehicle operation status data of the Driver Management System (DMS) to dynamically generate a list of key monitored vehicles, including: S101. Through the communication interface of the vehicle-mounted telematics processor T-Box, the real-time multi-dimensional data stream reported by the vehicle is accessed in real time, including spatiotemporal trajectory data, vehicle status data, alarm and fault data; among them, the real-time multi-dimensional data stream is buffered and distributed through the Apache Kafka message queue to ensure stable and reliable transmission under high concurrency data. S102. Input the real-time multidimensional data stream into the Flink stream processing job for standardization and cleaning, including coordinate correction, invalid value filtering, data completion and time alignment. S103. Based on the spatiotemporal trajectory data and alarm and fault data in the real-time multidimensional data stream after standardized cleaning, a location reporting validity verification mark is generated synchronously. The mark serves as the prerequisite for determining "valid location reporting" when dynamically generating a list of key monitored vehicles. S104. Connect with the Driver Management System (DMS) in real time via the RESTful API interface, and retrieve the latest operational status of all vehicles from the Driver Management System (DMS) periodically or based on order status change events. S105. Based on a configurable monitoring strategy mapping table, map the vehicle operation status obtained by the driver management system (DMS) to a preset monitoring level. S106, the Flink stream processing job dynamically maintains a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Vehicles that simultaneously meet the requirements of "valid location reporting" and "meeting the preset monitoring level" are included in the key monitoring list. Data of vehicles not included in the list are only archived and do not participate in the subsequent real-time risk calculation process.

3. The electronic fence risk warning method as described in claim 2, characterized in that, The Flink stream processing job dynamically maintains a list of key monitored vehicles in memory based on the latest vehicle operation status mapping results and standardized real-time multidimensional data streams. Specifically, this includes: S106-1. Load the output full vehicle monitoring level mapping results into Flink's resident memory broadcast state, covering the binding relationship between the VIN code and the corresponding monitoring level of all connected vehicles. S106-2. The output standardized real-time multidimensional data stream is associated with the broadcast status in memory level using the vehicle VIN code as the primary key, and the corresponding monitoring level tag is attached to each piece of real-time vehicle data. S106-3. Perform dual verification on the fused data after association: verify that the real-time location field on the standardized real-time multidimensional data stream side is not empty and the positioning accuracy is within the preset effective range, and at the same time verify that the attached monitoring level belongs to the preset monitoring range. S106-4. Vehicles that pass both verifications are updated to the dynamically maintained list of key monitored vehicles in memory. Vehicle data that fails verification is directly routed to the offline archiving link and does not flow into the subsequent real-time risk calculation process.

4. The electronic fence risk warning method as described in any one of claims 1 to 3, characterized in that, The real-time multidimensional data stream includes spatiotemporal trajectory data, vehicle status data, and alarm and fault data, wherein: The spatiotemporal trajectory data includes VIN identifier, positioning coordinates, positioning time, speed, direction angle, and positioning accuracy parameters; the vehicle status data includes power status, charging status, door lock status, and total mileage on the instrument panel; the alarm and fault data includes T-Box power failure alarm, GPS antenna open circuit alarm, and unauthorized entry alarm. The vehicle's operational status includes being in operation, idle and available, booked, undergoing maintenance, and out of contact.

5. The electronic fence risk warning method as described in claim 1, characterized in that: In step S2, the spatial pre-filtering operation of the vehicle data in the list of key monitored vehicles is performed in the Apache Flink streaming computing framework. Before execution, all electronic fence polygons are pre-loaded into memory, the minimum circumcircle center and circumcircle radius of each electronic fence polygon are pre-calculated, and these are kept in the memory of the computing node as metadata.

6. The electronic fence risk warning method as described in claim 1 or 5, characterized in that, The spatial pre-filtering decision logic is as follows: For each vehicle in the list of key monitored vehicles, the planar distance between the real-time coordinates of the vehicle and the center of the outer circle of all electronic fences is calculated using the planar coordinate distance formula. If the distance is greater than the sum of the corresponding circumscribed circle radius and the preset safety buffer distance, then the vehicle is determined to be absolutely far away from all monitored fence areas.

7. The electronic fence risk warning method as described in claim 1, characterized in that, The execution logic for determining the point-to-surface relationship between the coordinate points and the electronic fence polygon using the ray casting method in step S3 includes: Draw a ray from the coordinate point to be measured in a horizontal eastward direction. Count the total number of intersections between the ray and each side of the electronic fence polygon. If the total number of intersections is odd, the coordinate point is determined to be inside the polygon. If the total number of intersections is even, the coordinate point is determined to be outside the polygon.

8. The electronic fence risk warning method as described in claim 7, characterized in that, The optimization operations of the ray method include: We use polygonal bounding boxes to perform rapid initial screening, handle boundary scenes where rays pass through polygon vertices and coincide with polygon edges, use R-tree spatial indexing to manage a large number of electronic fence polygons, and locate related polygons to complete the judgment.

9. The electronic fence risk warning method as described in claim 1, characterized in that, The calculation process of the dynamic risk score in step S3 includes: Based on a preset sliding time window, the vehicle behavior sequence is maintained. Spatial dimension features, time and behavior dimension features, and equipment and state dimension features are extracted to form a feature vector. After applying rule compensation logic to the original trigger signal, the risk score is calculated by combining the dynamic weight of each feature and the time decay factor. The formula for calculating the dynamic risk score is as follows: In the formula, Indicates the vehicle's time Dynamic risk score; This represents the total number of anomaly feature dimensions, with a value of 3, corresponding to spatial dimension features, temporal and behavioral dimension features, and device and state dimension features, respectively. Indicates the first Anomaly features at time The dynamic weights, all weights satisfy ; Indicates the first Anomaly features at time The trigger flag value is 0 when not triggered and 1 when triggered; Indicates the time decay coefficient; Indicates the first The abnormal feature from the trigger time to the current time Time difference, in seconds. ,in For the first The triggering time of an abnormal feature; Indicates time Compliance behavior will result in a deduction of points, with a default value of 0.

10. The electronic fence risk warning method as described in claim 9, characterized in that: The rule-based compensation logic includes three categories: short-term dwell time compensation, location drift compensation, and whitelist compensation. Short-term stay compensation means that if a vehicle enters the fence and leaves within a preset time threshold, it is marked as passing by. Point drift compensation is determined as positioning drift when the point is stationary in a small area near the fence boundary and the positioning accuracy meets the threshold, ignoring entry and exit events. Whitelist compensation involves adjusting the weight of abnormal behavior or exempting vehicles, regions, or time periods from inspection within a preset whitelist.

11. The electronic fence risk warning method as described in claim 1, characterized in that: The structured alarm information generated in step S4 includes vehicle location snapshot, speed, dynamic risk score, abnormal feature trigger list, a simplified trajectory map of the past hour, as well as the name, person in charge information, and contact number of the dealer or operator to which the vehicle belongs. The push channels cover operation monitoring screen, SMS, and enterprise office robot.

12. The electronic fence risk warning method as described in claim 1, characterized in that, It also includes step S5, which collects alarm handling results as feedback data, adjusts the weight values ​​of each abnormal feature through machine learning algorithms, and adjusts the tolerance parameters of point drift compensation in combination with long-term GPS signal quality data of the region to complete model iterative optimization.

13. An electronic fence risk early warning system, characterized in that, include: The data access and filtering module is used to access multi-dimensional vehicle data streams to complete standardized cleaning, connect to the driver management system (DMS) to obtain vehicle operating status, and dynamically generate a list of key monitored vehicles. The spatial pre-filtering module is used to mark vehicle data that is far from the outer circle buffer zone of the electronic fence as safe, based on the outer circle metadata pre-calculated by the electronic fence. The core risk calculation module is used to use the ray casting method to determine the point-surface relationship of the pre-filtered vehicle data and calculate and generate the vehicle dynamic risk score. The alarm generation and push module is used to generate and push structured alarm messages when the vehicle's dynamic risk score exceeds a preset threshold, by associating the information of the organization to which the vehicle's VIN code belongs. The model self-learning iteration module is used to collect alarm handling results as feedback data, adjust the weight values ​​of each abnormal feature and the point drift compensation tolerance parameters, and complete the model iteration optimization.

14. An electronic fence risk warning device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the electronic fence risk warning method according to any one of claims 1 to 12.

15. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the electronic fence risk warning method according to any one of claims 1 to 12.