Method and system for automatic fire prevention power-off of shared power bank fault diagnosis

Through an edge-cloud collaborative architecture, the shared power bank system performs simple criterion verification at the edge and complex diagnosis in the cloud, solving the problem of limited computing power at the edge, achieving millisecond-level response and high-precision fault identification, and reducing the security risks of shared power banks.

CN122137056APending Publication Date: 2026-06-02SHENZHEN XIAOHUANGBAO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XIAOHUANGBAO TECHNOLOGY CO LTD
Filing Date
2026-02-24
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

With limited computing power at the edge, shared power bank fault diagnosis systems struggle to achieve millisecond-level response and high-precision fault identification, resulting in high rates of missed or false diagnoses and posing safety risks.

Method used

The edge-cloud collaborative architecture is adopted. The edge device has built-in sensors to collect data and transmits it in two paths: one path is cached and the other path is uploaded to the cloud. The edge device performs simple criterion verification, while the cloud device uses a pre-trained model for complex diagnosis. The edge device is powered off in a timely manner. The cloud device updates the criteria and optimizes the model regularly to improve the diagnostic accuracy.

Benefits of technology

It achieves a combination of millisecond-level fault response and high-precision diagnosis, with rapid response at the edge and avoidance of delay, and continuous optimization of judgment criteria in the cloud, which significantly improves fault identification accuracy and reduces security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137056A_ABST
    Figure CN122137056A_ABST
Patent Text Reader

Abstract

This invention relates to the field of power bank control technology, specifically to a method and system for automatic fire prevention and power-off fault diagnosis of shared power banks. The method includes the following steps: the shared power bank collects data and transmits it via two paths: one path is stored in an edge cache, and the other path is transmitted to the cloud via NB-IoT; the main control chip loads a preset criterion library, verifies the cached data, and directly cuts off power in case of an emergency fault; after receiving the data, the cloud uses a pre-trained model to identify the fault and its confidence level; the cloud sends the diagnostic results and optimized criteria to the edge at fixed time intervals to complete the update; if the edge determines an emergency fault, or the confidence level of the cloud result meets a threshold, power is directly cut off; the fault data is uploaded to the cloud, and the model and criteria are updated at fixed time intervals to improve accuracy. This method improves the accuracy of fault identification in power banks and effectively prevents safety accidents such as power bank fires.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power bank control technology, specifically to a method and system for automatic fire prevention and power-off in fault diagnosis of shared power banks. Background Technology

[0002] Studies have shown that after shared power bank devices have been used for more than 6 months, the accuracy of fault identification decreases significantly due to hardware aging and reduced sensor precision, leading to increased safety risks. Fault diagnosis of shared power banks requires millisecond-level response and strong computing power. However, the edge computing power of shared power banks is limited, making it difficult to quickly process multi-dimensional data. The main control chip of the power bank is limited by size and power consumption, restricting its computing power and preventing the deployment of complex diagnostic algorithms. Simple algorithms, on the other hand, reduce fault identification accuracy. For example: STMicroelectronics' STM32L051, as a mainstream low-power MCU for shared power banks, has a main frequency of only 32MHz, 8KB of RAM, and 64KB of Flash. It can only perform simple threshold judgments (such as triggering power-off when the temperature is >65℃). If processing 5 channels of real-time data such as temperature, current, and voltage (1kHz sampling per channel), feature extraction for a single set of data (such as calculating the rate of change) takes more than 10 milliseconds. It cannot deploy classification models with 100+ parameters, resulting in a high false negative rate.

[0003] The TIMSP430F5529 used in shared power banks features an ultra-low power consumption design (standby current < 1μA), a main frequency of 16MHz, and 10KB of RAM. When processing multi-dimensional data, a simple Fourier transform (extracting current harmonic features) takes 20 milliseconds. In practice, it can only use the crude logic of "power off when current > 2A", which has a high misjudgment rate.

