Electronic fence power-on and power-off control method and system based on lithium battery and medium

By combining GPS and other positioning technologies with electronic fence technology, the location of lithium batteries can be monitored in real time and intelligently controlled, which solves the shortcomings of lithium battery location monitoring, realizes all-weather automated safety management and control, and improves asset security and energy consumption management efficiency.

CN121813639APending Publication Date: 2026-04-07SUZHOU DACHUAN NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The location monitoring of lithium batteries relies on the positioning system of the onboard equipment, which cannot directly obtain the real-time location information of the lithium batteries, making it difficult to recover them after they are stolen, resulting in economic losses and safety hazards for the operators.

Method used

The system monitors the location of lithium batteries in real time using GPS and other positioning technologies, and combines electronic fence technology to achieve intelligent control that automatically cuts off power when the battery crosses the boundary and automatically turns on power when it returns to its original position. It uses rule-based fence generation algorithm, Kalman filter algorithm and abnormal pattern recognition algorithm for trajectory analysis to generate remote control signals to realize the power on and off management of the battery.

Benefits of technology

It enables 24/7 automated monitoring and safety management of lithium batteries, improving asset security and energy consumption management efficiency, reducing safety risks and increasing management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121813639A_ABST
    Figure CN121813639A_ABST
Patent Text Reader

Abstract

The invention relates to an electronic fence power-on and power-off control method and system for a lithium battery and a medium, and relates to the technical field of lithium battery management. The electronic fence power-on and power-off control method comprises the following steps: determining a fence type according to a device type, setting boundary data, and generating an electronic fence; positioning and tracking the real-time position of the battery, collecting and cleaning the position data of the battery, and constructing a battery moving track; verifying and comparing the battery moving track according to a preset abnormity judgment mechanism and the electronic fence, and generating a corresponding remote control signal; controlling the battery to supply power according to the remote control signal in combination with the battery position data; the position of the lithium battery is monitored in real time through positioning technologies such as a GPS, intelligent control over border-crossing automatic power-off and homing automatic power-on is achieved in combination with the electronic fence technology, the system can be used for scenes such as electric vehicles, shared battery leasing and communication base station standby power supplies, and the problems of battery theft prevention, illegal movement and cross-regional abuse are mainly solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of lithium battery management technology, and in particular to a method, system and medium for controlling the power on and off of an electronic fence based on a lithium battery. Background Technology

[0002] Lithium-ion batteries are rechargeable batteries that store and release energy based on the migration of lithium ions between positive and negative electrodes. They have advantages such as high energy density, long life and low self-discharge rate, and are widely used in various electronic devices and electric vehicles. The development of lithium-ion batteries has gone through two stages: lithium metal batteries and lithium-ion batteries. The latter has become the mainstream due to its higher safety. In recent years, lithium-ion battery technology has been continuously optimized, and its application fields have been continuously expanding.

[0003] Currently, lithium battery location monitoring mainly relies on the positioning system of the devices they are equipped with, such as GPS positioning modules installed on electric vehicle bodies or communication base station equipment rooms. Because there is no independent positioning unit inside the lithium battery, only the overall location feedback of the device can be achieved; the real-time location information of the lithium battery itself cannot be directly obtained.

[0004] An existing patent discloses a method for providing low-power geofencing services, comprising the following steps: detecting a reference Vrect value for evaluating indoor / outdoor location based on a solar charger of a location tracker; determining, based on the detected Vrect value, whether the solar charging module (solar charger) of the location tracker is charging or not charging; if it is determined that the solar charging module of the location tracker is charging, then determining that the location tracker is outdoors and acquiring location tracking data using a Global Positioning System (GPS) module; if it is determined that the solar charger of the location tracker is not charging, then determining that the location tracker is indoors or in a shaded area, and acquiring location tracking data using one of a Bluetooth Low Energy (BLE) module, a Wi-Fi module, and an Ultra Wideband (UWB) module, which is different from the GPS module; and transmitting the acquired location tracking data to a server using a low-power communication scheme.

[0005] The existing technical solutions mentioned above have the following drawbacks: 1. Since the lithium battery is separated from the mounting device, the positioning system on the device side cannot track the whereabouts of the lithium battery, making it difficult to recover it after it is stolen, resulting in economic losses and safety hazards for the operator. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this application is to provide a lithium battery-based electronic fence power-on / off control method, system, and medium. This method uses GPS and other positioning technologies to monitor the location of lithium batteries in real time and combines electronic fence technology to achieve intelligent control of automatic power-off when batteries cross boundaries and automatic power-on when they return to their original positions. It can be used in scenarios such as electric vehicles, shared battery rental, and backup power for communication base stations, and focuses on solving problems related to battery theft, illegal movement, and cross-regional misuse.

[0007] This was achieved using the following technical solutions: In a first aspect, this application provides a lithium battery-based method for controlling the power on / off of an electronic fence, comprising: Determine the fence type based on the device type and set the boundary data to generate an electronic fence; Locate and track the real-time position of the battery, collect and clean the battery position data, and construct the battery movement trajectory; Based on the preset anomaly detection mechanism and the electronic fence, the battery movement trajectory is verified and compared to generate a corresponding remote control signal. The battery power supply is controlled based on the remote control signal and the battery location data.

