Method and device for upgrading vehicle charging pile

By using segmented transmission and status recording, the problem of transmission interruption caused by signal instability during the upgrade of charging piles in network-free environments was solved, thereby improving the reliability of firmware transmission and the success rate of upgrades in network-free environments.

CN122640407APending Publication Date: 2026-08-25CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610802365.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In environments without a network, unstable signals can cause transmission interruptions during the upgrade of charging stations, resulting in a low success rate for the upgrade.

Method used

By combining block transmission with status recording, the upgrade data is divided into multiple data blocks with consecutive sequence numbers and sent to the target charging pile in sequence according to the sequence number. After successfully receiving each data block, the charging pile records its corresponding maximum sequence number. After the transmission is interrupted, the terminal device can accurately locate the interruption point by reading the maximum sequence number stored locally by the charging pile, and resume the transmission from the data block corresponding to the next sequence number until all data blocks have been sent.

Benefits of technology

It avoids full retransmission, makes efficient use of limited communication resources, and improves the reliability of firmware transmission and the success rate of upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122640407A_ABST
    Figure CN122640407A_ABST
Patent Text Reader

Abstract

The application discloses an upgrading method and device of a vehicle charging pile. The method comprises the following steps: a terminal device acquires upgrading data of a target charging pile, and divides the upgrading data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are continuous in value; the multiple data blocks are sequentially transmitted to the target charging pile according to the serial numbers; in the case of transmission interruption, the maximum serial number stored by the target charging pile is acquired, and the retransmission is started from the data block corresponding to the next serial number of the maximum serial number until the transmission of all the data blocks is completed; a target instruction is generated, and the target instruction is sent to the target charging pile, wherein the target instruction is used for instructing the target charging pile to upgrade by using the upgrading data. The application solves the technical problem of low upgrading success rate caused by the need for retransmission after the transmission interruption due to unstable signals in the related art in the charging pile upgrading process in a network-free environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to an upgrade method and apparatus for vehicle charging piles. Background Technology

[0002] In environments without a network, Bluetooth signals are easily affected by factors such as shielding from the metal structure of underground parking garages, multipath interference, and interference from other wireless devices during the upgrade of charging piles, resulting in frequent connection interruptions. Furthermore, the relevant technologies require retransmission after transmission interruptions due to signal instability during the upgrade process, leading to a low upgrade success rate.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method and apparatus for upgrading vehicle charging piles, which at least solves the technical problem that in the absence of a network, the related technologies require retransmission after the transmission is interrupted due to signal instability during the charging pile upgrade process, resulting in a low upgrade success rate.

[0005] According to one aspect of the embodiments of this application, an upgrade method for a vehicle charging pile is provided, comprising: a terminal device acquiring upgrade data of a target charging pile and dividing the upgrade data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive; transmitting the multiple data blocks sequentially to the target charging pile according to the serial numbers; in the event of a transmission interruption, acquiring the maximum serial number stored in the target charging pile and retransmitting from the data block corresponding to the next serial number after the maximum serial number until all data blocks have been transmitted, wherein the maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the starting value of the serial number; generating a target instruction and sending the target instruction to the target charging pile, wherein the target instruction is used to instruct the target charging pile to upgrade using the upgrade data.

[0006] In some embodiments of this application, multiple data blocks are transmitted to the target charging pile sequentially according to their serial numbers, including: after detecting that a wireless connection has been established between the terminal device and the target charging pile, generating an initialization command and sending the initialization command to the target charging pile, wherein the initialization command is used to instruct the target charging pile to erase the spare storage partition to receive data blocks; transmitting a first data block to the target charging pile, wherein the first data block includes any one of multiple data blocks; receiving an acknowledgment command returned by the target charging pile corresponding to the first data block, and transmitting a second data block to the target charging pile, wherein the second data block is the next data block in the serial number of the first data block, wherein the acknowledgment command is used to instruct the target charging pile that the serial number of the first data block has been recorded in the transmission status index table.

[0007] In some embodiments of this application, obtaining the maximum sequence number stored in the target charging pile in the event of a transmission interruption includes: re-establishing a connection with the target charging pile in the event of a wireless connection interruption; querying the transmission status index table of the target charging pile, wherein the transmission status index table is used to record the sequence number of the data block received by the target charging pile; and using the maximum consecutive sequence number in the transmission status index table as the maximum sequence number.

[0008] In some embodiments of this application, the terminal device includes a mobile terminal and the vehicle-mounted system of the target vehicle, wherein the target vehicle is a vehicle that has been paired with the target charging pile through a wireless communication interface.

[0009] In some embodiments of this application, the terminal device obtains upgrade data of the target charging pile, including: in response to a query instruction from the target object, the terminal device queries a first firmware package corresponding to the target charging pile from a cloud server, and if the version of the first firmware package is higher than the version of the current firmware package of the target charging pile, obtains the first firmware package as upgrade data; or, if the terminal device is in the target area, the terminal device queries a second firmware package corresponding to the target charging pile from a cloud server, and if the version of the second firmware package is higher than the version of the current firmware package of the target charging pile, obtains a differential package of the second firmware package and the current firmware package as upgrade data.

[0010] According to another aspect of the embodiments of this application, another method for upgrading a vehicle charging pile is also provided, including: the target charging pile receiving multiple data blocks transmitted by a terminal device, wherein the multiple data blocks together constitute upgrade data for firmware upgrade of the target charging pile, each data block corresponding to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive; in the event of a transmission interruption, in response to a query request from the terminal device, the maximum serial number of the received data blocks is returned, and the data blocks retransmitted by the terminal device starting from the next serial number after the maximum serial number are received, until all data blocks are transmitted, wherein the maximum serial number is the serial number corresponding to the last data block that is successfully received consecutively from the starting value of the serial number; and firmware upgrade is performed using the upgrade data corresponding to all data blocks.

[0011] In some embodiments of this application, before performing firmware upgrades using upgrade data corresponding to all data blocks, the method further includes: verifying the upgrade data to obtain a verification result, wherein the verification result is used to reflect the integrity and security of the upgrade data; if the verification result is successful, changing the startup flag from pointing to the first storage partition to pointing to the second storage partition, wherein the first storage partition is used to store the currently running firmware package, the second storage partition is used to store the upgrade data, and the startup flag is used to indicate the storage area where the firmware package will be loaded at the next startup.

[0012] In some embodiments of this application, the method further includes: starting the target firmware corresponding to the upgrade data from the second storage partition based on the start flag bit, and obtaining the execution result; if the execution result indicates that the target firmware has started successfully, updating the first storage partition using the upgrade data; if the execution result indicates that the target firmware has failed to start, changing the start flag bit from pointing to the second storage partition to pointing to the first storage partition.

