An intelligent charging method and system for an electric two-wheeled vehicle based on dual-mode wireless communication

CN121697480BActive Publication Date: 2026-10-27YADEA TECH GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511976110.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-10-27
Estimated Expiration
2045-12-25

AI Technical Summary

Technical Problem

1.充电安全问题:市场上充电器规格繁多,部分用户使用非适配的充电器给电动两轮车充电

Benefits of technology

1. 从源头规避非适配充电风险,杜绝兼容性安全事故:依托蓝牙主从设备的独占绑定技术,实现车辆对充电器的专属授权,仅绑定认证的充电器可启动充电流程。此举从根源杜绝用户滥用非适配充电器的行为,彻底规避因非认证充电器的电压、电流不匹配引发的短路、起火、电池损坏等安全隐患,筑牢充电安全第一道防线。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121697480B_ABST
    Figure CN121697480B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric two-wheeled vehicle intelligent charging method and system based on dual-mode wireless communication, and both charging device and electric two-wheeled vehicle are equipped with Bluetooth module and UWB ranging module, wherein the charging device Bluetooth module is slave device, and the vehicle Bluetooth module is master device;The method comprises: electric two-wheeled vehicle and target charger carry out first Bluetooth binding, and obtain shared key for pairing;When the target charger that has been bound is in the vehicle master device Bluetooth range, the target charger carries out Bluetooth pairing connection with electric two-wheeled vehicle based on shared key;After Bluetooth connection authentication passes, the UWB module of target charger and electric two-wheeled vehicle is activated, and the physical distance between the two is calculated;When physical distance meets preset safety distance range, target charger charges electric two-wheeled vehicle.This method realizes the intelligent charging strategy of vehicle and charger unique pairing, high-precision distance verification, safety control and data synchronization by dual-mode wireless communication technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electric two-wheeler charging technology, and in particular to an intelligent charging method and system for electric two-wheelers based on dual-mode wireless communication. Background Technology

[0002] Currently, electric two-wheelers are widely used in people's daily lives, and their ownership continues to grow. The technical compatibility and safety of the charging process have become an increasingly important focus of the industry. However, existing electric two-wheelers and chargers are separate and not linked, resulting in numerous problems with current charging methods: 1. Charging Safety Issues: The market offers a wide variety of charger specifications, and some users use incompatible chargers to charge their electric two-wheelers. Some substandard chargers lack necessary overcharge protection, overheat protection, and other safety mechanisms, which can easily damage the battery or even cause serious safety accidents such as fires. According to spot checks by relevant market supervision and management departments, a large number of electric two-wheeler chargers have substandard functions such as overheat protection, overcharge cut-off, and delayed cut-off, seriously threatening the safety of users' lives and property.

[0003] 2. Charger loss and theft: Traditional chargers are independent of the electric two-wheeler, and are located externally to the vehicle during charging, making them prone to loss or theft. If a user loses their charger, they not only need to purchase a new one, but may also face safety hazards due to purchasing an incompatible charger.

[0004] 3. Charger theft: Although Bluetooth functionality is now common in electric two-wheelers, this technology has not been fully utilized to achieve intelligent interaction between the charger and the vehicle. Even if the charger is within the vehicle's Bluetooth signal range, there is still the possibility that other nearby vehicles may steal the charger and charge the vehicle. This cannot fundamentally eliminate the security risks of "man-in-the-middle attacks" or illegal charging at close range.

[0005] To address the aforementioned pain points, there is an urgent need for a secure charging solution that enables electric two-wheeled vehicles to exclusively and encryptedly bind to the charger, effectively preventing unauthorized charging. Summary of the Invention

[0006] To address the aforementioned problems and technical requirements, the inventors have proposed an intelligent charging method and system for electric two-wheeled vehicles based on dual-mode wireless communication. By utilizing Bluetooth Low Energy (BLE) and Ultra Wideband (UWB) dual-mode wireless communication technologies, the system achieves an intelligent charging strategy that enables unique pairing between the vehicle and charger, high-precision distance verification, charging safety control, and data synchronization. This aims to solve existing problems in the charging process of electric two-wheeled vehicles, such as charging safety issues and the loss or theft of chargers.

[0007] The technical solution of the present invention is as follows: In the first aspect, this application provides a smart charging method for electric two-wheeled vehicles based on dual-mode wireless communication. Both the charger and the electric two-wheeled vehicle are equipped with a Bluetooth module and a UWB ranging module, wherein the Bluetooth module of the charger is a slave device and the Bluetooth module of the vehicle is a master device. The method includes the following steps: The electric two-wheeler and the target charger are initially bound together as master and slave devices to obtain a shared key for pairing. When the target charger is within the Bluetooth range of the vehicle's main device, the target charger will pair and connect with the electric two-wheeler via Bluetooth based on a shared key. After Bluetooth connection authentication is successful, the UWB ranging modules of the target charger and the electric two-wheeler are activated to calculate the physical distance between them. When the physical distance meets the preset safe distance range, the target charger charges the electric two-wheeler.

[0008] The further technical solution involves the following process: the initial binding of the electric two-wheeler and the target charger based on master-slave devices includes: After the target charger is powered on, it requests a pairing connection between the device and the main device of the electric two-wheeler, and sends its own unique identification information to the other party. Upon receiving a connection response from the slave device of the target charger, the master device of the electric two-wheeled vehicle synchronously executes the following: The master and slave devices establish an encrypted connection and generate a shared key; The target charger and the electric two-wheeler's UWB ranging module negotiate capabilities.

[0009] The further technical solution involves the initial binding process including: The electric two-wheeler binds the unique identification information of the target charger with its own unique identification information and synchronizes it to the cloud server; The cloud server pairs and stores the unique identification information of the two devices along with the activation timestamp, generates a successful binding certificate, and sends it to the electric two-wheeler and the user's APP respectively to complete the initial binding. The warranty period for the target charger is based on the cloud activation time.

[0010] The further technical solution involves the target charger establishing a Bluetooth pairing connection with the electric two-wheeler based on a shared key, which includes: After the vehicle's main device detects the Bluetooth signal of the charger slave device, it verifies the unique identification information of the target charger. If the verification is successful, the electric two-wheeler generates an encrypted connection response signal based on the shared key and sends it to the target charger; the encrypted connection response signal contains dynamic information. The target charger uses a shared key to decrypt the encrypted connection response signal and verify the validity of the dynamic information; If the verification is successful, the target charger and the electric two-wheeler will establish an encrypted Bluetooth channel and complete the Bluetooth pairing connection.

[0011] A further technical solution involves placing the UWB ranging module of the target charger at the charging plug and the UWB ranging module of the electric two-wheeler at the vehicle's charging port. The calculated physical distance between the two includes: The target charger and the electric two-wheeler exchange a series of UWB pulse signals through an established encrypted Bluetooth channel, and record the transmission and reception timestamps of the signals. The electric two-wheeler calculates the flight time of the signal based on the exchanged timestamp data, and then calculates the physical distance between the charging plug and the vehicle's charging port based on the flight time.

[0012] The further technical solution is that the process of the target charger charging the electric two-wheeler includes: The target charger sends a charging request signal to the electric two-wheeler through the established encrypted Bluetooth channel and simultaneously reports the current charging status information. The electric two-wheeler assesses the current charging status information; If the target charger is in normal condition, the electric two-wheeler sends a charging permission command to the target charger and simultaneously sends the current battery status information. The target charger adjusts the initial charging parameters output by its internal charging control circuit based on the current battery status information and charges the vehicle battery.

[0013] The further technical solution is that the charging control circuit includes: a DC conversion circuit, a transformer, an output control circuit, a rectifier and filter circuit, a voltage sampling circuit, a signal amplification circuit, an optocoupler, and a PWM drive circuit; wherein: The DC conversion circuit, transformer, and output control circuit are connected in sequence, and the transformer passes through a rectifier and filter circuit before and after the transformer. The control terminal of the output control circuit is connected to the MCU of the target charger. The MCU is used to control the output control circuit to turn on when it receives a charging permission command. The voltage sampling circuit is connected between the output of the transformer-rectified filter circuit and the input I / O port of the MCU; The MCU outputs a PWM signal, which passes through a signal amplification circuit and optocoupler isolation circuit in sequence before entering the PWM drive circuit. The PWM drive circuit is used to drive the switching transistors in the DC-DC converter circuit to turn on and off.

