Two-wheeled vehicle intelligent charging protection system based on OpenCPU and control method thereof

By integrating multi-module collaborative control through an intelligent charging protection system based on OpenCPU, the problem of poor software and hardware coordination in existing technologies has been solved, realizing intelligent, stable and safe management of two-wheeled vehicle charging, and adapting to the charging needs of multiple types of batteries.

CN122068616APending Publication Date: 2026-05-19LUOYANG XUGUANG INSURANCE EQUIP CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LUOYANG XUGUANG INSURANCE EQUIP CO LTD
Filing Date
2026-04-21
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

The existing two-wheeled vehicle charging protection system adopts a separate architecture design of microcontroller and 4G module, which results in poor software and hardware coordination, slow control response, and unstable system operation, and cannot meet the high-efficiency and safe charging requirements of multi-port and multi-type batteries in centralized charging scenarios.

Method used

The system adopts an intelligent charging protection system based on OpenCPU, which integrates five major software function modules: data preprocessing, intelligent power protection, status recognition, decision control, data storage, and remote management. It uses the OpenCPU 4G module as the main control core to achieve hardware and software collaboration. Combined with median filtering and linear normalization processing, it dynamically matches the protection threshold and adopts a dual data storage method of local Flash storage and cloud encrypted synchronization to achieve intelligent management and control of the entire charging process.

Benefits of technology

It has achieved intelligent management and control of the entire charging process for two-wheeled vehicles, improved system coordination efficiency, accurately identified abnormal charging power, adapted to various battery charging conditions, reduced the risk of data loss and manual maintenance costs, and improved the stability and safety of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122068616A_ABST
    Figure CN122068616A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of charging, and discloses a two-wheeled vehicle intelligent charging protection system based on an OpenCPU and a control method thereof. The system comprises the following modules: a data preprocessing module, an intelligent power protection module, a state identification module, a decision control module, a data storage module and a remote management module. The control method comprises the following steps: S1, electrifying and initializing the system; s2, receiving a card swiping or network charging starting request; s3, comparing the real-time power with a threshold value to complete anomaly recognition; s4, synchronously switching the display state of the port indicator lamp; s5, collecting related data of the whole charging process; and S6, corresponding management and control operation is completed. According to the technical scheme, an OpenCPU4G module is adopted as a main control core, six software function modules are integrated, and a hardware acquisition unit, a hardware execution unit and other units are linked to construct a software and hardware collaborative system, so that the problems of poor software and hardware collaboration, management and control response lagging and unstable system operation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of charging technology, specifically to an intelligent charging protection system and control method for two-wheeled vehicles based on OpenCPU. Background Technology

[0002] As a convenient short-distance mode of transportation, two-wheeled vehicles are increasingly demanding in terms of charging safety and intelligent management. Various two-wheeled vehicle charging protection systems have emerged to meet this need. These systems primarily monitor the status of two-wheeled vehicles during charging, protect power, and control charging. They are suitable for both centralized charging stations and decentralized charging scenarios, providing safety assurance for two-wheeled vehicle battery charging while facilitating management of charging equipment by staff. Currently, most two-wheeled vehicle charging protection systems on the market use a microcontroller as the control core, paired with an independent 4G module for data transmission, and equipped with basic data acquisition and execution units to perform simple charging start / stop and overload protection functions.

[0003] However, the existing two-wheeled vehicle charging protection system adopts a separate architecture design of microcontroller and 4G module. The microcontroller is responsible for core control, while the 4G module is only responsible for data transmission. The two have poor coordination, resulting in a lag in system control and response, and it is impossible to achieve efficient linkage control of the entire charging process.

[0004] Meanwhile, the hardware connection of the split architecture is complex, which can easily lead to problems such as unstable signal transmission and insufficient module compatibility. This results in poor overall system stability, making it difficult to meet the efficient and safe charging needs of multiple ports and multiple types of batteries in centralized charging scenarios, and failing to adapt to the development trend of intelligent and stable charging of two-wheeled vehicles. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an intelligent charging protection system and control method for two-wheeled vehicles based on OpenCPU. This solves the problems of poor hardware and software coordination, delayed control response, and unstable system operation caused by the separate architecture of microcontroller and 4G module in existing technologies.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a two-wheeled vehicle intelligent charging protection system based on OpenCPU, comprising the following modules:

[0007] The data preprocessing module is used to denoise and normalize the collected charging data;

[0008] The intelligent power protection module is used to identify abnormal charging power and perform graded protection processing.

[0009] The status recognition module is used to identify the working status of the charging port and control the indicator light display.

[0010] The decision control module is used to generate and send charging control commands based on the detection results;

[0011] The data storage module is used to store charging-related data and synchronize it to the cloud.

[0012] The remote management module is used to enable remote monitoring and control of the charging system.

[0013] Preferably, in the data preprocessing module, the denoising and normalization processing of the collected charging data includes:

[0014] Acquire raw data of charging power, voltage, and current transmitted by the data acquisition module;

[0015] The median filtering algorithm is used to denoise the original data;

[0016] The denoised data is normalized to form standardized charging data.

[0017] Preferably, in the intelligent power protection module, the step of identifying abnormal charging power and performing graded protection processing includes:

[0018] Receive standardized charging data transmitted by the data preprocessing module and extract charging power parameters;

[0019] Dynamically match the corresponding power protection threshold according to the battery type and charging stage;

[0020] The system compares the real-time charging power with the protection threshold to identify anomalies, performs three levels of power protection processing based on the identification results, and generates corresponding charging control commands.

[0021] Preferably, in the status recognition module, recognizing the working status of the charging port and controlling the indicator light display includes:

[0022] Receives GPIO port detection signals and Hall sensor detection signals transmitted by the data acquisition module;

[0023] Based on the level changes of the detection signal and the sensing results, the four working states of the charging port are identified: idle, inserted, charging, and faulty.

[0024] Based on the identified working status, an indicator light control signal is generated, and a corresponding display command is sent to the status indication module.

[0025] Preferably, in the decision control module, the step of generating and sending charging control commands based on the detection results includes:

[0026] Receive power protection commands from the intelligent power protection module and port status signals from the status identification module;

[0027] Based on the preset charging control logic, the received instructions and signals are analyzed and judged;

[0028] Generate corresponding control commands for charging port on / off and charging resumption, and send the commands to the execution module.

[0029] Preferably, the data storage module stores charging-related data and synchronizes it to the cloud, including:

[0030] Collect data such as timestamps, port numbers, power, voltage, current, charging status, and fault information throughout the entire charging process;

[0031] The collected charging data is stored in a structured format in the Flash memory built into the OpenCPU4G module.

[0032] A connection is established between the local server and the cloud server via a 4G communication module to synchronize structured charging data to the cloud.

[0033] Preferably, the remote management module enables remote monitoring and control of the charging system by including:

[0034] The charging status, operating parameters, and fault information data are uploaded to the cloud management platform via 4G communication.

[0035] Receive parameter adjustment instructions from the cloud management platform and adjust the maximum charging power and float charging time operating parameters;

[0036] Receive firmware upgrade packages from the cloud and complete remote system firmware upgrades;

[0037] Receive the network charging start command, verify the port status, and then generate a charging start instruction.

[0038] Preferably, in the status indication module, the control signal for displaying the charging status includes:

[0039] Receive indicator light control signals sent by the status recognition module and analyze the working status corresponding to the charging port;

[0040] Based on the analysis results, control the on / off and flashing modes of the red, green, and yellow LED indicator lights, which correspond to the idle, charging, insertion, and fault states.

[0041] When the port status changes, respond to the control signal to switch the indicator light display mode.

[0042] A two-wheeled vehicle intelligent charging protection control method based on OpenCPU, the method comprising the following steps:

[0043] S1, the system is powered on and initialized, and the configuration of each hardware and software module is completed. The charging port is set to the disconnected state and the port indicator light is set to the idle display state. At the same time, the charging port is collected to detect the charging port plug-in and connection signal with the tram, and the current working status of the port is identified.

[0044] S2 receives a charging start request from a card swipe or network, verifies the validity of the port status, sends a closing command to start charging, and synchronously switches the port indicator light to the charging display status. It also collects raw data of charging power, voltage, and current at fixed intervals.

[0045] S3 performs noise reduction and normalization processing on the collected raw charging data to form standardized charging data, extracts power parameters and matches the corresponding power protection threshold, and compares the real-time power with the threshold to complete the anomaly identification.

[0046] S4 executes three-level power protection processing based on the power anomaly identification result and generates corresponding control commands. It controls the charging port to complete the on / off action according to the commands. When the power returns to normal, it sends a closing command to resume charging and simultaneously switches the port indicator light display status.

[0047] The S5 collects relevant data from the entire charging process, stores it in local Flash memory in a structured format, and synchronizes the data to the cloud server via 4G communication. It monitors charging time and power level in real time, and sends a disconnect command to end charging and restore the indicator light to the idle state when the preset value is reached.

[0048] The S6 uploads real-time charging status, operating parameters, and fault information to the cloud management platform for remote monitoring. It also receives parameter adjustment, firmware upgrade, and network charging start commands from the cloud to complete corresponding management and control operations.

[0049] Preferably, in step S3, matching the corresponding power protection threshold and comparing the real-time power with the threshold to complete the anomaly identification includes:

[0050] Extract the basic protection threshold corresponding to the battery type, the dynamic adjustment coefficient corresponding to the charging stage, and the continuous change characteristics of standardized charging data;

[0051] The dynamic adjustment coefficient is applied to the basic protection threshold to generate a real-time power protection threshold that is adapted to the current charging condition.

[0052] The continuous change characteristics are combined with the comparison results of real-time power parameters and real-time power protection thresholds as the basis for power anomaly determination, thus completing the abnormal identification of charging power.

[0053] This invention provides an intelligent charging protection system for two-wheeled vehicles based on OpenCPU and its control method. It has the following beneficial effects:

[0054] 1. This invention adopts a technical solution that uses an OpenCPU 4G module as the main control core, integrates six major software function modules and links hardware acquisition and execution units to build a software and hardware collaborative system. This achieves the technical effect of realizing intelligent management and control of the entire charging process of two-wheeled vehicles and improving the system's collaborative efficiency. Compared with the existing technology that uses a separate architecture of microcontroller and 4G module, this invention solves the problems of poor software and hardware collaboration, delayed control response and unstable system operation.

[0055] 2. This invention employs a data preprocessing technique that combines median filtering and linear normalization, coupled with a three-level power protection scheme that dynamically adjusts the protection threshold based on battery type and charging stage. This achieves the technical effects of accurately identifying abnormal charging power, promptly executing graded safety protection, and adapting to various battery charging conditions. Compared with the power protection schemes in the prior art that use fixed thresholds and single filtering methods, this invention solves the problems of severe data distortion, poor protection threshold adaptability, and susceptibility to false protection or untimely protection.

[0056] 3. This invention adopts a dual data storage method that combines local Flash storage with cloud-based encrypted synchronization, and uses 4G bidirectional communication to achieve remote monitoring, parameter adjustment, and firmware upgrades. This achieves the technical effects of traceable charging data, remote system control, and reduced manual maintenance costs. Compared with existing technologies that have a single data storage method and lack remote control functions, this invention solves the problems of easy data loss, large workload of manual maintenance, and inconvenient system function iteration. Attached Figure Description

[0057] Figure 1 This is a schematic diagram of the framework of the intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to the present invention;

[0058] Figure 2 This is a flowchart illustrating the steps of the intelligent charging protection control method for two-wheeled vehicles based on OpenCPU according to the present invention. Detailed Implementation

[0059] The technical solution of the present invention will now be clearly and completely described with reference to the 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.

[0060] Please see the appendix Figure 1 This invention provides an intelligent charging protection system for two-wheeled vehicles based on OpenCPU, comprising the following modules:

[0061] The data preprocessing module is used to denoise and normalize the collected charging data. Its core function is to eliminate interference noise in the original charging data and unify the data units, so as to provide accurate and standardized data support for the subsequent abnormal identification of the intelligent power protection module, avoid misjudgment of power protection due to data distortion, and improve the accuracy and reliability of system protection.