[0013] According to another aspect of the embodiments of this application, an upgrade device for a vehicle charging pile is also provided, comprising: an acquisition module, configured to acquire upgrade data of a target charging pile by a terminal device, and divide the upgrade data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive; a transmission module, configured to transmit the multiple data blocks sequentially to the target charging pile according to the serial numbers; a query module, configured to acquire the maximum serial number stored in the target charging pile in the event of a transmission interruption, and retransmit from the data block corresponding to the next serial number after the maximum serial number until all data blocks have been transmitted, wherein the maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the starting value of the serial number; and a sending module, configured to generate a target instruction and send the target instruction to the target charging pile, wherein the target instruction is used to instruct the target charging pile to upgrade using the upgrade data.

[0014] According to another aspect of the embodiments of this application, another vehicle charging pile upgrade device is also provided, including: a receiving module, used for the target charging pile to receive multiple data blocks transmitted by a terminal device, wherein the multiple data blocks together constitute upgrade data for firmware upgrade of the target charging pile, each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive; a returning module, used to, in the event of a transmission interruption, respond to a query request from the terminal device, return the maximum serial number of the received data blocks, and receive data blocks retransmitted by the terminal device starting from the next serial number after the maximum serial number, until all data blocks are transmitted, wherein the maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the starting value of the serial number; and an upgrade module, used to perform firmware upgrade using the upgrade data corresponding to all data blocks.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-described upgrade method for vehicle charging piles.

[0016] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the above-described vehicle charging pile upgrade method by running the computer program.

[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described method for upgrading vehicle charging piles.

[0018] In this embodiment, a combination of block transmission and status recording is used. The terminal device divides the upgrade data into multiple data blocks with consecutive sequence numbers and sends them to the target charging pile one by one in sequence. The target charging pile records the maximum sequence number after successfully receiving each data block. If the transmission is interrupted, the terminal device reads the maximum sequence number stored locally by the charging pile to accurately locate the interruption point and resumes the transmission from the data block corresponding to the next sequence number until all data blocks have been sent. Then, an upgrade execution command is sent to the target charging pile to trigger it to update the firmware based on the complete received data. This achieves the goal of avoiding full retransmission and making efficient use of limited communication resources. This improves the reliability of firmware transmission in a network-free environment and solves the technical problem of low upgrade success rate caused by retransmission due to signal instability during the charging pile upgrade process in a network-free environment. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a hardware structure block diagram of a computer terminal for an upgrade method of a vehicle charging pile according to an embodiment of this application.

[0021] Figure 2 This is a flowchart of an upgrade method for a vehicle charging station according to an embodiment of this application;

[0022] Figure 3 This is a flowchart of another method for upgrading a vehicle charging station according to an embodiment of this application;

[0023] Figure 4 This is a system architecture diagram of an upgrade method for a vehicle charging station according to an embodiment of this application;

[0024] Figure 5 This is a schematic diagram of the overall process of an upgrade method for a vehicle charging pile according to an embodiment of this application;

[0025] Figure 6 This is a schematic diagram of the structure of an upgrade device for a vehicle charging pile according to an embodiment of this application;

[0026] Figure 7 This is a schematic diagram of the structure of an upgrade device for a vehicle charging station according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0030] Breakpoint Resumption Transfer: A technical mechanism that enables transmission to resume from the last successfully received position rather than the starting point after an interruption during data transmission. In this embodiment, the charging pile records the sequence number of the successfully received data block in non-volatile memory, allowing the terminal device to accurately locate the start point of the resume transmission after reconnection, thereby avoiding full retransmission and significantly improving transmission efficiency and success rate.

[0031] Sequence Number: A consecutive integer value used to identify the relative position of a data block in the complete data stream, ensuring that the receiving end can reassemble the data in sequence. In this embodiment, each firmware data block is assigned a unique and incrementing sequence number, which serves as the core index for the breakpoint resume mechanism, allowing the charging pile to record the receiving status and the terminal to determine the resume start point.

[0032] Dual-Bank Flash Memory: A non-volatile memory structure with two independent programmable firmware storage areas, typically used to implement "read-write separation" and version rollback during firmware updates. In the embodiments of this application, Bank 0 stores the currently running old firmware, and Bank 1 is used to receive and store the new firmware. The two serve as backups for each other, ensuring that the device can automatically switch back to the old version when the upgrade fails, thus ensuring that the basic functions of the device are not interrupted.

[0033] Transmission Status Index Table: A structured data table stored in non-volatile memory (such as EEPROM) to record the sequence number of successfully received data blocks. In this embodiment, the table is dynamically updated by the charging pile after each data block is received. It is a key status record carrier for realizing the interrupted transmission resume function, ensuring that the transmission logic is accurate and efficient after the interruption is recovered.

[0034] In-Vehicle Infotainment (IVI): An in-vehicle information terminal system installed inside a smart car, integrating navigation, entertainment, communication and vehicle control functions. In this embodiment, as an upgrade agent terminal alongside the mobile APP, it uses its built-in 4G / 5G T-Box and Bluetooth module to automatically acquire and forward firmware upgrade data to the charging pile without the user's awareness, thus expanding the upgrade scenarios and availability.

[0035] With the popularization of new energy vehicles, home AC charging stations have become essential facilities. To fix vulnerabilities, optimize performance, or add new functions, remote OTA (Over-The-Air) upgrades of charging stations are necessary. Currently, the mainstream upgrade method involves the charging station having a built-in 4G / 5G communication module that directly connects to a cloud server to download and update the firmware. However, most related technical solutions utilize mobile terminals (such as smartphones) as intermediaries for upgrades. The core process is: the mobile terminal downloads the firmware package from the server in an environment with network access (such as Wi-Fi), and then sends the firmware package to the offline charging station via wireless connection (including Bluetooth). This solves the basic upgrade problem when the charging station itself has no network, but in practical applications, the following significant pain points still exist:

[0036] (1) Poor transmission reliability and lack of effective breakpoint resumption mechanism: Bluetooth transmission is susceptible to environmental interference (such as the metal structure of underground parking garages, other wireless signals), which can lead to connection interruption. Related technologies usually adopt a simple "start from the beginning" retransmission strategy. For a firmware package of several megabytes (MB), if the transmission is interrupted in the later stage (such as 90%), the user needs to start over, which greatly wastes time and power, resulting in a low upgrade success rate and a very poor user experience.

[0037] (2) Limited upgrade scenarios and underutilization of vehicle resources: The relevant technologies mainly rely on mobile apps as the sole proxy terminal. However, the in-vehicle infotainment (IVI) system of smart cars also has Bluetooth communication capabilities and stronger network connectivity (in-vehicle T-Box). After a user parks at home, their mobile phone may not be with them, but the vehicle is always present. Existing technologies fail to utilize the in-vehicle infotainment system as an upgrade proxy, limiting the convenience and scope of upgrade scenarios.