[0014] A further technical solution involves the MCU implementing the process of adjusting the initial charging parameters output by the target charger's internal charging control circuit based on the current battery status information, including: Confirm the current charging mode based on the current battery status information; Based on the ideal charging parameters of the current charging mode and the current battery status information, determine the target output voltage of the DC conversion circuit; The PWM duty cycle is calculated in reverse based on the target output voltage and input voltage, and a PWM signal is generated to control the DC conversion circuit, so that the charging control circuit outputs ideal charging parameters.

[0015] A further technical solution is that the method also includes: During the charging process, the electric two-wheeler receives charging information from the target charger at regular intervals through the established encrypted Bluetooth channel and uploads the charging information to the cloud server. The user's app retrieves and displays the vehicle's charging information from the cloud server; The user's app allows for personalized configuration of charging parameters, which are then sent to the cloud server. The cloud server forwards these parameters to the electric two-wheeler and transmits them to the target charger via an encrypted Bluetooth channel. The target charger adjusts its charging strategy based on the received configuration parameters.

[0016] Secondly, this application also provides an intelligent charging system for electric two-wheeled vehicles based on dual-mode wireless communication. The system includes: a target charger, an electric two-wheeled vehicle, a cloud server, and a corresponding user app, wherein: Both the target charger and the electric two-wheeler are equipped with Bluetooth modules and UWB ranging modules, with the charger's Bluetooth module being the slave device and the vehicle's Bluetooth module being the master device. Electric two-wheeled vehicles transmit and interact with cloud servers via IoT technology; Data transmission and interaction between the cloud server and the user's app are conducted via wired or wireless networks; This system is used to implement the intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication as described in the first aspect.

[0017] The above method and system integrate Bluetooth and UWB ranging modules into the charger and the electric two-wheeler to build an intelligent binding and information interaction system between the charger and the electric two-wheeler. This precisely addresses the core pain points in existing charging scenarios, such as safety, after-sales service, anti-theft, and information synchronization, significantly improving charging safety and user experience. The specific beneficial technical effects are as follows: 1. Mitigating the risks of incompatible charging at the source and eliminating compatibility safety incidents: Utilizing exclusive Bluetooth master-slave device binding technology, the system grants exclusive authorization to the charger for each vehicle, allowing only certified chargers to initiate the charging process. This fundamentally prevents users from abusing incompatible chargers, completely avoiding safety hazards such as short circuits, fires, and battery damage caused by voltage and current mismatches with uncertified chargers, thus building a solid first line of defense for charging safety.

[0018] 2. Upgraded dual security verification to completely eliminate close-range charging theft: Innovatively introducing UWB centimeter-level high-precision distance verification technology, combined with Bluetooth, forms dual protection. The system only allows charging to begin when the charging plug is within extremely close proximity (≤10cm) to the vehicle's charging port, completely blocking the possibility of "unauthorized charging by another's charger within Bluetooth signal coverage" at the physical verification level. Compared to single Bluetooth verification, this represents a qualitative leap in security protection, guaranteeing exclusive right to use the charger.

[0019] 3. Establish a unique link for precise traceability of warranty service: The binding information between the charger and the vehicle is synchronized to the cloud server in real time, forming an unalterable and unique linked file. When a charger has a warranty issue, the sales information and binding / activation time of the corresponding vehicle can be accurately traced through the cloud file, directly pinpointing the warranty start point and providing objective and accurate evidence for consumers to protect their rights. This also facilitates after-sales service management for manufacturers.

[0020] 4. Reduce theft value and strengthen anti-theft and loss control: Based on a dedicated binding mechanism, the charger is only compatible with the corresponding vehicle, eliminating its cross-vehicle usability and significantly reducing the attractiveness of the charger for theft, thus reducing the probability of loss and theft from the source. In the event of accidental loss, users can remotely lock the charger via the APP, making it completely unusable on other vehicles, further protecting user property security and reducing subsequent replacement costs.

[0021] 5. Achieve intelligent management of the entire charging process and enhance user experience: Through real-time communication via an established encrypted Bluetooth channel, the charger and vehicle can exchange data throughout the entire charging process. Users can view key charging information such as charging voltage, current, progress, and remaining time in real time via the app, while also monitoring and analyzing the vehicle's battery health. Furthermore, the app supports customized charging parameter configurations, allowing users to adjust charging strategies according to actual needs, helping them scientifically maintain the battery, extend its lifespan, and comprehensively improve the convenience and intelligent experience of vehicle use. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the structure of an intelligent charging system for an electric two-wheeled vehicle based on dual-mode wireless communication in one embodiment; Figure 2This is a flowchart illustrating a smart charging method for an electric two-wheeled vehicle based on dual-mode wireless communication in one embodiment. Figure 3 This is a timing diagram illustrating the initial binding process between an electric two-wheeler and a target charger in one embodiment. Figure 4 This is a schematic diagram of the process for verifying the BLE+UWB dual-mode distance between an electric two-wheeled vehicle and a target charger in one embodiment; Figure 5 This is a timing diagram illustrating the charging interaction process between an electric two-wheeler and a target charger in one embodiment. Figure 6 This is a schematic diagram of the charging control circuit structure inside the charger in one embodiment; Figure 7 This is a schematic diagram of the charging mode decision of the charger MCU in one embodiment. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0024] like Figure 1 As shown in the figure, this application embodiment discloses an intelligent charging system for electric two-wheelers based on dual-mode wireless communication. The system employs a dual-mode communication architecture, primarily using Bluetooth Low Energy (BLE) and secondarily using Ultra Wideband (UWB). It includes a target charger, an electric two-wheeler, a cloud server, and a corresponding user app. Both the target charger and the electric two-wheeler are equipped with Bluetooth and UWB ranging modules, respectively, with the charger's Bluetooth module acting as a slave device and the vehicle's Bluetooth module as the master device. Data transmission and interaction between the electric two-wheeler and the cloud server are achieved via IoT technology. Data transmission and interaction between the cloud server and the user app are achieved via wired or wireless networks, such as Wi-Fi, cellular networks, NFC (Near Field Communication), or other technologies. This system is used to implement an intelligent charging method for electric two-wheelers based on dual-mode wireless communication.

[0025] Optionally, the Bluetooth module and the UWB ranging module can be implemented using a dual-mode communication chip, or using separate chips for BLE and UWB.

[0026] Optionally, the UWB ranging module of the target charger can be placed at the charging plug, and the UWB ranging module of the electric two-wheeler can be placed at the vehicle's charging port. Both can achieve precise physical ranging with an accuracy of up to the centimeter level.

[0027] Optionally, the terminal where the user app is located can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart TVs, smart in-vehicle systems, etc. Portable wearable devices can include smartwatches, smart bracelets, etc.

[0028] In one possible implementation, the target charger also includes other components such as an MCU, a charging control circuit, a power module, and an antenna matching circuit. The power module provides the necessary power to the MCU, charging control circuit, Bluetooth slave device, and UWB ranging module, and converts AC power into voltage and current suitable for charging the electric two-wheeler battery. The MCU is connected to the charging control circuit, Bluetooth slave device, and UWB ranging module. The charging control circuit enables precise control of the charging voltage and current and has multiple safety protection functions such as overvoltage protection, overcurrent protection, and overheat protection.

[0029] Optionally, the MCU and Bluetooth module inside the charger can be replaced with a single SOC chip that includes Bluetooth functionality.

[0030] In one possible implementation, the electric two-wheeler also includes other components such as an onboard IoT module, a battery management system (BMS), and an antenna matching circuit, all connected to a Bluetooth host device. The BMS is also connected to the onboard IoT module and is used to provide battery status information, such as the overall battery pack voltage, individual cell voltage differences, charging current, remaining capacity, and battery temperature, to the target charger or cloud server.

[0031] In the above system, once the electric two-wheeler establishes a Bluetooth communication connection with the target charger, the cloud server can synchronously receive the interaction data between the two, process the data, and realize remote control. In turn, the user's APP can also realize remote monitoring and charging configuration operations.

[0032] In one embodiment, such as Figure 2 As shown, a smart charging method for electric two-wheeled vehicles based on dual-mode wireless communication is provided, which can be applied to... Figure 1 The system shown is used as an example for illustration, including the following steps: Step 202: The electric two-wheeler and the target charger are initially bound based on master and slave devices to obtain a shared key for pairing.

