Method for warning illegal operation of storage battery based on edge calculation box
Through the edge computing box combined with video image acquisition equipment, human posture estimation algorithm, object detection and tracking algorithms are used to identify and alert battery violations in real time, solving the real-time and safety problems of traditional methods and achieving efficient battery management.
Patent Information
- Application Number
- CN202510372011.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional battery safety management methods have poor real-time performance, strong network dependence, and are unable to respond quickly to illegal operations. They also have congestion in computing resources, privacy leakage and security risks, and lack local independent decision-making capabilities.
The edge computing box is used to combine video image acquisition equipment to analyze user behavior in real time through human posture estimation algorithm, object detection algorithm and target tracking algorithm, identify illegal battery operation behavior, and trigger sound and light alarms and push alarm information.
Real-time monitoring and accurate alarms for battery violations are achieved, the safety and management efficiency of electric carports are improved, security risks are reduced, and data transmission integrity and privacy protection are ensured.
Smart Images

Figure CN120259943A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban governance algorithms, and more specifically, to a method for warning against illegal operation of electric batteries based on an edge computing box. Background Art
[0003] Traditional electric battery safety management methods mainly rely on cloud-based centralized processing or manual inspections, and have many limitations. First, traditional methods have poor real-time performance. Data needs to be transmitted to the cloud for analysis and then the results are returned, making it impossible to quickly respond to illegal operation of electric battery behaviors. For some illegal behaviors, such as disassembly and handling, serious accidents may be caused in a short time. Second, traditional methods are highly dependent on the network. In scenarios where the network is interrupted or the signal is weak, monitoring and warning may fail, reducing reliability. In addition, cloud-based centralized processing is prone to congestion of computing resources due to excessive data volume, affecting the stability and efficiency of the system, while manual inspections are inefficient, with limited frequency, and prone to missing abnormal problems in dynamic changes. Traditional methods also lack local autonomous decision-making capabilities, unable to issue warnings immediately in case of emergencies, missing the best treatment opportunity, and may also bring privacy leakage and security risks due to centralized transmission and storage of data. Summary of the Invention
[0004] The technical task of the present invention is to address the above deficiencies and provide a method for warning against illegal operation of electric batteries based on an edge computing box. For possible illegal operation behaviors in community electric vehicle sheds, through efficient data collection and analysis, real-time monitoring and accurate warning of illegal operation of electric batteries are achieved.
[0005] The technical solution adopted by the present invention to solve its technical problems is:
[0006] A method for warning against illegal operation of electric batteries based on an edge computing box, the implementation of this method includes:
[0007] Video image acquisition module: Obtain video image data of the community electric vehicle shed from video image acquisition devices installed in the community electric vehicle shed;
[0008] Illegal behavior analysis module: Perform real-time processing and analysis on the video image data. By integrating human pose estimation algorithms, object detection algorithms, and object tracking algorithms, it can capture and analyze user behaviors in real time and identify possible illegal operation behaviors of electric batteries;
[0009] Analysis result upload module: Upload the illegal behavior analysis results to the community monitoring platform, so that the community monitoring platform can display the illegal behavior analysis results to achieve information sharing and centralized management;
[0010] Violation Alarm Module: When the system identifies a user's illegal operation of the battery, it immediately triggers an audible and visual alarm and pushes an alarm message.
[0011] This method is an innovative intelligent battery monitoring solution that focuses on potential illegal operation behaviors in community electric vehicle sheds. The method takes the edge computing box installed in the community monitoring center as the core, and cooperates with the video image acquisition devices installed in the community electric vehicle sheds. Through efficient data acquisition and analysis, it realizes real-time monitoring and accurate warning of battery illegal operations.
[0012] First, the edge computing box obtains real-time video image data from the video image acquisition devices installed in the community electric vehicle shed. These data are transmitted to the illegal behavior analysis module pre-stored in the edge computing box for processing. This module integrates human pose estimation algorithms, object detection algorithms, and object tracking algorithms, and can perform detailed analysis on the user behaviors in the images. Among them, the human pose estimation algorithm is used to capture the user's body movements and their dynamic changes, the object detection algorithm can effectively locate the specific positions and states of electric vehicles, batteries, and users, and at the same time the object tracking algorithm is responsible for maintaining the tracking and behavior records of relevant targets in consecutive video frames.
[0013] Through the collaborative work of these algorithms, the system can real-time identify potential dangerous operations such as illegal disassembly and illegal handling of batteries. When the system identifies that a user has an illegal operation, the edge computing box will immediately trigger the on-site audible and visual alarm device to give a warning, so as to quickly attract the user's attention and prevent the further development of dangerous behaviors. At the same time, the system will upload the analysis results of illegal behaviors to the community monitoring platform, facilitating the management personnel to view the alarm information and specific behavior analysis results in real time through the platform interface.
[0014] In addition, the system can also push alarm messages to designated management personnel or user terminals, such as mobile applications or management platforms, to ensure that the alarm information is transmitted to relevant personnel in the shortest time. This method that integrates data acquisition, analysis, alarm, and display significantly improves the intelligent level of electric vehicle battery management, not only improves the safety of community electric vehicle sheds, but also reduces potential safety risks, providing reliable monitoring and alarm support for users.
[0015] Furthermore, the edge computing box includes multiple hardware interfaces for connecting different video image acquisition devices;
[0016] The video image acquisition includes: determining the target hardware interface corresponding to the video image acquisition device from a preset multiple of the hardware interfaces; using the target hardware interface to read the video image data from the video image acquisition device.
[0017] Furthermore, the video image acquisition module has a preliminary data processing function, including resolution adjustment and background noise filtering;
[0018] Specifically, the bilinear interpolation algorithm is used to scale the image size and the Gaussian filter is used to achieve background noise filtering.
[0019] Furthermore, for the input image I in (x, y), the goal is to generate a new output image I out (u, v) with a resolution of M×N. The video image acquisition process is as follows:
[0020] First, preset the scaling factors as s x and s y :
[0021]
[0022] The pixel values of the output image are calculated by bilinear interpolation:
[0023]
[0024] Among them, (x, y) and (u, v) represent the pixel coordinates before and after the video image scaling respectively;
[0025] Background noise filtering is achieved through a Gaussian filter. The two-dimensional Gaussian kernel function is as follows:
[0026]
[0027] Among them, σ represents the standard deviation, which is used to control the smoothness of the Gaussian filter;
[0028] Subsequently, a convolution operation is performed on the input image I in (x, y):
[0029]
[0030] Among them, k represents the radius of the filter kernel, which is used to control the size of the filter.
[0031] Furthermore, the violation behavior analysis module
[0032] Combines the human pose estimation algorithm with the YOLOv11 pedestrian target detection framework and the PoseNet pose estimation network to achieve accurate extraction and behavior analysis of human key points, and determines the behavior of bending over to operate the battery through the trunk bending angle and the joint spatial position relationship;
[0033] The target detection algorithm adopts the latest YOLOv11 framework, which is specifically used for efficiently detecting pedestrians and battery targets. It abandons the traditional non-maximum suppression step and adopts a consistent dual assignment strategy, improving the detection accuracy and reducing the computational overhead;
[0034] The target tracking algorithm adopts multi-object tracking technology based on ByteTrack, combining target detection and trajectory estimation, and can maintain efficient tracking performance when targets are occluded from each other or in complex environments.
[0035] Furthermore, for the human pose estimation algorithm, first, the YOLOv11 target detection framework is used to quickly locate pedestrians in the community video image frames, generating high-precision human detection boxes to provide reliable input for pose estimation; then, the PoseNet network extracts the two-dimensional coordinates of 17 key parts of the human body, including the head, shoulders, hips, and knees, etc.; to improve stability, the central coordinates of key points such as the hips, shoulders, and knees are calculated using the mean of bilateral horizontal and vertical coordinates to ensure the accuracy of the input data; the shoulder center coordinates are calculated using the mean of the horizontal and vertical coordinates of both shoulders, and the calculation formula is as follows:
[0036]
[0037] Among them, (X shoulde_l , Y shoulder_l ) and (X shoulder_r , Y shoulder_r ) respectively represent the horizontal and vertical coordinates of the left shoulder and the right shoulder; the other calculation formulas are similar;
[0038] On the basis of obtaining the human key points, the human pose estimation algorithm determines the bending behavior by calculating the trunk bending angle; specifically, the system constructs two vectors from the head to the hip and from the hip to the knee:
[0039]
[0040] Among them, respectively represent the direction vectors from the head to the hip and from the hip to the knee, (X head , Y head ), (X hip , Y hip ), (X knee , Y knee ) respectively represent the horizontal and vertical coordinates of the head, hip, and knee; the calculation formula for the included angle is as follows:
[0041]
[0042] Among them, θ represents the bending angle between the upper body and the lower body; the included angle can be obtained by taking the arccosine value of cos(θ); by calculating the included angle between these two vectors, the bending degree of the upper body is judged; when the human body stands upright, the head, hip, and knee are approximately on the same vertical line; when bending down, the forward tilt of the head causes the included angle between the vectors to decrease; if the included angle is less than the preset bending angle threshold (taking 150 degrees as an example), the system can determine that the upper body is in a bending state.
[0043] In addition to the trunk bending angle, the human body pose estimation algorithm also assists in judging the bending behavior by analyzing the spatial position relationship of key parts of the human body; specifically, using the vertical height ratio method, calculate the ratio of the height difference from the head to the hip to the height from the hip to the knee:
[0044]
[0045] Among them, Y hip 、Y knee respectively represent the central position heights of the two hips and two knees; in the case of normal standing, when standing normally, R y should be greater than the preset vertical height ratio threshold (taking 1.5 as an example), and when bending down, the head approaches the hip, resulting in Y head -Y hip shrinking, making R y decrease; if R y is lower than the preset threshold, it is determined as a bending action.
[0046] In addition, the horizontal displacement between the head and the hip is detected through the horizontal distance calculation method, and the forward movement trend of the head is further verified in combination with the shoulder width calculation; among them, the calculation formula for the horizontal distance between the head and the hip is as follows:
[0047] D x =|X head -X hip |;
[0048] The calculation formula for the shoulder width is as follows:
[0049] W s =|X shoulder_l -X shoulder_r |;
[0050] When the user stands, D x is small, and when bending down, D x will exceed the normal range. If D x exceeds the preset horizontal distance ratio threshold (taking 0.5 times of the shoulder width W s as an example), it is considered that the head has a significant forward movement, indicating a bending behavior.
[0051] In summary, through the dual analysis of the relationship between the trunk bending angle and the joint spatial position, the human pose estimation algorithm can effectively adapt to complex scenarios, filter out misjudgments caused by irrelevant actions, and finally achieve accurate determination of the illegal behavior of bending down to operate the battery; this algorithm provides key support for the illegal behavior analysis module and lays a technical foundation for the real-time warning and efficient management of the system;
[0052] For the target detection algorithm, the YOLOv11 model includes a backbone network Backbone, a neck network Neck, and a detection head Head. The backbone network is responsible for extracting the basic features of the battery from the community video image, such as shape, size, color, and edge contrast, while filtering out background noise; this stage provides reliable visual clues for subsequent feature fusion; the neck network fuses features of different scales through a Feature Pyramid Network (FPN) or a Path Aggregation Network (PAN), enabling the model to simultaneously focus on the global contour and detailed features of the battery; in this way, even in complex scenarios, the system can accurately detect battery targets of different sizes, positions, and angles; finally, the detection head is responsible for outputting the detection results, including the bounding box position, category, and confidence of the battery target;
[0053] The target detection algorithm further determines illegal behavior through the spatial position relationship: when a battery target is detected, the system compares its position with the human detection box. Assume the human detection box is a rectangle, and the area is delimited by the coordinates of the upper left corner and the lower right corner, that is, the upper left corner coordinates of the human detection box are (X left Y top ), and the lower right corner coordinates are (X right Y bottom ), while the center coordinates of the battery are (X battery Y battery ). Then the condition for the battery target to fall within the human detection box is that the horizontal and vertical coordinates of the battery center point both satisfy within the range of the human detection box, that is:
[0054] X left ≤X battery ≤X right ;
[0055] Y top ≤Y battery ≤Y bottom ;
[0056] If both of the above conditions are met, it means that the center point of the battery falls within the human detection box, which can be used as a basis for judging that the battery is within the user's activity range;
[0057] In addition, the object detection algorithm determines whether there is a relatively close spatial relationship between the battery center and the user's wrist joint by calculating the distance therebetween: assuming that the coordinates of the user's left and right wrist joints are (X wirst_l , Y wirst_l ), (X wirst_r , Y wirst_r ) respectively; taking the left wrist joint as an example, the Euclidean distance formula can be used to calculate the distance between the battery center and the left / right wrist:
[0058]
[0059] The distance D between the right / left wrist and the battery is calculated in the same way r ; after obtaining D l , D r , the shortest distance D between the battery and the wrist is further obtained min :
[0060] D min = min(D l , D r );
[0061] If the minimum distance D min is less than a preset threshold (taking 0.1 meters as an example), it is determined that the battery is within the operable range of the user; the judgment condition is as follows:
[0062] D min ≤ D threshlod ;
[0063] To ensure the accuracy of the judgment, the system will continuously calculate the D min values in multiple frames of video images in the time series to determine whether this spatial relationship persists: if D min ≤ D threshold holds continuously in multiple frames, it can be more stably determined that the user is operating the battery; through this distance calculation and threshold judgment, it can be more accurately determined whether the battery target is illegally carried into or out of the community by the user;
[0064] This object detection algorithm deeply learns the appearance features of the battery and combines human body spatial relationship analysis to achieve accurate determination of the behavior of illegally carrying or operating the battery; through efficient object detection and fine spatial relationship calculation, the YOLOv11 framework not only improves the accuracy of battery object detection, but also enhances the system's adaptability to complex scenarios, providing comprehensive and reliable technical support for the monitoring of battery violation behaviors;
[0065] The core process of the object tracking algorithm includes two stages: object detection and trajectory estimation;
[0066] First, the system uses an object detection algorithm (taking YOLOv11 as an example) to identify pedestrians and battery targets in the video image, and extracts their position and category information. Then, the object tracking algorithm predicts and updates the state of the target through the Kalman Filter, thus forming the movement trajectory of the target in the video image frame sequence. The Kalman Filter is the core tool for object tracking and is used to dynamically estimate the state of the battery (such as position and speed). It achieves the continuity and accuracy of tracking through two steps: The first step is prediction, which estimates the position of the target in the next frame based on the dynamic model of the system. The second step is update, which corrects the predicted value by comparing it with the actual position of the detection box, thereby improving the accuracy of the estimation. Specifically, the state prediction is described by the following formula:
[0067]
[0068] And the state update is completed by the following formula:
[0069]
[0070] Among them, F k 、H k represent the state transition matrix and the observation matrix respectively, and K k represents the Kalman gain;
[0071] To achieve the matching of pedestrian and battery targets between frames, the object tracking algorithm uses the Hungarian algorithm for data association. By calculating the cost matrix, this algorithm matches the targets in the current frame with the trajectories in the previous frame. Specifically, the cost matrix C is an N×N matrix, and the matrix element C [i][j] represents the matching cost between the i-th target (such as a trajectory) and the j-th detection box. The cost is calculated based on the Euclidean distance:
[0072]
[0073] Among them, (X i 、Y i )、(X j 、Y j ) represent the center position coordinates of the trajectory i and the detection box j respectively;
[0074] After obtaining the cost matrix, to find the optimal match, the algorithm processes the matrix through row and column subtraction. Subtract the minimum value of each row from that row, so that at least one element in the row is zero:
[0075] C′ [i][j] =C [i][j] -min i C [i][j]
[0076] Subsequently, a similar operation is performed on each column to ensure that there are also zero values in the column:
[0077] C″ [i][j] = C [i][j] - min j C [i][j]
[0078] The purpose of this process is to transform the problem into finding the optimal allocation of zero elements; then, by finding independent zeros (i.e., zeros that appear only once in each row and each column) as matching points, the matching relationship between partial trajectories and detection boxes is determined; if the independent zeros are not sufficient to complete all matches, the cost matrix needs to be adjusted; the algorithm will find the minimum value m among the uncovered elements and adjust the matrix: subtract m from the uncovered elements and add m to the elements covered twice; the purpose of this adjustment is to create new zero values, thereby increasing the number of independent zeros;
[0079] After repeated matrix adjustments and updates of the matching status, all trajectories and detection boxes will eventually be allocated, and the total cost will be calculated; the expression for the total cost is:
[0080] Total Cost = ∑ (i,j)∈Matching C [i][j] ;
[0081] where (i, j) represents the pair of matching trajectories and detection boxes;
[0082] Through the above series of optimization steps, the Hungarian algorithm finds the minimum matching cost to ensure the correct association of pedestrian and battery targets with trajectories; at the same time, for newly emerging targets, the algorithm will assign new trajectories to them, and for unmatched old trajectories, it will decide whether to continue to retain or terminate the tracking according to the set timeout threshold.
[0083] The innovation of the target tracking algorithm in this method lies in that it not only focuses on high-confidence detection boxes but also improves the tracking ability for occluded targets and complex scenarios by associating low-confidence detection targets. This delay mechanism allows pedestrian and battery targets to be recaptured after a short loss, making the application of the algorithm in the community environment more reliable.
[0084] In summary, with the collaborative effect of multiple algorithms, the violation behavior analysis module can quickly determine whether the user has violated the rules. When detecting abnormal operations such as disassembling and carrying the battery by the user, the module will generate analysis results in real time and output detailed descriptions of relevant behaviors, including information such as the operation category, time, and target location.
[0085] Furthermore, the analysis result uploading module,
[0086] In terms of data processing, this module standardizes and optimizes the analysis results, including video screenshots, descriptions of violation behaviors, and metadata such as event time and location; these data are uniformly converted into lightweight formats such as JSON and XML, and the video screenshots or short videos are compressed to reduce the amount of data transmitted; the video compression strategy adopted by this module is similar to the resolution adjustment algorithm of the video image acquisition module.
[0087] Through the combination of a hash function and an asymmetric encryption digital signature mechanism, the integrity and authenticity of the data during the upload process are ensured, while strengthening the protection of user privacy; the formula is as follows:
[0088] S = H(M) d mod n;
[0089] V = H(M′) e mod n;
[0090] Among them, S and V represent the user signature and verification result respectively, and H(M) and H(M') represent the hash value of message M and the hash value of the received message M' respectively;
[0091] The analysis result upload module supports real-time upload and resume interrupted upload functions. When the system identifies a violation behavior, the analysis result will be immediately uploaded to the community monitoring platform to ensure that the management personnel can obtain the event information and respond in the first time. In the case of network interruption or weak signal, the analysis result upload module temporarily caches the analysis result locally and automatically resumes the upload after the network is restored to ensure the integrity and reliability of the data; the core algorithm of resume interrupted upload is as follows:
[0092]
[0093] The resume interrupted upload algorithm can dynamically adjust the block size according to the network speed to optimize the transmission efficiency of the analysis result; specifically, if the current upload speed is higher than a certain threshold (taking 1M / s as an example), it means that the network condition is good, and the block size can be increased to speed up the transmission; if the current upload speed is lower than the threshold, it means that the network condition is poor, and the block size needs to be reduced to reduce the transmission failure caused by network fluctuations.
[0094] Through the analysis result upload module, the electric vehicle warning system for illegal operations realizes the efficient sharing and centralized management of information. The real-time, secure and extensible design of the module not only improves the operation efficiency of the system, but also provides technical support for the intelligent safety management of the community electric vehicle shed, ensuring the stable operation of the system in diverse scenarios.
[0095] Furthermore, the violation behavior warning module includes local warning and remote notification;
[0096] Regarding the local alarm, when the system identifies abnormal operations such as illegal disassembly or handling of the battery by the user through the illegal behavior analysis module, the alarm module will immediately trigger the on-site audible and visual alarm device. The high-decibel sound and high-brightness flashlights can issue warnings within a millisecond response time, quickly attracting the attention of the user and surrounding people, and promptly stopping potential dangerous behaviors;
[0097] Regarding the remote notification, the alarm information is remotely pushed to the terminal devices of relevant management personnel, including mobile applications, emails, or text messages, etc. The content of the pushed information is detailed and comprehensive, covering the description of the illegal behavior, the occurrence time, the specific location, and relevant screenshots or video clips, helping the management personnel quickly understand the whole picture of the event and take corresponding measures; according to the severity of the event, the system will automatically adjust the push priority; for example, for major illegal behaviors (such as high-risk battery handling), the alarm information will be preferentially sent to the key person in charge to ensure that the event can be handled in a timely manner;
[0098] Based on the risk classification alarm formula, a quantitative assessment is carried out by combining multiple attributes of the event, including the severity of the illegal behavior, the occurrence frequency, the detection confidence level, and the potential hazards that may be caused; the core formula of risk classification alarm is as follows:
[0099] R = α·S + β·F + γ·C + δ·H;
[0100] Among them, S represents the severity of the illegal behavior, which is directly assigned according to the type of illegal behavior; for example, illegal disassembly of the battery is recorded as 3, and illegal handling of the battery is recorded as 5;
[0101] F represents the occurrence frequency of the illegal behavior. The system records the number of illegal behaviors occurring for the same user or area within a specified time window (taking 1 hour or 1 day as an example), and normalizes it to 1 - 5; the calculation formula for the occurrence frequency of illegal behaviors is as follows:
[0102]
[0103] In the calculation formula of the occurrence frequency of illegal behaviors, N occurrences represents the number of violations, and T represents the time window;
[0104] C represents the detection confidence level, which is directly assigned according to the output confidence level of the algorithm, ranging from 0 to 1; the higher the confidence level, the more reliable the judgment of the illegal behavior;
[0105] H represents the potential hazard score, which is assigned according to the potential safety hazards caused by the illegal behavior. Considering that illegal handling of the battery may cause a fire, it is recorded as 5, while minor illegal behaviors are recorded as 2;
[0106] α, β, γ, δ all represent the weight coefficients of the above factors;
[0107] According to the calculated risk score R, the alarms are divided into different levels:
[0108] Low risk (R < 3): Only trigger local audible and visual alerts;
[0109] Medium risk (3 ≤ R < 6): Trigger local alerts and push remote alarms;
[0110] High risk (R ≥ 6): Trigger a full set of alarm means, including local alerts, remote pushes, and reporting to the advanced management system.
[0111] To improve the processing efficiency of alarms, the system also supports secondary alerts for unprocessed alarm events to avoid the expansion of risks caused by human negligence.
[0112] In summary, the illegal behavior alarm module realizes precise intervention in the illegal operation behavior of electric batteries through multi-level and multi-channel alarm means. The design of this module not only ensures the real-time and effectiveness of alarms but also provides data support and management convenience for the long-term operation of the system, thus significantly improving the safety and management efficiency of the community electric vehicle shed.
[0113] The present invention also claims to protect an edge computing box, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented;
[0114] The edge computing box supports real-time uploading and resume interrupted transfer functions, ensuring that in the case of network interruption or weak signal, the analysis results can be temporarily cached locally and automatically resumed after the network is restored, guaranteeing the integrity and reliability of the data.
[0115] The present invention also claims to protect a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented;
[0116] The computer program also implements a risk classification alarm formula, which quantitatively evaluates according to the severity, occurrence frequency, detection confidence, and potential harm of illegal behaviors, thereby triggering different levels of alarm measures.
[0117] Compared with the prior art, the method for warning against illegal operation of electric batteries based on an edge computing box according to the present invention has the following beneficial effects:
[0118] The present invention integrates edge computing technology and video image processing algorithms to achieve real-time monitoring and accurate warning of illegal operation behaviors of batteries in the community electric vehicle shed. The edge computing box efficiently processes video image data, and uses human pose estimation, object detection, and object tracking algorithms to collaboratively analyze user behaviors, quickly identify potential dangerous operations such as illegal battery disassembly and illegal battery handling, and trigger audible and visual alarms and push alarm messages when anomalies are identified. At the same time, the analysis results are uploaded to the community monitoring platform for easy viewing and timely handling by management personnel. The purpose of the present invention is to improve the intelligence and safety of electric vehicle battery management, reduce potential safety hazards caused by illegal operations, and ensure the safety and stability of the community environment. Description of the Drawings
[0119] Figure 1 It is a flowchart of the video image acquisition module provided by an embodiment of the present invention;
[0120] Figure 2 It is a flowchart of the illegal behavior analysis module provided by an embodiment of the present invention;
[0121] Figure 3 It is a diagram showing the architecture of the human pose estimation algorithm model provided by an embodiment of the present invention;
[0122] Figure 4 It is a diagram showing the architecture of the object detection network model provided by an embodiment of the present invention;
[0123] Figure 5 It is a flowchart of the object tracking algorithm provided by an embodiment of the present invention;
[0124] Figure 6 It is a flowchart of the analysis result upload module provided by an embodiment of the present invention;
[0125] Figure 7 It is a flowchart of the illegal behavior warning module provided by an embodiment of the present invention. Detailed Embodiments
[0126] An embodiment of the present invention provides an illegal operation battery warning method based on an edge computing box. The implementation of this method includes:
[0127] Video image acquisition: Obtain the video image data of the community electric vehicle shed from the video image acquisition device installed in the community electric vehicle shed;
[0128] Illegal behavior analysis: Use the illegal behavior analysis module pre-stored in the edge computing box to perform real-time processing and analysis on the video image data. By integrating human pose estimation algorithms, object detection algorithms, and object tracking algorithms, it is possible to capture and analyze user behaviors in real time and identify possible illegal operation battery behaviors;
[0129] Upload of analysis results: Upload the analysis results of violation behaviors to the community monitoring platform so that the community monitoring platform can display the analysis results of violation behaviors, realizing information sharing and centralized management;
[0130] Alarm for violation behaviors: When the system identifies that a user operates the battery in violation, it immediately triggers an audible and visual alarm and pushes the alarm information.
[0131] The edge computing box includes multiple hardware interfaces for connecting different video image acquisition devices; the acquisition of the video image includes: determining the target hardware interface corresponding to the video image acquisition device from a preset plurality of the hardware interfaces; using the target hardware interface to read the video image data from the video image acquisition device.
[0132] The video image acquisition module also has a preliminary data processing function, including resolution adjustment and background noise filtering; specifically, the bilinear interpolation algorithm is used to scale the image size and the Gaussian filter is used to implement background noise filtering.
[0133] The violation behavior analysis module combines the human pose estimation algorithm with the YOLOv11 pedestrian target detection framework and the PoseNet pose estimation network to achieve accurate extraction and behavior analysis of human key points, and determines the behavior of bending down to operate the battery through the trunk bending angle and the joint spatial position relationship. The target detection algorithm uses the latest YOLOv11 framework, which is specifically used for efficiently detecting pedestrian and battery targets, abandons the traditional non-maximum suppression step, and adopts a consistent dual assignment strategy, improving the detection accuracy and reducing the computational overhead. The target tracking algorithm uses the multi-target tracking technology based on ByteTrack, combines target detection and trajectory estimation, and can maintain high-efficiency tracking performance when targets are occluded from each other or in a complex environment.
[0134] This method is an innovative intelligent battery monitoring solution, focusing on the violation operation behaviors that may occur in the community electric vehicle shed. This method takes the edge computing box installed in the community monitoring center as the core, cooperates with the video image acquisition devices installed in the community electric vehicle shed, and realizes the real-time monitoring and accurate alarm of battery violation operations through efficient data acquisition and analysis.
[0135] First, the edge computing box obtains real-time video image data from the video image acquisition devices installed in the community electric vehicle shed. These data are transmitted to the pre-stored illegal behavior analysis module in the edge computing box for processing. This module integrates human pose estimation algorithms, object detection algorithms, and object tracking algorithms, and can conduct a detailed analysis of the user behavior in the image. Among them, the human pose estimation algorithm is used to capture the user's body movements and their dynamic changes, the object detection algorithm can effectively locate the specific positions and states of electric vehicles, batteries, and users, and at the same time, the object tracking algorithm is responsible for maintaining the tracking and behavior recording of relevant objects in consecutive video frames.
[0136] Through the collaborative work of these algorithms, the system can identify potential dangerous operations in real time, such as illegal disassembly and illegal handling of batteries. When the system identifies that a user has an illegal operation, the edge computing box will immediately trigger the on-site sound and light alarm device to give a warning, so as to quickly attract the user's attention and prevent the further development of dangerous behaviors. At the same time, the system will upload the analysis results of illegal behaviors to the community monitoring platform, facilitating the management personnel to view the warning information and specific behavior analysis results in real time through the platform interface.
[0137] In addition, the system can also push alarm information to designated management personnel or user terminals, such as mobile applications or management platforms, to ensure that the warning information is transmitted to relevant personnel in the shortest time. This method that integrates data collection, analysis, alarm, and display significantly improves the intelligent level of electric vehicle battery management, not only improves the safety of the community electric vehicle shed, but also reduces potential safety risks, providing reliable monitoring and alarm support for users.
[0138] As shown in the accompanying drawings, the specific implementation of this method is as follows:
[0139] 1. Video image acquisition module.
[0140] The video image acquisition module is a basic component of the illegal operation battery warning system based on the edge computing box. Its main function is to obtain real-time high-definition image data from the video acquisition devices in the community electric vehicle shed. Through a stable hardware interface, this module can efficiently connect multiple video acquisition devices to achieve the transmission of multi-source video data, providing reliable basic data for subsequent illegal behavior analysis. The process of the video image acquisition module is as Figure 1 shown.
[0141] In terms of hardware device configuration, this method deploys high-resolution video acquisition devices with all-weather working capabilities inside the community electric vehicle shed. These devices support the Wide Dynamic Range (WDR) function and can adapt to changes in different lighting conditions. The above devices are connected to the edge computing box through preset hardware interfaces, and the supported interface types include network ports, USB interfaces, and wireless connection modules to ensure adaptation to diverse installation environments. In addition, this invention selects an edge computing box with a multi-interface design to support the simultaneous access of multiple video acquisition devices and meet the large-scale monitoring requirements.
[0142] In this method, the captured images by the video acquisition devices are transmitted to the edge computing box in real time through wired or wireless networks. The entire data transmission process uses an encryption protocol to ensure that the transmission security is not threatened. At the same time, this method effectively utilizes the short-term data caching function of the edge computing box to cope with data loss problems caused by network fluctuations or short-term interruptions. To reduce the system burden, this method also integrates preliminary data processing functions in the video image acquisition module, including resolution adjustment and background noise filtering. Specifically, this method uses the Bilinear Interpolation algorithm to scale the image size. For the input image I in (x, y), the goal is to generate a new output image I out (u, v) with a resolution of M×N. The video image acquisition process is as follows:
[0143] First, preset the scaling factors as s x and s y :
[0144]
[0145] The pixel values of the output image are calculated by bilinear interpolation:
[0146]
[0147] Among them, (x, y) and (u, v) represent the pixel coordinates before and after the video image scaling respectively;
[0148] Background noise filtering is achieved through a Gaussian filter. The core of the Gaussian filter is a two-dimensional Gaussian kernel function, and the function is as follows:
[0149]
[0150] Among them, σ represents the standard deviation, which is used to control the smoothing degree of the Gaussian filter;
[0151] Subsequently, a convolution operation is performed on the input image I in (x, y):
[0152]
[0153] Among them, k represents the radius of the filtering kernel, which is used to control the size of the filter.
[0154] To sum up, the video image acquisition module realizes real-time and high-quality image data acquisition and transmission by efficiently connecting multiple video acquisition devices, providing reliable data support for the analysis of illegal behaviors. Its built-in data processing function can optimize the compression and transmission efficiency of image data, ensuring the security and integrity of the data.
[0155] 2. Illegal behavior analysis module.
[0156] The illegal behavior analysis module is the core component of the system. Its task is to perform real-time processing and analysis on the data transmitted from the video image acquisition module, accurately identify the illegal operation behaviors of users, such as potential risk operations like illegally disassembling or carrying the battery. This module integrates human pose estimation algorithms, object detection algorithms, and object tracking algorithms, and realizes the accurate monitoring of user behaviors through the collaborative work of multiple algorithms. The process of the illegal behavior analysis module is as Figure 2 shown.
[0157] (1) Human pose estimation algorithm.
[0158] The human pose estimation algorithm in the illegal behavior analysis module is responsible for identifying the key pose features of users to determine whether there are illegal behaviors such as bending over to operate the battery. This algorithm combines the YOLOv11 pedestrian object detection framework and the PoseNet pose estimation network to achieve accurate extraction and behavior analysis of human key points. The architecture diagram of the YOLOv11-PoseNet human pose estimation algorithm model is as Figure 3 shown.
[0159] For the above-mentioned human pose estimation algorithm, first, the YOLOv11 object detection framework quickly locates pedestrians in the community video image frames, generates high-precision human detection boxes, and provides reliable input for pose estimation. Then, the PoseNet network extracts the two-dimensional coordinates of 17 key parts of the human body, including the head, shoulders, hips, and knees. To improve stability, for key points such as the center coordinates of the shoulders, the average of the horizontal and vertical coordinates of both shoulders is used for calculation to ensure the accuracy of the input data. The calculation formula is as follows:
[0160]
[0161]
[0162] Among them, (Xshoulde_l, Yshoulder_l) and (Xshoulder_r, Yshoulder_r) represent the horizontal and vertical coordinates of the left shoulder and right shoulder respectively. The calculation formulas for the central coordinates of the hip, knee, etc. are similar and will not be elaborated here.
[0163] On the basis of obtaining the human key points, the human pose estimation algorithm determines the bending behavior by calculating the bending angle of the torso; specifically, the system constructs two vectors from the head to the hip and from the hip to the knee:
[0164]
[0165] Among them, respectively represent the direction vectors from the head to the hip and from the hip to the knee. (X head , Y head ), (X hip , Y hip ), (X knee , Y knee ) represent the horizontal and vertical coordinates of the head, hip, and knee respectively. The calculation formula for the included angle is as follows:
[0166]
[0167] Among them, θ represents the bending angle between the upper body and the lower body. The included angle can be obtained by taking the arccosine value of cos(θ). By calculating the included angle of these two vectors, the bending degree of the upper body is judged. When the human body is standing upright, the head, hip, and knee are roughly on the same vertical line; while when bending down, the forward tilt of the head causes the included angle of the vectors to decrease. If the included angle is less than the preset bending angle threshold of the system (taking 150 degrees as an example), the system can determine that the upper body is in a bending state.
[0168] In addition to the torso bending angle, the human pose estimation algorithm also assists in judging the bending behavior by analyzing the spatial position relationship of the key parts of the human body. Specifically, using the vertical height ratio method, calculate the ratio of the height difference from the head to the hip to the height from the hip to the knee:
[0169]
[0170] Among them, Y hip , Y knee respectively represent the central position heights of the two hips and two knees. In the case of normal standing, when standing normally, R y should be greater than the preset vertical height ratio threshold (taking 1.5 as an example), while when bending down, the head is close to the hip, resulting in the reduction of Y head - Y hip , making R y decrease. If R yIf it is lower than the preset threshold, it is determined as a bending action.
[0171] In addition, the horizontal displacement of the head and the hip is detected by the horizontal distance calculation method, and the forward movement trend of the head is further verified by combining the shoulder width calculation. Among them, the calculation formula for the horizontal distance between the head and the hip is as follows:
[0172] D x =|X head -X hip |;
[0173] The calculation formula for the shoulder width is as follows:
[0174] W s =|X shoulder_l -X shoulder_r |;
[0175] When the user stands, D x is smaller, while when bending, D x will exceed the normal range. If D x exceeds the preset horizontal distance ratio threshold (taking 0.5 times of the shoulder width W s as an example), it is considered that the head has a significant forward movement, indicating a bending behavior.
[0176] To sum up, through the dual analysis of the relationship between the trunk bending angle and the joint spatial position, the human pose estimation algorithm can effectively adapt to complex scenarios, filter out misjudgments caused by irrelevant actions, and finally achieve accurate determination of the illegal behavior of bending to operate the battery. This algorithm provides key support for the illegal behavior analysis module and lays a technical foundation for the real-time alarm and efficient management of the system.
[0177] (2) Object detection algorithm.
[0178] In the illegal behavior analysis module of this method, the object detection algorithm adopts the latest YOLOv11 framework, which is specifically used for efficient detection of battery targets. The model architecture diagram of the YOLOv11 battery target detection algorithm is as Figure 4 shown. This algorithm realizes high-precision object detection through an optimized network architecture, abandons the traditional Non-Maximum Suppression (NMS) step, and adopts a consistent dual assignment strategy, reducing the computational overhead while maintaining efficient inference. This design enables the system to accurately identify battery targets and provides a solid technical foundation for subsequent illegal behavior analysis and alarm.
[0179] The YOLOv11 model consists of three parts: Backbone (main network), Neck (neck network), and Head (detection head). The Backbone network is responsible for extracting the basic features of the battery from community video images, such as shape, size, color, and edge contrast, while filtering background noise. This stage provides reliable visual cues for subsequent feature fusion. The Neck network fuses features of different scales through the Feature Pyramid Network (FPN) or Path Aggregation Network (PAN), enabling the model to simultaneously focus on the global contour and detailed features of the battery. In this way, even in complex scenarios, the system can accurately detect battery targets of different sizes, positions, and angles. Finally, the Head network is responsible for outputting the detection results, including the bounding box position, category, and confidence of the battery target.
[0180] The object detection algorithm further determines violations through spatial position relationships. After detecting the battery target, the system compares its position with the human detection box. Assume the human detection box is a rectangle, and the area is defined by the coordinates of the upper left corner and the lower right corner, that is, the upper left corner coordinates of the human detection box are (X left , Y top ), and the lower right corner coordinates are (X right , Y bottom ), while the center coordinates of the battery are (X battery , Y battery ). The condition for the battery target to fall within the human detection box is that both the horizontal and vertical coordinates of the battery center point satisfy within the range of the human detection box, that is:
[0181] X left ≤X battery ≤X right ;
[0182] Y top ≤Y battery ≤Y bottom ;
[0183] If both of the above conditions are met, it means that the center point of the battery falls within the human detection box, which can be used as a basis for judging that the battery is within the user's activity range.
[0184] In addition, the object detection algorithm judges whether there is a relatively close spatial relationship between the battery center and the user's wrist joint by calculating the distance between them: assume the coordinates of the user's left and right wrist joints are (X wirst_l , Y wirst_l ), (X wirst_r , Y wirst_r) Taking the left wrist joint as an example, the Euclidean distance formula can be used to calculate the distance between the center of the battery and the left wrist:
[0185]
[0186] Calculate the distance D between the right wrist and the battery in the same way r . Get D l , D r After that, further obtain the shortest distance D between the battery and the wrist min :
[0187] D min = min(D l , D r );
[0188] If the minimum distance D min is less than the preset threshold (taking 0.1 meters as an example), it is determined that the battery is within the operable range of the user. The judgment conditions are as follows:
[0189] D mim ≤ D threshlod ;
[0190] To ensure the accuracy of the judgment, the system will continuously calculate the D min values in multiple frames of video images in the time series to determine whether this spatial relationship persists. If D min ≤ D threshold holds continuously in multiple frames, it can be more stably determined that the user is operating the battery. Through this distance calculation and threshold judgment, it can be more accurately determined whether the battery target is illegally carried into or out of the community by the user.
[0191] This object detection algorithm deeply learns the appearance features of the battery and combines human body spatial relationship analysis to achieve accurate determination of the behavior of illegally carrying or operating the battery. Through efficient object detection and fine spatial relationship calculation, the YOLOv11 framework not only improves the accuracy of battery target detection, but also enhances the system's adaptability to complex scenarios, providing comprehensive and reliable technical support for the monitoring of battery violation behaviors.
[0192] (3) Object tracking algorithm.
[0193] In the violation behavior analysis module, the object tracking algorithm adopts the multi-object tracking technology based on ByteTrack. By combining object detection and trajectory estimation, this algorithm can continuously and accurately track pedestrians and battery targets in the monitored video frames, and maintain high tracking performance even when the targets are occluded from each other or in a complex environment. This technology provides key support for the behavior analysis of battery violation operations. The object tracking algorithm process is as Figure 5 shown.
[0194] The core process of the target tracking algorithm consists of two stages: target detection and trajectory estimation. First, the system uses a target detection algorithm (taking YOLOv11 as an example) to identify pedestrians and battery targets in the video image, and extracts their position and category information. Then, the tracking algorithm predicts and updates the state of the target through the Kalman Filter, thus forming the moving trajectory of the target in the video image frame sequence.
[0195] The Kalman Filter is the core tool for target tracking and is used to dynamically estimate the state of the battery (such as position and speed). It achieves the continuity and accuracy of tracking through two steps. The first step is prediction, which estimates the position of the target in the next frame based on the dynamic model of the system; the second step is update, which corrects the prediction value by comparing with the actual position of the detection box, thereby improving the accuracy of the estimation.
[0196] Specifically, the state prediction is described by the following formula:
[0197]
[0198] And the state update is completed by the following formula:
[0199]
[0200] Among them, F k 、H k represent the state transition matrix and the observation matrix respectively, and K k represents the Kalman gain.
[0201] To achieve the matching of pedestrian and battery targets between frames, the target tracking algorithm uses the Hungarian algorithm for data association; by calculating the cost matrix, this algorithm matches the targets in the current frame with the trajectories in the previous frame; specifically, the cost matrix C is an N×N matrix, and the matrix element C [i][j] represents the matching cost between the i-th target (such as a trajectory) and the j-th detection box; the cost is calculated based on the Euclidean distance:
[0202]
[0203] Among them, (X i 、Y i )、(X j 、Y j ) represent the center position coordinates of trajectory i and detection box j respectively.
[0204] After obtaining the cost matrix, in order to find the optimal matching, the algorithm processes the matrix through row and column subtraction. Subtract the minimum value of each row from each row, so that at least one element in the row is zero:
[0205] C′ [i][j] = C [i][j] -min i C [i][j]
[0206] Subsequently, a similar operation is performed on each column to ensure that there are also zero values in the column:
[0207] C″ [i][j] = C [i][j] -min j C [i][j]
[0208] The purpose of this process is to transform the problem into finding the optimal allocation of zero elements. Then, by finding independent zeros (i.e., zeros that appear only once in each row and each column) as matching points, the matching relationship between partial trajectories and detection boxes is determined. If the independent zeros are not sufficient to complete all the matches, the cost matrix needs to be adjusted; the algorithm will find the minimum value m among the uncovered elements and adjust the matrix. The uncovered elements are subtracted by m, and the elements covered twice are added by m; the purpose of this adjustment is to create new zero values, thereby increasing the number of independent zeros.
[0209] After repeated matrix adjustments and updates of the matching status, the allocation of all trajectories and detection boxes will ultimately be completed, and the total cost will be calculated. The expression for the total cost is:
[0210] Total Cost = ∑ (i,j)∈Matching C [i][j] ;
[0211] where (i, j) represents the pair of matching trajectories and detection boxes;
[0212] Through the above series of optimization steps, the Hungarian algorithm finds the minimum matching cost to ensure the correct association of pedestrian and battery targets with trajectories. At the same time, for newly emerging targets, the algorithm will allocate new trajectories to them, and for the unmatched old trajectories, it will decide whether to continue to retain or terminate the tracking according to the set timeout threshold.
[0213] The innovation of the target tracking algorithm in this method lies in that it not only focuses on high-confidence detection boxes, but also improves the tracking ability for occluded targets and complex scenarios by associating low-confidence detection targets. This delay mechanism allows pedestrian and battery targets to be recaptured after being briefly lost, making the application of the algorithm in the community environment more reliable.
[0214] In summary, with the collaborative effect of multiple algorithms, the violation behavior analysis module can quickly determine whether a user has violated the rules. When detecting abnormal operations such as disassembling and carrying the battery by the user, the module will generate analysis results in real time and output detailed descriptions of the relevant behaviors, including information such as the operation category, time, and target location.
[0215] 3. Analysis result upload module.
[0216] The function of the analysis result upload module is to upload the generated analysis results of battery behavior with violations to the community monitoring platform to achieve information sharing and centralized management. Through multiple technical designs, this module ensures the real-time, reliable, and secure data transmission, providing technical support for the intelligent management of the system. The process of the analysis result upload module is as Figure 6 shown.
[0217] In terms of data processing, this module standardizes and optimizes the analysis results, including video screenshots, descriptions of violation behaviors, and metadata such as event time and location. These data are uniformly converted into lightweight formats such as JSON and XML, and the video screenshots or short films are compressed to reduce the amount of data transmitted. The video compression strategy adopted by this module is similar to the resolution adjustment algorithm of the video image acquisition module.
[0218] To ensure the integrity and authenticity of data during the upload process and strengthen the protection of user privacy, the present invention designs a hash function combined with an asymmetric encryption digital signature mechanism. The formula is as follows:
[0219] S = H(M) d mod n;
[0220] V = H(M') e mod n;
[0221] Where S and V represent the user signature and verification result respectively, and H(M) and H(M') represent the hash value of message M and the hash value of the received message M' respectively.
[0222] The analysis result upload module supports real-time upload and resume interrupted upload functions. When the system identifies a violation behavior, the analysis results will be immediately uploaded to the community monitoring platform to ensure that the management personnel can obtain the event information and respond in a timely manner. In the case of network interruption or weak signal, the analysis result upload module temporarily caches the analysis results locally and automatically resumes the upload after the network is restored to ensure the integrity and reliability of the data. The core algorithm of resume interrupted upload is as follows:
[0223]
[0224] The resume interrupted upload algorithm can dynamically adjust the block size according to the network speed to optimize the transmission efficiency of the analysis results. Specifically, if the current upload speed is higher than a certain threshold (taking 1M / s as an example), it means that the network condition is good, and the block size can be increased to speed up the transmission; if the current upload speed is lower than the threshold, it means that the network condition is poor, and the block size needs to be reduced to reduce the transmission failure caused by network fluctuations.
[0225] By uploading the analysis results to the module, the illegal battery operation warning system realizes efficient information sharing and centralized management. The real-time, security and scalability design of the module not only improves the operating efficiency of the system, but also provides technical support for the intelligent safety management of community electric sheds, ensuring the stable operation of the system in a variety of scenarios.
[0226] 4. Violation alarm module.
[0227] The violation alarm module is responsible for quickly triggering an alarm to reduce potential safety risks after detecting battery violation operations. This module combines local alarm and remote notification functions to ensure that the system can remind users and notify managers in the shortest time, thereby achieving real-time intervention and effective management. Figure 7 shown.
[0228] In terms of local alarm, when the system identifies abnormal operations such as illegal disassembly or transportation of batteries by the user through the violation analysis module, the alarm module will immediately trigger the sound and light alarm device on site. The high-decibel sound and high-brightness flash light can issue an alarm within a millisecond response time, quickly attracting the attention of the user and surrounding personnel, and stopping potential dangerous behaviors in time.
[0229] In addition to local alarms, the module will also remotely push alarm information to the terminal devices of relevant managers, including mobile applications, emails or text messages. The content of the push information is detailed and comprehensive, covering the description of the violation, the time of occurrence, the specific location, and related screenshots or video clips, helping managers to quickly understand the full picture of the incident and take corresponding measures. Depending on the severity of the incident, the system will automatically adjust the priority of the push. For example, for major violations (such as high-risk battery handling), the alarm information will be sent to the key person in charge first to ensure that the incident can be handled in a timely manner.
[0230] In addition, the present invention innovatively proposes a risk classification alarm formula that can combine multiple attributes of the event for quantitative evaluation, including the severity of the violation, frequency of occurrence, detection confidence, and potential harm that may result. The core formula of the risk classification alarm is as follows:
[0231] R=α·S+β·F+γ·C+δ·H;
[0232] Among them, S represents the severity of the violation, which is directly assigned according to the type of violation. For example, illegal battery removal is recorded as 3, and illegal battery handling is recorded as 5.
[0233] F represents the frequency of violations. The system records the number of violations committed by the same user or in the same area within a specified time window (taking 1 hour or 1 day as an example), and normalizes it to 1 - 5. The formula for calculating the frequency of violations is as follows:
[0234]
[0235] In the calculation of the frequency of violations formula, N occurrences represents the number of violations, and T represents the time window.
[0236] C represents the detection confidence level, which is directly assigned according to the output confidence level of the algorithm, ranging from 0 to 1. The higher the confidence level, the more reliable the judgment of the violation behavior. H represents the potential hazard score, which is assigned according to the potential safety hazards caused by the violation behavior. Considering that illegal handling of batteries may lead to fires, it is recorded as 5, while minor violations are recorded as 2. α, β, γ, and δ all represent the weight coefficients of the above factors.
[0237] According to the calculated risk score R, the alarms are divided into different levels:
[0238] Low risk (R < 3): Only trigger local audible and visual alerts.
[0239] Medium risk (3 ≤ R < 6): Trigger local alerts and push remote alarms.
[0240] High risk (R ≥ 6): Trigger a full set of alarm means, including local alerts, remote pushes, and reporting to the advanced management system.
[0241] To improve the processing efficiency of alarms, the system also supports secondary reminders for unprocessed alarm events to avoid the expansion of risks caused by human negligence.
[0242] In summary, the violation alarm module realizes precise intervention in the illegal operation behavior of batteries through multi-level and multi-channel alarm means. The design of this module not only ensures the real-time and effectiveness of alarms, but also provides data support and management convenience for the long-term operation of the system, thus significantly improving the safety and management efficiency of the community electric vehicle shed.
[0243] This method integrates two different types of datasets in model training and experimental evaluation, which are used for the development of human pose estimation models and object detection models respectively. For the human pose estimation model, this method uses the COCO open-source dataset. This dataset is known for its large scale and rich diversity, covering the poses of people of different ages, genders, and body types in various daily activities. For the object detection model, this method constructs a proprietary image dataset, which consists of 62,614 images collected from the Internet and recorded on-site. These images are obtained through a variety of recording tools, including industrial cameras, drones, and surveillance cameras, and cover a variety of actual application scenarios such as communities, factories, and schools, ensuring the wide range of data sources and the diversity of application scenarios. To optimize the model training and evaluation process, this method divides the dataset into a training set, a validation set, and a test set according to the ratio of 8:1:1. Specifically, the training set contains 50,092 images, while the validation set and the test set each contain 6,261 images. By combining these two carefully selected datasets, this method can effectively improve the generalization ability and practical application performance of the model.
[0244] To prevent the model from overfitting and optimize the training efficiency, this method introduces data augmentation techniques in the training set design and carefully adjusts the image size and batch size. Data augmentation is a method of expanding the scale and diversity of the training set through various input transformations (such as horizontal flipping, random angle rotation, and random scaling), simulating more possible actual scenarios without changing the output labels, thereby improving the generalization ability of deep convolutional neural networks as an implicit regularization means. All input images are uniformly adjusted to 640×640 pixels to maximize the utilization of GPU video memory resources. Through a series of experimental observations and analyses, the present invention finds that the choice of batch size has a significant impact on GPU memory utilization and training efficiency. Through multiple iterations and optimizations, the batch size with the optimal performance is finally determined to be 16. This setting not only fully utilizes the memory resources of the GPU but also achieves a good balance between the speed and stability of model training. In addition, to enable the model to fully learn the complex features in the data, the present invention sets the training cycle to 300 epochs, ensuring that the model undergoes sufficient iterations, thereby improving its adaptability to diverse data and performance on unknown data.
[0245] To evaluate the accuracy and stability of the illegal operation battery warning model, precision, recall, and mean average precision (mAP) are selected as evaluation metrics. The calculation formulas for each evaluation metric are as follows:
[0246]
[0247] Among them, True Positive and False Positive represent the numbers of positive samples and negative samples predicted as positive by the model respectively, and False Negative represents the number of positive samples predicted as negative by the model. n represents the categories of all samples. In this experiment, the target instances to be detected are divided into two categories, namely pedestrians and electric vehicles.
[0248] Table 1 Experimental Comparison of the Illegal Operation Electric Vehicle Analysis Model
[0249]
[0250] Table 1 shows the experimental comparison results of the network model of this system with several advanced models in the task of illegal operation of electric vehicles. Specifically, in the comparison experiments with Sparse R-CNN, ViT-Adapter, and Grounding DINO, the performance of the network model of this system shows significant advantages. Compared with these models, the accuracy of this system model has increased by 5.5%, 3.6%, and 1.9% respectively, the recall rate has increased by 12.8%, 14.8%, and 1.4% respectively, and the mean average precision has also increased by 2.2%, 1.8%, and 1.5% respectively. The experimental results show that the network model of this system not only surpasses the existing mainstream detection models in the task of illegal operation of electric vehicle alarms, but also shows obvious improvements in terms of accuracy, recall rate, and mean average precision, providing a more efficient and accurate solution for this field.
[0251] An embodiment of the present invention also provides an edge computing box, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method for warning of illegal operation of electric vehicles based on the edge computing box described in the above embodiment are implemented.
[0252] The edge computing box supports real-time uploading and resume breakpoint function, ensuring that in the case of network interruption or weak signal, the analysis results can be temporarily cached locally and automatically resumed after the network is restored, ensuring the integrity and reliability of the data.
[0253] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the illegal operation battery warning method based on an edge computing box described in the above embodiment are implemented; the computer program also implements a risk classification warning formula, which quantitatively evaluates according to the severity, occurrence frequency, detection confidence, and potential harm of illegal behaviors, so as to trigger different levels of warning measures. Specifically, a system or device equipped with a storage medium can be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device is made to read and execute the program code stored in the storage medium.
[0254] In this case, the program code read from the storage medium itself can implement the functions of any one of the above embodiments. Therefore, the program code and the storage medium storing the program code constitute a part of the present invention.
[0255] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.
[0256] In addition, it should be clear that not only can the actual operations be completed in part or in whole by executing the program code read by the computer, but also by means of the operating system operating on the computer based on the instructions of the program code, so as to implement the functions of any one of the above embodiments.
[0257] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU etc. installed on the expansion board or the expansion unit are made to execute part and all of the actual operations, so as to implement the functions of any one of the above embodiments.
[0258] The present invention has been shown and described in detail above through the drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above-mentioned multiple embodiments, those skilled in the art can know that the code review means in different above embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A method for warning against illegal operation of electric batteries based on an edge computing box, characterized in that, The implementation of this method includes: Video image acquisition module: Obtain the video image data of the community electric vehicle shed from the video image acquisition device installed in the community electric vehicle shed; Violation behavior analysis module: Perform real-time processing and analysis on the video image data. By integrating human pose estimation algorithms, object detection algorithms, and object tracking algorithms, it can capture and analyze user behaviors in real time, and identify possible illegal operations of the battery; Analysis result upload module: Upload the violation behavior analysis results to the community monitoring platform, so that the community monitoring platform can display the violation behavior analysis results to achieve information sharing and centralized management; Violation behavior alarm module: When an illegal operation of the battery by the user is identified, the system immediately triggers an audible and visual alarm and pushes an alarm message.
2. The illegal operation battery warning method based on an edge computing box according to claim 1, wherein The edge computing box includes multiple hardware interfaces for connecting different video image acquisition devices; The video image acquisition includes: determining the target hardware interface corresponding to the video image acquisition device from a preset multiple hardware interfaces; Using the target hardware interface, read the video image data from the video image acquisition device.
3. The illegal operation battery warning method based on an edge computing box according to claim 1, wherein The video image acquisition module has a preliminary data processing function, including resolution adjustment and background noise filtering; Specifically, the bilinear interpolation algorithm is used to scale the image size and the Gaussian filter is used to achieve background noise filtering.
4. A method for warning against illegal operation of a storage battery based on an edge computing box according to claim 1 or 3, characterized in that, For the input image I in (x, y), the goal is to generate a new output image I with a resolution of M×N out (u, v). The video image acquisition process is as follows: First, preset the scaling factor as s x and s y : The output image pixel value is calculated by bilinear interpolation: Among them, (x, y) and (u, v) represent the pixel coordinates before and after the video image scaling respectively; Background noise filtering is achieved through a Gaussian filter. The two-dimensional Gaussian kernel function is as follows: Among them, σ represents the standard deviation, which is used to control the smoothness of the Gaussian filter; Subsequently, perform a convolution operation on the input image I in (x, y): Among them, k represents the radius of the filter kernel, which is used to control the size of the filter.
5. The method for warning against illegal operation of storage batteries based on an edge computing box according to claim 1, wherein, The violation behavior analysis module, The human pose estimation algorithm combines the YOLOv11 pedestrian object detection framework and the PoseNet pose estimation network to achieve accurate extraction and behavior analysis of human key points, and determines the behavior of bending down to operate the battery through the torso bending angle and the joint spatial position relationship; The object detection algorithm uses the latest YOLOv11 framework, which is specifically used for efficiently detecting pedestrians and batteries. The target adopts a consistent dual assignment strategy to improve the detection accuracy and reduce the computational overhead; The object tracking algorithm uses the multi-object tracking technology based on ByteTrack, which combines object detection and trajectory estimation, and can maintain high-efficiency tracking performance when objects are occluded from each other or in a complex environment.
6. The illegal operation battery warning method based on an edge computing box according to claim 1, wherein, The human pose estimation algorithm first quickly locates pedestrians in the community video image frame through the YOLOv11 object detection framework, generates a high-precision human detection box, and provides reliable input for pose estimation; then, the PoseNet network extracts the two-dimensional coordinates of 17 key parts of the human body, including the head, shoulders, hips, and knees; the central coordinates of the hips, shoulders, and knees are calculated using the mean of the bilateral horizontal and vertical coordinates, and the central coordinates of the shoulders are calculated using the mean of the horizontal and vertical coordinates of both shoulders. The calculation formula is as follows: Among them, (X shoulde_l , Y shoulder_l ), (X shoulder_r , Y shoulder_r ) represent the abscissa and ordinate of the left shoulder and the right shoulder respectively; Based on obtaining human key points, the human pose estimation algorithm determines the bending behavior by calculating the bending angle of the torso; specifically, the system constructs two vectors from the head to the hip and from the hip to the knee: Among them, respectively represent the direction vectors from the head to the hip and from the hip to the knee, and (X head , Y head ), (X hip , Y hip ), (X knee , Y knee ) respectively represent the abscissa and ordinate of the head, hip, and knee; the calculation formula for the included angle is as follows: Among them, θ represents the bending angle between the upper body and the lower body; the included angle can be obtained by taking the arccosine value of cos(θ); by calculating the included angle of these two vectors, the bending degree of the upper body is judged; if the included angle is less than the preset bending angle threshold of the system, the system can determine that the upper body is in a bending state; The human pose estimation algorithm also assists in judging the bending behavior by analyzing the spatial position relationship of key human parts; specifically, using the vertical height ratio method, calculate the height difference ratio from the head to the hip and from the hip to the knee: Among them, Y hip and Y knee respectively represent the central position heights of the double hips and double knees; in the case of normal standing, when standing normally, R y should be greater than the preset vertical height ratio threshold (taking 1.5 as an example), and when bending over, the head approaches the hips, resulting in Y head -Y hip to shrink, making R y drop; if R y is lower than the preset threshold, it is determined as a bending-over action; In addition, the horizontal displacement between the head and the hip is detected by the horizontal distance calculation method, and the forward movement trend of the head is further verified in combination with the shoulder width calculation; among them, the calculation formula for the horizontal distance between the head and the hip is as follows: D x = |X head - X hip |; The calculation formula for shoulder width is as follows: W s = |X shoulder_l - X shoulder_r |; If D x exceeds the preset horizontal distance ratio threshold, it is considered that the head has significantly moved forward, indicating a bending behavior; For the target detection algorithm, the YOLOv11 model includes a backbone network, a neck network, and a detection head. The backbone network is responsible for extracting the basic features of the battery from the community video image and filtering background noise at the same time; the neck network fuses features of different scales through a feature pyramid network or a path aggregation network, enabling the model to simultaneously focus on the global contour and detailed features of the battery; finally, the detection head is responsible for outputting the detection results, including the bounding box position, category, and confidence of the battery target; The target detection algorithm further determines violations through spatial position relationships: after detecting the battery target, the system compares its position with the human detection frame. Assume the human detection frame is a rectangle, and the area is delimited by the coordinates of the upper left corner and the lower right corner, that is, the upper left corner coordinates of the human detection frame are (X left , Y top ), and the lower right corner coordinates are (X right , Y bottom ), while the center coordinates of the battery are (X battery , Y battery ). Then the condition for the battery target to fall within the human detection frame is that both the horizontal and vertical coordinates of the battery center point satisfy within the range of the human detection frame, that is: X left ≤ X battery ≤ X right ; Y top ≤Y battery ≤Y bottom ; If both of the above two conditions are met, it means that the center point of the battery falls within the human detection box, which is used as the basis for judging that the battery is within the user's activity range; In addition, the object detection algorithm determines whether there is a relatively close spatial relationship between the battery center and the user's wrist joint by calculating the distance therebetween: assuming that the coordinates of the user's left and right wrist joints are (X wirst_l , Y wirst_l ), (X wirst_r , Y wirst_r ) respectively; the Euclidean distance formula is used to calculate the distance between the battery center and the left / right wrist: Calculate the distance D between the right / left wrist and the battery using the same method r ; Obtain D l , D r After obtaining D and D, further obtain the shortest distance D between the battery and the wrist min : D min = min(D l , D r ); If the minimum distance D min is less than a preset threshold value, it is determined that the battery is within the operable range of the user; the judgment conditions are as follows: D min ≤ D threshlod ; To ensure the accuracy of the judgment, the system continuously calculates the D values in multiple frames of video images in the time series to determine whether this spatial relationship persists: If D ≤ D holds continuously in multiple frames, it can be more stably determined that the user is performing a battery operation; min values to determine whether this spatial relationship persists: If D min ≤ D threshold continues to hold, it can be more stably determined that the user is performing a battery operation; The core process of the target tracking algorithm includes two stages: target detection and trajectory estimation; First, the system uses the target detection algorithm to identify pedestrians and battery targets in the video image and extracts their position and category information; then, the target tracking algorithm predicts and updates the state of the target through a Kalman filter, thereby forming the moving trajectory of the target in the video image frame sequence; the Kalman filter is the core tool for target tracking and is used to dynamically estimate the state (such as position and speed) of the battery. It achieves the continuity and accuracy of tracking through two steps: the first step is prediction, which estimates the position of the target in the next frame based on the dynamic model of the system; the second step is update, which corrects the predicted value by comparing with the actual position of the detection box, thereby improving the accuracy of the estimation; specifically, the state prediction is described by the following formula: And the state update is completed by the following formula: Among them, F k , H k respectively represent the state transition matrix and the observation matrix, and K k represents the Kalman gain; To achieve the matching of pedestrian and battery targets between frames, the target tracking algorithm uses the Hungarian algorithm for data association; by calculating the cost matrix, the algorithm matches the targets in the current frame with the trajectories in the previous frame; specifically, the cost matrix C is an N×N matrix, and the matrix element C [i][j] represents the matching cost between the i-th target (such as a trajectory) and the j-th detection box; the cost is calculated based on the Euclidean distance: Among them, (X i , Y i ), (X j , Y j ) respectively represent the central position coordinates of the trajectory i and the detection box j; After obtaining the cost matrix, in order to find the optimal match, the algorithm processes the matrix through row and column subtraction; subtract the minimum value of each row from each row, so that at least one element in the row is zero: C′ [i][j] = C [i][j] - min i C [i][j] Subsequently, a similar operation is performed on each column to ensure that there are also zero values in the column: C″ [i][j] = C [i][j] -min j C [i][j] Then, by finding independent zeros as matching points, the matching relationship between part of the trajectory and the detection box is determined; if the independent zeros are not sufficient to complete all matches, the cost matrix needs to be adjusted; the algorithm will find the minimum value m among the uncovered elements and adjust the matrix: subtract m from the uncovered elements and add m to the elements covered twice; After repeated matrix adjustment and matching status update, all trajectories and detection boxes will eventually be assigned, and the total cost will be calculated; the expression of the total cost is: TotalCost = ∑ (i,j)∈Matching C [i][j] ; Among them, (i, j) represents the pair of matching trajectory and detection box; Through the above optimization steps, the Hungarian algorithm finds the minimum matching cost to ensure the correct association between pedestrians, battery targets and trajectories; at the same time, for newly emerged targets, the algorithm will assign new trajectories to them, and for unmatched old trajectories, it will decide whether to continue to retain or terminate the tracking according to the set timeout threshold.
7. A method for warning of illegal operation of a storage battery based on an edge computing box according to claim 1, characterized in that, The above-mentioned analysis result upload module In terms of data processing, this module standardizes and optimizes the analysis results, including video screenshots, descriptions of violation behaviors, and event time and location; these data are uniformly converted into a lightweight format, and the video screenshots or short films are compressed to reduce the amount of transmitted data; Through the hash function combined with the asymmetric encryption digital signature mechanism, the integrity and authenticity of the data during the upload process are ensured, and at the same time, the protection of user privacy is strengthened; the formula is as follows: S = H(M) d mod n; V = H(M′) e mod n; Among them, S and V represent the user signature and verification result respectively, and H(M) and H(M') represent the hash value of message M and the hash value of the received message M' respectively; The analysis result upload module supports real-time upload and resume interrupted upload functions. When the system identifies a violation behavior, the analysis result will be immediately uploaded to the community monitoring platform to ensure that the management personnel can obtain the event information and respond in the first time. In the case of network interruption or weak signal, the analysis result upload module temporarily caches the analysis result locally and automatically resumes the upload after the network is restored; the core algorithm of resume interrupted upload is as follows: The resume interrupted upload algorithm can dynamically adjust the block size according to the network speed to optimize the transmission efficiency of the analysis result; specifically, if the current upload speed is higher than a certain threshold, it means that the network condition is good, and the block size can be increased to speed up the transmission; if the current upload speed is lower than the threshold, it means that the network condition is poor, and the block size needs to be reduced to reduce the transmission failure caused by network fluctuations.
8. A method for warning about a non-compliant operation battery based on an edge computing box according to claim 1, characterized in that, The above-mentioned violation behavior warning module includes local warning and remote notification; For the above-mentioned local warning, when the system identifies that the user has abnormal operations such as illegal disassembly or handling of the battery through the violation behavior analysis module, the warning module will immediately trigger the on-site sound and light alarm device; For the above-mentioned remote notification, the warning information will be remotely pushed to the terminal devices of relevant management personnel, including mobile applications, emails or text messages. The content of the pushed information covers the description of the violation behavior, the occurrence time, the specific location, and the relevant screenshots or video clips, helping the management personnel quickly understand the whole picture of the event and take corresponding measures; according to the severity of the event, the system will automatically adjust the push priority; Based on the risk grading warning formula, a quantitative assessment is carried out by combining multiple attributes of the event, including the severity of the violation behavior, the occurrence frequency, the detection confidence level, and the potential hazards that may be caused; the core formula of risk grading warning is as follows: R = α·S + β·F + γ·C + δ·H; Among them, S represents the severity of the violation behavior, which is directly assigned according to the type of the violation behavior; F represents the frequency of violations. The system records the number of violations committed by the same user or in the same area within a specified time window and normalizes it to 1 - 5. The formula for calculating the frequency of violations is as follows: In the calculation of the violation frequency formula, N occurrences represents the number of violations, and T represents the time window; C represents the detection confidence level, which is directly assigned according to the output confidence level of the algorithm, ranging from 0 to 1. The higher the confidence level, the more reliable the judgment of the violation behavior; H represents the potential hazard score, which is assigned based on the potential safety hazards that the violation behavior may cause; α, β, γ, and δ all represent the weight coefficients of the above factors; According to the calculated risk score R, the alarms are divided into different levels: Low risk (R < 3): Only trigger local audible and visual alerts; Medium risk (3 ≤ R < 6): Trigger local alerts and push remote alarms; High risk (R ≥ 6): Trigger a full set of alarm means, including local alerts, remote pushes, and reporting to the advanced management system.
9. An edge computing box, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 8; The edge computing box supports real-time uploading and resume interrupted transfer functions, ensuring that in the case of network interruption or weak signal, the analysis results can be temporarily cached locally and automatically resumed after the network is restored, guaranteeing the integrity and reliability of the data.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method described in any one of claims 1 to 8; The computer program also implements a risk classification alarm formula, which quantitatively evaluates the severity, frequency, detection confidence level, and potential hazards of violation behaviors, thereby triggering different levels of alarm measures.
Citation Information
Cited By
Concrete pouring illegal water adding monitoring method
CN120976861A