[0008] By adopting the above technical solution, a rule-based fence generation algorithm is used to dynamically set geographical boundaries according to device type. Satellite / base station positioning combined with Kalman filtering algorithm is used to clean battery location data in real time and construct trajectory. Then, trajectory-fence collision detection and abnormal pattern recognition algorithm are used to automatically determine movement abnormalities. Finally, a decision tree-based intelligent control signal is triggered to remotely power on or off the battery. This achieves all-weather automated monitoring and safety management of battery movement status, improving asset security and energy consumption management efficiency.

[0009] This application is further configured to: determine the fence type based on the device type and set boundary data to generate an electronic fence, including: The purpose of monitoring the electronic fence is determined based on the type of equipment, and the fence type is obtained; Real-time positioning of the battery carrier equipment is performed to determine the center coordinates of the carrier, and combined with battery status data, hierarchical fence boundary data is obtained. An initial hierarchical fence is generated based on the carrier's center coordinates and the hierarchical fence boundary data. The initial level fence is modified based on the fence type and the behavior state association rules to obtain the electronic fence.

[0010] By adopting the above technical solution, the fence type is determined based on the device type classification algorithm, hierarchical boundaries are generated through real-time positioning and battery status data, and the initial fence is dynamically corrected using a rule engine. Finally, an electronic fence that intelligently adapts to the device behavior status is constructed, achieving precise, flexible and dynamically adjustable security control.

[0011] This application further includes: locating and tracking the real-time position of the battery, collecting and cleaning battery position data, and constructing the battery movement trajectory, including: Multi-source positioning is used to determine the real-time location of the battery, and internal and external positioning signals are collected. Based on the device status data, the external positioning signals are filtered for anomalies to determine that there are no abnormal position signals. The abnormal location signal and the internal positioning signal are correlated and corrected according to the timestamp to determine the compliant positioning signal; The compliant positioning signals are converted, fused, and smoothly interpolated to generate battery location data; The battery location data is segmented into point streams based on the battery status to obtain independent service data segments; Based on the business events, the independent business data segments are fitted with events to generate the battery movement trajectory.

[0012] By adopting the above technical solution, battery location signals are collected through multi-source positioning algorithms (such as GNSS and base station positioning), and Kalman filtering and anomaly detection algorithms are used for data cleaning and fusion. Then, smooth trajectories are generated based on timestamp alignment and interpolation algorithms. Finally, intelligent segmentation and fitting are performed in combination with business events, which realizes the construction of high-precision and high-reliability battery movement trajectories, significantly improving the accuracy of location tracking and the adaptability to business scenarios.

[0013] This application is further configured to: verify and compare the battery movement trajectory based on a preset anomaly detection mechanism and the electronic fence, and generate a corresponding remote control signal, including: The electronic fence is analyzed based on the preset safety distance to obtain the fence layer lines and geometric turning points; A sliding window analysis and feature extraction were performed on the battery's movement trajectory to obtain a sequence of trajectory points. According to the preset anomaly detection mechanism, the spatial position of the fence hierarchy line and the trajectory point sequence is initially determined; If consecutive trajectory points in the trajectory point sequence are within the critical distance threshold of the current fence level line, then the current trajectory point sequence is compared and fitted according to the geometric turning point; If no trajectory point fits the current turning boundary point, the battery is determined to be located on the current fence level line, and a remote power-on control signal is generated. If not, it is determined that the battery is not located at the current fence level line, and a remote power-off control signal is generated.

[0014] By adopting the above technical solution, the hierarchical structure of the electronic fence is analyzed through geometric calculation, and the sliding window feature extraction and spatial topology analysis algorithms are used to compare the spatial relationship between the battery trajectory points and the fence boundary in real time. Combined with the critical distance threshold and the turning point fitting strategy, the battery position status is automatically determined, thereby intelligently generating power-on / power-off control signals. This achieves real-time, automated and precise battery safety monitoring, significantly reducing safety risks and improving management efficiency.

[0015] This application further specifies that the anomaly detection mechanism includes: Based on the battery location data, determine the coordinates of the battery center point, and combine this with the battery size to construct a primary safety zone for the battery deployment location; Based on the external dimensions and center coordinates of the battery carrier device, a secondary safety zone covering the entire device is constructed; Based on the mileage of the battery carrier device and its historical movement trajectory, an ultimate safety zone is constructed for the normal activity range; The coordinates of the battery center point are compared with the coordinates of the carrier center point, and the deviation value is calculated; If the deviation value is within the preset deviation tolerance range, the current battery position is determined to be normal, and the battery operating status is detected; otherwise, feature extraction and judgment are performed on the battery movement trajectory. If the coordinates of the battery movement trajectory are located within the danger distance range of the primary safety zone, the battery status is detected. If the battery capacity is at a preset capacity limit threshold and the battery vibration and pressure are abnormal, the current battery is determined to be abnormally disassembled. If the coordinates of the battery movement trajectory are located within the danger distance range of the secondary safety zone, it indicates that the current battery has detached from the battery carrier device, and the current battery is determined to be moving abnormally, generating the highest level risk warning. If the coordinates of the battery's movement trajectory are located within the danger distance range of the ultimate safety zone, the current battery is determined to be moving abnormally, and the highest level risk warning is generated.

