Program flashing method and device for charging pile

By obtaining the flag information and communication link status of the charging pile controller, combined with the step-by-step flashing and fault reporting mechanism, the low efficiency and accuracy problems of the traditional charging pile program flashing method are solved, and the efficiency, reliability and security of the charging pile software update are achieved.

CN120780323APending Publication Date: 2025-10-14ZHONGDE CENTURY (TIANJIN) NEW ENERGY TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510920137.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

Traditional charging pile program flashing methods rely on manual configuration, which is cumbersome and inefficient. Existing automated methods have limitations and cannot efficiently identify and update charging pile controller software.

Method used

By obtaining the controller flag information and combining it with the communication link status, the flash execution conditions are determined, the flash operation is performed step by step, and the flash result information is generated, including fault reporting and rollback mechanisms, to ensure the accuracy and reliability of the flash process.

Benefits of technology

It achieves high efficiency, accuracy and reliability in charging pile program updates, avoids flashing failures caused by environmental interference and hardware failures, and improves the convenience and safety of software maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780323A_ABST
    Figure CN120780323A_ABST
Patent Text Reader

Abstract

The invention provides a program flashing method and equipment for a charging pile, relates to the technical field of intelligent management and software updating of charging equipment, and aims to solve the technical problems of low flashing efficiency and easiness in mistaken flashing due to the fact that an upgrading program cannot be automatically searched in controller upgrading in related technologies. The method comprises the steps of obtaining controller flag bit information, and determining a target controller of a to-be-flashed program and the to-be-flashed program corresponding to the target controller according to the controller flag bit information; acquiring communication link state information, and determining a flashing execution condition according to the target controller, the communication link state information and the program to be flashed; and according to the flashing execution condition and the controller flag bit information, performing step-by-step flashing operation on the to-be-flashed program, and generating flashing result information.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent management and software updating of charging equipment, and in particular to a program flashing method and device for charging piles. BACKGROUND

[0002] With the rapid development of new energy technology and Internet of Things technology, as an important supporting facility for new energy vehicles, charging piles have increasing complexity and intelligence. During the development, production and after-sales of charging piles, controller software updating has become an important requirement. However, the traditional flashing method relies on a background debugging mode debugger or manually configures the download rate and selects the corresponding controller through a host computer, which is tedious and inefficient. In order to improve the flashing efficiency, various solutions have been proposed in the prior art, such as batch flashing based on hardware serial number identification or relay blind flashing, but these methods still have certain limitations.

[0003] Therefore, there is an urgent need for a flashing method that can automatically identify programs to meet the demand for efficient software updating in the field of charging piles. SUMMARY

[0004] To solve the above technical problems, the present application provides a program flashing method and device for charging piles to solve the technical problems of low flashing efficiency and easy to flash errors in controller upgrading in the related art.

[0005] To achieve the above technical purposes, the present application provides the following technical solutions: In a first aspect, the present specification provides a program flashing method for charging piles, comprising: obtaining controller flag bit information and determining the target controller and the target controller corresponding to the to-be-flashed program according to the controller flag bit information; obtaining communication link state information and determining the flashing execution condition according to the target controller, the communication link state information and the to-be-flashed program; performing step-by-step flashing operation on the to-be-flashed program according to the flashing execution condition and the controller flag bit information, and generating flashing result information.

[0006] Through this solution, the target controller and its corresponding to-be-flashed program are accurately identified by reading the controller flag bit information, and the accuracy and reliability of the flashing process are ensured by combining the communication link state information and the flashing execution condition. In the flashing process, if an abnormal situation occurs, a new flashing strategy can be generated according to the flashing result information and the flashing operation is re-executed. This process ensures that the charging pile can efficiently complete program updating, while avoiding flashing failure caused by environmental interference or hardware failure, and improves the convenience and safety of software maintenance of the charging pile.

[0007] In an implementation, according to the controller flag bit information, the target controller and the corresponding program to be flashed are determined, including: The controller flag bit information is analyzed to extract the hardware identification code and the software version number of the target controller; According to the hardware identification code and the software version number, the corresponding program in the preset program file library is matched; The corresponding program is determined as the program to be flashed, and the association between the program to be flashed and the target controller is recorded; According to the association, a flashing task list is generated.