[0038] (3) Inadequate security and rollback mechanisms: The relevant solutions provide only brief descriptions of the security verification of the firmware package and the handling of upgrade failures. In a network-free environment, the charging pile cannot obtain verification information from the server in real time. If the transmitted firmware package is tampered with or an accident occurs during the flashing process (such as a power outage), the charging pile may fail to start, requiring on-site repair by professional personnel, resulting in high maintenance costs.

[0039] To address the aforementioned technical problems, this application provides corresponding solutions, which are detailed below.

[0040] The vehicle charging pile upgrade method embodiments provided in this application can be executed on a mobile terminal, computer terminal or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing an upgrade method for vehicle charging stations is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0041] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0042] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the vehicle charging pile upgrade method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned vehicle charging pile upgrade method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0043] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.

[0044] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0045] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0046] In the above operating environment, this application provides an embodiment of a method for upgrading a vehicle charging pile. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0047] Figure 2 This is a flowchart of an upgrade method for a vehicle charging station according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0048] In step S202, the terminal device obtains the upgrade data of the target charging pile and divides the upgrade data into multiple data blocks. Each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive.

[0049] In step S202 above, the terminal device refers to an external computing device that serves as a data relay carrier for firmware upgrades of charging piles in a network-free environment, and has wireless communication capabilities, local storage capabilities, and a communication interface paired with the charging pile.

[0050] Upgrade data refers to the complete firmware image file used to update the charging pile control program. It is usually generated by a cloud server and includes program code, configuration parameters, and verification information. A data block is the smallest transmission unit after the complete upgrade data is divided into fixed-size segments. Its purpose is to reduce the impact of a single transmission failure on the overall process and improve communication fault tolerance.

[0051] The serial number is a unique, incrementing integer identifier assigned to each data block, used to mark its logical position in the original upgrade data. It should be noted that the serial number is not only used for sorting, but also serves as the core index for the breakpoint resume mechanism. For example, when the 800th data block is successfully received, the charging pile writes the serial number into its local non-volatile memory. If communication is interrupted, the terminal device can use this serial number to determine that "it only needs to continue sending from the 801st block," avoiding retransmission from the beginning.

[0052] In some embodiments of this application, the terminal device includes a mobile terminal and the vehicle-mounted system of the target vehicle, wherein the target vehicle is a vehicle that has been paired with the target charging pile through a wireless communication interface.

[0053] Specifically, (1) Mobile terminal refers to portable electronic devices carried by users, such as smartphones or tablets, which have cellular network connectivity, Bluetooth communication modules and supporting applications. Its function is to act as the first agent terminal to download firmware when the user initiates an upgrade in a network environment (such as home Wi-Fi or urban 4G / 5G coverage area), and transmit the upgrade data to the target charging pile via Bluetooth after the user parks.

[0054] (2) The vehicle system refers to the vehicle information processing unit installed inside the intelligent electric vehicle, which integrates vehicle control, navigation and communication functions. It has a built-in cellular communication module, Bluetooth interface and background service program. Its function is to take advantage of the vehicle itself always being in the charging position and having stronger network access capabilities, so that it can automatically obtain upgrade data from the cloud and actively establish a Bluetooth connection with the paired charging pile to complete firmware forwarding without the user's awareness.

[0055] In some embodiments of this application, the terminal device can obtain the upgrade data of the target charging pile in the following ways: in response to a query instruction from the target object, the terminal device queries the cloud server for a first firmware package corresponding to the target charging pile, and if the version of the first firmware package is higher than the version of the current firmware package of the target charging pile, the terminal device obtains the first firmware package as upgrade data; or, if the terminal device is in the target area, the terminal device queries the cloud server for a second firmware package corresponding to the target charging pile, and if the version of the second firmware package is higher than the version of the current firmware package of the target charging pile, the terminal device obtains the differential package between the second firmware package and the current firmware package as upgrade data.

[0056] It should be noted that cloud servers refer to centralized data service systems deployed in remote Internet environments, used to centrally store all historical firmware packages, version metadata, and security signatures of charging piles.

[0057] Specifically, as an example, when a user manually clicks the "Upgrade" button (i.e., the query command for the target object) through a smartphone application (APP), the terminal device immediately connects to the cloud server to query the latest complete firmware package version corresponding to the unique identifier of the charging pile. If this version number is higher than the current firmware version of the charging pile (e.g., upgrading from V2.0 to V2.1), the terminal device will download the entire 2.5MB firmware package as upgrade data.

[0058] As another example, when the vehicle system is parked in the garage and detects the Bluetooth signal of the charging pile, it automatically determines that it is a paired device. Then it initiates a version comparison query to the cloud to confirm that the current firmware is V2.0, while the latest version on the cloud is V2.1. The vehicle system then requests and downloads the differential package between the two, merges the differential package with the current firmware locally, restores the complete V2.1 image, and caches it as upgrade data to be transmitted.

[0059] The above embodiments achieve intelligent adaptation of upgrade data acquisition methods by constructing a dual-path firmware acquisition strategy of "actively querying complete packets" and "environment-triggered differential packets". When the user actively initiates the update, the standard complete packet is used to ensure the integrity and compatibility of the update; in passive scenarios such as automatic vehicle return, the smaller and more efficient differential update method is preferred, which significantly reduces network resource consumption and transmission latency.

[0060] Step S204: Transmit multiple data blocks to the target charging pile in sequence according to the serial number.

[0061] In step S204 above, after completing data segmentation and serial number allocation, the terminal device sends data blocks to the charging pile one by one via Bluetooth Low Energy communication protocol in ascending order starting from 1. After sending each data block, the terminal device waits for the charging pile to return an acknowledgment response. After receiving the data block, the charging pile first performs a cyclic redundancy check. If the check passes, the data block is written to the spare storage area (Bank 1), and the currently successfully received serial number is recorded in the "transmission status index table" in the internal EEPROM. Subsequently, the charging pile sends an acknowledgment signal to the terminal device via Bluetooth. Only after receiving the signal does the terminal device continue to send the data block corresponding to the next serial number.

[0062] To improve transmission throughput, terminal devices can also send data in blocks according to sequence number order. However, instead of the strict serial mode of "send-wait for confirmation-resend", a "window-type continuous sending" mechanism is adopted. That is, multiple data blocks are sent continuously at one time (such as 5 consecutively) and then paused to wait for the charging pile to return a set of successfully received sequence numbers in batches. After receiving multiple data blocks, the charging pile performs a unified verification and sends back all successfully received sequence numbers in the form of a list at once. The terminal device uses this list to determine the unconfirmed data blocks and only retransmits the missing parts.