[0004] Huada HC32L136: A domestically produced low-power MCU for shared power banks, with a main frequency of 48MHz and 16KB of RAM. Although its computing power is slightly higher, it cannot cache timing data longer than 100 milliseconds and is difficult to identify hidden faults such as "slow temperature rise + slight current fluctuation". Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for automatic fire prevention and power-off in fault diagnosis of shared power banks, so as to solve the problems mentioned in the background art.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: The automatic fire prevention and power-off method for diagnosing shared power bank faults includes the following steps: The shared power bank has built-in temperature sensor, current sensor, voltage sensor, cell deformation sensor and environmental sensor to collect data and transmit it in two ways: one way is stored in the edge buffer and the other way is transmitted to the cloud via NB-IoT. The main control chip loads a preset criterion library to verify the cached data. When the temperature, current or voltage deviation meets the threshold and the deformation meets the threshold, it is judged as an emergency fault and the power is cut off directly. After receiving data in the cloud, a pre-trained model is used to identify faults and confidence levels; The cloud sends diagnostic results and optimization criteria to the edge device at fixed time intervals to complete the update. If the edge device determines an emergency fault, or if the confidence level of the cloud result meets the threshold, power will be cut off directly. Fault data is uploaded to the cloud, and the model and criteria are updated at fixed time intervals to improve accuracy.

[0007] Furthermore, the shared power bank incorporates a temperature sensor, a current sensor, a voltage sensor, a cell deformation sensor, and an environmental sensor to collect data. Specifically, the shared power bank incorporates five types of sensors: temperature, current, voltage, cell deformation, and environmental sensors. Each type of sensor collects data synchronously at a corresponding fixed frequency. The temperature sensor collects the temperature of the cell surface and the circuit PCB board; the current sensor collects the real-time current of the charging and discharging circuit; the voltage sensor collects the cell output and circuit bus voltage; the cell deformation sensor collects the change in cell thickness; and the environmental sensor collects the external ambient temperature and humidity. The data collected by the sensors is used to generate samples containing information collected by each type of sensor at fixed time intervals.

[0008] Furthermore, the transmission is divided into two paths: one path stores the data in the edge cache, and the other path transmits it to the cloud via NB-IoT. Specifically, the data collected by the sensor is used to generate samples at fixed intervals; one path is the local path, which is directly transmitted to the cache unit of the edge main control chip for temporary storage; the other path is the cloud path, which uploads the samples to the cloud server in real time through the low-latency NB-IoT module, and each uploaded sample is accompanied by a precise timestamp.

[0009] Furthermore, the main control chip loads a preset criterion library to verify the cached data. Specifically, the main control chip loads a preset emergency fault criterion library to perform real-time verification on the local cached data. The criterion is based on the device's physical safety threshold setting. If the temperature index exceeds the standard, it is determined to be an overheating emergency fault; if the current exceeds the standard, it is determined to be a short circuit emergency fault; if both the voltage deviation and the cell deformation exceed the standard, it is determined to be a cell failure emergency fault.

[0010] Furthermore, after receiving data, the cloud server uses a pre-trained model to identify faults and confidence levels. Specifically, the cloud server receives cloud-based road data uploaded via the NB-IoT module and generates a temporal feature vector containing direct features of the original data, first-order statistical features, and higher-order fault features. The features are then subjected to standardized preprocessing to eliminate dimensional differences. A pre-trained temporal feature fusion fault diagnosis model is activated. This model employs a temporal convolutional architecture with channel attention and a fully connected classification system to capture fault features at different time scales and highlight key features. Finally, the fault type with the highest confidence level and its corresponding confidence level are output through classification mapping.

[0011] Furthermore, the cloud sends the diagnostic results and optimized criteria to the edge terminal at fixed time intervals to complete the update. Specifically, the cloud sends the diagnostic results and optimized edge terminal criterion thresholds to the edge terminal through the NB-IoT module at fixed time intervals synchronized with the data acquisition cycle. The diagnostic results include the fault type and corresponding confidence level, and the optimized criterion thresholds can be adapted to the actual environmental conditions. After receiving the information, the edge terminal main control chip updates the threshold parameters of the emergency fault criterion library to achieve dynamic adaptation of the edge terminal criteria and complete the update.