[0033] Specifically, the user initiates an "initial pairing" command through the vehicle's central control unit or the accompanying app, and the vehicle's main device enters Bluetooth discoverable and pairable mode; simultaneously, after the user plugs in the target charger, the target charger's slave device enters pairing response mode. Subsequently, both devices randomly generate a shared key based on a preset encryption algorithm and store it locally for use in the subsequent Bluetooth pairing and connection process.

[0034] Step 204: When the bound target charger is within the Bluetooth range of the vehicle's main device, the target charger establishes a Bluetooth pairing connection with the electric two-wheeler based on the shared key.

[0035] Specifically, the vehicle's main device (electric two-wheeler) scans for surrounding Bluetooth signals in real time. Meanwhile, the charger slave device automatically enters a low-power listening mode after being powered on. When the target charger approaches the vehicle, the Bluetooth module is woken up and activated. Subsequently, the two verify each other's identities based on a shared key. After confirming that the identities are correct, they establish an encrypted link. The vehicle's main device and the target charger slave device formally establish a stable Bluetooth connection and synchronize the current device status (such as the vehicle's battery status and the charger's ready status) to prepare for the subsequent charging start-up process.

[0036] Step 206: After Bluetooth connection authentication is successful, activate the UWB ranging modules of the target charger and the electric two-wheeler to calculate the physical distance between them.

[0037] Specifically, the target charger and the electric two-wheeler transmit UWB activation commands via an established encrypted Bluetooth channel. These commands are encrypted using a shared key to prevent tampering. A unified UWB ranging time reference is then established; the target charger's UWB module calibrates its time to match the vehicle's UWB time reference, laying the foundation for centimeter-level ranging. Both chargers' UWB ranging modules use a two-way time-of-flight (ToF) ranging method to output the centimeter-level precise distance between the target charger plug and the vehicle's charging port.

[0038] Step 208: When the physical distance meets the preset safe distance range, the target charger charges the electric two-wheeler. That is, the charging prerequisites proposed in this application must be met: the charger and the electric two-wheeler must be mutually bound (Bluetooth master-slave device pairing connection), and the physical distance between the target charging plug and the vehicle's charging port must be within the preset safe distance range before the charging process can begin. This charging process also involves information interaction between the target charger and the vehicle battery, safe charging of the charging control circuit, and the interaction between both directly or indirectly with the cloud server and the accompanying user APP, which will be described in detail later.

[0039] In the aforementioned smart charging method, once the target charger is paired with the vehicle, the shared pairing key is permanently stored in the target charger. Subsequently, when the target charger approaches the paired vehicle, the Bluetooth slave device automatically searches for and reuses the key to establish a Bluetooth connection with the vehicle's main device, eliminating the need for manual user intervention. After storing this key, the target charger will reject pairing requests from other devices. Furthermore, after establishing an encrypted Bluetooth channel with the vehicle, the target charger does not immediately begin the charging process. A UWB ranging module is used to determine whether the target charger's charging plug is plugged into the paired vehicle's charging port, thus preventing unauthorized chargers from being used within Bluetooth signal range and mitigating the risk of close-range unauthorized charging.

[0040] In one embodiment, step 202 includes: 1) After the target charger is powered on, it initiates a pairing connection request with the main device of the electric two-wheeler and sends its unique identification information to the other party. The pairing connection request includes initialization preparation and device search and matching: Initialization Preparation: After the charger is powered on, it enters discoverable mode from the device and broadcasts a signal containing the charger's unique identification code (such as a Bluetooth MAC address or ID number) and UWB capability set. Merchants or users can initiate a "charger binding" command through the central control screen of the electric two-wheeler or the accompanying user APP.

[0041] Device Search and Pairing: After receiving the charger pairing command, the electric two-wheeler's master device initiates Bluetooth search and filters for charger broadcast signals in discoverable mode. Users can select the target charger to pair on the vehicle screen or in the app interface (usually displayed as "[Vehicle Model] - [Last 4 Digits Identification Code]"). The vehicle's master device sends a pairing request signal to the target charger's slave device, containing the vehicle's unique identifier (such as the VIN and device ID).

[0042] 2) After receiving the connection response from the slave device of the target charger, the master device of the electric two-wheeler synchronously performs the following: the master and slave devices establish an encrypted connection and generate a shared key, and the UWB ranging module of the target charger and the electric two-wheeler negotiate capabilities.

[0043] Before sending a connection response, the device needs to verify information: After receiving the pairing request signal, the target charger's slave device verifies the legality of the vehicle identification. The verification method can be by comparing the preset brand code or by verifying through a cloud whitelist.

[0044] After successful verification, the slave device sends a connection response to the vehicle's master device. The master and slave devices establish an encrypted connection using a preset encryption algorithm and generate a shared key. In one possible implementation, the preset encryption algorithm is based on the AES-128 encryption algorithm, including: the target charger and the vehicle each generating a pair of asymmetric keys (public key and private key). During the binding phase, both parties exchange public keys and use their own private key and the other party's public key to calculate an identical shared key using the ECDH algorithm, which is stored in the local memory of the charger and the vehicle, respectively. Subsequently, when the target charger and the vehicle transmit data on the established encrypted Bluetooth channel, they will encrypt the data using the shared key to transmit encrypted data packets, ensuring data security and preventing malicious tampering.

[0045] While exchanging BLE keys, the target charger and the vehicle simultaneously negotiate capabilities: they exchange session key parameters (Session Key) such as the channel and preamble code required for UWB ranging, and store them in their respective non-volatile memories. The preamble code is a key signal sequence used for synchronization and channel estimation. In this embodiment, all session key parameters are processed using a hash function and denoted as SK1_Hash.

[0046] In addition, step 202 also includes: 3) The electric two-wheeler binds the unique identification information of the target charger with its own unique identification information and synchronizes it to the cloud server. Specifically, the target charger associates the vehicle's unique identifier with its own identification code and stores it in its local Flash chip, and returns a "binding confirmation" signal to the vehicle. After receiving the confirmation, the vehicle binds the charger's identification code with the vehicle information, stores it in its local EEPROM, and synchronizes it to the cloud server (recording the binding time, device information, etc.).

[0047] The cloud server pairs and stores the unique identification information of both the electric two-wheeler and the activation timestamp (i.e., binding time), generating a binding success certificate, which is then sent to both the electric two-wheeler and the user's app to complete the initial binding. The vehicle screen or app displays a "Binding Successful" message and prompts the user to perform an initial charging test. The warranty period for the target charger is based on the cloud activation time, preventing dealer tampering. Scanning the charger's QR code allows users to check the bound vehicle, activation time, and warranty status, thus improving the merchant's warranty mechanism.

[0048] The initial binding process described above can be found in [link to documentation]. Figure 3As shown, the system ensures the security of the initial binding information transmission through encrypted connections and shared key generation, preventing the unique identification information from being tampered with or stolen, thus laying a solid foundation for binding security. The binding process simultaneously completes UWB capability negotiation, laying the groundwork for subsequent accurate ranging and improving the efficiency of subsequent charging safety verification. The unique identifier is stored in the cloud and recorded with a timestamp, establishing an immutable device association file to support accurate after-sales warranty traceability. The cloud-based credential is issued bidirectionally, ensuring the binding validity is verifiable, while allowing users to know the binding result in real time through the app, improving operational certainty and user experience.

[0049] Furthermore, when it's necessary to unbind the device, the user or merchant initiates an unbinding request through the app. After verification by the cloud server, an unbinding command is issued, and the vehicle's ECU and charger's MCU clear the locally stored shared key. Afterward, the charger can accept pairing requests from other devices. The specific process of the cloud server verifying the unbinding request includes: Establish a secure connection: The device (vehicle T-Box or charger) initiates an HTTPS or MQTTS connection to the cloud server via a cellular network (4G / 5G). A TLS handshake is completed to establish an encrypted communication channel.

[0050] Identity authentication (authorization): The device sends its unique identifier (Device ID) and a signature (usually generated using a pre-configured key or certificate and data such as a timestamp) to the cloud. The cloud retrieves the corresponding key from its database based on the Device ID. The cloud then uses this key to verify the validity of the signature. If the verification passes, the device is considered legitimate.