[0008] Through the scheme, the hardware identification code and the software version number of the target controller are extracted by analyzing the controller flag bit information, which are used as the key basis for matching the program file. On this basis, the program to be flashed corresponding to the target controller is quickly located by using the preset program file library, and it is marked as the core object of the flashing task. By generating the flashing task list, the order and target of each flashing step are clear, which provides a clear guidance path for subsequent flashing operation, and significantly improves the automation degree and accuracy of the flashing process.

[0009] In an implementation, the flashing execution condition includes communication rate, signal strength and target controller state, and the flashing execution condition is determined according to the target controller, the communication link state information and the program to be flashed, including: According to the communication link state information, the communication rate and signal strength of the serial communication protocol CAN bus are detected; According to the target controller state, it is judged whether the target controller is in a flashable mode; If the communication rate and the signal strength meet the preset threshold and the target controller is in the flashable mode, a flashing start instruction is generated; The flashing start instruction is included in the flashing execution condition.

[0010] Through the scheme, the communication rate and signal strength of the CAN bus are obtained by detecting the communication link state information, and whether the target controller has the flashing condition is judged by combining the state information of the target controller. When the communication rate and the signal strength reach the preset threshold, and the target controller enters the flashable mode, the flashing start instruction is generated to ensure that the flashing operation can be executed under the best condition. This process verifies the condition in multiple dimensions, effectively reduces the risk of flashing failure, and improves the stability and reliability of the flashing process.

[0011] In an implementation, according to the flashing execution condition and the controller flag bit information, the program to be flashed is subjected to step-by-step flashing operation, and flashing result information is generated, including: According to the flashing execution condition, the flashing tool is initialized and the program to be flashed is loaded; based on the preset flashing procedure, sequentially performing a pre-programming stage, a main programming stage and a post-programming stage; after the end of each stage, reading feedback information of the target controller; based on the feedback information, determining flashing result information.

[0012] Through the scheme, the flashing tool is initialized and the flashing operation is gradually performed according to the preset procedure through the guidance of the flashing execution condition. After the completion of each stage, the feedback information of the target controller is read to confirm the execution state of the current stage. If a stage fails, the flashing parameters are adjusted according to the feedback information and reattempted until the maximum number of retries is reached. Through this mechanism, it is ensured that the flashing process can find the optimal solution in multiple attempts, significantly improving the success rate and stability of flashing.

[0013] In an embodiment, after the step-by-step flashing operation on the to-be-flashed program according to the flashing execution condition and the controller flag bit information and the generation of the flashing result information, the method further comprises: judging whether the software version number of the target controller is successfully updated according to the flashing result information; if the update is successful, marking the target controller as a completed flashing state; if the update fails, recording the failure reason and generating a fault report for prompting a technician to troubleshoot.

[0014] Through the scheme, after the completion of the flashing operation, the software version number of the target controller is read to verify whether the flashing is successful. If the version number is successfully updated, the target controller is marked as a completed state; if the update fails, the failure reason is recorded in detail and a fault report is generated to provide a clear troubleshooting direction for the technician. This process ensures the accuracy and transparency of the flashing result through a closed-loop verification mechanism, and provides a reliable basis for subsequent fault handling.

[0015] In an embodiment, before the step-by-step flashing operation on the to-be-flashed program according to the flashing execution condition and the controller flag bit information and the generation of the flashing result information, the method further comprises: judging whether the target controller has been flashed with the same version of the program according to the controller flag bit information; if the same version has been flashed, skipping the target controller and recording the skipping reason; recording the skipping reason and the flashing operation to the flashing log.

[0016] In an embodiment, after the step-by-step flashing operation on the to-be-flashed program according to the flashing execution condition and the controller flag bit information and the generation of the flashing result information, the method further comprises: Obtaining the running state information of the target controller, judging whether the program after the flashing is normally running or not; If the program is not normally running, recording the abnormal information and generating a rollback instruction; According to the rollback instruction, restoring the target controller to the program version before the flashing; Recording the rollback result information into the flashing log.

[0017] Through the scheme, by comparing the controller flag bit information, it is judged whether the target controller has been flashed with the same version of the program. If it has been flashed, the target controller is directly skipped to avoid resource waste caused by repeated flashing. If it has not been flashed, the flashing operation is normally performed. Through this mechanism, the flashing process is optimized, unnecessary operation steps are reduced, and the flashing efficiency and resource utilization are further improved.