[0012] Furthermore, if the edge terminal determines an emergency fault, or the confidence level of the cloud result meets the threshold, the power is directly cut off. Specifically, the emergency fault determined by the edge terminal includes three situations: temperature index exceeding the standard, current exceeding the standard, and voltage deviation and cell deformation both exceeding the standard; the confidence level of the cloud result meeting the threshold means that the diagnostic result issued by the cloud is abnormal and the confidence level meets the standard; when one of the above two situations is met, the main control chip immediately executes the power-off action, quickly outputs a signal to control the magnetic latching relay to disconnect the charging and discharging main circuit of the shared power bank, thereby cutting off the power supply.

[0013] Furthermore, the process of uploading fault data to the cloud and updating the model and criteria at fixed time intervals to improve accuracy involves the following steps: Fault data includes the original data at the time of the fault, edge-end criteria results, and cloud-based diagnostic results; after the emergency response is completed, the main control chip packages the fault data and uploads it to the cloud fault sample library via the NB-IoT module; updates are triggered at fixed time intervals or when new samples are added to the sample library; during updates, the network structure is fixed, and a suitable optimizer and loss function are used for model training; after training, new model parameters and edge-end criteria thresholds are generated; new parameters and thresholds are continuously issued through corresponding steps to achieve dynamic optimization of the model and criteria, thereby improving diagnostic accuracy.

[0014] The shared power bank fault diagnosis automatic fire prevention and power-off system includes: The sensor acquisition module is used to collect data from temperature, current, voltage, cell deformation, and environmental sensors. The data distribution module is used to transmit the collected data in two paths: one path is stored in the edge cache, and the other path is transmitted to the cloud via NB-IoT. The emergency fault determination module is used to load a preset criterion library, verify cached data, and determine an emergency fault and cut off power when the conditions are met. The cloud-based identification module receives data and uses a pre-trained model to identify faults and confidence levels. The criteria update module is used to send diagnostic results and optimized criteria from the cloud to the edge device at fixed time intervals; The fault upload module is used to upload fault data to the cloud and update the model and criteria at fixed time intervals. The power control module is used to directly cut off power when an emergency fault is detected.

[0015] Compared with existing technologies, this invention has the following advantages: This application successfully solves the fundamental contradiction between the limited computing power at the edge of shared power banks and the need for high-precision fault diagnosis, achieving a perfect combination of millisecond-level fault response and high-precision diagnosis. Traditional solutions are limited by the computing power of the edge MCU (such as the STM32L051 with a main frequency of only 32MHz and 8KB of RAM), and can only use simple threshold judgments, resulting in high false negative or false positive rates. In contrast, this solution uses an edge-cloud collaborative architecture to delegate complex diagnostic tasks to the cloud while ensuring the rapid response capability of the edge. The edge only needs to perform preset simple criterion checks (such as temperature, current, voltage deviation and deformation meeting thresholds), and can complete emergency fault judgment and power off within milliseconds, avoiding the delay risk brought by complex algorithms. The cloud deploys a complex model including temporal convolution, channel attention and fully connected classification, which can accurately identify hidden faults such as "gradual temperature rise + micro-current fluctuation", significantly improving diagnostic accuracy. More importantly, the cloud periodically sends diagnostic results and optimized threshold criteria to the edge, enabling the edge criteria to dynamically adapt to changes in the actual environment (such as automatically adjusting temperature thresholds when the ambient temperature rises), thus continuously improving diagnostic accuracy. This architecture not only solves the computing power bottleneck problem but also continuously optimizes the cloud model, allowing the system to maintain millisecond-level response while continuously improving fault identification accuracy. This effectively prevents safety accidents such as power bank fires and provides reliable protection for the safe use of shared power banks. Attached Figure Description

[0016] Figure 1 This is a flowchart of the automatic fire prevention and power-off method for fault diagnosis of shared power banks according to the present invention. Detailed Implementation

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