[0051] Command and Data Validation: 1) Permission Validation: The cloud checks whether the device has permission to execute the currently requested operation (e.g., whether a charger has permission to charge a vehicle). This requires querying binding relationships. For example, when charger A requests to charge vehicle B, the cloud will verify in the database whether "the charger bound to vehicle B is A". 2) Business Logic Validation: Verifies whether the command parameters are valid (e.g., whether the charging current is within a reasonable range when using custom configuration parameters), and whether the vehicle status allows the execution of the command (e.g., whether the vehicle is parked). 3) Anti-Replay Attack: Verifies whether the request sent by the device contains an incrementing sequence number or a unique random number. The cloud will check whether this sequence number has been used before to prevent hackers from repeatedly sending intercepted legitimate commands.

[0052] Cloud response: Only after all verifications pass will the cloud execute the command (e.g., issue an unbinding command) and return the result to the device. If any verification fails, the cloud will log the error and return an error code, refusing to execute the operation.

[0053] After the target charger and the vehicle establish a binding relationship, they need to verify the Bluetooth connection before charging is required. In one embodiment, step 204 includes: 1) After the vehicle's main device detects the Bluetooth signal of the charger's slave device, it verifies the target charger's unique identification information. Specifically, when the bound target charger approaches the electric two-wheeler (usually within the effective Bluetooth communication range, approximately 10 meters), the target charger, after being powered on, automatically enters connection mode and actively searches for the bound vehicle's Bluetooth signal. At this time, the vehicle's Bluetooth main device is in standby listening mode. Upon receiving the target charger's Bluetooth search signal, it identifies the charger's unique identification code. The vehicle then compares and verifies the received charger identification code with the locally stored bound charger identification code.

[0054] 2) If the verification is successful, the electric two-wheeler generates an encrypted connection response signal based on the shared key and sends it to the target charger. Specifically, if the identification code matches successfully, the vehicle generates a random number as a dynamic challenge code and uses a preset encryption key (such as using the AES-128 algorithm) to generate an encrypted connection response signal containing dynamic information (i.e., the dynamic challenge code encrypted with the key).

[0055] 3) The target charger uses a shared key to decrypt the encrypted connection response signal and verify the validity of the dynamic information. If the verification is successful, the target charger and the electric two-wheeler establish an encrypted Bluetooth channel and complete the Bluetooth pairing connection.

[0056] After the Bluetooth connection between the target charger and the vehicle is verified, to further enhance security and eliminate the risk of "close-range charging theft," both devices initiate UWB precise distance verification. In one embodiment, the UWB ranging module of the target charger is placed at the charging plug, and the UWB ranging module of the electric two-wheeler is placed at the vehicle's charging port. Step 206 then includes: 1) The target charger and the electric two-wheeler exchange a series of UWB pulse signals through an established encrypted Bluetooth channel and record the timestamps of the transmission and reception of the signals.

[0057] Specifically, the vehicle sends a UWB_Poll message (containing device identifier, ranging mode parameters, and time synchronization reference value) to the charger via the BLE channel and records the sending timestamp. Upon receiving the Poll message, the target charger immediately records the receiving timestamp and prepares to send a Response message based on the triggering of the Poll message. At this point, the UWB ranging modules within both devices are activated, initiating the UWB ranging process. In one possible implementation, the target charger and vehicle follow a two-way time-of-flight (ToF) ranging method (to compensate for clock skew and environmental interference), exchanging a series of UWB pulse signals (Final, Report). The specific interaction process includes: a. After receiving the Response message, the vehicle's main device sends a UWB probe Final message (containing the main device ID and ranging sequence number) through the UWB module, and records the precise timestamp T1 of the sending time.

[0058] b. After receiving the Final message from the device's UWB module, the charger immediately records the receiving time timestamp T2 and generates a UWB response Report message (including the slave device ID, the corresponding ranging sequence number, the T2 timestamp, and the sending time timestamp T3).

[0059] c. After receiving the Report message, the vehicle's main equipment records the timestamp T4 of the time of receipt. At this time, the vehicle's main equipment has recorded all timestamp information, including T1, T2, T3, and T4.

[0060] The UWB detection and response frames both use narrow pulse ultra-wideband signal transmission, which has strong anti-interference capabilities and can effectively avoid the influence of Bluetooth signals and environmental noise on ranging.

[0061] 2) The electric two-wheeler calculates the time of flight (ToF) of the signal based on the exchanged timestamp data, and then calculates the physical distance between the charging plug and the vehicle's charging port based on the time of flight. The time of flight (ToF) is expressed as: ToF = [(T4 - T1) - (T3 - T2)] / 2; the physical distance D = ToF × speed of light (c ≈ 3 × 10⁻⁶). 8 (m / s). In the formula: (T4 - T1) is the total transmission time of the signal "master → slave → master", and (T3 - T2) is the signal processing delay of the charger slave device, ultimately achieving centimeter-level ranging accuracy.

[0062] 3) The vehicle-side system checks whether the distance measured by UWB is less than a preset safety threshold (e.g., 0.1 meters) to ensure that the target charger is physically inserted into the vehicle's charging port, and not just within the Bluetooth signal range. If the distance D is greater than the safety threshold, it indicates that the target charger is not physically connected correctly. Even if the Bluetooth connection is successful, the charger's MCU will refuse to charge and may report a "safety warning" event.

[0063] The above BLE+UWB dual-mode distance verification process can be found in [reference needed]. Figure 4 As shown, through dual protection of Bluetooth verification and UWB centimeter-level ranging, the unauthorized charging within the Bluetooth signal range is completely eliminated, significantly improving the charging safety level; based on encrypted UWB signal interaction and timestamp ranging, the physical distance calculation is ensured to be accurate and reliable, and charging is only allowed when the charger is physically inserted into the charging port (≤0.1 meters), avoiding the risk of accidental triggering; the legality of charging is confirmed from the dual dimensions of "identity verification and physical positioning", which in principle avoids the charging safety hazards in non-physical contact scenarios and ensures that the charging process is compliant and controllable.

[0064] After both BLE verification and UWB distance verification are passed, the charging process officially begins. In one embodiment, such as... Figure 5 As shown, step 208 includes: 1) The target charger sends a charging request signal to the electric two-wheeler through the established encrypted Bluetooth channel and simultaneously reports the current charging status information, such as input voltage, internal temperature, and whether it is in a rechargeable state.

[0065] 2) After receiving the charging request signal and the current charging status information, the electric two-wheeler evaluates the current charging status information. If the target charger is in normal condition, the electric two-wheeler sends a charging permission command to the target charger and simultaneously sends the current battery status information (such as remaining power, battery temperature, etc.).

[0066] In one possible implementation, the evaluation method includes: first verifying whether the charging request originates from a bound charger to ensure the request's compliance. Parameters are evaluated item by item: ① Verify whether the input voltage matches the vehicle's rated charging voltage range to avoid voltage incompatibility risks; ② Detect whether the internal temperature of the battery and charging circuit is within a safe threshold (e.g., 0~45℃) to avoid charging at extreme temperatures; ③ Confirm whether the vehicle is in a rechargeable state (no fault codes, no triggered protection mechanisms, etc.). If all parameters meet safety requirements, the target charger is determined to be in normal condition, and a charging permission command is issued to the target charger. If any parameter is abnormal, it is determined to be "charging prohibited," the cause of the abnormality (e.g., voltage exceeding limits, temperature too high) is reported, and the user is notified via the app to ensure charging safety and battery life.

[0067] 3) After receiving the charging permission command and vehicle battery status information, the target charger adjusts the initial charging parameters (such as initial charging voltage and current) output by its internal charging control circuit according to the current battery status information, and charges the vehicle battery.

[0068] The target charger has a built-in charging control circuit that connects to the charger's MCU. When the MCU receives a charging permission command, it sends a charging permission signal (active high) to the charging control circuit, thus initiating charging. If the MCU receives a charging prohibition command, or the Bluetooth connection is interrupted, the charging control circuit immediately stops charging to prevent unauthorized chargers from connecting and ensure charging safety.

[0069] In one embodiment, such as Figure 6 As shown, the charging control circuit includes: a DC conversion circuit (such as a Buck circuit), a transformer, an output control circuit, a rectifier and filter circuit, a voltage sampling circuit, a signal amplification circuit, an optocoupler, and a PWM drive circuit. Specifically, the external AC input sequentially passes through the first rectifier and filter circuit (which can be implemented using electromagnetic filtering), the DC conversion circuit, the transformer, the second rectifier and filter circuit, and the output control circuit, before being converted to DC output and connected to the electric two-wheeler. The control terminal of the output control circuit is connected to the MCU of the target charger. The MCU controls the output control circuit to conduct when it receives a charging permission command. The voltage sampling circuit is connected between the output of the transformer-fb rectifier and filter circuit (i.e., the second rectifier and filter circuit) and the MCU's input I / O port, used to sample a feedback voltage Vfb proportional to the output voltage Vout. The MCU outputs a PWM signal, which sequentially passes through a signal amplification circuit and an optocoupler before entering the PWM drive circuit. The PWM drive circuit is used to drive the switching transistors (such as MOSFETs) in the DC conversion circuit to turn on and off.