[0016] By adopting the above technical solution, a three-level safety zone for the battery is constructed through spatial geometric algorithms. The battery position is monitored in real time by calculating deviation values ​​and extracting trajectory features. Combined with multi-source sensor data (capacity, vibration, pressure) for state fusion judgment, the system automatically identifies multi-level risks from loosening and disassembly to abnormal movement. This achieves all-weather, multi-level intelligent early warning and precise control of the battery safety status, significantly improving risk response speed and safety management efficiency.

[0017] This application is further configured to: control battery power supply based on the remote control signal and the battery location data, including: The remote control signals are encapsulated based on the risk warning level, execution parameters, and device identification to generate a secure execution instruction package; Based on the battery's movement trajectory and the carrier's center coordinates, a dedicated transmission channel is constructed according to the aforementioned risk warning level; The secure execution instruction packet is encrypted and transmitted through the dedicated transmission channel, and the optimal communication link is selected based on the urgency of the instruction and network conditions. The secure execution instruction packet is parsed and verified according to the optimal communication link. If the verification is successful, the remote control signal is decomposed to obtain the battery drive instruction. According to the battery drive command, the power supply status of the battery is controlled to be turned on or off.

[0018] By adopting the above technical solution, based on the multi-parameter fusion instruction encapsulation algorithm and dynamic channel allocation technology, the instructions are delivered securely and reliably through encrypted transmission and optimal link selection algorithms (such as QoS routing). After parsing and verification, the power management unit is driven to perform power-on and power-off operations, realizing the real-time performance, security and adaptability of battery power supply control, and significantly improving the abnormal response speed.

[0019] Secondly, this application also provides an electronic fence power-on / off control system based on a lithium battery, which adopts the following technical solution: A lithium battery-based electronic fence power on / off control system, comprising a method for controlling the power on / off of an electronic fence, including: The positioning module is used to locate and track the real-time position of the battery, collect and clean the battery position data, construct the battery movement trajectory, and obtain the position data of the battery carrier device. The electronic fence module is used to determine the fence type and set boundary data based on the device type, and generate the electronic fence. The processing and control module is used to verify and compare the battery movement trajectory based on the preset anomaly judgment mechanism and the electronic fence, and generate the corresponding remote control signal. The power on / off execution module is used to control the battery power supply based on the remote control signal and the battery position data; the remote control signal includes a power off signal and a power on signal; The alarm module is used to monitor the battery. When the battery is violently disassembled or impacted, it will issue an alarm signal and generate alarm information. The communication module is used to send the alarm information to the user terminal or cloud platform, and at the same time, the user can remotely and manually control the power on and off.

[0020] By adopting the above technical solution, the battery trajectory is constructed by integrating multi-source positioning and Kalman filtering algorithms in the positioning module, the geofence module dynamically generates geofences based on the rule engine, the processing and control module uses spatial topology analysis and decision tree algorithms to determine trajectory anomalies in real time and generate control signals, the power on / off execution module executes commands through encrypted transmission and dynamic routing technology, the alarm module monitors violent behavior with the help of sensor fusion technology, and the communication module ensures real-time interaction. This achieves automated, precise, and end-to-end intelligent monitoring and active protection of battery safety status, significantly improving safety management efficiency and real-time risk response.

[0021] Thirdly, this application also provides an electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.

[0022] Fourthly, this application also provides a storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the lithium battery-based electronic fence power-on / off control method as described above.

[0023] In summary, the beneficial technical effects of this application are as follows: The location of lithium batteries is monitored in real time by GPS and other positioning technologies, and combined with electronic fence technology to achieve intelligent control that automatically cuts off power when the battery crosses the boundary and automatically restores power when the battery returns to its original position. This is used to solve problems such as battery theft, illegal movement and cross-regional abuse. By dynamically setting geographical boundaries based on device type, using satellite / base station positioning to clean battery location data in real time and construct trajectories, and then automatically determining movement anomalies through trajectory-fence collision detection and abnormal pattern recognition algorithms, the system ultimately triggers intelligent control signals based on decision trees to remotely power or power off the battery. This achieves 24 / 7 automated monitoring and safety management of battery movement status, improving asset security and energy consumption management efficiency. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the power-on / off control method for the electronic fence in this application; Figure 2 This is a flowchart illustrating step S3 in the electronic fence power-on / off control method of this application; Figure 3 This is a flowchart illustrating the anomaly detection mechanism in this application; Figure 4This is a schematic diagram of the electronic fence power control system in this application. Detailed Implementation

[0025] The present application will be further described in detail below with reference to the accompanying drawings.

[0026] Reference Figure 1 The present application discloses a lithium battery-based electronic fence power-on / off control method, comprising: S1: Determine the fence type based on the device type and set the boundary data to generate an electronic fence; S2: Locate and track the real-time position of the battery, collect and clean the battery position data, and construct the battery movement trajectory; S3: Based on the preset anomaly detection mechanism and combined with the electronic fence, verify and compare the battery movement trajectory, and generate the corresponding remote control signal; S4: Controls battery power supply based on remote control signals and battery location data.