[0062] Furthermore, the data preprocessing module performs noise reduction and normalization processing on the collected charging data, including:

[0063] Acquire raw data of charging power, voltage, and current transmitted by the data acquisition module;

[0064] The median filtering algorithm is used to denoise the original data;

[0065] The denoised data is normalized to form standardized charging data;

[0066] Specifically, the core principle of the median filtering algorithm is to select continuously collected raw data sequences, sort them, and take the median value as the effective data after denoising. This effectively filters out high-frequency noise and abnormal pulse data generated during charging due to factors such as grid voltage fluctuations, equipment electromagnetic interference, and poor contact. Compared to the mean filtering algorithm, its advantage lies in not obscuring the abrupt changes in data, better preserving the true trend of charging data changes, and adapting to dynamic fluctuations in charging power and voltage. In this embodiment, the median filtering algorithm uses a sliding window with a window size of 5, that is, continuously collecting raw data for 5 cycles, sorting it by value, and taking the 3rd value in the sorted sequence as the denoised data for that window, as shown in the formula below:

[0067] ;

[0068] in, This represents the charging data after noise reduction. These represent the raw data from five consecutive acquisition cycles, and median() represents the function to take the median value.

[0069] The core function of normalization is to eliminate the dimensional differences between power, voltage, and current parameters, mapping all data to the [0,1] interval. This facilitates unified threshold comparison and anomaly identification by the subsequent intelligent power protection module, avoiding problems such as unreasonable protection threshold settings and decreased identification accuracy caused by differences in parameter magnitudes. Normalization uses a linear normalization formula, as follows:

[0070] ;

[0071] in, The data is normalized and takes values ​​in the range [0,1]. This is the clean, original data obtained after median filtering; This represents the minimum measurement range of the corresponding acquired parameter; To determine the maximum value of the measurement range of the corresponding collected parameters, after processing with the above normalization formula, all types of charging data are unified into dimensionless standardized data, which can be directly transmitted to the intelligent power protection module for subsequent processing.

[0072] The intelligent power protection module is used to identify abnormal charging power and perform graded protection processing. It is the core module of the system to realize charging safety protection. Its core function is to monitor the dynamic changes of charging power in real time, accurately identify abnormal power states, and perform different levels of protection actions according to the severity of the abnormality. This avoids safety hazards such as battery damage, equipment overheating, and short circuits caused by problems such as overpower and power sudden changes, and ensures the safety and stability of the two-wheeled vehicle charging process.

[0073] Furthermore, the intelligent power protection module identifies abnormal charging power and performs graded protection processing, including:

[0074] Receive standardized charging data transmitted by the data preprocessing module and extract charging power parameters;

[0075] Dynamically match the corresponding power protection threshold according to the battery type and charging stage;

[0076] The real-time charging power is compared with the protection threshold to identify anomalies. Based on the identification results, three levels of power protection processing are executed to generate corresponding charging control commands.

[0077] Specifically, the intelligent power protection module first extracts charging power parameters from standardized charging data, that is... The corresponding power normalization data is then converted back to the actual power value using an inverse normalization formula, facilitating a direct comparison with the protection threshold. The inverse normalization formula is as follows:

[0078] ;

[0079] in, The actual charging power value after restoration (unit: W). To standardize power data, This represents the maximum value within the power measurement range. This is the minimum value in the power measurement range.

[0080] The dynamic matching of protection thresholds is based on the differences in battery type and charging stage. The core principle is to adapt to the charging characteristics of different batteries and avoid overly strict or lenient protection caused by a uniform threshold.

[0081] Battery types mainly include lead-acid batteries, lithium batteries, and graphene batteries. The charging stages are divided into the initial charging stage, the middle charging stage, and the final charging stage. The matching formula for the dynamic protection threshold is as follows:

[0082] ;

[0083] in, The real-time power protection threshold under the current operating conditions (unit: W); The basic protection threshold for the corresponding battery type; This is the dynamic adjustment coefficient during the charging phase;

[0084] Power anomaly identification employs a dual logic of real-time value comparison and trend judgment. It not only compares the real-time power with the real-time protection threshold but also determines whether the power anomaly has persisted for three consecutive data collection cycles to avoid false protection due to instantaneous fluctuations. The specific logic of the three-level power protection process is as follows: when the real-time power > 1.5 × U, it is determined to be a serious anomaly, and an immediate power-off command is generated to quickly disconnect the charging circuit and prevent equipment damage.

[0085] When U < real-time power ≤ 1.5 × U, it is judged as a general anomaly, a delayed power-off command is generated, and a 1-minute countdown is started. If the power recovers to the range of U during the countdown, the power-off command is canceled and charging continues; if the power is still in the abnormal range after the countdown ends, the power-off command is executed; when the real-time power ≤ U and lasts for 3 consecutive collection cycles, it is judged as an anomaly eliminated, a charging recovery command is generated, and the charging circuit is restored.

[0086] The status recognition module is used to identify the working status of the charging port and control the indicator light display. Its core function is to collect various status signals of the charging port in real time, accurately identify the four working states of the port: idle, inserted, charging, and fault, provide status basis for the decision control module, and send control signals to the status indication module to realize the visualization of the charging status, so that users and staff can intuitively understand the working status of the port.

[0087] Furthermore, the status recognition module identifies the operating status of the charging port and controls the indicator light display, including:

[0088] Receives GPIO port detection signals and Hall sensor detection signals transmitted by the data acquisition module;

[0089] Based on the level changes of the detection signal and the sensing results, the four working states of the charging port are identified: idle, inserted, charging, and faulty.

[0090] Based on the identified working status, an indicator light control signal is generated, and a corresponding display command is sent to the status indication module;

[0091] In the status indication module, the control signals used to display the charging status include:

[0092] Receive indicator light control signals sent by the status recognition module and analyze the working status corresponding to the charging port;