[0018] In an embodiment, after the step-by-step flashing operation of the to-be-flashed program is performed according to the flashing execution condition and the controller flag bit information, and the flashing result information is generated, the method further comprises: According to the flashing result information, the success rate and the failure rate of the flashing are counted; According to the success rate and the failure rate of the flashing, a flashing quality evaluation report is generated.

[0019] Through the scheme, after the flashing is completed, the running state information of the target controller is obtained to verify whether the program after the flashing is normally running. If it is found that the program is not normally running, a rollback instruction is generated to restore the target controller to the program version before the flashing, so as to ensure the normal operation of the device. This process effectively deals with the situation of flashing failure or program abnormality through the rollback mechanism, and guarantees the stability and reliability of the charging pile.

[0020] In an embodiment, matching the corresponding program in the preset program file library comprises: According to the hardware identification code of the target controller, searching for the program file corresponding to the hardware identification code in the program file library; According to the software version number of the target controller, screening the program file higher than the current version number; The screened program file is marked as a to-be-flashed program. Through the scheme, the success rate and the failure rate of the flashing are calculated through the statistics of the flashing result information, and a flashing quality evaluation report is generated. This report provides comprehensive data support for the management personnel, which is convenient for subsequent optimization and improvement of the flashing process. Through this mechanism, closed-loop management of the flashing process is realized, and the overall quality and efficiency of the flashing work are further improved.

[0021] In a second aspect, the embodiments of the present specification provide a program flashing device for a charging pile, comprising: The first determining module is configured to acquire controller flag information, and determine a target controller to be programmed and a target program corresponding to the target controller according to the controller flag information. The second determining module is configured to acquire communication link state information, and determine a programming execution condition according to the target controller, the communication link state information and the target program. The processing module is configured to perform step-by-step programming operation on the target program according to the programming execution condition and the controller flag information, and generate programming result information.

[0022] In an embodiment, the first determining module is specifically configured to: analyze the controller flag information, and extract a hardware identification code and a software version number of the target controller; match a corresponding program in a preset program file library according to the hardware identification code and the software version number; determine the corresponding program as the target program, and record an association between the target program and the target controller; generate a programming task list according to the association.

[0023] In an embodiment, the programming execution condition includes a communication rate, a signal strength and a target controller state, and the second determining module is specifically configured to: detect the communication rate and the signal strength of a serial communication protocol CAN bus according to the communication link state information; determine whether the target controller is in a programmable mode according to the target controller state; if the communication rate and the signal strength meet a preset threshold value and the target controller is in the programmable mode, generate a programming start instruction; include the programming start instruction in the programming execution condition.

[0024] In an embodiment, the processing module is specifically configured to: initialize a programming tool and load the target program according to the programming execution condition; perform a pre-programming stage, a main programming stage and a post-programming stage in sequence based on a preset programming flow; read feedback information of the target controller after each stage ends; determine the programming result information based on the feedback information.

[0025] In an embodiment, the processing module is specifically configured to: determine whether the software version number of the target controller is successfully updated according to the programming result information; if the software version number is successfully updated, mark the target controller as a completed programming state; If the updating fails, the failure reason is recorded and a failure report is generated to prompt a technician to troubleshoot.

[0026] In an implementation, the processing module is specifically further configured to: According to the controller flag bit information, it is judged whether the target controller has been flashed with the same version of program; If the same version has been flashed, the target controller is skipped and the skipping reason is recorded; The skipping reason and the flashing operation are recorded in the flashing log.

[0027] In an implementation, the processing module is specifically further configured to: The running state information of the target controller is acquired to judge whether the flashed program runs normally; If the program runs abnormally, the abnormal information is recorded and a rollback instruction is generated; According to the rollback instruction, the target controller is restored to the program version before flashing; The rollback result information is recorded in the flashing log.

[0028] In an implementation, the processing module is specifically further configured to: According to the flashing result information, the flashing success rate and the failure rate are counted; According to the flashing success rate and the failure rate, a flashing quality evaluation report is generated.

[0029] In an implementation, the first determining module is specifically configured to: According to the hardware identification code of the target controller, the program file corresponding to the hardware identification code is searched in the program file library; According to the software version number of the target controller, the program file higher than the current version number is screened; The screened program file is marked as a program to be flashed.