[0018] This application discloses a method for automatic fire prevention and power-off in fault diagnosis of shared power banks, such as... Figure 1 The steps include: S1. The shared power bank has built-in temperature sensor, current sensor, voltage sensor, cell deformation sensor and environmental sensor to collect data and transmit it in two ways: one way is stored in the edge buffer and the other way is transmitted to the cloud via NB-IoT. S2. The main control chip loads the preset criterion library, verifies the cached data, and determines an emergency fault when the temperature, current or voltage deviation meets the threshold and the deformation meets the threshold, and directly cuts off the power. S3. After receiving data in the cloud, the pre-trained model is used to identify faults and confidence levels; S4. The cloud sends the diagnostic results and optimization criteria to the edge device at fixed time intervals to complete the update; S5. If the edge device determines an emergency fault, or the confidence level of the cloud result meets the threshold, power is cut off directly; S6. Upload fault data to the cloud and update the model and criteria at fixed time intervals to improve accuracy.

[0019] The shared power bank in S1 incorporates a temperature sensor, current sensor, voltage sensor, cell deformation sensor, and environmental sensor to collect data. Specifically, the temperature sensor has a sampling rate of 2kHz and an accuracy of ±0.3℃. It collects the cell surface temperature and the circuit PCB temperature. The current sensor has a sampling rate of 2kHz and a range of 0-3A. It collects the real-time current of the charging and discharging circuit. The voltage sensor has a sampling rate of 2kHz and a range of 3-12V. It collects the cell output voltage and the circuit bus voltage. The cell deformation sensor has a sampling rate of 1kHz and an accuracy of ±0.05mm. It collects the change in cell thickness. The environmental sensor has a sampling rate of 0.1kHz and collects the ambient temperature and humidity outside the device. These sensors collect data synchronously at a fixed frequency. One sample is generated every 5 milliseconds. Each sample contains the above eight raw data items.

[0020] The S1 process involves two transmission paths: one for edge-end buffering and the other for transmission to the cloud via NB-IoT. Specifically, in implementation, one sample is generated every 5 milliseconds of collected data. One path is the local path, directly inputting data into the buffer unit of the edge-end main control chip. The buffer unit has a capacity of 10 samples, corresponding to 50 milliseconds of data. The other path is the cloud path, transmitted via a low-latency NB-IoT module. The NB-IoT module's transmission latency does not exceed 10 milliseconds. Data is uploaded to the cloud server in real time. Each sample is appended with a timestamp, accurate to the millisecond.

[0021] In step S2, the main control chip loads a preset criterion library to verify cached data. Specifically, in implementation, the main control chip loads a preset emergency fault criterion library. The parameter capacity of this criterion library does not exceed 8KB. The main control chip performs real-time verification on the local cached data. The criteria are based on the device's physical safety threshold settings. If the cell surface temperature is not lower than 70℃ or the circuit PCB board temperature is not lower than 80℃, it is determined to be an overheating emergency fault. If the real-time current of the charging and discharging circuit is not lower than 2.5A, it is determined to be a short circuit emergency fault. If the absolute value of the deviation between the cell output voltage and the rated voltage of 5V is not lower than 1V and the cell thickness change is not lower than 0.3mm, it is determined to be a cell failure emergency fault. The criterion execution process only involves numerical comparison and logical judgment.

[0022] In step S3, after receiving data from the cloud, a pre-trained model is used to identify faults and confidence levels. Specifically, in implementation, the cloud server receives cloud-based network data uploaded via the NB-IoT module. The data consists of one sample generated every 5 milliseconds. Each sample contains 8 raw data items. Each sample is appended with a timestamp accurate to milliseconds.

[0023] A pre-trained time-series feature fusion fault diagnosis model is launched in the cloud. The model input is a 128-dimensional time-series feature vector.

[0024] The 128-dimensional time-series feature vector includes 8 dimensions of direct features from the original data. The 8 dimensions of direct features from the original data are taken from the original values ​​of the latest set of samples, including cell surface temperature, circuit PCB temperature, real-time current of charging and discharging circuit, cell output voltage, circuit bus voltage, cell thickness change, ambient temperature, and humidity.