[0070] In the MCU, the feedback voltage Vfb is compared with a stable reference voltage Vref, generating an error signal Verror. If Vout is low, Verror increases; conversely, it decreases. The error signal Verror is fed into a comparator and compared with a triangular wave carrier, outputting a PWM wave (i.e., the PWM signal). The larger Verror is, the larger the duty cycle D of the generated PWM pulse. The generated PWM wave is sent to the driver circuit for amplification of current and voltage capabilities. As the duty cycle D increases, the on-time of the switching transistor becomes longer, and the output voltage Vout also increases. After Vout increases, the feedback voltage Vfb also increases, the error signal Verror decreases, thus causing the duty cycle D to decrease, ultimately stabilizing Vout at the set value. This forms a negative feedback closed-loop control system that can automatically maintain the stability of the output voltage.

[0071] Based on the working principle of the charging control circuit described above, step 208-3) proposes that the process of the target charger adjusting the initial charging parameters output by its internal charging control circuit according to the current battery status information is implemented by the MCU. The MCU calculates the ideal voltage and current values ​​required for the current charging mode based on the battery status information, and then controls the DC conversion circuit by changing the duty cycle D of the PWM signal to output these calculated values. Taking intelligent parameter adjustment in constant current constant voltage (CC-CV) charging as an example, this specifically includes: a. Status reading and mode decision: Determine the current charging mode based on the current battery status information.

[0072] Specifically, the MCU continuously reads the battery's voltage (V_bat), current (I_bat), and temperature (T_bat) via an ADC, and then estimates the battery's state of charge (SOC) based on V_bat and the accumulated coulomb count. The MCU then calculates the SOC based on... Figure 7 The processing logic shown determines whether the current charging mode should be constant current charging mode (CC) or constant voltage charging mode (CV).

[0073] b. Calculate the target value: Based on the ideal charging parameters of the current charging mode and the current battery state information, determine the target output voltage of the DC conversion circuit.

[0074] Taking the current charging mode as constant current charging mode CC as an example, the target current of CC mode is known to be I_cc_set (e.g., 2A), and the MCU can obtain the input voltage Vin of the DC-DC converter circuit (e.g., 12V). In order to obtain the target current of 2A at the battery terminal, the MCU needs to calculate the target voltage V_target that the DC-DC converter circuit outputs. In actual calculation, factors such as the battery's internal resistance R_internal and the line resistance need to be considered. This embodiment provides a simplified calculation formula as follows: V_target = V_bat + (I_cc_set * R_total), where R_total is the estimated total impedance.

[0075] c. Duty cycle D calculation and output: The PWM duty cycle is calculated in reverse based on the target output voltage and input voltage, forming a PWM signal to control the DC conversion circuit, so that the charging control circuit outputs ideal charging parameters.

[0076] Specifically, the input-output voltage relationship of the DC-DC converter circuit is known to be: Vout = D * Vin. To obtain the V_target calculated in the previous step, the MCU can calculate the required duty cycle D in reverse: D = V_target / Vin. The MCU sets the duty cycle register of its PWM peripheral to the calculated D value, and then outputs a PWM wave. The PWM wave is sent to the drive circuit, which amplifies the weak PWM signal into a strong drive signal that can quickly turn the MOSFET on and off. The MOSFET switches at high speed according to the PWM frequency, controlling the energy supplied to the subsequent networks.

[0077] During the charging process described above, the charger's MCU, in conjunction with the charging control circuit, can adaptively match the battery status, optimize initial charging parameters, avoid the risks of overcharging and undercharging, and extend battery life. Closed-loop voltage sampling and PWM drive control enable precise adjustment of the output voltage, improving charging stability and efficiency. The MCU coordinates the collaborative work of multiple circuits to achieve automated management and control of the charging process, enhancing the reliability and adaptability of the charging process.

[0078] Based on the above charging process, this embodiment further provides methods for multi-device information synchronization, APP configuration, and OTC upgrade. In one embodiment, step 208 further includes: 4) During the charging process, the target charger collects charging information in real time, including charging voltage, current, charger temperature, fan status (working, stopped, faulty), charging stage (CC-CV) and stage duration, total charging time per charge, faults, alarms, and other parameters. The Bluetooth slave device packages this information and transmits it to the electric two-wheeler periodically through the established encrypted Bluetooth channel.

[0079] After receiving the charging information from the target charger, the electric two-wheeler can display it in real time on the vehicle's dashboard, allowing users to intuitively understand the charging status. On the other hand, the charging information is uploaded to the cloud server through the vehicle's IoT module, and then forwarded to the user's APP by the cloud server.

[0080] The user app obtains the vehicle's charging information from the cloud server. Users can view the vehicle's charging history, current charging progress, and charger status at any time through the app.

[0081] 5) Because the user app communicates with the vehicle's IoT module, it can indirectly interact with the target charger via master-slave Bluetooth devices. The user app allows for personalized configuration of charging parameters, such as setting charging voltage and current, adjusting charging speed (e.g., selecting fast charging, standard charging, or trickle charging modes), and setting charging start and stop times. The app sends the user-defined configuration parameters to a cloud server, which then forwards them to the electric two-wheeler via the IoT module, and finally transmits them to the target charger via an encrypted Bluetooth channel. Ultimately, the target charger adjusts its charging strategy based on the received configuration parameters to meet different user charging needs.

[0082] 6) When new firmware needs to be upgraded, the upgrade notification can be pushed to the user's APP through the cloud server. After the user authorizes the upgrade, the cloud server will push the firmware to the whole vehicle, and the whole vehicle will then send the upgrade package through Bluetooth to realize the OTA of the target charger.

[0083] The complete charging process of the target charger for the vehicle can be found in [reference needed]. Figure 5 As shown, by transmitting charging and battery status in real time and displaying it synchronously across multiple devices (dashboard / APP), the transparency of the charging process is improved, making it convenient for users to monitor in real time. The APP supports personalized configuration of charging parameters and dynamic adjustment of the charger to achieve precise charging and optimize battery maintenance. It also supports OTA remote upgrades for the charger, allowing for feature iteration and bug fixing without offline disassembly, extending the device's lifespan and improving the product's continuous service capabilities.

[0084] In practical applications, the hardware configuration of the intelligent charging system for electric two-wheeled vehicles provided in this embodiment is designed as follows: A low-power Bluetooth chip supporting Bluetooth (4.0 or 5.0) protocol, such as the Telink TLSR8258, is selected. This chip can simultaneously realize Bluetooth binding and communication functions, as well as the charger's own charging state machine, charging control, signal sampling, and fault protection functions. To achieve high-precision distance verification, a UWB chip (such as the Qorvo DW3000) needs to be added to both the vehicle and charger ends. On the charger's circuit board, the Bluetooth chip is rationally arranged and electrically connected with the charging control circuit, power module, and other components. The charging control circuit uses a dedicated charging management chip, such as the Morochip MK2697A, which can achieve precise control of charging voltage and current, and has multiple safety protection functions such as overvoltage protection, overcurrent protection, and overheat protection. The power module is responsible for converting the mains power into voltage and current suitable for charging the electric two-wheeled vehicle battery. The key steps of the system's software implementation specifically include: 1) Dual-mode binding procedure: During the binding process, while exchanging encryption keys for BLE, session key parameters such as the channel and preamble code required for UWB ranging are simultaneously exchanged and stored in the non-volatile memory of both parties. A Bluetooth binding function module is developed in the vehicle's central control system software and the user's app. When the user uses the target charger for the first time, they open the app and enter the binding interface. The app searches for nearby Bluetooth devices, finds the Bluetooth name corresponding to the target charger (e.g., "[Vehicle Brand][Charger Model] Bluetooth Charger"), and clicks to connect. At this time, the vehicle sends a binding request to the target charger. After receiving the request, the target charger's Bluetooth chip sends its own identification code to the vehicle. The vehicle sends the charger identification code, vehicle information (such as VIN, vehicle ID), and activation timestamp to the cloud server for binding record storage and sends a successful binding message back to the user.