[0030] In a third aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to implement the program flashing method for the charging pile according to the second aspect or any one of the corresponding embodiments thereof.

[0031] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is run by a processor to implement the program flashing method for the charging pile according to any one of the above aspects.

[0032] In a fifth aspect, an embodiment of the present specification provides a computer program product or computer program, the computer program product comprising a computer program stored in a computer readable storage medium; the processor of the computer device reads the computer program from the computer readable storage medium, and the processor executes the computer program to implement the program flashing method for the charging pile according to any one of the above.

[0033] From the above technical solution, it can be seen that the present application provides a program flashing method and device for a charging pile, the method comprising: obtaining controller flag bit information, and determining a target controller to be flashed and a target controller corresponding to a program to be flashed according to the controller flag bit information; obtaining communication link state information, and determining a flashing execution condition according to the target controller, the communication link state information and the program to be flashed; and performing a step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag bit information, and generating flashing result information. By reading the controller flag bit information, the target controller and the corresponding program to be flashed are accurately identified, and the communication link state information and the flashing execution condition are combined to ensure the accuracy and reliability of the flashing process. In the flashing process, if an abnormal situation occurs, a new flashing strategy can be generated according to the flashing result information and the flashing operation is re-executed. This process ensures that the charging pile can efficiently complete program updating, avoids flashing failure caused by environmental interference or hardware failure, and improves the convenience and safety of software maintenance of the charging pile. BRIEF DESCRIPTION OF DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.

[0035] Figure 1 A flowchart of a program flashing method for a charging pile is provided for the embodiments of the present specification; Figure 2 A structural diagram of a program flashing device for a charging pile is provided for the embodiments of the present specification; Figure 3 A structural diagram of an electronic device is provided for the embodiments of the present specification. DETAILED DESCRIPTION

[0036] Unless otherwise defined, technical terms or scientific terms used in the embodiments of the present specification shall have the same meaning as those understood by a person skilled in the art to which the embodiments of the present specification belong. The technical terms or scientific terms used in the embodiments of the present specification are not intended to have special meanings unless otherwise defined. The terms "first", "second", and the like used in the embodiments of the present specification are not intended to denote any order, quantity, or importance, but are used to avoid confusion among components.

[0037] Unless the context requires otherwise, throughout the specification, "plurality" means "at least two", "include" is interpreted to mean "include, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to mean that a specific feature, structure, material or characteristic related to the embodiment or example is included in at least one embodiment or example of the specification. The illustrative representation of the above terms does not necessarily mean the same embodiment or example.

[0038] The technical solutions in the embodiments of the present specification will be described clearly and completely in combination with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, not all. Based on the embodiments in the present specification, all other embodiments obtained by a person skilled in the art without creative labor are within the scope of protection of the present specification.

[0039] As in the background art, with the rapid development of new energy technology and Internet of Things technology, as an important supporting facility for new energy vehicles, the functionality and intelligence of charging piles are constantly improving. In the development, production and after-sales stage of charging piles, controller software updating becomes an important requirement. However, the traditional writing method relies on background debugging mode debugger or manually configures the download rate and selects the corresponding controller through the host computer, which is tedious and inefficient. In order to improve the writing efficiency, the prior art proposes a variety of solutions, such as batch writing based on hardware serial number identification or relay blind writing method, but these methods still have certain limitations.

[0040] Therefore, there is an urgent need for a writing method that can automatically identify programs to meet the demand for efficient software updating in the field of charging piles.

[0041] Based on the above inventive concept, the program writing method for charging piles provided by the embodiments of the present specification will be described exemplarily.

[0042] The embodiments of the present specification provide a program writing method for charging piles, as shown in Figure 1 , comprising: S101, obtain controller flag bit information, and determine the target controller to be flashed and the target controller corresponding to-be-flashed program according to the controller flag bit information.