[0093] Based on the analysis results, control the on / off and flashing modes of the red, green, and yellow LED indicator lights, which correspond to the idle, charging, insertion, and fault states.

[0094] When the port status changes, respond to the control signal to switch the indicator light display mode;

[0095] Specifically, the signal analysis principle of the status recognition module is based on the combination of level signals and inductive signals: GPIO24 and GPIO23 pins of the GPIO port detection circuit are input pins; a high level indicates the charger is not inserted, and a low level indicates the charger is inserted. The Hall sensor detects the inductive signal from the magnet inside the charging socket; a high level indicates the trolley is not connected, and a low level indicates the trolley is connected. The status recognition module achieves accurate identification of four operating states through the combined analysis of these two types of signals. The specific recognition logic is as follows:

[0096] Idle state: GPIO pin high level, charger not plugged in; Hall sensor high level, tram not connected;

[0097] Insertion status: GPIO pin low level indicates charger is inserted; Hall sensor low level indicates trolley is connected and no charging start command has been received.

[0098] Charging status: GPIO pin is low, indicating that the charger is plugged in; Hall sensor is low, indicating that the trolley is connected and has received the charging start command and is charging normally.

[0099] Fault status: GPIO pin is low, charger is plugged in, Hall sensor is low, tram is connected and power failure command or equipment fault signal has been received.

[0100] After receiving the control signal from the status recognition module, the status indication module represents the corresponding status through different display modes of red, green, and yellow LED indicators;

[0101] When idle, the green LED indicator is constantly lit; when charging, the red LED indicator is constantly lit; when plugged in, the yellow LED indicator flashes slowly; when in fault condition, the yellow LED indicator flashes quickly.

[0102] When the port status changes, the status indicator module responds to the control signal within 100ms to switch the indicator display mode, ensuring that the status display is synchronized with the actual port status and avoiding user misjudgment.

[0103] The decision control module is used to generate and send charging control commands based on the detection results. It is the core of the system's decision-making. Its core function is to receive signals and commands transmitted by each module, analyze and judge them according to the preset control logic, generate accurate control commands and send them to the execution module, coordinate the work of each module, ensure the orderly progress of the charging process and the timely execution of safety protection. It is the key hub connecting each module.

[0104] Furthermore, in the decision control module, the generation and sending of charging control commands based on the detection results includes:

[0105] Receive power protection commands from the intelligent power protection module and port status signals from the status identification module;

[0106] Based on the preset charging control logic, the received instructions and signals are analyzed and judged;

[0107] Generate corresponding control commands for charging port on / off and charging resumption, and send the commands to the execution module;

[0108] Specifically, the decision control module adopts priority judgment and logic verification control logic to ensure the accuracy and rationality of command generation. Among them, the power protection command has a higher priority than the port status signal. That is, when a power abnormality power-off command is received, the power-off control is executed first, regardless of the current port status, to ensure safety. When no power abnormality command is received, the corresponding command is generated according to the port status signal.

[0109] The core process of instruction parsing and judgment is as follows: First, the power protection instruction sent by the intelligent power protection module and the port status signal sent by the status recognition module are received. The validity of the instruction and signal is verified. If the verification fails, the instruction / signal is ignored and a fault prompt signal is sent to the status indication module. If the verification is successful, a control instruction is generated according to the preset logic.

[0110] The control commands use a binary encoding format for easy parsing by the execution module. The command encoding rules are as follows: immediate power-off command is coded as 0001, delayed power-off command as 0010, charging recovery command as 0011, port closure command as 0100, and port opening command as 0101. After generating the command, the decision control module transmits it to the execution module via GPIO pins at a rate of 9600bps to ensure fast and stable command transmission. The command transmission delay is ≤50ms, ensuring timely execution of protection actions. Simultaneously, the decision control module records the generation time and execution status of all commands for subsequent data storage and fault diagnosis.

[0111] The data storage module is used to store charging-related data and synchronize it with the cloud. Its core function is to persistently store data throughout the entire charging process, achieving dual backups on both the local and cloud sides. This facilitates local devices in querying historical charging records and troubleshooting, as well as enabling the cloud management platform to perform data statistics, analysis, and control. It provides data support for system optimization and operating condition adaptation, while ensuring that data is not lost and is traceable.

[0112] Furthermore, the data storage module stores charging-related data and synchronizes it to the cloud, including:

[0113] Collect data such as timestamps, port numbers, power, voltage, current, charging status, and fault information throughout the entire charging process;

[0114] The collected charging data is stored in a structured format in the Flash memory built into the OpenCPU4G module.

[0115] A connection between the local server and the cloud server is established through the 4G communication module, and the structured charging data is synchronized to the cloud.

[0116] Specifically, data acquisition adopts a real-time acquisition + timed storage method, with the acquisition frequency consistent with the acquisition frequency of the data acquisition module (500ms / time). The acquired data includes: timestamp, port number, actual charging power (unit: W), actual charging voltage (unit: V), actual charging current (unit: A), charging status, and fault information.

[0117] Structured data storage uses JSON format, which facilitates local Flash storage and cloud parsing;

[0118] Cloud synchronization utilizes 4G communication and establishes a stable connection between the local machine and the cloud server based on the TCP / IP protocol. The synchronization frequency is once per minute. If the 4G network is interrupted, the data storage module will temporarily store the unsynchronized data in local Flash memory and automatically re-transmit it once the network is restored, ensuring the integrity of the data synchronization. Data synchronized in the cloud is transmitted using encrypted AES-128 encryption, with the encryption formula as follows:

[0119] ;

[0120] in, For encrypted transmission data, For AES-128 encryption functions, For encryption key, This is the original structured data. Encrypted transmission effectively prevents data tampering and theft, ensuring the security and privacy of charging data.

[0121] The remote management module is used to realize the remote monitoring and control of the charging system. Its core function is to establish two-way communication between the local charging system and the cloud management platform based on the 4G communication function, so as to realize the remote real-time monitoring of charging status, remote adjustment of operating parameters, remote upgrade of system firmware and remote start of network charging, reduce manual maintenance costs, improve the intelligent management level of the charging system, and adapt to the large-scale management and control needs of centralized charging stations.