[0027] The implementation principle of this embodiment is as follows: Based on the rule engine and geofencing algorithm, multi-layer electronic fences are dynamically generated according to the device type; then, the battery movement trajectory is cleaned and constructed in real time through multi-source positioning fusion and Kalman filtering algorithm; then, spatial topology analysis and time-series trajectory comparison algorithm are used, combined with a preset anomaly judgment mechanism (such as three-level security zone verification and deviation tolerance judgment) to automatically identify trajectory anomalies; finally, control commands are securely issued through encrypted transmission and dynamic routing technology to drive the power management unit to perform precise power on and off operations, thereby forming a closed-loop safety management system from real-time perception, intelligent analysis to active control, which significantly improves the automation level of battery management and the real-time performance of risk response.

[0028] Preferably, step S1 includes: The purpose of monitoring the electronic fence is determined based on the type of equipment, and the fence type is obtained; Real-time positioning of the battery carrier equipment is performed to determine the center coordinates of the carrier, and combined with battery status data, hierarchical fence boundary data is obtained. Based on the carrier's center coordinates and the hierarchical fence boundary data, an initial hierarchical fence is generated. The initial level fence is modified based on the fence type and the behavior state association rules to obtain the electronic fence.

[0029] In this embodiment, the equipment types include fixed energy storage / charging equipment, such as community energy storage cabinets, electric bicycle charging station cabinets, electric vehicle charging stations, and communication base station backup power cabinets.

[0030] Mobile transportable battery assets: such as spare battery packs for electric vehicles (battery swapping scenarios), spare batteries for forklifts / AGVs used by logistics companies, and outdoor emergency power supply boxes.

[0031] Carrier-based mobile equipment: These are mobile devices that are powered by batteries, such as electric forklifts, electric AGVs, electric cleaning robots, and shared electric bicycles / scooters.

[0032] Personnel-worn devices: such as inspection toolkits equipped with high-capacity batteries and portable energy storage power supplies (“outdoor power supplies”).

[0033] Fixed equipment: Core objectives: prevention of theft, vandalism, and environmental risks (such as high temperature and water immersion). Fence types: fixed geofences (circular / polygonal, defining permitted installation / storage areas) and status threshold fences (such as automatically generating temporary high-risk alarm fences when battery temperature > 60℃).

[0034] Mobile battery assets: Core objectives: Prevent abnormal movement, prevent leaving the authorized area (warehouse / battery swapping station), and prevent unauthorized dismantling. Fence types: Static / dynamic geofence (authorized storage / battery swapping station area), route fence (defined transportation route), and dismantling-sensing fence (immediately triggers virtual fence alarm upon detecting unauthorized dismantling).

[0035] Carrier-based mobile equipment: Core objectives: Standardize work areas, monitor battery level and safety status, and prevent unauthorized use or entry into hazardous areas. Fence types: Work area fences (such as polygonal work areas within warehouses), no-entry fences (such as hazardous chemical areas and office areas), and low-battery automatic retractable fences (when battery level is below 20%, the activity range shrinks to the vicinity of the charging area).

[0036] Personnel-worn devices: Core objectives: preventing loss, preventing entry into hazardous environments, and preventing battery malfunctions; Fence types: accompanying fence (linked to employee ID / mobile phone, alarm sounds when device is separated from person) and hazardous area fence (prohibiting entry into high temperature and high humidity areas).

[0037] The location data can be obtained through GPS / BeiDou positioning during the initial installation or deployment of the equipment, or imported from the asset management system. Polygonal / circular coordinates can be drawn or imported onto a map, such as warehouse electronic maps, park boundaries, and the service radius of battery swapping stations.

[0038] Real-time location stream: obtained via vehicle / airborne GNSS modules or IoT positioning tags.

[0039] Battery status data: Safety data: Real-time / periodic reporting of battery pack temperature, voltage, current, and SOC (state of charge). These are key inputs for generating status threshold fences.

[0040] Operational events: Charging start / end events, battery removal / installation sensor signals. Used to correlate charging / swapping behavior with geographical location.

[0041] Equipment operating data: such as speed, start / stop status, and tilt angle (anti-tipping).

[0042] On the electronic fence management platform, create corresponding fence types (geofence fences, status fences, etc.) based on the device type. Associate fence rules (such as "Energy Storage Cabinet 001 - Fixed Circular Fence, Radius 50 meters") with specific device IDs. For fleets or asset groups, batch binding is possible.

[0043] Geofencing parameters: Set center point, radius, and vertex coordinates.

[0044] Behavioral rules: An alarm will be triggered when the device enters an unauthorized area or leaves an authorized area (for theft / movement prevention). Exceeding the time limit for staying outside charging points may indicate a malfunction, unauthorized operation, or theft. An alarm will be triggered for excessive speed in restricted areas such as warehouses.

[0045] Status Association Rules: Battery Level-Location Linkage: "When the battery level is <15%, if the battery is not within the charging fence, trigger a low battery not returning to charge alarm." Temperature-Fence Linkage: "When the battery temperature > a set threshold, immediately generate the highest level alarm regardless of location and highlight it on the map." Disassembly-Location Verification: "When a disassembly signal is received, verify if the location is within the authorized repair / replacement fence; otherwise, trigger an illegal disassembly alarm."

[0046] The map displays the real-time locations of various fences and devices in layers using different colors and shapes. Triggered state threshold fences are visually represented (e.g., flashing red circles).

[0047] Alarm levels: Theft and movement (highest level), abnormal high temperature (highest level), low battery not returned to normal (medium level), and entering restricted area (low level).