[0063] In some embodiments of this application, multiple data blocks can be transmitted to a target charging pile in the following manner: after detecting that a wireless connection has been established between the terminal device and the target charging pile, an initialization command is generated and sent to the target charging pile, wherein the initialization command is used to instruct the target charging pile to erase the spare storage partition to receive data blocks; a first data block is transmitted to the target charging pile, wherein the first data block includes any one of multiple data blocks; an acknowledgment command corresponding to the first data block is received from the target charging pile, and a second data block is transmitted to the target charging pile, wherein the second data block is the next data block in the sequence number of the first data block, wherein the acknowledgment command is used to instruct the target charging pile that the sequence number of the first data block has been recorded in the transmission status index table.

[0064] It should be noted that the wireless connection refers to a point-to-point communication link established between the terminal device and the target charging pile via the Bluetooth communication protocol, possessing authentication and data transmission capabilities. The initialization command is a control signal sent by the terminal device after the wireless connection is established. It is used to notify the target charging pile to clear its spare storage area, making room for the upcoming upgrade data block and entering a receiving preparation state. This command triggers the charging pile's internal main control unit to perform a Flash erase operation, ensuring that the area to be written to the new firmware is free from historical data interference. The spare storage partition refers to a dedicated physical area in the charging pile's internal Flash memory used for temporarily storing the new firmware, isolated from the currently running main storage area.

[0065] The confirmation command is a response signal sent by the target charging pile to the terminal device after successfully receiving and verifying a data block. Its core content is the sequence number of the data block, which is used to inform the terminal device that "the block has been validly recorded". The transmission status index table includes a structured record table stored in the charging pile's non-volatile memory (such as EEPROM) to persistently store the sequence numbers of successfully received data blocks.

[0066] Specifically, after the terminal device detects that a Bluetooth connection has been established with the charging pile and completes identity authentication, it actively sends an initialization command. Upon receiving this command, the charging pile's main control unit immediately starts the BootLoader program, erases all contents of the backup storage area (Bank 1), and clears the transmission status index table in its EEPROM (for the first upgrade scenario). Subsequently, the terminal device starts sending data from the data block with serial number 1. After receiving the data, the charging pile performs a CRC16 check. If the data is correct, the charging pile writes the serial number into the index table at EEPROM address 0x0010 and sends an acknowledgment command containing the serial number to the terminal device. After receiving the acknowledgment, the terminal device automatically increments the serial number and sends the next data block (e.g., serial number 2), and repeats this process until all data is sent.

[0067] Step S206: In the event of a transmission interruption, obtain the maximum serial number stored in the target charging pile, and start retransmitting from the data block corresponding to the next serial number after the maximum serial number until all data blocks are transmitted. The maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively since the serial number start value.

[0068] In step S206 above, transmission interruption refers to the abnormal disconnection of the wireless communication link between the terminal device and the target charging pile due to environmental interference (such as metal shielding, electromagnetic noise, excessive distance or device movement), resulting in the inability to continue transmitting data blocks.

[0069] The maximum serial number refers to the unique, incrementing number corresponding to the last successfully received and verified data block that the target charging station persistently records in its non-volatile memory (such as EEPROM). It precisely identifies the "last successfully reached position" and is the core data anchor point for implementing the breakpoint resume mechanism. For example, if the index table records serial numbers 1, 2, 3, 5, 6, and 8, the maximum consecutive serial number is 3. Because the missing number 4 causes a continuity interruption, the system must start retransmission from 4.

[0070] In some embodiments of this application, in the event of a transmission interruption, the maximum sequence number stored in the target charging pile can be obtained by: re-establishing a connection with the target charging pile in the event of a wireless connection interruption; querying the transmission status index table of the target charging pile, wherein the transmission status index table is used to record the sequence number of the data block received by the target charging pile; and using the maximum consecutive sequence number in the transmission status index table as the maximum sequence number.

[0071] Specifically, when the terminal device detects a Bluetooth connection loss, its internal communication module automatically initiates a new round of Bluetooth scanning within a preset reconnection time (e.g., 5–15 seconds) to find the identifier of the paired target charging pile device. Once the target device is detected, the terminal device immediately initiates a secure pairing process. After completing identity authentication, it sends a "read transmission status" command to the charging pile. The charging pile's main control unit responds to this command, reads the "maximum serial number" value stored at a fixed address (e.g., 0x0010) from the EEPROM, and returns it to the terminal device as is. After receiving this value (e.g., 800), the terminal device immediately locates the next data block to be sent (serial number 801) and continues to send the remaining data blocks from that point until all transmissions are completed.

[0072] Step S208: Generate a target instruction and send the target instruction to the target charging pile, wherein the target instruction is used to instruct the target charging pile to upgrade using upgrade data.

[0073] In step S208 above, the target instruction refers to the control command actively sent by the terminal device after confirming that all upgrade data blocks have been successfully transmitted to the target charging pile. Its content includes key operation instructions such as "start upgrade", "verify", and "switch startup area", which are used to trigger the final execution process of firmware update inside the charging pile.

[0074] In some embodiments of this application, after the terminal device completes the block-by-block transmission of all data blocks and confirms that the charging pile has successfully received all blocks, it sends a "complete verification" instruction to the charging pile. This instruction is a structured command frame, which includes the firmware version number, the expected verification value (such as MD5 or CRC32), and the "activation" flag. After receiving the instruction, the charging pile main control unit immediately stops receiving new data, enters BootLoader mode, and performs integrity verification and digital signature verification on the complete firmware in the backup storage area (Bank 1). If both verifications pass, the main control unit modifies the Flash boot configuration bytes (such as Option Bytes), points the system boot address to Bank 1, and sends a "soft reset" signal. After the system restarts, the new firmware is loaded and run from Bank 1, completing the upgrade.

[0075] Through steps S202 to S208, a combination of block transmission and status recording is adopted. The terminal device divides the upgrade data into multiple data blocks with consecutive serial numbers and sends them to the target charging pile in sequence according to the serial numbers. At the same time, the target charging pile records the corresponding maximum serial number after successfully receiving each data block. After the transmission is interrupted, the terminal device reads the maximum serial number stored locally by the charging pile to accurately locate the interruption point and resumes the transmission from the data block corresponding to the next serial number until all data blocks have been sent. Then, an upgrade execution command is sent to the target charging pile to trigger it to perform a firmware update based on the complete received data. This achieves the goal of avoiding full retransmission and making efficient use of limited communication resources. This improves the technical effect of firmware transmission reliability in a network-free environment. In turn, it solves the technical problem that in a network-free environment, the relevant technologies need to be retransmitted after the transmission is interrupted due to signal instability during the charging pile upgrade process, resulting in a low upgrade success rate.