[0043] In specific implementation, in the process of obtaining the controller flag bit information, the system determines the target controller and the corresponding to-be-flashed program by reading the hardware identification code and software version number of each ECU in the charging pile. Specifically, the master control unit of the charging pile sends a request signal to each ECU through the CAN bus, receives and analyzes the returned controller flag bit information. These flag bit information contains the hardware identification code and the current running software version number of the target controller, and the master control unit compares these information with the preset program file library to match the program file to be flashed. For example, when detecting that the hardware identification code of an ECU is "HW-001" and the software version number is "V1.0", the system will find the latest version program file (such as "V2.0") corresponding to "HW-001" in the program file library, and mark this file as to-be-flashed program. At the same time, the system generates a flashing task list to clearly record each target controller 2 and its corresponding to-be-flashed program, ensuring that the subsequent operation has a basis.

[0044] S102, obtain communication link state information, and determine the flashing execution condition according to the target controller, the communication link state information and the to-be-flashed program.

[0045] In specific implementation, the system determines the flashing execution condition according to the information of the target controller and the communication link state information. The communication link state information includes the communication rate and signal strength of the CAN bus, and the master control unit judges whether the current communication environment meets the flashing requirements by real-time monitoring of these parameters. For example, when detecting that the communication rate of the CAN bus reaches 500kbps and the signal strength is higher than -60dBm, the system considers that the communication link state is good. In addition, the master control unit also checks the state information of the target controller to confirm whether it is in the flashable mode. If the target controller has entered the flashable mode, a flashing start instruction is generated and included in the flashing execution condition. This process ensures that the flashing operation is started only under the best conditions, avoiding flashing failure caused by unstable communication or abnormal state of the target controller.

[0046] S103, according to the flashing execution condition and the controller flag bit information, step-by-step flashing operation is performed on the to-be-flashed program, and flashing result information is generated.

[0047] In implementation, after determining the flashing execution conditions, the system initializes the flashing tool and loads the program to be flashed, and executes the pre-programming stage, main programming stage and post-programming stage in sequence according to the preset flashing process. In the pre-programming stage, the flashing tool sends an initialization instruction to the target controller to ensure that it is ready to accept new program data; in the main programming stage, the flashing tool transmits the data of the program to be flashed to the target controller in blocks and checks the data integrity block by block; in the post-programming stage, the flashing tool verifies whether the entire program is correctly written into the memory of the target controller. After each stage is completed, the system reads the feedback information of the target controller to determine whether the current stage is successful. If a stage fails, the system adjusts the flashing parameters according to the feedback information and reattempts to execute the stage, with a maximum of three retries. This mechanism significantly improves the stability and success rate of the flashing process.

[0048] After the flashing operation is completed, the system verifies whether the software version number of the target controller is successfully updated according to the flashing result information. Specifically, the host unit reads the software version number of the target controller again and compares it with the target version number of the program to be flashed. If the version numbers are consistent, the target controller is marked as having completed the flashing state; if they are not consistent, the system records the failure reason and generates a fault report to prompt the technical personnel to troubleshoot. In addition, the system also obtains the running state information of the target controller to determine whether the program after flashing is running normally. If it is found that the program is running abnormally, the system generates a rollback instruction to restore the target controller to the program version before flashing, to ensure the normal operation of the charging pile.

[0049] During the entire flashing process, the system also determines whether the target controller has been flashed with the same version of the program through the controller flag bit information. If the same version has been flashed, the system skips the target controller and records the skipping reason; if the same version has not been flashed, the flashing operation is normally executed. This optimization measure reduces unnecessary repeated flashing steps, further improving the flashing efficiency and resource utilization.

[0050] Finally, the system calculates the flashing success rate and failure rate according to the flashing result information and generates a flashing quality evaluation report. The flashing quality evaluation report not only contains the specific data of the flashing success rate and failure rate, but also lists the detailed log information of each flashing, including the skipping reason, failure reason, rollback operation, etc. These data are sent to the management system for the management personnel to analyze and optimize the flashing process. Through this closed-loop management mechanism, the system realizes comprehensive monitoring and continuous improvement of the flashing work.

[0051] In the above embodiments, the controller flag information is taken as the core input throughout the entire flashing process, providing a key basis for the identification of the target controller and the matching of the to-be-flashed program; the communication link state information and the flashing execution condition jointly constitute the basic guarantee of the flashing operation, ensuring that the flashing process is carried out in the best environment; the flashing tool realizes the precise writing of program data through step-by-step flashing operation; the flashing result information, fault report, rollback instruction and flashing quality evaluation report constitute the verification and feedback link of the flashing result, forming a complete closed-loop management system. Each link closely cooperates to ensure the efficiency, accuracy and reliability of the charging pile program flashing.