[0048] Preferably, step S2 includes: Multi-source positioning is used to determine the real-time location of the battery, and internal and external positioning signals are collected. Based on the equipment status data, external positioning signals are filtered for anomalies to determine that there are no abnormal position signals. Correlate and correct abnormal location signals with internal location signals based on timestamps to determine compliant location signals; The compliant positioning signals are converted, fused, and smoothly interpolated to generate battery location data. Based on the battery status, the battery location data is segmented into point streams to obtain independent business data segments; Based on business events, event fitting is performed on independent business data segments to generate battery movement trajectories.

[0049] In this embodiment, GNSS (GPS / BeiDou) positioning is applicable to outdoor mobile devices (such as electric vehicles and outdoor energy storage power supplies). The collected data includes: latitude and longitude, altitude, timestamp, positioning accuracy (HDOP / PDOP), number of satellites, speed, and heading.

[0050] Location-based services (LBS): Used as a supplement or backup to GNSS, suitable for areas with signal obstruction. It collects base station ID (Cell ID), signal strength (RSSI), and triangulation coordinates.

[0051] Local IoT positioning: Suitable for indoor / warehouse environments (such as fixed energy storage cabinets and in-stock battery packs). Utilizes: UWB / Bluetooth AoA: Provides centimeter-level accuracy in 2D / 3D coordinates. RFID / QR code: Scans at key nodes (such as warehouse doors and charging racks) to record discrete "check-in" locations and times.

[0052] Inertial navigation (IMU) assistance: When GNSS signals are interrupted (such as in a tunnel), short-term displacement is calculated using accelerometer and gyroscope data to maintain trajectory continuity.

[0053] Terminal devices (such as vehicle-mounted T-Boxes and battery BMS integrated modules) package the above location data with the device's unique ID and battery status data (SOC, temperature).

[0054] Using IoT communication modules such as 4G / 5G Cat.1 / NB-IoT, data packets are uploaded to the cloud or edge server at a fixed frequency (e.g., once every 10 seconds) or triggered by events (e.g., location changes exceeding a threshold).

[0055] For known fixed equipment (such as energy storage cabinets), filter out random fluctuations of the positioning point within a small radius (such as 5 meters) of the preset anchor point (such as installation coordinates).

[0056] Based on physical laws, calculate the instantaneous velocity between consecutive points. Points with velocities exceeding the equipment's maximum possible speed (e.g., electric forklifts > 30 km / h) or with unreasonable acceleration are eliminated.

[0057] Remove low-quality positioning points whose positioning accuracy (HDOP) is greater than a set threshold (e.g., HDOP>3.0).

[0058] If a location appears in an obviously impossible area (such as the center of a lake or outside the country), it should be judged and eliminated based on historical trajectory.

[0059] For data gaps caused by signal interruption, linear or spline interpolation is performed between valid points before and after the gap, based on timestamps and average velocity, to generate reasonable inferred trajectory points.

[0060] The cleaned GPS point sequence is matched to the road network to correct positioning errors and smooth the trajectory to a practically feasible road.

[0061] GNSS, LBS, and IMU data are fused using a Kalman filter (KF) or a particle filter (PF) to obtain the optimal position estimate, which improves accuracy, especially in areas with complex signals.

[0062] Based on battery status or business events, continuous point flows are divided into independent "trips" or "tasks." The division criteria include: Charging events: The start and end of charging are the start and end points of the trip.

[0063] Prolonged stillness: Stillness exceeding a threshold (e.g., 15 minutes) may indicate loading / unloading or parking, serving as a break point.

[0064] Equipment start / stop signals: Combined with vehicle CAN bus or equipment power on / off signals.

[0065] Create a trajectory data structure for each trip, including: trajectory ID, device ID, battery ID, start time, end time, and a point sequence array. Use a spatiotemporal density-based clustering algorithm (such as DBSCAN-ST) to identify points that have been clustered for a long time and label them as "loading / unloading points," "charging points," and "abnormal stop points."

[0066] Preferably, refer to Figure 2 Step S3 includes: The electronic fence is analyzed based on the preset safety distance to obtain the fence layer lines and geometric turning points; A sliding window analysis and feature extraction were performed on the battery's movement trajectory to obtain a sequence of trajectory points. Based on the preset anomaly detection mechanism, the initial spatial position of the fence hierarchy lines and trajectory point sequence is determined; If consecutive trajectory points in the trajectory point sequence are within the critical distance threshold of the current fence level line, then the current trajectory point sequence is compared and fitted based on the geometric turning point; If no trajectory point fits the current turning boundary point, the battery is determined to be located on the current fence level line, and a remote power-on control signal is generated. If not, it is determined that the battery is not located at the current fence level line, and a remote power-off control signal is generated.

[0067] In this embodiment, the electronic fence is structured and analyzed according to a preset security strategy to obtain the fence hierarchy boundary lines and their geometric turning points composed of different alert levels. A time-series analysis and feature extraction based on a sliding window are performed on the real-time reported battery movement trajectory to obtain a smoothed trajectory point sequence with spatiotemporal attributes. Make an initial judgment on the spatial relationship between the trajectory point sequence and the fence hierarchy lines; If multiple consecutive points in the trajectory point sequence fall within the critical distance buffer of the current fence level, then the geometric similarity fitting and comparison between the trajectory segment and the turning boundary points of the fence will be further performed. If the trajectory fails to form an effective fit with any turning boundary point (i.e., the trajectory shape does not coincide with the fence boundary), it is determined that the battery is currently located within the allowable area defined by the fence level line, and the system automatically generates a remote power-on (or power-on) control signal. Otherwise, if the trajectory successfully fits the turning boundary point, it is determined that the battery has touched or exceeded the current safety boundary, and the system automatically generates a remote power-off (or enters restricted mode) control signal.