[0085] 2) Dual-mode charging authentication procedure: After successful BLE connection verification, the central control units on both the charging end and the vehicle end wake up their local UWB chips. Based on the session parameters stored during binding, both parties initiate one or more UWB two-way ranging (TWR) measurements. The vehicle end calculates the precise distance between the target charging plug and the vehicle's charging port and compares it with a safe distance threshold (e.g., 0.1 meters). If the distance verification passes, the vehicle end sends a final "allow charging" command to the target charger via BLE. If the distance verification fails, even if the BLE connection is successful, the vehicle end refuses to charge and may report a "safety warning" event to the cloud server. After ranging is completed, the UWB chip can immediately enter sleep mode to control overall power consumption.

[0086] 3) Charging Control Program: A program is written into the Bluetooth chip of the target charger to automatically search for the Bluetooth signal of the paired vehicle after power-on. If a charging permission signal from the paired vehicle is detected, a high-level signal is sent to the charging control circuit, which then initiates the charging process. If no charging permission signal is detected within a certain time or the Bluetooth connection is interrupted, the charger remains in standby mode and does not charge. During charging, the charging control circuit collects parameters such as charging voltage and current in real time and sends these parameters to the Bluetooth chip via the MCU. The Bluetooth chip packages the charging information according to a specific data format and transmits it to the vehicle's central control system via Bluetooth.

[0087] 4) Information Synchronization and App Configuration: After receiving charging information from the target charger, the vehicle's central control system displays it in real-time on the instrument panel and uploads it to the cloud server via the IoT module. The user's app retrieves the vehicle's charging information from the cloud server and displays it. Simultaneously, the app interface provides charging parameter configuration options. After the user sets parameters such as charging voltage, current, and charging speed, the app sends these parameters to the cloud server. The cloud server then transmits these parameters to the target charger via the IoT module and Bluetooth chip, and the charger adjusts its charging strategy based on the received parameters.

[0088] In summary, this embodiment, through the synergy of exclusive Bluetooth binding and UWB precise ranging technology, compensates for the shortcomings of Bluetooth alone, providing the highest level of security, anti-counterfeiting, and anti-theft capabilities. It is particularly suitable for scenarios with extremely high requirements for security and reliability, such as shared electric vehicles and high-end civilian electric vehicles. It constructs a comprehensive and reliable charging solution (method, hardware, and system architecture), realizing a closed loop across the entire chain of charging safety, information interaction, anti-theft warranty, and OTA upgrades, ensuring system integrity and reliability. The collaboration of multiple terminals (charger, vehicle, cloud, user APP) and multiple technologies (Bluetooth, UWB) balances charging safety, convenience, and scalability, enhancing the core competitiveness of the product.

[0089] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0090] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with an external terminal. Wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a smart charging method for an electric two-wheeled vehicle. The display screen may be an LCD screen or an e-ink display screen. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0091] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: Step 302: The electric two-wheeler and the target charger undergo an initial master-slave device pairing to obtain a shared key for pairing. Specifically, the user initiates an "initial pairing" command through the vehicle's central control unit or the accompanying app. The vehicle's master device enters Bluetooth discoverable and pairable mode; simultaneously, after the user connects the target charger to power, the target charger's slave device enters a pairing response mode. Subsequently, both devices randomly generate a shared key based on a preset encryption algorithm and store it locally for use in subsequent Bluetooth pairing and connection processes.

[0092] Step 304: When the paired target charger is within the Bluetooth range of the vehicle's main device, the target charger establishes a Bluetooth pairing connection with the electric two-wheeler based on the shared key. Specifically, the vehicle's main device (electric two-wheeler) scans for surrounding Bluetooth signals in real time, while the charger automatically enters a low-power listening mode after being powered on. When the target charger approaches the vehicle, the Bluetooth module is activated. Subsequently, both devices verify their identities based on the shared key. After confirming the identities are correct, they establish an encrypted link, and the vehicle's main device and the target charger establish a stable Bluetooth connection, synchronizing the current device status (such as vehicle battery status and charger readiness status) to prepare for the subsequent charging start-up process.

[0093] Step 306: After Bluetooth connection authentication is successful, the UWB ranging modules of the target charger and the electric two-wheeler are activated to calculate the physical distance between them. Specifically, the target charger and the electric two-wheeler transmit UWB activation commands through an established encrypted Bluetooth channel. The commands are encrypted using a shared key to prevent tampering. A unified UWB ranging time reference is then established; the target charger's UWB module time is calibrated to match the vehicle's UWB time reference, laying the foundation for centimeter-level ranging. Both devices' UWB ranging modules use a two-way time-of-flight (ToF) ranging method to output the centimeter-level precise distance between the target charger plug and the vehicle's charging port.

[0094] Step 308: When the physical distance meets the preset safe distance range, the target charger charges the electric two-wheeler. That is, the charging prerequisites proposed in this application must be met: the charger and the electric two-wheeler must be mutually bound (Bluetooth master-slave device pairing connection), and the physical distance between the target charging plug and the vehicle's charging port must be within the preset safe distance range before the charging process can begin. This charging process also involves information interaction between the target charger and the vehicle battery, safe charging of the charging control circuit, and the interaction between both directly or indirectly with the cloud server and the accompanying user APP, which will be described in detail later.

[0095] In one embodiment, step 302 includes: 1) After the target charger is powered on, it initiates a pairing connection request with the main device of the electric two-wheeler and sends its unique identification information to the other party. The pairing connection request includes initialization preparation and device search and matching: Initialization Preparation: After the charger is powered on, it enters discoverable mode from the device and broadcasts a signal containing the charger's unique identification code (such as a Bluetooth MAC address or ID number) and UWB capability set. Merchants or users can initiate a "charger binding" command through the central control screen of the electric two-wheeler or the accompanying user APP.

[0096] Device Search and Pairing: After receiving the charger pairing command, the electric two-wheeler's master device initiates Bluetooth search and filters for charger broadcast signals in discoverable mode. Users can select the target charger to pair on the vehicle screen or in the app interface (usually displayed as "[Vehicle Model] - [Last 4 Digits Identification Code]"). The vehicle's master device sends a pairing request signal to the target charger's slave device, containing the vehicle's unique identifier (such as the VIN and device ID).

[0097] 2) Upon receiving the connection response from the target charger's slave device, the master device of the electric two-wheeler synchronously performs the following: establishing an encrypted connection between the master and slave devices and generating a shared key; and negotiating the capability between the target charger and the electric two-wheeler's UWB ranging module. Before sending the connection response, the slave device must perform information verification: after receiving the pairing request signal, the target charger's slave device verifies the legitimacy of the vehicle identification. Verification can be done by comparing a preset brand code or through a cloud-based whitelist.

[0098] After successful verification, the slave device sends a connection response to the vehicle's master device. The master and slave devices establish an encrypted connection using a preset encryption algorithm and generate a shared key. In one possible implementation, the preset encryption algorithm is based on the AES-128 encryption algorithm, which will not be elaborated further here. Subsequently, when the target charger and the vehicle transmit data on the established encrypted Bluetooth channel, they will encrypt the data using the shared key to transmit encrypted data packets, ensuring data security and preventing malicious tampering.

[0099] While exchanging BLE keys, the target charger and the vehicle simultaneously negotiate capabilities: they exchange session key parameters (Session Key) such as the channel and preamble code required for UWB ranging, and store them in their respective non-volatile memories. The preamble code is a key signal sequence used for synchronization and channel estimation. In this embodiment, all session key parameters are processed using a hash function and denoted as SK1_Hash.

[0100] In addition, step 302 also includes: 3) The electric two-wheeler binds the unique identification information of the target charger with its own unique identification information and synchronizes it to the cloud server. Specifically, the target charger associates the vehicle's unique identifier with its own identification code and stores it in its local Flash chip, and returns a "binding confirmation" signal to the vehicle. After receiving the confirmation, the vehicle binds the charger's identification code with the vehicle information, stores it in its local EEPROM, and synchronizes it to the cloud server (recording the binding time, device information, etc.).