[0052] In one example, for example in the workshop of a certain charging pile production enterprise, a technician needs to update the ECU software of a batch of newly produced charging piles. These charging piles contain multiple ECUs of different models, and each ECU may run different software versions. First, the master control unit sends a request signal to each ECU in the charging pile through the CAN bus, requiring the return of controller flag information. Taking a certain ECU as an example, its returned hardware identification code is "HW-002", and the currently running software version number is "V1.5". After receiving this information, the master control unit compares it with the preset program file library and finds that the latest version program file corresponding to this ECU is "V2.0". The system marks this program file as a to-be-flashed program and generates a flashing task list, clearly recording the ECU and its corresponding to-be-flashed program. This process provides a key basis for the identification of the target controller and the matching of the to-be-flashed program through the analysis of the controller flag information, thereby avoiding the risk of incorrect flashing caused by manual configuration.

[0053] Next, the system determines the flashing execution conditions according to the information of the target controller and the communication link state information. For example, when the communication rate of the CAN bus is detected to be 500 kbps and the signal strength is -55 dBm, the system judges that the communication link state is good. At the same time, the master control unit checks the state information of the target controller and confirms that it has entered the flashable mode. Subsequently, the system generates a flashing start instruction and includes it in the flashing execution conditions. This process verifies the communication rate, signal strength, and target controller state in multiple dimensions to ensure that the flashing operation is only started under optimal conditions, thereby reducing the probability of flashing failure caused by unstable communication or abnormal state of the target controller. After meeting the flashing execution conditions, the system initializes the flashing tool and loads the program to be flashed, and executes the pre-programming phase, main programming phase, and post-programming phase in the preset flashing process. Taking the main programming phase as an example, the flashing tool transmits the data of the program to be flashed to the target controller in blocks and checks the data integrity block by block. If a data block fails the check, the system will adjust the transmission parameters and try to transmit again, with a maximum of three retries. Through this mechanism, even if there is a short-term communication disturbance in a harsh environment, the system can still complete data transmission through multiple retries, thereby significantly improving the stability and success rate of the flashing process.

[0054] After the flashing operation is completed, the master control unit reads the software version number of the target controller again and compares it with the target version number of the program to be flashed. For example, when the software version number of the target controller is detected to have been updated to "V2.0", the system marks it as a completed flashing state. If the version number is not updated successfully, the system will record the failure reason and generate a fault report to prompt the technician to troubleshoot. In addition, the system also acquires the running state information of the target controller to determine whether the program after flashing is running normally. If it is found that the program is running abnormally, for example, the target controller fails to respond to some function instructions, the system will generate a rollback instruction to restore the target controller to the program version "V1.5" before flashing to ensure the normal operation of the charging pile. This process effectively deals with the situation of flashing failure or program abnormality through closed-loop verification and rollback mechanism, ensuring the reliability of the charging pile.

[0055] During the entire flashing process, the system also determines whether the target controller has been flashed with the same version of the program through the controller flag bit information. For example, for another ECU with a hardware identification code of "HW-003", the system detects that the software version number currently running is "V2.0", which is consistent with the version of the program to be flashed. At this time, the system skips this ECU and records the skipping reason, avoiding unnecessary repeated flashing steps. This optimization measure not only improves the flashing efficiency, but also reduces resource waste.

[0056] Finally, the system calculates the success rate and failure rate of the flashing based on the flashing result information and generates a flashing quality evaluation report. For example, in this flashing task, 10 target controllers participated in the flashing, 9 of which successfully updated to the latest version, and 1 failed due to communication interruption. The system calculates the flashing success rate as 90%, and records detailed log information such as skipping reasons, failure reasons, and rollback operations to the flashing quality evaluation report 10. These data are sent to the management system for management personnel to analyze and optimize the flashing process. Through this closed-loop management mechanism, the system realizes comprehensive monitoring and continuous improvement of the flashing work.