[0025] The 128-dimensional time-series feature vector includes 40 dimensions of first-order statistical features. The mean, maximum, minimum, standard deviation, and rate of change of eight raw data points are calculated for the last 20 sets of samples. Each of the last 20 sets of samples corresponds to 100 milliseconds of data. Each raw data point corresponds to five statistical measures.

[0026] The 128-dimensional time-series feature vector includes 80 dimensions of higher-order fault features. These include current harmonic components, extracted by performing a Fourier transform on the real-time current of the charging and discharging circuit to extract the amplitudes of the 1st to 10th harmonics; voltage fluctuation coefficients, which are the standard deviation of the ratio sequence of the cell output voltage to the circuit bus voltage; temperature coupling degree, which is the rate of change of the difference between the cell surface temperature and the ambient temperature; and cell deformation acceleration, which is the second-order difference of the cell thickness change.

[0027] Standardize the 128-dimensional features. Each feature value is converted to (feature value minus the mean of that feature in over 100,000 historical failure samples) divided by the standard deviation of that feature in over 100,000 historical failure samples. This eliminates dimensional differences.

[0028] The model employs a classification architecture combining temporal convolution, channel attention, and fully connected layers. The input layer receives a 128-dimensional standardized feature vector.

[0029] Temporal convolutional block 1 contains 16 3×1 convolutional kernels with a stride of 1 and padding of 1. It extracts local temporal correlations from the input features. The output is a 16×128 feature map. After batch normalization, the mean and variance are 0 and 1, respectively. The ReLU activation function is then applied to preserve non-linear features.

[0030] Temporal convolutional block 2 contains 32 5×1 convolutional kernels with a stride of 1 and padding of 2. It extracts mid-range temporal correlations and outputs a 32×128 feature map. This map is then batch normalized and activated using ReLU.

[0031] Temporal convolutional block 3 contains 64 7×1 convolutional kernels with a stride of 1 and padding of 3. It extracts long-range temporal correlations and outputs a 64×128 feature map. This map is then batch normalized and activated using ReLU.

[0032] The channel attention layer performs global average pooling on the 64×128 feature map, resulting in a 64×1 vector. Weight coefficients for all 64 channels are calculated using two fully connected layers. The number of neurons in each fully connected layer ranges from 32 to 64. The activation function is sigmoid. The weight coefficients range from 0 to 1. These weight coefficients are then multiplied channel-by-channel by the 64×128 feature map to highlight key fault features.

[0033] The global max pooling layer performs max pooling on the 64×128 feature map output by the attention layer, compressing it into a 64×1 vector.

[0034] The fully connected layer 1 contains 128 neurons, with ReLU as the activation function, and performs non-linear mapping on 64-dimensional features.

[0035] The fully connected layer 2 contains 64 neurons and uses ReLU as the activation function to further compress features.

[0036] The output layer contains 6 neurons, corresponding to 6 types of faults. The 6 types of faults include short circuit, overheating, cell bulging, circuit aging, cell micro-short circuit, and normal. The Softmax activation function is used to output the confidence score of each type, and the sum of the confidence scores of all types is 1.

[0037] In the feature extraction stage, temporal convolutional blocks slide through convolutional kernels of different sizes to capture fault features at different time scales. The attention layer dynamically amplifies the weights of key features by learning the correlation strength between features and faults in historical samples.

[0038] During the classification phase, the fully connected layer transforms the 64-dimensional features into a probability distribution for six fault categories through multiple nonlinear mappings. The output layer takes the category with the highest confidence as the diagnostic result and outputs the confidence value of that category.

[0039] In S4, the cloud sends diagnostic results and optimized criteria to the edge terminal at fixed time intervals to complete the update. Specifically, in implementation, the fixed time interval is synchronized with the data acquisition cycle, i.e., every 5 milliseconds. The cloud sends the diagnostic results and optimized edge terminal criterion thresholds to the edge terminal via the NB-IoT module. The diagnostic results include the fault type and the corresponding confidence level. For example, when the ambient temperature is higher than 35℃, the optimized edge terminal criterion threshold for the cell surface temperature is lowered from 70℃ to 65℃ in the overheating criterion. After receiving the sent information, the main control chip at the edge terminal updates the threshold parameters in the emergency fault criterion library within 1 millisecond. This achieves dynamic adaptation of the edge terminal criteria and completes the update.