[0076] Figure 3 This is a flowchart of another method for upgrading a vehicle charging station according to an embodiment of this application, such as... Figure 3 As shown, the method includes:

[0077] In step S302, the target charging pile receives multiple data blocks transmitted by the terminal device. These multiple data blocks together constitute upgrade data for firmware upgrade of the target charging pile. Each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive.

[0078] In step S304, in the event of a transmission interruption, in response to a query request from the terminal device, the maximum sequence number of the received data block is returned, and the data block retransmitted by the terminal device starting from the next sequence number after the maximum sequence number is received is received until all data blocks are transmitted. The maximum sequence number is the sequence number corresponding to the last data block that has been successfully received consecutively from the starting value of the sequence number.

[0079] Step S306: Perform firmware upgrade using the upgrade data corresponding to all data blocks.

[0080] In some embodiments of this application, before performing firmware upgrades using upgrade data corresponding to all data blocks, the following steps may be performed: verifying the upgrade data to obtain a verification result, wherein the verification result is used to reflect the integrity and security of the upgrade data; if the verification result is successful, changing the startup flag from pointing to the first storage partition to pointing to the second storage partition, wherein the first storage partition is used to store the currently running firmware package, the second storage partition is used to store the upgrade data, and the startup flag is used to indicate the storage area where the firmware package will be loaded at the next startup.

[0081] It should be noted that the verification result refers to the binary conclusion (pass / fail) output by the target charging pile after receiving all the upgrade data and verifying the integrity and authenticity of the firmware through local calculation. In some embodiments of this application, the result is based on two core verifications: one is integrity verification (such as CRC32), which is used to confirm that no bit errors or loss occurred during data transmission; the other is digital signature verification, which verifies whether the firmware is issued by a legitimate authorized party through a preset public key to prevent tampering or malicious injection.

[0082] The boot flag is a control field stored in the charging pile's non-volatile memory (such as Flash Option Bytes). It instructs the BootLoader which physical storage area to load the firmware from when the system powers on. The first storage partition (e.g., Bank 0) is the main storage area within the charging pile used to store the currently running, verified, and stable firmware. Its contents remain unchanged during normal operation and serve as the baseline for safe system operation. The second storage partition (e.g., Bank 1) is a dedicated backup storage area within the charging pile used to receive and temporarily store upgrade data. It is isolated from the main partition during the upgrade process.

[0083] Specifically, after the terminal device completes the transmission of all data blocks and sends the "complete verification" command, the charging pile main control unit immediately enters BootLoader mode. First, it performs a CRC32 integrity check on the complete firmware in the second storage partition and compares the check value with the original check value provided by the cloud server. If they match, it calls the public key preset in the chip ROM to verify the firmware digital signature and confirm its legitimate origin. After both checks pass, the main control unit changes the boot flag from "0" (pointing to Bank 0) to "1" (pointing to Bank 1) and then performs a system soft reset. When the system restarts, the BootLoader detects that the boot flag is "1" and automatically loads the new firmware from Bank 1 and runs it.

[0084] In some embodiments of this application, the following steps may also be performed: booting the target firmware corresponding to the upgrade data from the second storage partition according to the boot flag bit, and obtaining the execution result; if the execution result indicates that the target firmware booted successfully, updating the first storage partition with the upgrade data; if the execution result indicates that the target firmware booted unsuccessfully, changing the boot flag bit from pointing to the second storage partition to pointing to the first storage partition.

[0085] It should be noted that the execution result refers to the running status feedback information actively fed back to the BootLoader by the new firmware after the target firmware successfully boots from the second storage partition. This information is used to clearly indicate whether the new version has completed initialization, established normal services, and responded to key operating indicators such as watchdog timer feeding.

[0086] Specifically, after the target firmware completes booting from the second storage partition, the new firmware performs a self-test process, including initializing the communication module, responding to the watchdog timer, illuminating the running indicator light, and monitoring Bluetooth connections. If all self-test items respond normally within a preset time (e.g., 3 seconds), the new firmware sends a "boot successful" confirmation signal to the BootLoader. Upon receiving this signal, the BootLoader erases the contents of the old firmware in the first storage partition and copies the complete new firmware image from the second storage partition byte by byte to the first storage partition, completing the master-slave synchronization. If the new firmware fails to send a "boot successful" signal during boot due to program errors, watchdog timeouts, or hardware initialization failures, the BootLoader detects this unconfirmed state upon the next power-on and automatically changes the boot flag from "pointing to the second storage partition" back to "pointing to the first storage partition," restoring the system to the original stable version.

[0087] It should be noted that, Figure 3 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 2 The corresponding solutions in the illustrated embodiments will not be described in detail here.

[0088] Figure 4 This is a system architecture diagram of a vehicle charging pile upgrade method according to an embodiment of this application, such as... Figure 4 As shown, the system includes a cloud server 402, a terminal device 404, and a charging pile 406, wherein:

[0089] (1) Cloud server 402: responsible for storing and managing different versions of charging pile firmware packages, and generating digital signatures and version information for each firmware package.

[0090] (2) Terminal device 404: This can be a smartphone or a smart car's infotainment system. It has a built-in Bluetooth module and an APP / vehicle infotainment program, which is responsible for downloading firmware from the cloud and forwarding it to the charging pile via Bluetooth.

[0091] (3) AC charging pile 406: includes main control MCU, Bluetooth communication module and dual bank flash memory. The MCU runs BootLoader and main application.

[0092] It should be noted that the main control MCU (i.e., the main controller) is used to execute the bootloader and application software; the Bluetooth communication module is used to establish a wireless data connection with an external mobile terminal; the dual-bank Flash memory includes a first storage partition and a second storage partition. The first storage partition is used to store the currently running application software, and the second storage partition is used to temporarily store the application software to be upgraded; the BootLoader (i.e., the bootloader) is executed first after the system is reset. It is used to verify the integrity of the application software in the second storage partition, and after the verification is successful, it updates the startup configuration and guides the system to start the main application from the second storage partition.

[0093] It should be noted that, Figure 4 The system shown is used to execute Figure 2 , Figure 3 The upgrade method for vehicle charging stations shown is therefore Figure 2 , Figure 3 The explanations and instructions regarding the upgrade methods for vehicle charging stations in the document also apply to... Figure 4 The system shown will not be described in detail here.

[0094] Figure 5 This is a schematic diagram of the overall process of an upgrade method for a vehicle charging station according to an embodiment of this application, as shown below. Figure 5 As shown, in some embodiments of this application, the method includes the following steps:

[0095] S502: Prepare upgrade data, including: (1) Mobile APP queries and downloads firmware package; Mobile APP triggers upgrade. (2) Vehicle system queries and downloads firmware package; Start upgrade after parking. Specifically, it includes two independent terminal agent triggers: Smartphone APP or Smart Car System (IVI). Regardless of the terminal, it actively connects to the cloud server through its own network capabilities (mobile phone via Wi-Fi, vehicle system via vehicle T-Box 4G / 5G) to query the current firmware version of the charging pile and the version information of the available upgrade package. If the version is detected to be inconsistent, the terminal downloads the complete firmware package or differential package from the cloud to the local cache.

[0096] S504: Bluetooth Scanning and Authentication. Specifically, after the firmware package is downloaded, the terminal device starts the Bluetooth Low Energy (BLE) scanning program to search for nearby target charging pile devices that are discoverable. When the pre-paired charging pile device is identified, the terminal initiates a connection request. Both parties perform two-way authentication based on the Bluetooth Secure Pairing Protocol (SMP) to ensure that the communication object is a legitimate and authorized device, preventing man-in-the-middle attacks or impersonation by unauthorized terminals.

[0097] S506: Firmware Segmentation. Specifically, the terminal device logically segments the downloaded complete firmware package into multiple independent data units according to a preset fixed size (such as 4KB or 2KB). Each unit is called a "data block". The segmentation process follows the principle of sequence to ensure that the relative position of each data block in the original firmware can be uniquely identified. Each data block is assigned an incrementing integer sequence number as its unique index in the transmission sequence.

[0098] S508: Send initialization command. Specifically, after data block segmentation is completed, the terminal device sends a structured "upgrade initialization command" to the target charging pile. This command includes key metadata such as the total size of the firmware package, version number, total number of data blocks, and checksum (e.g., MD5). Upon receiving this command, the charging pile enters BootLoader mode, clears any remaining historical data in the backup storage area (Bank1), and initializes the receive buffer and state management module. Simultaneously, once ready, the charging pile returns a "Ready" response to the terminal, confirming that subsequent data streams can be accepted.

[0099] S510: Data block transmission. Specifically, the terminal device sends data blocks to the charging pile one by one in ascending order of serial number. Each data block can also be appended with its serial number and a simple checksum (such as CRC16) before being sent. The transmission process can, for example, adopt a "send-wait for acknowledgment" mechanism, that is, after sending each data block, the terminal waits for the charging pile to receive the acknowledgment (ACK). If no ACK is received, the block is retransmitted after a preset timeout until it is successful or the maximum number of retries is reached.

[0100] S512: The charging pile receives data and generates a status index table. Specifically, after receiving each data block, the charging pile first performs a local verification of the data integrity (such as CRC16). If the verification passes, the data block is written to a specified address in the spare storage area (Bank 1), and its corresponding sequence number is written to the "transmission status index table" in non-volatile memory (such as EEPROM). This index table is stored in the form of a linear array or sequential linked list, and only records the sequence numbers that have been successfully received and verified, and requires that they be continuous without any breaks.

[0101] S514: In the event of a Bluetooth connection interruption, the mobile terminal reconnects to the charging station. Specifically, after a Bluetooth connection is abnormally interrupted due to interference with wireless communication (such as metal structure shielding or signal attenuation), the terminal device automatically initiates a reconnection mechanism within a preset time, re-initiating the Bluetooth scanning and pairing process to attempt to restore the communication link with the target charging station.

[0102] S516: Query the charging pile status index table. Specifically, after a successful reconnection, the terminal device sends a "read transmission status" command to the charging pile. The charging pile responds to the request by reading the maximum consecutive successful sequence number K (i.e., the last data block number received sequentially starting from sequence number 1) recorded in the "transmission status index table" from the EEPROM and returning this value to the terminal. Based on this value, the terminal calculates the sequence number of the next block to be sent as K+1, thereby accurately locating the breakpoint and avoiding retransmission from the beginning, achieving efficient continuation of transmission.

[0103] S518: The charging pile performs data verification. Specifically, after the terminal completes the transmission of all data blocks and sends the "verification complete" command, the charging pile's main control MCU stops receiving new data and enters the final verification stage before firmware activation. The MCU first performs an overall integrity verification (such as CRC32) on the complete firmware package stored in Bank 1 to confirm that there are no bit errors in the data; then, it uses the public key preset in the chip ROM to verify the firmware digital signature to confirm that its source is legitimate and has not been tampered with. Only when both verifications pass can the next step of the activation process be entered.

[0104] S520: Start the new firmware. Specifically, if the verification passes, the MCU modifies the boot flag in the BootLoader, switching it from pointing to Bank 0 (old firmware) to pointing to Bank 1 (new firmware), and performs a system soft reset. After the reset, the BootLoader loads the new firmware from Bank 1 into memory according to the new boot flag and jumps to execute it. After the new firmware starts, it actively sends a "boot successful" confirmation signal to the BootLoader, indicating that it has been normally initialized and has service capabilities. Subsequently, the BootLoader completely copies the new firmware from Bank 1 to Bank 0, achieving master-slave synchronization and providing the latest stable benchmark for subsequent upgrades.

[0105] S522: If starting the new firmware fails, the old firmware will be started. Specifically, if the new firmware fails to send a "startup successful" signal due to program errors, hardware incompatibility, or watchdog timeout, or if it is abnormally reset during operation, the BootLoader will detect the failure flag (such as no acknowledgment received, startup timeout, or excessive number of abnormal resets) on the next power-on and will automatically reset the startup flag to Bank 0, forcing the system to start from the original stable firmware. This mechanism enables system self-healing without user intervention, completely preventing the device from becoming "bricked" and ensuring that the charging pile always has basic charging functions.

[0106] To facilitate understanding of the above-mentioned vehicle charging station upgrade process, the following explanation will be provided in conjunction with some specific embodiments.

[0107] Specific Implementation Example 1: The specific process of a user using a smartphone as a proxy terminal to perform a firmware upgrade on a home AC charging station in a home garage environment (no Wi-Fi coverage, and the charging station has no 4G module):

[0108] (1) The hardware environment configuration is as follows:

[0109] Cloud server: Deployed on Alibaba Cloud, storing firmware package V2.1.0.bin, which is 2.5MB in size.

[0110] Mobile terminal: User's smartphone (Android 12), with built-in Bluetooth 5.0 module and APP version 3.0.

[0111] Charging station: Built-in STM32F4 series MCU, Bluetooth 4.2 module, on-chip Flash adopts dual-bank structure (Bank0: 0x08000000, Bank1: 0x08040000), each 512KB, and equipped with 4KB on-chip EEPROM for storing status index.