[0057] In one example embodiment of the present specification, a program flashing device 200 for a charging pile is also provided, as shown in Figure 2 comprising: A first determination module 201 is configured to obtain controller flag bit information and determine a target controller to be flashed and a target controller corresponding to a program to be flashed according to the controller flag bit information. A second determination module 202 is configured to obtain communication link state information and determine a flashing execution condition according to the target controller, the communication link state information, and the program to be flashed. A processing module 203 is configured to perform step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag bit information, and generate flashing result information.

[0058] In one embodiment, the first determination module 201 is specifically configured to: analyze the controller flag bit information, extract the hardware identification code and software version number of the target controller; match the corresponding program in the preset program file library according to the hardware identification code and the software version number; determine the corresponding program as the program to be flashed, and record the association between the program to be flashed and the target controller; generate a flashing task list according to the association.

[0059] In one embodiment, the flashing execution condition includes communication rate, signal strength, and target controller state, and the second determination module 202 is specifically configured to: detect the communication rate and signal strength of the serial communication protocol CAN bus according to the communication link state information; determine whether the target controller is in a flashable mode according to the target controller state; if the communication rate and the signal strength meet the preset threshold and the target controller is in the flashable mode, generate a flashing start instruction; include the flashing start instruction in the flashing execution condition.

[0060] In one embodiment, the processing module 203 is specifically configured to: According to the flashing execution condition, the flashing tool is initialized and the program to be flashed is loaded; Based on the preset flashing process, the pre-programming stage, the main programming stage and the post-programming stage are executed in sequence; After the end of each stage, the feedback information of the target controller is read; Based on the feedback information, the flashing result information is determined.

[0061] In an embodiment, the processing module 203 is specifically further configured to: According to the flashing result information, it is judged whether the software version number of the target controller is successfully updated; If the update is successful, the target controller is marked as a completed flashing state; If the update fails, the failure reason is recorded and a fault report is generated to prompt the technician to troubleshoot.

[0062] In an embodiment, the processing module 203 is specifically further configured to: According to the controller flag bit information, it is judged whether the target controller has been flashed with the same version of the program; If the same version has been flashed, the target controller is skipped and the skipping reason is recorded; The skipping reason and the flashing operation are recorded in the flashing log.

[0063] In an embodiment, the processing module 203 is specifically further configured to: Obtain the running state information of the target controller, and judge whether the flashed program runs normally; If the program runs abnormally, the abnormal information is recorded and a rollback instruction is generated; According to the rollback instruction, the target controller is restored to the program version before flashing; The rollback result information is recorded in the flashing log.

[0064] In an embodiment, the processing module 203 is specifically further configured to: According to the flashing result information, the flashing success rate and the failure rate are counted; According to the flashing success rate and the failure rate, a flashing quality evaluation report is generated.

[0065] In an embodiment, the first determining module 201 is specifically configured to: According to the hardware identification code of the target controller, the program file corresponding to the hardware identification code is searched in the program file library; According to the software version number of the target controller, the program file higher than the current version number is screened; The screened program file is marked as the program to be flashed.

[0066] The program writing device for the charging pile provided in the embodiment belongs to the same application concept as the program writing method for the charging pile provided in the above embodiments of the application, can execute the program writing method for the charging pile provided in any of the above embodiments of the application, and has the corresponding function modules and beneficial effects of executing the program writing method for the charging pile. The technical details not described in detail in the embodiment can refer to the specific processing content of the program writing method for the charging pile provided in the above embodiments of the application, which will not be described here.

[0067] In one example embodiment of the present specification, an electronic device is also provided, as shown in the figure, which can include a processor 310, a communications interface 320, a memory 330 and a communications bus 340, wherein the processor 310, the communications interface 320 and the memory 330 complete mutual communication through the communications bus 340. The processor 310 can invoke the logic instructions in the memory 330 to execute the program writing method for the charging pile, which includes: Figure 3 obtaining controller flag bit information, and determining a target controller to be written and a target controller corresponding to the program to be written according to the controller flag bit information; obtaining communication link state information, and determining a writing execution condition according to the target controller, the communication link state information and the program to be written; performing step-by-step writing operation on the program to be written according to the writing execution condition and the controller flag bit information, and generating writing result information. In addition, the logic instructions in the memory 330 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0068]

[0069] ​In addition to the method and device described above, the program flashing method for the charging pile provided by the embodiments of the present specification can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps in the program flashing method for the charging pile according to various embodiments of the present specification described in the “Exemplary Method” section of the present specification.