[0040] The fixed-time interval distribution of diagnostic results and optimization criteria from the cloud to the edge device leads to threshold adaptation lag. Therefore, this application employs "multi-dimensional dynamic weighted criterion generation," which dynamically generates edge-side criterion thresholds by integrating device health, environmental coupling, and fault risk trends. This solves the threshold adaptation lag problem caused by fixed-time interval distribution. The steps include: Input data: Equipment historical data: Fault records for the past 30 days (fault type) (corresponding to 6 types of faults) and cumulative usage time (Unit: hour), Historical Criterion Threshold Adjustment Records ; Real-time data: Sensor data vectors within the current acquisition period: (These are respectively: cell temperature, PCB temperature, current, cell voltage, bus voltage, deformation, ambient temperature, and humidity); Cloud-based diagnostic results: Current fault type and confidence level .

[0041] Then, calculate the equipment health index. Based on cumulative usage time and historical failure frequency, the aging and health status of equipment are quantified: ;in, (Duration decay coefficient) (Fault impact coefficient) This represents the total number of historical failures. A higher value indicates a better health status of the device.

[0042] Then calculate the environmental coupling coefficient. This characterizes the influence of environmental parameters on equipment fault criteria, calculated through the correlation between ambient temperature and humidity and equipment temperature. ; in, =0.7 (temperature weight), For variables and covariance, For variables standard deviation The standard deviation of humidity, For PCB temperature standard deviation, The standard deviation of ambient temperature. This represents the standard deviation of the cell temperature. A positive value indicates that the environmental parameter is positively correlated with the equipment temperature (e.g., a high-temperature environment exacerbates the equipment temperature rise).

[0043] Then, calculate the failure risk trend value. : Based on the rate of change of features within the sliding window, predict the fault evolution trend: ; in, (Sensor data dimension) Risk weights for each feature (e.g., current change weights) =0.2, higher than the humidity weight. , For the current moment, the first Item data, Milliseconds (sliding window duration). The larger the value, the faster the risk of failure increases.

[0044] Dynamically generate threshold adjustment amount For the benchmark threshold Adjust as needed (e.g., the original temperature threshold is 70℃):