[0068] Establish a multi-dimensional anomaly detection rule base and logically associate it with electronic fences.

[0069] Multi-level decision logic definition: Level 1 anomaly: violation of basic geofencing (such as entering a restricted area or leaving an authorized area); Level 2 anomaly: Violation of status association rules (e.g., low battery without charging, moving in high temperature). Level 3 anomaly: violation of spatiotemporal behavior patterns (such as abnormal movement at night, speeding); Perform multi-dimensional matching judgments on each trajectory point to generate a matching matrix.

[0070] Anomaly score = Base score + Duration-weighted score + State-weighted score + Pattern deviation score Grading standards: - 0-30 points: Low risk warning (monitoring and observation); - 31-70 points: Medium risk alert (notification for manual review); - 71-100 points: High risk emergency (immediate automatic response).

[0071] Preferably, refer to Figure 3 The anomaly detection mechanism includes: Based on the battery location data, determine the coordinates of the battery center point, and combine this with the battery size to construct a primary safety zone for the battery deployment location; Based on the external dimensions and center coordinates of the battery carrier device, a secondary safety zone covering the entire device is constructed; Based on the mileage of the battery carrier device and its historical movement trajectory, an ultimate safety zone is constructed for the normal activity range; Compare the coordinates of the battery center point with the coordinates of the carrier center point, and calculate the deviation value; If the deviation value is within the preset deviation tolerance range, the current battery position is determined to be normal, and the battery operating status is detected; otherwise, feature extraction and judgment are performed on the battery movement trajectory. If the coordinates of the battery movement trajectory are located in the danger distance range of the primary safety zone, the battery status is detected. If the battery capacity is at the preset capacity limit threshold and the battery vibration and pressure are abnormal, the current battery is determined to be abnormally disassembled. If the coordinates of the battery's movement trajectory are located within the danger distance range of the secondary safety zone, it indicates that the current battery has detached from the battery carrier device, and the current battery is judged to be moving abnormally, generating the highest level risk warning. If the coordinates of the battery's movement trajectory are located within the danger distance range of the ultimate safety zone, the current battery is determined to be moving abnormally, and the highest level risk warning is generated.

[0072] In this embodiment, the fence hierarchy is constructed as follows: Battery safety boundary: Based on the battery's own position coordinates and physical dimensions, a primary safety zone is constructed that closely adheres to the battery's outer contour; Carrier-related boundary: Based on the external dimensions and center coordinates of the battery carrier device, a secondary safety zone covering the entire device is constructed; Behavioral pattern boundary: Combining the device's historical mileage and habitual movement trajectory, construct the ultimate safe zone that represents its normal range of activity.

[0073] Battery position deviation detection: The spatial deviation between the battery center point and the carrier center point is calculated in real time. If the value is within the preset allowable deviation range, the battery position is determined to be normal, and the battery operation status monitoring process is initiated; otherwise, trajectory feature analysis is triggered.

[0074] Abnormal trajectory classification diagnosis: If the trajectory point enters the dangerous distance range of the body's safety boundary, the battery status is comprehensively detected: when the battery capacity is lower than the set threshold and the vibration and pressure data are abnormal at the same time, it is judged as abnormal disassembly. If the trajectory point enters the danger distance range of the carrier's associated boundary, it indicates that the battery has detached from the carrier device, which is judged as abnormal movement and generates the highest level risk warning; If the trajectory point enters the dangerous distance range of the behavior pattern boundary, that is, the battery exceeds the historical normal activity range, it is also judged as abnormal movement and the highest level risk warning is generated.

[0075] Preferably, step S4 includes: The remote control signals are encapsulated based on the risk warning level, execution parameters, and device identification to generate a secure execution instruction package; Based on the battery's movement trajectory and the carrier's center coordinates, a dedicated transmission channel is constructed according to the risk warning level; The secure execution instruction packets are encrypted and transmitted using a dedicated transmission channel, and the optimal communication link is selected based on the urgency of the instruction and network conditions. The secure execution instruction packet is parsed and verified according to the optimal communication link. If the verification is successful, the remote control signal is decomposed to obtain the battery drive instruction. Based on the battery drive command, the power supply status of the battery is controlled to be turned on or off.

[0076] In this embodiment, the generated remote control commands (such as "power off", "power limited operation", "power restored") and context data such as real-time location are securely encapsulated to generate a structured data packet containing a unique command ID, target device ID, action type, execution parameters (such as power off delay, power percentage), activation conditions (such as "execute when battery enters charging fence"), and a digital signature. Based on the urgency of the command (such as "emergency power off" being the highest priority) and network conditions, the optimal communication link (such as a 4G / 5G channel directly connected to the device BMS, or a LoRaWAN link forwarded through a gateway) is automatically selected and entered into the corresponding priority transmission queue.