[0122] Furthermore, the remote management module enables remote monitoring and control of the charging system, including:

[0123] The charging status, operating parameters, and fault information data are uploaded to the cloud management platform via 4G communication.

[0124] Receive parameter adjustment instructions from the cloud management platform and adjust the maximum charging power and float charging time operating parameters;

[0125] Receive firmware upgrade packages from the cloud and complete remote system firmware upgrades;

[0126] Receives the network charging start command, verifies the port status, and then generates a charging start instruction.

[0127] Specifically, remote monitoring adopts real-time uploading and status push. The remote management module retrieves various data from the status identification module, intelligent power protection module, and data storage module in real time, and uploads them to the cloud management platform via 4G communication at a frequency of 1 time / second. The uploaded data includes the real-time status, real-time power, voltage, current, operating parameters, fault information, etc. of all charging ports. The cloud management platform parses and displays the data, and staff can view it in real time through computers and mobile terminals to achieve remote monitoring with a monitoring delay of ≤1 second.

[0128] When a fault is detected, the remote management module will immediately push a fault alarm signal to the cloud management platform and trigger a fault prompt from the local status indicator module, so that staff can respond quickly and troubleshoot the fault.

[0129] The core of remote parameter adjustment is receiving parameter adjustment instructions from the cloud management platform. These instructions include core parameters such as maximum charging power and float charging time. After the remote management module parses the instructions, it transmits the parameters to the intelligent power protection module, which then updates the power protection threshold matching rules and float charging time settings. The parameter adjustment response time is ≤2 seconds, and the adjusted data is synchronized to local storage and the cloud in real time to ensure parameter consistency.

[0130] The float charging time can be adjusted from 0 to 120 minutes, and the maximum power can be adjusted from 100 to 3500W to suit the charging needs of different scenarios.

[0131] Remote firmware upgrades employ a breakpoint resume + verification upgrade approach. The cloud management platform issues firmware upgrade commands and upgrade packages, and the remote management module downloads the upgrade packages via 4G communication. If the network is interrupted during the download process, breakpoint resume is supported to avoid repeated downloads. After the download is complete, the upgrade package is verified. Once the verification is successful, the remote upgrade of the system firmware is automatically completed. The upgrade process does not affect the normal operation of other charging ports. After the upgrade is completed, the system automatically restarts to ensure that the upgrade takes effect.

[0132] The core of remote charging start is receiving a network charging start command from the cloud management platform. The command includes parameters such as port number, charging power, and charging time. The remote management module transmits the command to the decision control module, which verifies the status of the corresponding port. Once the verification is successful, a charging start command is generated and sent to the execution module to start charging. The entire process has a response time of ≤1 second, enabling remote contactless charging start and improving ease of use.

[0133] The OpenCPU-based intelligent charging protection system for two-wheeled vehicles uses the OpenCPU 4G module as the core control unit and integrates six major software functional modules: data preprocessing module, intelligent power protection module, status recognition module, decision control module, data storage module, and remote management module. It is paired with compatible hardware acquisition, execution, indication, and power supply modules to realize intelligent control, safety protection, and remote management of the charging process of two-wheeled vehicles.

[0134] The corresponding control method is based on the collaborative work of six major software modules. It completes the status detection, data processing, power protection, data storage and remote management of the entire charging process through six core steps. It is adaptable to the charging conditions of various two-wheeled vehicle batteries and meets the high safety and high reliability requirements of centralized charging scenarios.

[0135] The hardware component uses the OpenCPU4G module as the sole main control core, and is equipped with a data acquisition module, an execution module, a status indication module, and a power supply module. Each hardware module is electrically connected to the OpenCPU4G module, providing the hardware platform for the operation of the software modules.

[0136] Data acquisition module: includes power metering chip, GPIO port detection circuit, Hall sensor, and card swipe detection chip, which are used to collect charging power, voltage and current data, detect charger insertion status, detect the connection status between the trolley and the charging socket, and collect card swipe charging verification signal, respectively. All collected data and signals are transmitted to the OpenCPU4G module.

[0137] Execution module: It uses a relay as the core execution element to receive control commands issued by the OpenCPU4G module, complete the opening and closing of the charging port, and realize the start and stop control of the charging process;

[0138] Status indicator module: Each charging port is equipped with a red, green and yellow LED indicator, which receives indicator control signals and represents the four states of the charging port: idle, charging, plugged in and faulty through different on and off and flashing modes;

[0139] Power supply module: This is an AC-DC conversion circuit that takes in 220V AC mains power and outputs a stable DC voltage, providing continuous and stable power to the OpenCPU4G module and all the aforementioned hardware modules.

[0140] The OpenCPU 4G module has a built-in local storage unit and integrates 4G communication functionality, enabling local data storage and cloud data interaction. Its six internal software modules work in conjunction with the hardware modules to form a software and hardware collaborative intelligent charging protection system.

[0141] Please see the appendix Figure 2 A smart charging protection control method for two-wheeled vehicles based on OpenCPU, the method includes the following steps:

[0142] S1, the system is powered on and initialized, and the configuration of each hardware and software module is completed. The charging port is set to the disconnected state and the port indicator light is set to the idle display state. At the same time, the charging port is collected to detect the charging port plug-in and connection signal with the tram, and the current working status of the port is identified.

[0143] Furthermore, the system power-on initialization and identification of the current working status of the ports include:

[0144] Retrieve the preset initialization configuration parameters of each hardware and software module to complete the module startup and parameter configuration;

[0145] Generate a charging port disconnect command and an indicator light idle display command, and send them to the execution module and the status indication module respectively;

[0146] The detection unit of the data acquisition module is activated to collect the charger insertion detection signal and the tram connection detection signal. After analyzing the signal characteristics, the current working status of the port is identified.

[0147] Specifically, the system is connected to a 220V AC power supply. The power supply module completes the AC-DC conversion, providing a rated DC voltage of 5V±0.1V to the OpenCPU4G module and all hardware modules. After the OpenCPU4G module starts up, it retrieves the preset initialization configuration parameters of each hardware and software module, completes the hardware startup of the data acquisition module, execution module, and status indication module, as well as the parameter configuration and function activation of six major software modules, including the data preprocessing module and intelligent power protection module, to ensure that all modules are in a working state.