[0070] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present specification, including an object-oriented programming language, such as Java, C++, and the like, and a conventional procedural programming language, such as the “C” language or a similar programming language.

[0071] In addition, the embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon, and the computer program causes a processor to perform the steps in the program flashing method for the charging pile according to various embodiments of the present specification described in the “Exemplary Method” section of the present specification.

[0072] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-mentioned embodiments. Any reference to memory, storage, databases, or other media in the embodiments provided by the present specification can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0073] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, as long as the combinations of technical features do not have contradictions, they shall be considered within the scope of the present disclosure.

[0074] The above embodiments only express several implementation manners of the present disclosure, and the description is relatively specific and detailed, but it shall not be understood as a limitation on the scope of the solutions provided by the embodiments of the present disclosure. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these shall be within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the appended claims.

Claims

1. A method for flashing a program for a charging pile, characterized in that: include: Acquire controller flag information, and determine a target controller to be flashed and a program to be flashed corresponding to the target controller according to the controller flag information; Acquire communication link status information, and determine a flash execution condition based on the target controller, the communication link status information, and the program to be flashed; According to the flash execution condition and the controller flag information, the program to be flashed is flashed step by step, and flash result information is generated.

2. The method according to claim 1, characterized in that The step of determining a target controller and a corresponding program to be flashed based on the controller flag information includes: Analyze the controller flag information to extract the hardware identification code and software version number of the target controller; Matching a corresponding program in a preset program file library according to the hardware identification code and the software version number; Determine the corresponding program as a program to be flashed, and record the association between the program to be flashed and the target controller; A flashing task list is generated according to the association relationship.

3. The method according to claim 1, characterized in that The flash execution conditions include communication rate, signal strength, and target controller status. Then, determining the flash execution conditions based on the target controller, the communication link status information, and the program to be flashed includes: Detecting the communication rate and signal strength of the serial communication protocol CAN bus according to the communication link status information; According to the state of the target controller, determining whether the target controller is in a flashable mode; If the communication rate and signal strength meet the preset threshold and the target controller is in a flashable mode, generating a flash start instruction; The flash start instruction is included in the flash execution condition.

4. The method according to claim 1, wherein The step of performing a step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag information, and generating flashing result information, includes: Initializing a flashing tool and loading the program to be flashed according to the flashing execution condition; Based on the pre-set flashing process, the pre-programming stage, the main programming stage and the post-programming stage are performed in sequence; After each stage, reading feedback information from the target controller; Flashing result information is determined based on the feedback information.

5. The method according to claim 4, characterized in that After performing the step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag information and generating flashing result information, the method further includes: Determining whether the software version number of the target controller is successfully updated based on the flashing result information; If the update is successful, the target controller is marked as having completed the flashing state; If the update fails, the reason for the failure is recorded and a failure report is generated to prompt technical personnel to perform troubleshooting.

6. The method according to claim 1, characterized in that Before performing the step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag information and generating the flashing result information, the method further includes: Determine whether the target controller has been flashed with the same version of the program according to the controller flag information; If the same version has been flashed, skip the target controller and record the reason for skipping; The skip reason and the flash operation are recorded in the flash log.

7. The method according to claim 1, characterized in that After performing the step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag information and generating flashing result information, the method further includes: Obtaining the operating status information of the target controller to determine whether the program after flashing is running normally; If the program runs abnormally, the abnormal information is recorded and a rollback instruction is generated; According to the rollback instruction, the target controller is restored to the program version before the flashing; The rollback result information is recorded in the flash log.

8. The method according to claim 1, characterized in that After performing the step-by-step flashing operation on the program to be flashed according to the flashing execution condition and the controller flag information and generating flashing result information, the method further includes: According to the flashing result information, the flashing success rate and failure rate are counted; A flashing quality assessment report is generated based on the flashing success rate and failure rate.

9. The method according to claim 2, characterized in that The matching corresponding program in the preset program file library includes: According to the hardware identification code of the target controller, searching for a program file corresponding to the hardware identification code in a program file library; According to the software version number of the target controller, filter the program files with higher version numbers than the current version number; Mark the filtered program files as programs to be flashed.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the program flashing method for a charging pile according to any one of claims 1 to 9 by executing the computer instructions.