[0101] The cloud server pairs and stores the unique identification information of both the electric two-wheeler and the activation timestamp (i.e., binding time), generating a binding success certificate, which is then sent to both the electric two-wheeler and the user's app to complete the initial binding. The vehicle screen or app displays a "Binding Successful" message and prompts the user to perform an initial charging test. The warranty period for the target charger is based on the cloud activation time, preventing dealer tampering. Scanning the charger's QR code allows users to check the bound vehicle, activation time, and warranty status, thus improving the merchant's warranty mechanism.

[0102] In the initial binding process described above, encrypted connections and shared key generation ensure the security of the initial binding information transmission, preventing the unique identification information from being tampered with or stolen, thus laying a solid foundation for binding security. The binding process simultaneously completes UWB capability negotiation, laying the groundwork for subsequent accurate ranging and improving the efficiency of subsequent charging safety verification. Unique identifiers are stored in the cloud and timestamps are recorded, establishing an immutable device association file to support accurate after-sales warranty traceability. Cloud credentials are issued bidirectionally to ensure the binding validity is verifiable, while allowing users to know the binding result in real time through the app, improving operational certainty and user experience.

[0103] Furthermore, when it is necessary to unbind the device, the user or merchant initiates an unbinding request through the app. After verification by the cloud server, an unbinding command is issued, and the vehicle's ECU and charger's MCU clear the locally stored shared key. Afterward, the charger can accept pairing requests from other devices. The specific process of the cloud server verifying the unbinding request can be found in the limitations section of the intelligent charging method for electric two-wheelers above, and will not be repeated here.

[0104] After the target charger and the vehicle establish a binding relationship, they need to verify the Bluetooth connection before charging is required. In one embodiment, step 304 includes: 1) After the vehicle's main device detects the Bluetooth signal of the charger's slave device, it verifies the target charger's unique identification information. Specifically, when the bound target charger approaches the electric two-wheeler (usually within the effective Bluetooth communication range, approximately 10 meters), the target charger, after being powered on, automatically enters connection mode and actively searches for the bound vehicle's Bluetooth signal. At this time, the vehicle's Bluetooth main device is in standby listening mode. Upon receiving the target charger's Bluetooth search signal, it identifies the charger's unique identification code. The vehicle then compares and verifies the received charger identification code with the locally stored bound charger identification code.

[0105] 2) If the verification is successful, the electric two-wheeler generates an encrypted connection response signal based on the shared key and sends it to the target charger. Specifically, if the identification code matches successfully, the vehicle generates a random number as a dynamic challenge code and uses a preset encryption key (such as using the AES-128 algorithm) to generate an encrypted connection response signal containing dynamic information (i.e., the dynamic challenge code encrypted with the key).

[0106] 3) The target charger uses a shared key to decrypt the encrypted connection response signal and verify the validity of the dynamic information. If the verification is successful, the target charger and the electric two-wheeler establish an encrypted Bluetooth channel and complete the Bluetooth pairing connection.

[0107] After the Bluetooth connection between the target charger and the vehicle is verified, to further enhance security and eliminate the risk of "close-range charging theft," both devices initiate UWB precise distance verification. In one embodiment, the UWB ranging module of the target charger is placed at the charging plug, and the UWB ranging module of the electric two-wheeler is placed at the vehicle's charging port. Step 306 then includes: 1) The target charger and the electric two-wheeler exchange a series of UWB pulse signals through the established encrypted Bluetooth channel and record the transmission and reception timestamps of the signals (T1, T2, T3, T4).

[0108] Specifically, the vehicle sends a UWB_Poll message (containing device identifier, ranging mode parameters, and time synchronization reference value) to the charger via the BLE channel and records the sending timestamp. Upon receiving the Poll message, the target charger immediately records the receiving timestamp and prepares to send a Response message based on the triggering of the Poll message. At this point, the UWB ranging modules within both devices are activated, initiating the UWB ranging process. In one possible implementation, the target charger and vehicle follow a two-way time-of-flight (ToF) ranging method (to compensate for clock skew and environmental interference), exchanging a series of UWB pulse signals (Final, Report). The specific interaction process can be combined with... Figure 4 The limitations mentioned above regarding the intelligent charging method for electric two-wheeled vehicles will not be repeated here.

[0109] 2) The electric two-wheeler calculates the time of flight (ToF) of the signal based on the exchanged timestamp data, and then calculates the physical distance between the charging plug and the vehicle's charging port based on the time of flight. The time of flight (ToF) is expressed as: ToF = [(T4 - T1) - (T3 - T2)] / 2; the physical distance D = ToF × speed of light (c ≈ 3 × 10⁻⁶). 8 (m / s). In the formula: (T4 - T1) is the total transmission time of the signal "master → slave → master", and (T3 - T2) is the signal processing delay of the charger slave device, ultimately achieving centimeter-level ranging accuracy.

[0110] 3) The vehicle-side system checks whether the distance measured by UWB is less than a preset safety threshold (e.g., 0.1 meters) to ensure that the target charger is physically inserted into the vehicle's charging port, and not just within the Bluetooth signal range. If the distance D is greater than the safety threshold, it indicates that the target charger is not physically connected correctly. Even if the Bluetooth connection is successful, the charger's MCU will refuse to charge and may report a "safety warning" event.

[0111] In the above dual-mode distance verification process, Bluetooth verification and UWB centimeter-level ranging provide dual protection, completely eliminating unauthorized charging within the Bluetooth signal range and significantly improving charging safety. UWB signal interaction based on encrypted channels and timestamp ranging ensure accurate and reliable physical distance calculation.

[0112] After both BLE verification and UWB distance verification are passed, the charging process officially begins. In one embodiment, such as... Figure 5 As shown, step 308 includes: 1) The target charger sends a charging request signal to the electric two-wheeler through the established encrypted Bluetooth channel and simultaneously reports the current charging status information, such as input voltage, internal temperature, and whether it is in a rechargeable state.

[0113] 2) After receiving the charging request signal and the current charging status information, the electric two-wheeler evaluates the current charging status information. If the target charger is in normal condition, the electric two-wheeler sends a charging permission command to the target charger and simultaneously sends the current battery status information (such as remaining power, battery temperature, etc.).

[0114] 3) After receiving the charging permission command and vehicle battery status information, the target charger adjusts the initial charging parameters (such as initial charging voltage and current) output by its internal charging control circuit according to the current battery status information, and charges the vehicle battery.

[0115] The target charger has a built-in charging control circuit that connects to the charger's MCU. When the MCU receives a charging permission command, it sends a charging permission signal (active high) to the charging control circuit, thus initiating charging. If the MCU receives a charging prohibition command, or the Bluetooth connection is interrupted, the charging control circuit immediately stops charging to prevent unauthorized chargers from connecting and ensure charging safety.

[0116] In one embodiment, such as Figure 6As shown, the charging control circuit includes: a DC conversion circuit (such as a Buck circuit), a transformer, an output control circuit, a rectifier and filter circuit, a voltage sampling circuit, a signal amplification circuit, an optocoupler, and a PWM drive circuit. Specifically, the external AC input sequentially passes through the first rectifier and filter circuit (which can be implemented using electromagnetic filtering), the DC conversion circuit, the transformer, the second rectifier and filter circuit, and the output control circuit, before being converted to DC output and connected to the electric two-wheeler. The control terminal of the output control circuit is connected to the MCU of the target charger. The MCU controls the output control circuit to conduct when it receives a charging permission command. The voltage sampling circuit is connected between the output of the transformer-fb rectifier and filter circuit (i.e., the second rectifier and filter circuit) and the MCU's input I / O port, used to sample a feedback voltage Vfb proportional to the output voltage Vout. The MCU outputs a PWM signal, which sequentially passes through a signal amplification circuit and an optocoupler before entering the PWM drive circuit. The PWM drive circuit is used to drive the switching transistors (such as MOSFETs) in the DC conversion circuit to turn on and off.

[0117] Based on the working principle of the charging control circuit described above, the process of the target charger adjusting the initial charging parameters output by its internal charging control circuit according to the current battery status information is implemented by the MCU. It calculates the ideal voltage and current values ​​required for the current charging mode based on the battery status information, and then controls the DC conversion circuit by changing the duty cycle D of the PWM signal to output these calculated values. The specific calculation process can be found in the limitations of the intelligent charging method for electric two-wheeled vehicles mentioned above, and will not be repeated here.