[0112] (2) The software and data interaction process is as follows:

[0113] Firmware pre-download: When a user connects to the cloud via Wi-Fi at home, the app detects that the charging station has a new firmware V2.1.0 and downloads it to the local cache on the phone.

[0114] Connection and negotiation: When the user drives to the garage and opens the APP, the APP scans and discovers the device AC_Charger_001 via Bluetooth and initiates pairing. After both parties complete SMP (Security Management Protocol) pairing, the APP sends an upgrade command package containing the firmware MD5 value and a total size of 2.5MB.

[0115] Index table initialization: After receiving the instruction, the charging pile MCU enters BootLoader mode, erases the Bank1 area, and reads the "Transmission Status Index Table" at address 0x0010 in the EEPROM. Since this is the first upgrade, the index table is empty, and the maximum consecutive sequence number K=0.

[0116] Chunked transmission and interruption: The APP started sending data from block #1 (2KB per block). When transmitting the 800th block (approximately 1.56MB, progress 62%), the Bluetooth signal signal-to-noise ratio (SNR) dropped sharply due to reflection from the metal shelves in the garage, and the connection timed out and was disconnected.

[0117] Resume interrupted transmission: When the user's mobile phone receives a Bluetooth disconnection notification, the APP will automatically attempt to reconnect after 10 seconds. After the connection is established, the APP first sends a "read status" command. The charging pile reads the maximum success sequence number K=800 from the EEPROM and returns it to the APP. The APP then adjusts the sending pointer and continues to send from the 801st block.

[0118] Verification and Activation: After the transmission is complete, the MCU performs a CRC32 check on Bank1, and the result matches the MD5 provided by the cloud. The MCU then modifies the startup flag (located in Flash Option Bytes) to 0x01 (pointing to Bank1) and triggers a system reset.

[0119] Feedback: The system starts the new firmware from Bank1. After the new firmware runs, the green indicator light turns on and sends a "upgrade successful" message to the APP via Bluetooth.

[0120] Specific Implementation Example 2: Using the intelligent vehicle infotainment system as an agent, the charging pile upgrade process is completed without the user's awareness. When the user's parking space has no 4G signal, the user drives the electric vehicle out and parks the vehicle in another location with a signal. The infotainment system then connects to the cloud through the vehicle's 4G T-Box.

[0121] (1) The execution steps are as follows:

[0122] Obtaining the differential upgrade package: The vehicle's infotainment system queries the cloud via the T-Box and finds a differential package delta_V2.0_to_V2.1.patch (only 300KB in size) between the current version V2.0 and the latest version V2.1 of the charging pile. The vehicle's infotainment system downloads this differential package.

[0123] Automatic detection: The vehicle system's backend service detects that the vehicle has been parked in a parking space (triggered by GPS positioning or NFC beacon) and scans for the Bluetooth signal of the paired charging station.

[0124] Bluetooth pass-through: The vehicle's Bluetooth module establishes a GATT long connection with the charging pile, and the vehicle forwards the differential packet data stream to the charging pile.

[0125] Local synthesis and rollback: After receiving the differential packet, the charging pile synthesizes a complete V2.1 image based on the old firmware V2.0 in Bank0 inside the MCU and writes it into Bank1.

[0126] (2) Fault simulation: During the writing process, the charging pile was momentarily powered off due to power grid fluctuations.

[0127] Recovery mechanism: After power is restored, the charging pile performs a power-on self-test. The BootLoader detects that the previous write was incomplete (flag bit abnormal) and the new firmware verification failed. The BootLoader automatically clears the dirty data in Bank1 and switches the startup pointer back to Bank0. The charging pile starts normally with the old version V2.0 and continues to provide charging services. At the same time, the vehicle screen will display "Upgrade failed, please try again" without causing the device to malfunction.

[0128] This embodiment leverages the network advantages and automation capabilities of the vehicle's infotainment system to achieve "seamless upgrades." Meanwhile, the dual-bank rollback mechanism ensures that even if unforeseen circumstances (power outages) occur during the upgrade process, the equipment can self-repair, guaranteeing the stability of the infrastructure.

[0129] This application's embodiments introduce an index-based breakpoint resume mechanism, enabling transmission to resume from the point of interruption even in harsh wireless environments after connection restoration, avoiding repetitive work. Furthermore, it supports dual-terminal proxy upgrades via mobile app and intelligent vehicle infotainment system (IVI), allowing users to automatically complete the upgrade task after parking without needing to actively use their phones, achieving "seamless upgrades." In addition, it employs a combined strategy of "digital signature verification + dual-bank storage + automatic rollback." The firmware package is encrypted and signed before transmission, and the charging pile performs local verification before flashing, ensuring the firmware's source is trustworthy and tamper-proof. The dual-bank design guarantees that even if the new firmware flashing fails, the system can automatically revert to the old version and operate normally, completely eliminating the risk of "bricking" the system and reducing maintenance costs.

[0130] Figure 6This is a structural diagram of an upgrade device for a vehicle charging station according to an embodiment of this application, as shown below. Figure 6 As shown, the device includes:

[0131] The acquisition module 602 is used for the terminal device to acquire the upgrade data of the target charging pile and divide the upgrade data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive.

[0132] The transmission module 604 is used to transmit multiple data blocks sequentially to the target charging pile according to the serial number;

[0133] The query module 606 is used to obtain the maximum serial number stored in the target charging pile in the event of a transmission interruption, and to retransmit from the data block corresponding to the next serial number after the maximum serial number until all data blocks are transmitted. The maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the starting value of the serial number.

[0134] The sending module 608 is used to generate a target instruction and send the target instruction to the target charging pile. The target instruction is used to instruct the target charging pile to upgrade using upgrade data.

[0135] It should be noted that, Figure 6 The upgrade device for the vehicle charging station shown is used to perform... Figure 2 The upgrade method for vehicle charging stations shown is therefore Figure 2 The explanations and instructions regarding the upgrade methods for vehicle charging stations in the document also apply to... Figure 6 The upgrade device for the vehicle charging station shown will not be described in detail here.

[0136] Figure 7 This is a structural diagram of an upgrade device for a vehicle charging station according to an embodiment of this application, such as... Figure 7 As shown, the device includes:

[0137] The receiving module 702 is used to receive multiple data blocks transmitted by the target charging pile terminal device. The multiple data blocks together form upgrade data for firmware upgrade of the target charging pile. Each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive.

[0138] The return module 704 is used to respond to a query request from the terminal device in the event of a transmission interruption, return the maximum sequence number of the received data block, and receive the data block retransmitted by the terminal device starting from the next sequence number after the maximum sequence number, until all data blocks are transmitted. The maximum sequence number is the sequence number corresponding to the last data block that has been successfully received consecutively from the starting value of the sequence number.

