An offline authentication and charging method, device and equipment of a charging pile and a medium
Patent Information
- Application Number
- CN202610940136.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明提供了一种充电桩的离线鉴权与充电方法,以解决现有无网络场景下充电桩鉴权依赖人工干预,无法实现离线自动鉴权与插枪即充的问题
通过用户终端与充电桩双侧蓝牙动态令牌离线鉴权,解决无网络场景下充电鉴权依赖人工、安全性低的问题,实现全自动无感充电;同时具备实时数据传输、临时访客授权、离线权限管控、本地计费及多重防攻击能力,适配地下车库、偏远地区等各类无网络场景,兼顾用户便捷性、充电安全性与运营商可管理性。
Smart Images

Figure CN122976383A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy vehicle charging technology, and in particular to an offline authentication and charging method, device, equipment, and medium for charging piles. Background Technology
[0002] With the rapid popularization of new energy vehicles, a large number of charging piles are deployed in underground garages, remote suburbs and other areas without mobile communication networks. Traditional cloud-based QR code authentication cannot be used. Existing methods such as offline passwords, manual Bluetooth pairing and NFC card swiping are cumbersome to operate, have insufficient security and cannot be started seamlessly, making it difficult to meet the convenient and safe charging needs in scenarios without network coverage. Summary of the Invention
[0003] This invention provides an offline authentication and charging method for charging piles to solve the problem that in existing network-free scenarios, charging pile authentication relies on manual intervention and cannot achieve offline automatic authentication and plug-in charging.
[0004] In a first aspect, the present invention provides an offline authentication and charging method for a charging pile, the method comprising: Scan the BLE beacon broadcast by the charging pile, parse the device identifier and match it with the locally stored shared key to generate a dynamic token; A Bluetooth connection is established based on the device address carried by the beacon, and the dynamic token is sent using a custom GATT feature. Upon receiving successful authentication feedback, the charging station automatically starts charging when it detects the insertion of the charging gun.
[0005] Secondly, the present invention provides an offline authentication and charging method for a charging pile, the method comprising: Broadcasts a BLE beacon carrying the device identifier to accept Bluetooth connection requests from user terminals; Receive and decrypt the dynamic token, and verify the device identifier, time validity, and local permission list; Once the verification is successful, charging will begin upon detecting the charging gun insertion signal.
[0006] Thirdly, the present invention provides an offline authentication and charging device for a charging pile, comprising: The scanning unit is used to scan the BLE beacons broadcast by the charging pile, parse the device identifier and match it with the locally pre-stored shared key to generate a dynamic token; The sending unit is used to establish a Bluetooth connection based on the device address carried by the beacon and to send the dynamic token through a custom GATT feature. The receiving unit is used to receive successful authentication feedback, so that the charging pile can automatically start charging when it detects that the charging gun is inserted.
[0007] Fourthly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When the processor executes a program stored in the memory, it implements the steps of the offline authentication and charging method for the charging pile described in any embodiment of the first aspect.
[0008] Fifthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the offline authentication and charging method for a charging pile as described in any embodiment of the first aspect.
[0009] The technical solutions provided in the embodiments of the present invention have the following advantages compared with the prior art: By using offline authentication via Bluetooth dynamic tokens on both the user terminal and the charging pile, the problem of manual authentication and low security in charging scenarios without network coverage is solved, enabling fully automatic and seamless charging. It also features real-time data transmission, temporary visitor authorization, offline permission management, local billing, and multiple anti-attack capabilities, making it suitable for various scenarios without network coverage, such as underground parking garages and remote areas, while balancing user convenience, charging security, and operator manageability. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating an offline authentication and charging method for a charging pile provided in an embodiment of the present invention; Figure 2 A flowchart illustrating another offline authentication and charging method for a charging pile provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an offline authentication and charging device for a charging pile provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] Example Figure 1 This is a flowchart illustrating an offline authentication and charging method for a charging pile according to an embodiment of the present invention. The present invention proposes an offline authentication and charging method for a charging pile, applied to a user terminal (e.g., a mobile phone). Specifically, see [link to documentation]. Figure 1 The offline authentication and charging method of the charging pile includes the following steps S101-S103.
[0015] S101 scans the BLE beacon broadcast by the charging pile, parses the device identifier and matches it with the locally pre-stored shared key to generate a dynamic token.
[0016] S102, establish a Bluetooth connection based on the device address carried by the beacon, and send the dynamic token through a custom GATT feature.
[0017] S103, receive successful authentication feedback, enabling the charging pile to automatically start charging when it detects the insertion of the charging gun.
[0018] In this embodiment, the BLE beacon refers to the short message periodically broadcast by the charging pile Bluetooth module, containing the device's unique identifier and MAC address; the shared key refers to the symmetric encryption key stored locally by the terminal and the charging pile after the initial network connection and binding; the dynamic token refers to a one-time authentication credential generated based on the shared key, device identifier, timestamp, and random number; and the custom GATT feature refers to a predefined data transmission interface in Bluetooth communication used for secure transmission of the dynamic token.
[0019] In a specific embodiment, the user pre-binds the terminal to the charging pile in a network-connected environment, and the terminal locally stores the shared key of the charging pile. When the user drives the vehicle into an underground parking garage without network access, the terminal automatically scans the BLE beacon broadcast by the charging pile, parses the unique device identifier in the beacon, and matches it with the locally stored shared key. After a successful match, the terminal generates a dynamic token using AES-128 encryption based on the shared key, device identifier, current minute-level timestamp, and random number R3. The terminal initiates a Bluetooth connection based on the charging pile MAC address carried by the beacon. After the connection is established, the dynamic token is sent to the charging pile using a preset custom GATT feature. The terminal receives a successful authentication feedback from the charging pile. At this point, the user only needs to insert the charging gun into the vehicle, and the charging pile will automatically start charging without any additional terminal operation.
[0020] It enables fully automatic offline authentication on the terminal side in the absence of network environment, eliminating the need for manual scanning, password entry or manual pairing, and achieving a seamless experience of plugging in and charging; dynamic tokens replace static credentials, reducing the risk of key leakage and forgery.
[0021] In one embodiment, real-time charging data is transmitted via Bluetooth during the charging process.
[0022] In this embodiment, real-time charging data includes operating parameters such as charging voltage, current, battery level, battery temperature, and charging power; GATT notification is a mechanism for actively pushing data in Bluetooth communication, without requiring the terminal to actively request it.
[0023] In a specific embodiment, after the charging pile starts charging, its Bluetooth module collects charging voltage, current, cumulative power and battery temperature data in real time, and pushes the data to the user terminal periodically through the Bluetooth GATT notification mechanism; after receiving the data, the terminal displays the charging status in real time, and the user can keep track of the charging progress without having to get close to the charging pile, and network interruption does not affect data transmission.
[0024] Real-time visualization of charging status in offline scenarios enhances user control over the charging process and avoids the problem of not being aware of charging abnormalities due to lack of network connectivity.
[0025] In one embodiment, the method further includes the steps of: generating a temporary token with an expiration date and a limited number of uses, and completing Bluetooth connection and authentication interaction based on the temporary token.
[0026] In this embodiment, the temporary token is an authentication credential generated by the terminal that includes an expiration period and a limit on the number of uses, and it does not depend on any bound device; the expiration period is the valid time period of the temporary token, such as 1 hour or 24 hours; the limit on the number of uses refers to the maximum number of times the temporary token can be used for authentication, such as 1 time or 3 times.
[0027] In a specific embodiment, when the vehicle owner is not present, a temporary token is generated via the terminal, with a validity period of 2 hours and a usage limit of 1. The terminal sends the temporary token to the visitor via social media, and the visitor imports the temporary token into their own terminal. Upon arriving at the charging station, the visitor's terminal scans the BLE beacon, parses the device identifier, and completes Bluetooth connection and authentication directly based on the imported temporary token without needing to match a long-term shared key. After successful authentication, the visitor can plug in the charging gun to charge. The temporary token automatically expires or becomes invalid after the usage limit is exhausted, and cannot be authenticated again.
[0028] It supports temporary visitors charging without binding in offline scenarios, without the need for physical cards or passwords, thus improving the flexibility of shared charging; validity period and usage limit ensure authorization security and prevent abuse of permissions.
[0029] In one embodiment, the method further includes the steps of: obtaining the blacklist increment via the Internet and synchronizing it to the charging station offline via Bluetooth.
[0030] In this embodiment, the blacklist refers to a list of user IDs or device identifiers that are prohibited from charging, stored in the cloud, including abnormal users such as those with outstanding payments or those who have been charging without authorization; the blacklist increment refers to the addition of new blacklist entries updated in the cloud, reducing the amount of data synchronized.
[0031] In a specific embodiment, when the user terminal is in a network environment, it automatically downloads the latest blacklist increment from the cloud server and caches it locally; when the terminal enters a network-free environment and establishes a Bluetooth connection with the charging pile, the terminal sends the locally cached blacklist increment to the charging pile via Bluetooth; after receiving the data, the charging pile updates its local blacklist list and automatically blocks blacklisted users during subsequent authentication, thus completing permission control without relying on the cloud.
[0032] It enables offline synchronization and management of blacklists in environments without network connectivity, allowing for timely interception of abnormal users and reducing losses for operators; incremental synchronization reduces data transmission and improves synchronization efficiency.
[0033] Figure 2 This is a flowchart illustrating another offline authentication and charging method for a charging pile provided by an embodiment of the present invention. This embodiment of the present invention proposes an offline authentication and charging method for a charging pile, applied to the charging equipment (e.g., a charging pile). Specifically, see [link to documentation]. Figure 2 The offline authentication and charging method of the charging pile includes the following steps S201-S203.
[0034] S201 broadcasts a BLE beacon carrying the device identifier to accept Bluetooth connection requests from user terminals.
[0035] S202 receives and decrypts the dynamic token, and verifies the device identifier, time validity, and local permission list.
[0036] S203, after the verification is passed, the charging gun insertion signal is detected and charging is started.
[0037] In this embodiment, the local permission list includes a whitelist and a blacklist stored locally by the charging pile. The whitelist contains the bound user ID, and the blacklist contains the user ID that is prohibited from charging. The time validity refers to the difference between the timestamp in the dynamic token and the current time, which is usually set to within ±2 minutes to prevent replay attacks.
[0038] In a specific embodiment, the charging pile's Bluetooth module periodically broadcasts a BLE beacon carrying the device's unique identifier and continuously listens for Bluetooth connection requests from user terminals. Upon receiving a connection request from a terminal, it completes the Bluetooth connection. The charging pile receives a dynamic token sent by the terminal using a custom GATT feature, decrypts the token using a locally pre-stored shared key, and extracts the device identifier, timestamp, and random number. The charging pile verifies that the device identifier matches the locally stored identifier, that the timestamp is within the current time ± 2 minutes, and that the user ID exists in the local whitelist and is not in the blacklist. After all verifications pass, it returns an authentication success response to the terminal. The charging pile detects the charging gun insertion signal in real time. Upon detecting the signal, it directly starts the charging circuit and begins charging the vehicle.
[0039] Offline authentication is completed independently on the charging pile side without cloud involvement, making it suitable for scenarios without network access; multiple verification mechanisms ensure authentication security and prevent unauthorized users from starting charging.
[0040] In one embodiment, the method further includes the steps of: locally storing charging records and uploading them to the cloud for settlement after the network is restored.
[0041] In this embodiment, the charging record includes detailed data such as user ID, charging start and end time, cumulative electricity consumption, charging duration, and charging pile number; local storage refers to the charging pile's Flash memory, which supports storing at least 1,000 records; cloud settlement refers to the cloud calculating fees based on the charging records and updating the user's bill or balance.
[0042] In a specific embodiment, after the charging pile starts charging, it records information such as the user ID, start and end time, cumulative electricity consumption, and charging pile number in real time and stores it in the local Flash memory. After charging is completed, the record is archived. When the charging pile reconnects to the mobile communication network or a network hotspot is available, it automatically encrypts and uploads all unsynchronized charging records stored locally to the cloud server. After the cloud verifies the legality of the records, it completes the payment settlement and updates the user's bill. After synchronization is complete, the charging pile can delete the synchronized records locally to free up storage space.
[0043] It enables local storage of charging data in the absence of network coverage to prevent data loss; it automatically synchronizes and settles billing after the network is restored, ensuring the operator's billing revenue and solving the pain point of offline billing failure.
[0044] In one embodiment, the verification of the dynamic token also includes a random number replay protection check.
[0045] In this embodiment, the random number replay check refers to verifying that the random number in the dynamic token has not been used in the last 5 minutes, preventing attackers from repeatedly sending old tokens for authentication.
[0046] In a specific embodiment, after the charging pile decrypts the dynamic token, it extracts the random number R3 from the token; it queries the local random number usage record to verify that the random number has not appeared in the last 5 minutes; if it has not appeared, the verification passes and the subsequent authentication process continues; if it has appeared, it is determined to be a replay attack, authentication is rejected and the abnormal event is recorded.
[0047] Adding random number verification on top of timestamp verification provides double protection against replay attacks, further enhancing the security of offline authentication and preventing tokens from being stolen and reused.
[0048] The embodiments of the present invention can achieve the following advantages: By using offline authentication via Bluetooth dynamic tokens on both the user terminal and the charging pile, the problem of manual authentication and low security in charging scenarios without network coverage is solved, enabling fully automatic and seamless charging. It also features real-time data transmission, temporary visitor authorization, offline permission management, local billing, and multiple anti-attack capabilities, making it suitable for various scenarios without network coverage, such as underground parking garages and remote areas, while balancing user convenience, charging security, and operator manageability.
[0049] See Figure 3 This invention also provides an offline authentication and charging device 400 for a charging pile, which includes a scanning unit 401, a sending unit 402, and a receiving unit 403.
[0050] The scanning unit 401 is used to scan the BLE beacon broadcast by the charging pile, parse the device identifier and match the locally pre-stored shared key to generate a dynamic token.
[0051] The sending unit 402 is used to establish a Bluetooth connection based on the device address carried by the beacon and send the dynamic token through a custom GATT feature.
[0052] The receiving unit 403 is used to receive successful authentication feedback, so that the charging pile can automatically start charging when it detects that the charging gun is inserted.
[0053] In one embodiment, real-time charging data is transmitted via Bluetooth during the charging process.
[0054] In one embodiment, a generation unit is also included: for generating a temporary token with an expiration date and a limited number of uses, and for completing Bluetooth connection and authentication interaction based on the temporary token.
[0055] In one embodiment, a synchronization unit is also included: for obtaining blacklist increments via network connection and synchronizing them to the charging station offline via Bluetooth.
[0056] like Figure 4 As shown, Figure 4 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0057] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0058] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it enables the processor 502 to execute an offline authentication and charging method for a charging station.
[0059] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0060] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an offline authentication and charging method for a charging pile.
[0061] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0062] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0063] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0064] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program.
[0065] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0066] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0067] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0068] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0071] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0072] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An offline authentication and charging method for a charging pile, characterized in that, The method includes: Scan the BLE beacon broadcast by the charging pile, parse the device identifier and match it with the locally stored shared key to generate a dynamic token; A Bluetooth connection is established based on the device address carried by the beacon, and the dynamic token is sent using a custom GATT feature. Upon receiving successful authentication feedback, the charging station automatically starts charging when it detects the insertion of the charging gun.
2. The method according to claim 1, characterized in that, During charging, real-time charging data is transmitted via Bluetooth.
3. The method according to claim 2, characterized in that, The method further includes: A temporary token with an expiration date and a limited number of uses is generated, and Bluetooth connection and authentication interaction are completed based on the temporary token.
4. The method according to claim 1, characterized in that, The method further includes: Get the blacklist increments online and sync them to the charging station offline via Bluetooth.
5. An offline authentication and charging method for a charging pile, characterized in that, The method includes: Broadcasts a BLE beacon carrying the device identifier to accept Bluetooth connection requests from user terminals; Receive and decrypt the dynamic token, and verify the device identifier, time validity, and local permission list; Once the verification is successful, charging will begin upon detecting the charging gun insertion signal.
6. The method according to claim 5, characterized in that, The method further includes: Charging records are stored locally and uploaded to the cloud for settlement once the network is restored.
7. The method according to claim 5, characterized in that, When verifying dynamic tokens, a random number replay prevention check is also included.
8. An offline authentication and charging device for a charging pile, characterized in that, include: The scanning unit is used to scan the BLE beacons broadcast by the charging pile, parse the device identifier and match it with the locally pre-stored shared key to generate a dynamic token; The sending unit is used to establish a Bluetooth connection based on the device address carried by the beacon and to send the dynamic token through a custom GATT feature. The receiving unit is used to receive successful authentication feedback, so that the charging pile can automatically start charging when it detects that the charging gun is inserted.
9. A computer device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.