[0148] The OpenCPU4G module sends a charging port disconnect command to the execution module, controlling the relay to remain in the disconnected state, so that the charging port is in the power-off idle mode. At the same time, it sends an indicator light idle display command to the status indication module, controlling the green LED indicator light of all charging ports to stay on, and the red and yellow LED indicator lights to be off.

[0149] The GPIO port detection circuit and Hall sensor of the data acquisition module are activated. Port 1 of the GPIO port detection circuit is connected to the GPIO24 pin of the OpenCPU4G module, and port 2 is connected to the GPIO23 pin. It collects the charger insertion detection signal in real time. The Hall sensor detects the connection signal between the electric vehicle and the charging socket by sensing the magnet inside the charging socket. Both types of detection signals are transmitted to the status recognition module of the OpenCPU4G module in real time. The status recognition module analyzes the changes in signal level and the sensing results. A high level indicates that it is not inserted or not connected, and a low level indicates that it is inserted or connected. Based on the analysis results, the current working status of each charging port is identified, such as: idle, inserted, or faulty. The identification results are temporarily stored to provide a basis for subsequent charging start verification.

[0150] S2 receives a charging start request from a card swipe or network, verifies the validity of the port status, sends a closing command to start charging, and synchronously switches the port indicator light to the charging display status. It also collects raw data of charging power, voltage, and current at fixed intervals.

[0151] Furthermore, receiving the charging start request and initiating charging, as well as collecting raw data, includes:

[0152] Receive the card swipe verification signal from the card swipe detection module or the network charging start request from the remote management module;

[0153] Retrieve the port working status identification result from step S1 to verify the validity of the charging port;

[0154] Generate and send out the charging port closing command and the indicator light charging display command, and start the data acquisition module to collect raw data of charging power, voltage and current at a fixed period;

[0155] Specifically, the FM17580 card swipe detection chip of the data acquisition module collects the user's card swipe verification signal in real time, or the remote management module of the OpenCPU4G module receives the network charging start request issued by the cloud management platform. Both the card swipe verification signal and the network charging start request are transmitted to the decision control module.

[0156] The decision control module retrieves the port working status identification results stored in the status identification module in step S1, and verifies the validity of the port requesting to start charging. Only when the port is in the inserted state, such as when the charger is inserted, the trolley is connected, and there is no fault, the port status is determined to be valid and charging is allowed to start. If the port is in an idle or faulty state, the port status is determined to be invalid, the charging start request is rejected, and a fault prompt is given through the status indication module.

[0157] For a charging port whose status verification is valid, the decision control module sends a charging port closing command to the execution module, controls the relay to close, connects the charging port to the power supply, and starts the two-wheeled vehicle charging process; at the same time, it sends an indicator charging display command to the status indication module, controls the red LED indicator of the port to be constantly on, and the green and yellow LED indicators to be off, completing the synchronous switching of the indicator status;

[0158] After charging is started, the decision control module sends a data acquisition command to the data acquisition module, which then activates the BL0939 power metering chip to collect raw data of the charging power, voltage, and current of the charging port at a fixed time period of 500ms. The collected raw data is transmitted in real time to the data preprocessing module of the OpenCPU4G module, waiting for subsequent data processing.

[0159] S3 performs noise reduction and normalization processing on the collected raw charging data to form standardized charging data, extracts power parameters and matches the corresponding power protection threshold, and compares the real-time power with the threshold to complete the anomaly identification.

[0160] Furthermore, matching the corresponding power protection threshold and comparing the real-time power with the threshold completes anomaly identification, including:

[0161] Extract the basic protection threshold corresponding to the battery type, the dynamic adjustment coefficient corresponding to the charging stage, and the continuous change characteristics of standardized charging data;

[0162] The dynamic adjustment coefficient is applied to the basic protection threshold to generate a real-time power protection threshold that is adapted to the current charging conditions.

[0163] By combining the continuous change characteristics with the comparison results of real-time power parameters and real-time power protection thresholds, the abnormal power of charging is identified.

[0164] Specifically, the data preprocessing module receives the raw charging power, voltage, and current data transmitted from the data acquisition module. First, it uses a median filter algorithm with a window size of 5 to denoise the raw data. The raw data from five consecutive acquisition cycles are sorted by size, and the median value is used as the denoised data. This filters out high-frequency noise caused by grid fluctuations and equipment interference during the charging process, ensuring data accuracy. Then, the denoised clean data is normalized to eliminate the dimensional differences between different parameters. The normalization process uses the following formula:

[0165] ;

[0166] in, For normalized standardized data, The original data after denoising. This represents the minimum measurement range of the corresponding acquired parameters. This represents the maximum value within the measurement range of the corresponding acquired parameter;

[0167] After normalizing all collected power, voltage, and current data using the above formula, standardized charging data is generated and transmitted to the intelligent power protection module.

[0168] The intelligent power protection module extracts charging power parameters from standardized charging data and retrieves the system's preset power protection threshold matching rules. It matches the basic protection threshold according to the type of two-wheeled vehicle battery connected to the current charging port, and then dynamically adjusts the basic protection threshold based on the initial, middle, and final stages of charging. For lead-acid batteries, a higher protection threshold is configured in the initial stage of charging and a lower protection threshold is configured in the final stage of charging. For lithium batteries and graphene batteries, a stable protection threshold is configured throughout the entire process, generating a real-time power protection threshold that is adapted to the current charging conditions.

[0169] The intelligent power protection module compares and analyzes the real-time collected charging power parameters with the dynamically adjusted real-time power protection threshold in real time. It also makes a comprehensive judgment based on the continuous change trend of the power parameters. If the real-time power parameters exceed the real-time power protection threshold and maintain an abnormal trend for multiple consecutive collection cycles, it is determined that the charging power is abnormal. If the real-time power parameters are within the threshold range, it is determined that the charging power is normal, and the power abnormality identification result is transmitted to the decision control module in real time.