[0077] An end-to-end secure tunnel is established using certificate-based bidirectional TLS / DTLS encryption or Chinese national cryptographic algorithms to transmit encrypted command data packets. An acknowledgment (ACK) mechanism is used. Upon receiving a command, the device immediately returns a signed receipt containing the command ID. If the control center does not receive an ACK within a set time limit, it automatically retransmits the command according to a retry strategy (such as binary exponential backoff) to ensure delivery.

[0078] The system verifies the digital signature of the command to confirm its legitimacy and lack of tampering. Combined with local real-time data (such as precise location, voltage, temperature, and load status reported by the BMS), it determines whether the command's validity conditions are met. For example, the "restore power" command will only pass verification if the battery is detected to be stably connected to the charging station and at a normal temperature. Hardware and logic-level interlock checks are performed to prevent dangerous operations. For instance, when the vehicle is traveling at high speed (determined via CAN bus signals), the execution of the "remote power-off" command is blocked, and a "safety interlock rejected" feedback is returned.

[0079] The BMS main control chip parses the final approved instructions and drives the corresponding power switches (such as contactors and MOSFETs) or regulates the DC-DC converter to achieve operations such as power-on, power-off, and power limiting. After the instruction is executed, the device immediately and actively transmits the new power supply status (such as "main circuit disconnected" or "output power limited to 50%)", the execution result code, and key electrical parameters (total voltage and output current) back to the control center to complete status synchronization. The entire process of instruction reception, verification, and execution, as well as key snapshot data, are recorded in detail in the device's non-volatile memory for auditing and fault diagnosis.

[0080] The implementation principle of this embodiment is as follows: Based on the rule engine and geofencing algorithm, a multi-layer electronic fence is dynamically constructed that is linked with the device type and behavior status; then, high-precision battery movement trajectory is cleaned and constructed in real time through multi-source positioning fusion, Kalman filtering and interpolation algorithms; then, spatial topology analysis, trajectory-fence collision detection and multi-level safety zone (primary, secondary and ultimate) comparison algorithms are used, combined with battery status sensing data, to perform intelligent anomaly judgment and risk assessment; finally, control signals are issued through instruction encapsulation, encrypted transmission and dynamic routing technology to drive the power management unit to perform precise power on and off operations, thereby constructing a full-link, automated closed-loop safety management system from real-time perception, intelligent analysis to active control.

[0081] Reference Figure 4 A lithium battery-based electronic fence power on / off control system, applied to an electronic fence power on / off control method, includes: The positioning module is used to locate and track the real-time position of the battery, collect and clean the battery position data, construct the battery movement trajectory, and obtain the position data of the battery carrier device. The electronic fence module is used to determine the fence type and set boundary data based on the device type, and generate the electronic fence. The processing and control module is used to verify and compare the battery movement trajectory based on the preset anomaly judgment mechanism and the electronic fence, and generate the corresponding remote control signal. The power on / off execution module is used to control battery power supply based on remote control signals and battery position data; the remote control signals include power off signals and power on signals. The alarm module is used to monitor the battery. When the battery is violently disassembled or impacted, it will issue an alarm signal and generate alarm information. The communication module is used to send alarm information to the user terminal or cloud platform, and at the same time, the user can remotely and manually control the power on and off.

[0082] The implementation principle of this embodiment is as follows: the positioning module constructs the battery trajectory in real time through multi-source positioning fusion and Kalman filtering algorithm; the electronic fence module dynamically generates geofence based on rule engine; the processing and control module automatically determines anomalies and generates control signals using spatial topology analysis and trajectory collision detection algorithm; the power on / off execution module executes instructions through encrypted transmission and dynamic routing technology; the alarm module monitors violent behavior with the help of sensor fusion technology; and the communication module ensures real-time interaction, thereby constructing a full-link automated safety management and control system from real-time perception and intelligent analysis to active control. Example

[0083] The system is activated by connecting to the communication module via the user terminal APP, the power module starts up to supply power to each module, and the processing and control module completes self-test. Log in to the backend system via APP or computer client, select the fence type and set the boundary data. The boundary data is transmitted to the processing and control module through the communication module and stored in the built-in Flash memory. The location information of the lithium battery is obtained in real time through the positioning module built into the lithium battery; The processing and control module compares the acquired location information with the preset electronic fence boundary data to determine whether the lithium battery exceeds the specified area range. Based on the comparison results, the intelligent control system switches the lithium battery on and off. When the lithium battery is detected to be outside the designated area, the system automatically cuts off the power supply to the lithium battery; when the lithium battery returns to the designated area, the system automatically restores the power supply to the lithium battery.

[0084] An electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.

[0085] A storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the electronic fence power-on / off control method as described above.

[0086] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A method for controlling the power on / off of an electronic fence based on a lithium battery, characterized in that, include: Determine the fence type based on the device type and set the boundary data to generate an electronic fence; Locate and track the real-time position of the battery, collect and clean the battery position data, and construct the battery movement trajectory; Based on the preset anomaly detection mechanism and the electronic fence, the battery movement trajectory is verified and compared to generate a corresponding remote control signal. The battery power supply is controlled based on the remote control signal and the battery location data.

2. The lithium battery-based electronic fence power-on / off control method according to claim 1, characterized in that, The step of determining the fence type based on the device type and setting boundary data to generate an electronic fence includes: The purpose of monitoring the electronic fence is determined based on the type of equipment, and the fence type is obtained; Real-time positioning of the battery carrier equipment is performed to determine the center coordinates of the carrier, and combined with battery status data, hierarchical fence boundary data is obtained. An initial hierarchical fence is generated based on the carrier's center coordinates and the hierarchical fence boundary data. The initial level fence is modified based on the fence type and the behavior state association rules to obtain the electronic fence.

3. The lithium battery-based electronic fence power-on / off control method according to claim 1, characterized in that, The real-time location tracking of the battery, including collecting and cleaning battery location data and constructing the battery movement trajectory, includes: Multi-source positioning is used to determine the real-time location of the battery, and internal and external positioning signals are collected. Based on the device status data, the external positioning signals are filtered for anomalies to determine that there are no abnormal position signals. The abnormal location signal and the internal positioning signal are correlated and corrected according to the timestamp to determine the compliant positioning signal; The compliant positioning signals are converted, fused, and smoothly interpolated to generate battery location data; The battery location data is segmented into point streams based on the battery status to obtain independent service data segments; Based on the business events, the independent business data segments are fitted with events to generate the battery movement trajectory.

4. The lithium battery-based electronic fence power-on / off control method according to claim 1, characterized in that, The step of verifying and comparing the battery movement trajectory based on a preset anomaly detection mechanism and the electronic fence, and generating a corresponding remote control signal, includes: The electronic fence is analyzed based on the preset safety distance to obtain the fence layer lines and geometric turning points; A sliding window analysis and feature extraction were performed on the battery's movement trajectory to obtain a sequence of trajectory points. According to the preset anomaly detection mechanism, the spatial position of the fence hierarchy line and the trajectory point sequence is initially determined; If consecutive trajectory points in the trajectory point sequence are within the critical distance threshold of the current fence level line, then the current trajectory point sequence is compared and fitted according to the geometric turning point; If no trajectory point fits the current turning boundary point, the battery is determined to be located on the current fence level line, and a remote power-on control signal is generated. If not, it is determined that the battery is not located at the current fence level line, and a remote power-off control signal is generated.

5. The lithium battery-based electronic fence power-on / off control method according to claim 1 or 4, characterized in that, The anomaly detection mechanism includes: Based on the battery location data, determine the coordinates of the battery center point, and combine this with the battery size to construct a primary safety zone for the battery deployment location; Based on the external dimensions and center coordinates of the battery carrier device, a secondary safety zone covering the entire device is constructed; Based on the mileage of the battery carrier device and its historical movement trajectory, an ultimate safety zone is constructed for the normal activity range; The coordinates of the battery center point are compared with the coordinates of the carrier center point, and the deviation value is calculated; If the deviation value is within the preset deviation tolerance range, the current battery position is determined to be normal, and the battery operating status is detected; otherwise, feature extraction and judgment are performed on the battery movement trajectory. If the coordinates of the battery movement trajectory are located within the danger distance range of the primary safety zone, the battery status is detected. If the battery capacity is at a preset capacity limit threshold and the battery vibration and pressure are abnormal, the current battery is determined to be abnormally disassembled. If the coordinates of the battery movement trajectory are located within the danger distance range of the secondary safety zone, it indicates that the current battery has detached from the battery carrier device, and the current battery is determined to be moving abnormally, generating the highest level risk warning. If the coordinates of the battery's movement trajectory are located within the danger distance range of the ultimate safety zone, the current battery is determined to be moving abnormally, and the highest level risk warning is generated.

6. The lithium battery-based electronic fence power-on / off control method according to claim 1, characterized in that, The step of controlling battery power supply based on the remote control signal and the battery location data includes: The remote control signals are encapsulated based on the risk warning level, execution parameters, and device identification to generate a secure execution instruction package; Based on the battery's movement trajectory and the carrier's center coordinates, a dedicated transmission channel is constructed according to the aforementioned risk warning level; The secure execution instruction packet is encrypted and transmitted through the dedicated transmission channel, and the optimal communication link is selected based on the urgency of the instruction and network conditions. The secure execution instruction packet is parsed and verified according to the optimal communication link. If the verification is successful, the remote control signal is decomposed to obtain the battery drive instruction. According to the battery drive command, the power supply status of the battery is controlled to be turned on or off.

7. A lithium battery-based electronic fence power-on / off control system, used to implement the electronic fence power-on / off control method as described in any one of claims 1-6, characterized in that, include: The positioning module is used to locate and track the real-time position of the battery, collect and clean the battery position data, construct the battery movement trajectory, and obtain the position data of the battery carrier device. The electronic fence module is used to determine the fence type and set boundary data based on the device type, and generate the electronic fence. The processing and control module is used to verify and compare the battery movement trajectory based on the preset anomaly judgment mechanism and the electronic fence, and generate the corresponding remote control signal. The power on / off execution module is used to control the battery power supply based on the remote control signal and the battery position data; The alarm module is used to monitor the battery. When the battery is violently disassembled or impacted, it will issue an alarm signal and generate alarm information. The communication module is used to send the alarm information to the user terminal or cloud platform, and at the same time, the user can remotely and manually control the power on and off.

8. The lithium battery-based electronic fence power on / off control system according to claim 7, characterized in that, The remote control signals include power-off signals and power-on signals.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.

10. A storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the electronic fence power-on / off control method as described in any one of claims 1 to 6.