[0139] Upgrade module 706 is used to perform firmware upgrades using upgrade data corresponding to all data blocks.

[0140] It should be noted that, Figure 7 Another vehicle charging station upgrade device shown is used to perform... Figure 3 The upgrade method for vehicle charging stations shown is therefore Figure 3 The explanations and instructions regarding the upgrade methods for vehicle charging stations in the document also apply to... Figure 7 The upgrade equipment for vehicle charging stations will not be described in detail here.

[0141] This application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of the vehicle charging pile upgrade method in various embodiments of this application.

[0142] This application also provides a non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the steps of the vehicle charging pile upgrade method in various embodiments of this application by running the computer program.

[0143] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the vehicle charging pile upgrade method in various embodiments of this application.

[0144] This application also provides a computer program that, when executed by a processor, implements the steps of the vehicle charging pile upgrade method in various embodiments of this application.

[0145] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0146] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0148] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0149] Furthermore, the functional units in the various embodiments of this application 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0150] 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 computer-readable storage medium. Based on this understanding, the technical solution of this application, 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0151] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for upgrading a vehicle charging station, characterized in that, include: The terminal device acquires the upgrade data of the target charging pile and divides the upgrade data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive. The plurality of data blocks are transmitted to the target charging pile in sequence according to the serial number; In the event of a transmission interruption, the maximum serial number stored in the target charging pile is obtained, and the transmission is resumed from the data block corresponding to the next serial number after the maximum serial number until all data blocks are transmitted. The maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the serial number start value. A target instruction is generated and sent to the target charging pile, wherein the target instruction is used to instruct the target charging pile to upgrade using the upgrade data.

2. The method according to claim 1, characterized in that, The plurality of data blocks are transmitted sequentially to the target charging pile according to the serial number, including: After detecting that the terminal device has established a wireless connection with the target charging pile, an initialization command is generated and sent to the target charging pile. The initialization command is used to instruct the target charging pile to erase the spare storage partition in order to receive the data block. The first data block is transmitted to the target charging pile, wherein the first data block includes any one of the plurality of data blocks; The system receives a confirmation instruction from the target charging pile corresponding to the first data block and transmits the second data block to the target charging pile. The second data block is the next data block in the sequence number of the first data block. The confirmation instruction is used to indicate that the target charging pile has recorded the sequence number of the first data block in the transmission status index table.

3. The method according to claim 2, characterized in that, In the event of a transmission interruption, the maximum serial number stored in the target charging pile is obtained, including: In the event of a wireless connection interruption, a new connection is established with the target charging station. Query the transmission status index table of the target charging pile, wherein the transmission status index table is used to record the sequence number of the data block received by the target charging pile; The maximum consecutive sequence number in the transmission status index table is used as the maximum sequence number.

4. The method according to claim 1, characterized in that, The terminal device includes a mobile terminal and the vehicle-mounted system of the target vehicle, wherein the target vehicle is a vehicle that has been paired with the target charging pile through a wireless communication interface.

5. The method according to claim 4, characterized in that, The terminal device acquires upgrade data for the target charging station, including: In response to a query command for a target object, the terminal device queries a cloud server for a first firmware package corresponding to the target charging pile. If the version of the first firmware package is higher than the current firmware package version of the target charging pile, the first firmware package is obtained as the upgrade data; or, When the terminal device is in the target area, the terminal device queries the cloud server for the second firmware package corresponding to the target charging pile, and when the version of the second firmware package is higher than the version of the current firmware package of the target charging pile, it obtains the differential package of the second firmware package and the current firmware package as the upgrade data.

6. A method for upgrading a vehicle charging station, characterized in that, include: The target charging pile receives multiple data blocks transmitted by the terminal device, wherein the multiple data blocks together constitute upgrade data for firmware upgrade of the target charging pile, each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive. In the event of a transmission interruption, in response to a query request from the terminal device, the maximum sequence number of the received data blocks is returned, and the terminal device is received to retransmit data blocks starting from the next sequence number after the maximum sequence number, until all data blocks are transmitted. The maximum sequence number is the sequence number corresponding to the last data block that has been successfully received consecutively from the sequence number start value. Firmware upgrades are performed using the upgrade data corresponding to all the data blocks.

7. The method according to claim 6, characterized in that, Before performing a firmware upgrade using the upgrade data corresponding to all the data blocks, the method further includes: The upgrade data is verified to obtain a verification result, wherein the verification result is used to reflect the integrity and security of the upgrade data; If the verification result is successful, the startup flag is changed from pointing to the first storage partition to pointing to the second storage partition. The first storage partition is used to store the currently running firmware package, the second storage partition is used to store the upgrade data, and the startup flag is used to indicate the storage area where the firmware package will be loaded on the next startup.

8. The method according to claim 7, characterized in that, The method further includes: Based on the boot flag, the target firmware corresponding to the upgrade data is booted from the second storage partition to obtain the execution result; If the execution result indicates that the target firmware has booted successfully, the first storage partition is updated using the upgrade data; If the execution result indicates that the target firmware has failed to boot, the boot flag is changed from pointing to the second storage partition to pointing to the first storage partition.

9. An upgrade device for a vehicle charging station, characterized in that, include: The acquisition module is used by the terminal device to acquire the upgrade data of the target charging pile and divide the upgrade data into multiple data blocks, wherein each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive. The transmission module is used to transmit the plurality of data blocks sequentially to the target charging pile according to the sequence number; The query module is used to obtain the maximum serial number stored in the target charging pile in the event of a transmission interruption, and to retransmit from the data block corresponding to the next serial number of the maximum serial number until all data blocks are transmitted. The maximum serial number is the serial number corresponding to the last data block that has been successfully received consecutively from the serial number starting value. A sending module is used to generate a target instruction and send the target instruction to the target charging pile, wherein the target instruction is used to instruct the target charging pile to upgrade using the upgrade data.

10. An upgrade device for a vehicle charging station, characterized in that, include: A receiving module is used to receive multiple data blocks transmitted by the target charging pile terminal device. The multiple data blocks together constitute upgrade data for firmware upgrade of the target charging pile. Each data block corresponds to a serial number, and the serial numbers corresponding to the multiple data blocks are numerically consecutive. The return module is used to respond to the query request of the terminal device in the event of a transmission interruption, return the maximum sequence number of the received data block, and receive the data block retransmitted by the terminal device starting from the next sequence number after the maximum sequence number, until all data blocks are transmitted. The maximum sequence number is the sequence number corresponding to the last data block that has been successfully received consecutively from the sequence number start value. The upgrade module is used to perform firmware upgrades using the upgrade data corresponding to all the data blocks.