[0118] Based on the above charging process, this embodiment further provides methods for multi-device information synchronization, APP configuration, and OTC upgrade. In one embodiment, step 308 further includes: 4) During the charging process, the target charger collects charging information in real time, including charging voltage, current, charger temperature, fan status (working, stopped, faulty), charging stage (CC-CV) and stage duration, total charging time per charge, faults, alarms, and other parameters. The Bluetooth slave device packages this information and transmits it to the electric two-wheeler periodically through the established encrypted Bluetooth channel.

[0119] After receiving the charging information from the target charger, the electric two-wheeler can display it in real time on the vehicle's dashboard, allowing users to intuitively understand the charging status. On the other hand, the charging information is uploaded to the cloud server through the vehicle's IoT module, and then forwarded to the user's APP by the cloud server.

[0120] The user app obtains the vehicle's charging information from the cloud server. Users can view the vehicle's charging history, current charging progress, and charger status at any time through the app.

[0121] 5) Because the user app communicates with the vehicle's IoT module, it can indirectly interact with the target charger via master-slave Bluetooth devices. The user app allows for personalized configuration of charging parameters, such as setting charging voltage and current, adjusting charging speed (e.g., selecting fast charging, standard charging, or trickle charging modes), and setting charging start and stop times. The app sends the user-defined configuration parameters to a cloud server, which then forwards them to the electric two-wheeler via the IoT module, and finally transmits them to the target charger via an encrypted Bluetooth channel. Ultimately, the target charger adjusts its charging strategy based on the received configuration parameters to meet different user charging needs.

[0122] 6) When new firmware needs to be upgraded, the upgrade notification can be pushed to the user's APP through the cloud server. After the user authorizes the upgrade, the cloud server will push the firmware to the whole vehicle, and the whole vehicle will then send the upgrade package through Bluetooth to realize the OTA of the target charger.

[0123] The complete charging process of the target charger for the vehicle can be found in [reference needed]. Figure 5 As shown, by transmitting charging and battery status in real time and displaying it synchronously across multiple devices (dashboard / APP), the transparency of the charging process is improved, making it convenient for users to monitor in real time. The APP supports personalized configuration of charging parameters and dynamic adjustment of the charger to achieve precise charging and optimize battery maintenance. It also supports OTA remote upgrades for the charger, allowing for feature iteration and bug fixing without offline disassembly, extending the device's lifespan and improving the product's continuous service capabilities.

[0124] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0125] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0127] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A smart charging method for electric two-wheeled vehicles based on dual-mode wireless communication, characterized in that, Both the charger and the electric two-wheeler are equipped with Bluetooth modules and UWB ranging modules, with the charger's Bluetooth module being the slave device and the vehicle's Bluetooth module being the master device. The method includes: The electric two-wheeler and the target charger are initially bound based on master-slave device configuration, including: After the target charger is powered on, it requests a pairing connection between the device and the main device of the electric two-wheeler, and sends its own unique identification information to the other party. Upon receiving the connection response from the slave device of the target charger, the master device of the electric two-wheeled vehicle synchronously executes the following: The master and slave devices establish an encrypted connection and generate a shared key for pairing. While the master and slave devices exchange keys, the target charger and the UWB ranging module of the electric two-wheeler negotiate capabilities: the two exchange session key parameters required for UWB ranging, including the channel and preamble, and store them in the non-volatile memory of both parties. When the target charger that has been bound is within the Bluetooth range of the vehicle's main device, the target charger will pair and connect with the electric two-wheeler via Bluetooth based on the shared key. After Bluetooth connection authentication is successful, the UWB ranging modules of the target charger and the electric two-wheeler are activated. The UWB ranging module of the target charger is placed at the charging plug, and the UWB ranging module of the electric two-wheeler is placed at the vehicle charging port. The UWB ranging modules of both calculate the centimeter-level precise physical distance between the target charging plug and the vehicle charging port. When the physical distance meets the preset safe distance range, the target charger charges the electric two-wheeler.

2. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 1, characterized in that, The initial binding process also includes: The electric two-wheeler binds the unique identification information of the target charger with its own unique identification information and synchronizes it to the cloud server; The cloud server pairs and stores the unique identification information of the two devices along with the activation timestamp, generates a successful binding certificate, and sends it to the electric two-wheeler and the user's APP respectively, thus completing the initial binding. The warranty period for the target charger is based on the cloud activation time.

3. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 1, characterized in that, The process by which the target charger establishes a Bluetooth pairing connection with the electric two-wheeler based on the shared key includes: After the vehicle's main device detects the Bluetooth signal of the charger slave device, it verifies the unique identification information of the target charger. If the verification is successful, the electric two-wheeler generates an encrypted connection response signal based on the shared key and sends it to the target charger; wherein the encrypted connection response signal contains dynamic information; The target charger uses the shared key to decrypt the encrypted connection response signal and verify the validity of the dynamic information; If the verification is successful, the target charger and the electric two-wheeler establish an encrypted Bluetooth channel to complete the Bluetooth pairing connection.

4. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 1, characterized in that, The method for calculating the precise physical distance, down to the centimeter level, between the target charging plug and the vehicle charging port includes: The target charger and the electric two-wheeler exchange UWB pulse signals through an established encrypted Bluetooth channel, and record the transmission and reception timestamps of the signals. The electric two-wheeler calculates the flight time of the signal based on the exchanged timestamp data, and calculates the physical distance between the charging plug and the vehicle's charging port based on the flight time.

5. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 1, characterized in that, The process of the target charger charging the electric two-wheeler includes: The target charger sends a charging request signal to the electric two-wheeler through the established encrypted Bluetooth channel and simultaneously reports the current charging status information. The electric two-wheeler evaluates the current charging status information; If the charger is in normal condition, the electric two-wheeler sends a charging permission command to the target charger and simultaneously sends the current battery status information. The target charger adjusts the initial charging parameters output by its internal charging control circuit based on the current battery status information, and charges the vehicle battery.

6. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 5, characterized in that, The charging control circuit includes: a DC conversion circuit, a transformer, an output control circuit, a rectifier and filter circuit, a voltage sampling circuit, a signal amplification circuit, an optocoupler, and a PWM drive circuit; wherein: The DC conversion circuit, the transformer, and the output control circuit are connected in sequence, and the transformer passes through a rectifier and filter circuit before and after the transformer. The control terminal of the output control circuit is connected to the MCU of the target charger. The MCU is used to control the output control circuit to turn on when it receives the charging permission command. The voltage sampling circuit is connected between the output of the transformer-rectified filter circuit and the input I / O port of the MCU; The MCU outputs a PWM signal, which passes through the signal amplification circuit and optocoupler isolation circuit in sequence before entering the PWM drive circuit. The PWM drive circuit is used to drive the switching transistors in the DC conversion circuit to turn on and off.

7. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 6, characterized in that, The process by which the target charger adjusts the initial charging parameters output by its internal charging control circuit based on the current battery state information is implemented by the MCU, including: The current charging mode is determined based on the current battery status information; Based on the ideal charging parameters of the current charging mode and the current battery state information, the target output voltage of the DC conversion circuit is determined. The PWM duty cycle is calculated in reverse based on the target output voltage and input voltage, and the PWM signal is generated to control the DC conversion circuit, so that the charging control circuit outputs the ideal charging parameters.

8. The intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication according to claim 1, characterized in that, The method further includes: During the charging process, the electric two-wheeler receives charging information sent by the target charger at regular intervals through the established encrypted Bluetooth channel and uploads the charging information to the cloud server. The user app obtains and displays the vehicle's charging information from the cloud server. The user's APP allows for personalized configuration of charging parameters, which are then sent to the cloud server. The cloud server forwards these parameters to the electric two-wheeler, and the data is then transmitted to the target charger via the encrypted Bluetooth channel. The target charger adjusts its charging strategy based on the received configuration parameters.

9. A smart charging system for electric two-wheeled vehicles based on dual-mode wireless communication, characterized in that, The system includes: a target charger, an electric two-wheeler, a cloud server, and a corresponding user app, wherein: Both the target charger and the electric two-wheeler are equipped with a Bluetooth module and a UWB ranging module, wherein the Bluetooth module of the charger is a slave device and the Bluetooth module of the vehicle is a master device. The electric two-wheeled vehicle and the cloud server transmit and interact via IoT technology. The cloud server and the user APP communicate and interact via wired or wireless networks. The system is used to implement the intelligent charging method for electric two-wheeled vehicles based on dual-mode wireless communication as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Auxiliary parking of electric vehicle in charging station

    CN117980180A

  • Three-in-one safe binding system and method for electric vehicle

    CN120263827A