[0045] in, =5 (Health Influence Coefficient) =2 (risk trend coefficient) For symbolic functions ( Take 1 at time, Take -1 at times. For example: low health ( =0.3), positive coupling with the environment ( =0.6), high risk trend ( =3), high confidence level ( When =0.9), The temperature threshold is then lowered from 70℃ to 61.1℃.

[0046] Then, the distribution interval is... Dynamically adjust according to failure risk: ; in, =50 milliseconds (baseline interval). =0.1 (risk sensitivity coefficient). The higher the risk ( The larger the value, the shorter the distribution interval (minimum 10 milliseconds), ensuring that the threshold is updated quickly in emergency situations.

[0047] This method uses three dimensions—"health, environment coupling, and risk trend"—combined with confidence level to dynamically allocate and adjust weights, and the distribution interval adapts to risk changes, forming a closed-loop mechanism of "state perception, dynamic calculation, and on-demand distribution," which significantly improves the adaptability of the criteria to individual device differences and complex environments.

[0048] In S5, if an emergency fault is determined at the edge, or if the confidence level of the cloud result meets the threshold, the power is directly cut off. Specifically, the edge-end determination of an emergency fault includes three situations: First, if the cell surface temperature is not lower than 70℃ or the circuit PCB temperature is not lower than 80℃, it is determined to be an overheating emergency fault. Second, if the real-time current of the charging / discharging circuit is not lower than 2.5A, it is determined to be a short-circuit emergency fault. Third, if the absolute value of the deviation between the cell output voltage and the rated voltage of 5V is not lower than 1V and the cell thickness change is not lower than 0.3mm, it is determined to be a cell failure emergency fault. Meeting the cloud result confidence threshold means that in the diagnostic results issued by the cloud, the fault category is abnormal and the confidence level is not lower than 95%. When either of the above two situations is met, the main control chip immediately executes a power-off action. Specifically, the power-off action outputs a high-level power-off signal within 0.5 milliseconds. This signal controls the magnetic latching relay to disconnect the charging / discharging main circuit, thereby cutting off the power supply.

[0049] In step S6, fault data is uploaded to the cloud, and the model and criteria are updated at fixed time intervals to improve accuracy. Specifically, the fault data includes 30 sets of raw data at the time of the fault. The fault data also includes edge-side criterion results and cloud-based diagnostic results. After the emergency response is completed, the main control chip packages this fault data and uploads it to the cloud fault sample library via the NB-IoT module. The fixed time interval is every 24 hours. The sample library is also updated when the cumulative number of newly added samples is not less than 500. During the update, the network structure is fixed, using the Adam optimizer with an initial learning rate of 0.001. The learning rate decays by 10% every 100 rounds. The cross-entropy loss function is used as the optimization objective. Iterative training continues until the loss value is less than 0.01. New model parameters and edge-side criterion thresholds are generated. This achieves dynamic improvement in model accuracy.

[0050] This application also discloses an automatic fire prevention and power-off system for fault diagnosis of shared power banks, including: The sensor acquisition module is used to collect data from temperature, current, voltage, cell deformation, and environmental sensors. The data distribution module is used to transmit the collected data in two paths: one path is stored in the edge cache, and the other path is transmitted to the cloud via NB-IoT. The emergency fault determination module is used to load a preset criterion library, verify cached data, and determine an emergency fault and cut off power when the conditions are met. The cloud-based identification module receives data and uses a pre-trained model to identify faults and confidence levels. The criteria update module is used to send diagnostic results and optimized criteria from the cloud to the edge device at fixed time intervals; The fault upload module is used to upload fault data to the cloud and update the model and criteria at fixed time intervals. The power control module is used to directly cut off power when an emergency fault is detected.

[0051] This application also protects a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the automatic fire prevention and power-off method for fault diagnosis of shared power banks provided in the embodiments of the present invention.

[0052] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device.

[0053] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, system, or device.

[0054] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0055] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A shared power bank fault diagnosis method with automatic fire prevention and power-off, characterized in that, Including the following steps: The shared power bank has built-in temperature sensor, current sensor, voltage sensor, cell deformation sensor and environmental sensor to collect data and transmit it in two ways: one way is stored in the edge buffer and the other way is transmitted to the cloud via NB-IoT. The main control chip loads a preset criterion library to verify the cached data. When the temperature, current or voltage deviation meets the threshold and the deformation meets the threshold, it is judged as an emergency fault and the power is cut off directly. After receiving data in the cloud, a pre-trained model is used to identify faults and confidence levels; The cloud sends diagnostic results and optimization criteria to the edge device at fixed time intervals to complete the update. If the edge device determines an emergency fault, or if the confidence level of the cloud result meets the threshold, power will be cut off directly. Fault data is uploaded to the cloud, and the model and criteria are updated at fixed time intervals to improve accuracy.

2. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, The shared power bank incorporates a temperature sensor, a current sensor, a voltage sensor, a cell deformation sensor, and an environmental sensor to collect data. Specifically, the shared power bank incorporates five types of sensors: temperature, current, voltage, cell deformation, and environmental sensors. Each type of sensor collects data synchronously at a corresponding fixed frequency. The temperature sensor collects the temperature of the cell surface and the circuit PCB board; the current sensor collects the real-time current of the charging and discharging circuit; the voltage sensor collects the cell output and circuit bus voltage; the cell deformation sensor collects the change in cell thickness; and the environmental sensor collects the external ambient temperature and humidity. The data collected by the sensors is used to generate samples containing information collected by each type of sensor at fixed time intervals.

3. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, The transmission is divided into two paths: one path stores the data in the edge cache, and the other path transmits it to the cloud via NB-IoT. Specifically, the data collected by the sensor is used to generate samples at fixed intervals. One path is the local path, which is directly transmitted to the cache unit of the edge main control chip for temporary storage. The other path is the cloud path, which uploads the samples to the cloud server in real time through the low-latency NB-IoT module. Each uploaded sample is accompanied by a precise timestamp.

4. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, The main control chip loads a preset criterion library to verify the cached data. Specifically, the main control chip loads a preset emergency fault criterion library to perform real-time verification on the local cached data. The criteria are based on the physical safety threshold of the device. If the temperature index exceeds the standard, it is determined to be an overheating emergency fault; if the current exceeds the standard, it is determined to be a short circuit emergency fault; if both the voltage deviation and the cell deformation exceed the standard, it is determined to be a cell failure emergency fault.

5. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, After receiving the data, the cloud server uses a pre-trained model to identify faults and confidence levels. Specifically, the cloud server receives cloud path data uploaded by the NB-IoT module and generates a time-series feature vector containing direct features of the original data, first-order statistical features, and higher-order fault features. Standardization preprocessing is performed on the features to eliminate dimensional differences; a pre-trained temporal feature fusion fault diagnosis model is launched, which adopts a temporal convolution plus channel attention and fully connected classification architecture to capture fault features at different time scales and highlight key features; the fault type with the highest confidence and its corresponding confidence are output through classification mapping.

6. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, The cloud sends the diagnostic results and optimized criteria to the edge at fixed time intervals to complete the update. Specifically, the cloud sends the diagnostic results and optimized edge criteria thresholds to the edge through the NB-IoT module at fixed time intervals synchronized with the data collection cycle. The diagnostic results include the fault type and corresponding confidence level, and the optimized judgment threshold can be adapted to the actual environmental conditions; After receiving the information, the edge-end main control chip updates the threshold parameters of the emergency fault judgment database to achieve dynamic adaptation of the edge-end judgment and complete the update.

7. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, If the edge terminal determines an emergency fault, or the confidence level of the cloud result meets the threshold, the power will be directly cut off. Specifically, the emergency fault determined by the edge terminal includes three situations: temperature index exceeding the standard, current exceeding the standard, and voltage deviation and cell deformation both exceeding the standard; the confidence level of the cloud result meeting the threshold means that the diagnosis result issued by the cloud is abnormal and the confidence level meets the standard; when one of the above two situations is met, the main control chip immediately executes the power-off action, quickly outputs a signal to control the magnetic latching relay to disconnect the charging and discharging main circuit of the shared power bank, thereby cutting off the power supply.

8. The automatic fire prevention and power-off method for fault diagnosis of shared power banks according to claim 1, characterized in that, The process of uploading fault data to the cloud and updating the model and criteria at fixed time intervals to improve accuracy involves the following steps: Fault data includes the original data at the time of the fault, edge-end criteria results, and cloud-based diagnostic results; after the emergency response is completed, the main control chip packages the fault data and uploads it to the cloud fault sample library via the NB-IoT module; updates are triggered at fixed time intervals or when new samples are added to the sample library; during updates, the network structure is fixed, and a suitable optimizer and loss function are used for model training; after training, new model parameters and edge-end criteria thresholds are generated; new parameters and thresholds are continuously issued through corresponding steps to achieve dynamic optimization of the model and criteria, thereby improving diagnostic accuracy.

9. A system applying the automatic fire prevention and power-off method for fault diagnosis of shared power banks as described in claim 1, characterized in that, include: The sensor acquisition module is used to collect data from temperature, current, voltage, cell deformation, and environmental sensors. The data distribution module is used to transmit the collected data in two paths: one path is stored in the edge cache, and the other path is transmitted to the cloud via NB-IoT. The emergency fault determination module is used to load a preset criterion library, verify cached data, and determine an emergency fault and cut off power when the conditions are met. The cloud-based identification module receives data and uses a pre-trained model to identify faults and confidence levels. The criteria update module is used to send diagnostic results and optimized criteria from the cloud to the edge device at fixed time intervals; The fault upload module is used to upload fault data to the cloud and update the model and criteria at fixed time intervals. The power control module is used to directly cut off power when an emergency fault is detected.