[0170] S4 executes three-level power protection processing based on the power anomaly identification result and generates corresponding control commands. It controls the charging port to complete the on / off action according to the commands. When the power returns to normal, it sends a closing command to resume charging and simultaneously switches the port indicator light display status.

[0171] Furthermore, the implementation of three-level power protection processing and control of port on / off states, as well as switching indicator light statuses, includes:

[0172] Retrieve the power anomaly identification results, execute the corresponding three-level power protection processing according to the preset rules, and generate port on / off or charging recovery control commands;

[0173] The control command is sent to the execution module to control the charging port to complete the corresponding on / off or closed action;

[0174] Based on the port action results, an indicator light control signal is generated and sent to the status indication module to complete the synchronous switching of the indicator light display status;

[0175] Specifically, the decision control module receives the power anomaly identification result transmitted by the intelligent power protection module. If the power is determined to be normal, no protection processing is performed, and the charging process continues. The status indicator module maintains the charging display state with the red LED indicator light constantly on.

[0176] If an abnormality in power is detected, the decision control module executes the corresponding protection process according to the preset three-level power protection rules and generates corresponding control commands:

[0177] Level 1 protection: When the real-time charging power exceeds 1.5 times the real-time power protection threshold, an immediate power-off command is generated.

[0178] Level 2 protection: When the real-time charging power is greater than the real-time power protection threshold but less than 1.5 times the threshold, a delayed power-off command is generated and a 1-minute countdown is started. If the power is still in an abnormal state after the countdown ends, the power-off action is executed.

[0179] Level 3 protection: When the abnormal power state is eliminated and the real-time power parameters are restored to the threshold range, a charging recovery command is generated;

[0180] The decision control module sends the above control commands to the execution module. The execution module controls the relay to complete the corresponding actions according to the commands: when it receives an immediate power-off or delayed power-off command, it controls the relay to open, the charging port to be powered off, and charging to stop; when it receives a charging recovery command, it controls the relay to close, the charging port to be powered on again, and the charging process to resume.

[0181] After the execution module completes the port opening / closing action, it feeds back the action result to the decision control module. The decision control module generates the corresponding indicator control signal based on the action result and sends it to the status indication module: when the port is powered off, it controls the yellow LED indicator of the port to flash quickly to indicate the fault status; when charging is restored, it controls the yellow LED indicator to turn off and the red LED indicator to turn on again, restoring the charging display status, thus realizing the synchronous switching between the indicator display status and the actual port status.

[0182] The S5 collects relevant data from the entire charging process, stores it in local Flash memory in a structured format, and synchronizes the data to the cloud server via 4G communication. It monitors charging time and power level in real time, and sends a disconnect command to end charging and restore the indicator light to the idle state when the preset value is reached.

[0183] Furthermore, storing charging data, syncing to the cloud, and ending charging include:

[0184] Collect various operational data throughout the entire charging process and write and store them in the local storage unit according to a preset structured format;

[0185] Activate the 4G communication module to establish a communication connection between the local machine and the cloud server, and synchronously upload the structured charging data to the cloud.

[0186] Real-time monitoring of charging time and charging power data; when the data reaches a preset threshold, a port disconnect command and an indicator light idle command are generated and sent to complete the charging process end operation.

[0187] Specifically, after the charging process starts, the data storage module collects all relevant data of the charging port in real time, including timestamp, port number, charging power, voltage, current, charging status, and fault information. The collected data is organized according to the system's preset structured data format. Each piece of structured data contains preset fixed fields to ensure the standardization and parsability of the data.

[0188] The sorted structured data is first written to the built-in Flash local storage unit of the OpenCPU4G module to complete the persistent storage of local data and ensure that the data is not lost.

[0189] At the same time, the OpenCPU4G module starts the 4G communication function, establishes a stable communication connection between the local and cloud servers, and uploads the structured data to the cloud server in real time, realizing dual storage of charging data in the local and cloud.

[0190] While collecting and storing data, the data storage module also monitors the duration of the charging process and the cumulative charging power in real time, and compares the monitored data with the user-preset or cloud-based charging time and power thresholds in real time.

[0191] When the charging time reaches the time threshold or the cumulative charging power reaches the power threshold, the charging is determined to be complete. The data storage module transmits the charging completion signal to the decision control module. The decision control module sends a charging port disconnect command to the execution module, controls the relay to disconnect, and ends the charging process. At the same time, it sends an indicator light idle display command to the status indication module, controls the red or yellow LED indicator light of the port to turn off, and the green LED indicator light to stay on, restoring the idle display state.

[0192] The S6 uploads real-time charging status, operating parameters, and fault information to the cloud management platform for remote monitoring. It also receives parameter adjustment, firmware upgrade, and network charging start commands from the cloud to complete corresponding management and control operations.

[0193] Furthermore, uploading charging data and receiving cloud commands to complete remote management includes:

[0194] The charging system's operating status, parameters, and fault information are collected in real time and continuously uploaded to the cloud management platform via a 4G communication module.

[0195] It receives and parses various commands issued by the cloud management platform, including parameter adjustment, firmware upgrade, and network charging startup instructions.

[0196] Based on the command parsing results, execute the corresponding control operations for adjusting charging parameters, upgrading system firmware, and starting network charging.

[0197] Specifically, the remote management module retrieves the real-time working status, system operating parameters, and fault information of all charging ports from the status identification module, intelligent power protection module, and data storage module, and continuously and stably uploads them to the cloud management platform through the 4G communication module. The cloud management platform parses and displays the received data, enabling staff to remotely monitor the charging system in real time, with a remote monitoring delay of ≤1 second.

[0198] The remote management module receives various control commands issued by the cloud management platform in real time, including commands for adjusting charging parameters, upgrading system firmware, and starting network charging. It also parses all commands and extracts their core requirements.

[0199] Based on the command parsing results, the remote management module coordinates with other software modules to complete the corresponding control operations:

[0200] When receiving a charging parameter adjustment command, the maximum power, float charging time and other parameters in the command are transmitted to the intelligent power protection module. The intelligent power protection module updates the power protection threshold matching rules to realize remote adjustment of charging parameters, and the parameter adjustment response time is ≤2 seconds.

[0201] When receiving a system firmware upgrade command, the firmware upgrade package is downloaded from the cloud via the 4G communication module to complete the remote upgrade of the internal software system of the OpenCPU4G module and realize the iterative optimization of system functions;

[0202] When a network charging start command is received, the command is transmitted to the decision control module, which then executes the port status verification process in step S2 to complete the network remote charging start operation.

[0203] The results of all control operations are fed back to the cloud management platform in real time by the remote management module, realizing a closed loop of remote control.

[0204] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A two-wheeled vehicle intelligent charging protection system based on OpenCPU, characterized in that, Includes the following modules: The data preprocessing module is used to denoise and normalize the collected charging data; The intelligent power protection module is used to identify abnormal charging power and perform graded protection processing. The status recognition module is used to identify the working status of the charging port and control the indicator light display. The decision control module is used to generate and send charging control commands based on the detection results; The data storage module is used to store charging-related data and synchronize it to the cloud. The remote management module is used to enable remote monitoring and control of the charging system.

2. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The data preprocessing module performs noise reduction and normalization processing on the collected charging data, including: Acquire raw data of charging power, voltage, and current transmitted by the data acquisition module; The median filtering algorithm is used to denoise the original data; The denoised data is normalized to form standardized charging data.

3. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The intelligent power protection module includes the following steps for identifying abnormal charging power and performing tiered protection: Receive standardized charging data transmitted by the data preprocessing module and extract charging power parameters; Dynamically match the corresponding power protection threshold according to the battery type and charging stage; The system compares the real-time charging power with the protection threshold to identify anomalies, performs three levels of power protection processing based on the identification results, and generates corresponding charging control commands.

4. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The status recognition module identifies the working status of the charging port and controls the indicator light display, including: Receives GPIO port detection signals and Hall sensor detection signals transmitted by the data acquisition module; Based on the level changes of the detection signal and the sensing results, the four working states of the charging port are identified: idle, inserted, charging, and faulty. Based on the identified working status, an indicator light control signal is generated, and a corresponding display command is sent to the status indication module.

5. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The decision control module generates and sends charging control commands based on the detection results, including: Receive power protection commands from the intelligent power protection module and port status signals from the status identification module; Based on the preset charging control logic, the received instructions and signals are analyzed and judged; Generate corresponding charging port on / off and charging recovery control commands, and send the commands to the execution module.

6. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The data storage module stores charging-related data and synchronizes it to the cloud, including: Collect timestamps, port numbers, power, voltage, current, charging status, and fault information data throughout the entire charging process; The collected charging data is stored in a structured format in the Flash memory built into the OpenCPU4G module. A connection is established between the local server and the cloud server via a 4G communication module to synchronize structured charging data to the cloud.

7. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 1, characterized in that, The remote management module enables remote monitoring and control of the charging system, including: The charging status, operating parameters, and fault information data are uploaded to the cloud management platform via 4G communication. Receive parameter adjustment instructions from the cloud management platform and adjust the maximum charging power and float charging time operating parameters; Receive firmware upgrade packages from the cloud and complete remote system firmware upgrades; Receive the network charging start command, verify the port status, and then generate a charging start instruction.

8. The intelligent charging protection system for two-wheeled vehicles based on OpenCPU according to claim 4, characterized in that, In the status indication module, the control signal for displaying the charging status includes: Receive indicator light control signals sent by the status recognition module and analyze the working status corresponding to the charging port; Based on the analysis results, control the on / off and flashing modes of the red, green, and yellow LED indicator lights, which correspond to the idle, charging, insertion, and fault states. When the port status changes, respond to the control signal to switch the indicator light display mode.

9. A two-wheeled vehicle intelligent charging protection control method based on OpenCPU, characterized in that, The method for the OpenCPU-based intelligent charging protection system for two-wheeled vehicles according to any one of claims 1-8 includes the following steps: S1, the system is powered on and initialized, and the configuration of each hardware and software module is completed. The charging port is set to the disconnected state and the port indicator light is set to the idle display state. At the same time, the charging port is collected to detect the charging port plug-in and connection signal with the tram, and the current working status of the port is identified. S2 receives a charging start request from a card swipe or network, verifies the validity of the port status, sends a closing command to start charging, and synchronously switches the port indicator light to the charging display status. It also collects raw data of charging power, voltage, and current at fixed intervals. S3 performs noise reduction and normalization processing on the collected raw charging data to form standardized charging data, extracts power parameters and matches the corresponding power protection threshold, and compares the real-time power with the threshold to complete the anomaly identification. S4 executes three-level power protection processing based on the power anomaly identification result and generates corresponding control commands. It controls the charging port to complete the on / off action according to the commands. When the power returns to normal, it sends a closing command to resume charging and simultaneously switches the port indicator light display status. The S5 collects relevant data from the entire charging process, stores it in local Flash memory in a structured format, and synchronizes the data to the cloud server via 4G communication. It monitors charging time and power level in real time, and sends a disconnect command to end charging and restore the indicator light to the idle state when the preset value is reached. The S6 uploads real-time charging status, operating parameters, and fault information to the cloud management platform for remote monitoring. It also receives parameter adjustment, firmware upgrade, and network charging start commands from the cloud to complete corresponding management and control operations.

10. The intelligent charging protection control method for two-wheeled vehicles based on OpenCPU according to claim 9, characterized in that, In step S3, matching the corresponding power protection threshold and comparing the real-time power with the threshold to complete the anomaly identification includes: Extract the basic protection threshold corresponding to the battery type, the dynamic adjustment coefficient corresponding to the charging stage, and the continuous change characteristics of standardized charging data; The dynamic adjustment coefficient is applied to the basic protection threshold to generate a real-time power protection threshold that is adapted to the current charging condition. The continuous change characteristics are combined with the comparison results of real-time power parameters and real-time power protection thresholds as the basis for power anomaly determination, thus completing the abnormal identification of charging power.