Charging pile subcomponent software upgrade method, device, medium, and charging pile
By acquiring the identifiers and upgrade packages of charging pile sub-components, and then identifying and issuing upgrade packages, the problem of low efficiency in traditional methods is solved. This achieves high efficiency and reliability in upgrading the software of charging pile components, and supports synchronous upgrades of sub-components from different suppliers.
Patent Information
- Application Number
- CN202210005233.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-01-04
AI Technical Summary
Traditional methods for upgrading the software of charging pile components are inefficient, requiring after-sales personnel from different suppliers to perform upgrades one by one. Furthermore, the same sub-component in different charging piles may have multiple hardware and software versions, which significantly increases the workload for R&D personnel and makes it impossible to perform batch upgrades on-site.
By obtaining the identifier and upgrade package of the sub-component to be upgraded, it determines whether the sub-component needs to be upgraded, and if so, distributes the package to the sub-component for upgrade. It supports synchronous upgrades of sub-components from different vendors, including security verification, package processing, and verification mechanisms to ensure the security and reliability of the upgrade process.
It achieves high efficiency and reliability in upgrading the software of charging pile sub-components, improves work efficiency, ensures the normal operation and safety of charging piles, and supports synchronous upgrades of sub-components from different suppliers.
Smart Images

Figure CN115827012B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of charging piles, in particular to a charging pile subcomponent software upgrading method and device, a computer readable storage medium, a computer program product and a charging pile. BACKGROUND
[0002] With the rapid development of the new energy industry, the number of electric vehicles gradually increases, and the number of supporting charging piles also increases. In the charging pile, there are various subcomponents, and during use, the software of each subcomponent needs to be upgraded regularly or irregularly to continuously improve the charging pile and improve user experience.
[0003] In the traditional technology, the after-sales personnel of each subcomponent supplier carries professional upgrading tools to the charging pile site to upgrade the subcomponents. Since the charging piles are scattered and the same charging pile corresponds to multiple subcomponent suppliers, the traditional technology needs the after-sales personnel of different subcomponent suppliers to upgrade the corresponding subcomponents of different charging piles one by one.
[0004] Therefore, the traditional charging pile subcomponent software upgrading method has the problem of low work efficiency. SUMMARY
[0005] Therefore, it is necessary to provide a charging pile subcomponent software upgrading method, device, computer readable storage medium, computer program product and charging pile capable of improving work efficiency in view of the above technical problems.
[0006] In a first aspect, the present application provides a charging pile subcomponent software upgrading method. The method comprises:
[0007] obtaining a subcomponent identifier and an upgrading software package of a subcomponent to be upgraded;
[0008] extracting version information of the upgrading software package;
[0009] obtaining subcomponent version information of a subcomponent corresponding to the subcomponent identifier, and determining whether the subcomponent needs to be upgraded according to the version information of the upgrading software package and the subcomponent version information;
[0010] If the subcomponent needs to be upgraded, the upgrading software package is sent to the subcomponent; the upgrading software package is used to upgrade the software of the subcomponent.
[0011] The charging pile subcomponent software upgrading method can determine whether the subcomponent needs to be upgraded according to the version information of the upgrading software package and the version information of the subcomponent corresponding to the upgrading software package in the charging pile, and then download the upgrading software package to the corresponding subcomponent to perform software upgrading on the subcomponent when the subcomponent needs to be upgraded, so that the charging pile subcomponent software upgrading method is simple, can support synchronous upgrading of subcomponents of different suppliers, and is beneficial to improving the work efficiency of the charging pile subcomponent software upgrading process.
[0012] In one of the embodiments, before the extracting of the version information of the upgrading software package, the method further comprises:
[0013] obtaining working state information of the charging pile, and determining whether the current working state supports software upgrading according to the working state information;
[0014] If yes, the step of extracting the version information of the upgrading software package is performed.
[0015] In the above embodiments, before the extracting of the version information of the upgrading software package, the working state information of the charging pile is obtained, and it is determined whether the current working state supports software upgrading according to the working state information, so that the software upgrading process does not affect the normal working of the charging pile, and the scientificity of the charging pile subcomponent software upgrading method is improved.
[0016] In one of the embodiments, before the extracting of the version information of the upgrading software package, the method further comprises:
[0017] performing security check on the upgrading software package;
[0018] The extracting of the version information of the upgrading software package comprises:
[0019] If the security check passes, the version information of the upgrading software package is extracted.
[0020] In the above embodiments, before the extracting of the version information of the upgrading software package, the security check is performed on the upgrading software package first, so that the security of the upgrading software package is ensured, the charging pile is prevented from being attacked, and the security of the charging pile subcomponent software upgrading method is improved.
[0021] In one of the embodiments, the downloading of the upgrading software package to the subcomponent comprises:
[0022] obtaining the size of a reserved buffer of the subcomponent;
[0023] determining whether the size of the upgrading software package is greater than the size of the reserved buffer;
[0024] If so, the upgrade package is divided into sub-packages according to the size of the reserved buffer, and the sub-packages are sent to the sub-components in sequence.
[0025] In the above embodiments, during the process of distributing the upgrade package to the sub-component, the size of the reserved buffer of the sub-component is also obtained, and data transmission is performed differently according to the relationship between the size of the reserved buffer and the upgrade package. This can ensure the smooth distribution of the upgrade package under different circumstances and is conducive to expanding the application scenarios of the charging pile sub-component software upgrade method.
[0026] In one embodiment, the sub-package includes at least a first sub-package and a second sub-package; the step of sequentially sending the sub-package to the sub-component includes:
[0027] Send the first sub-package to the sub-component, and send the first sub-checksum of the first sub-package to the sub-component;
[0028] Obtain a first verification result, and if the first verification result is a successful verification, send a second sub-package to the sub-component; the first verification result is generated by the sub-component calculating the first sub-verification code of the received first sub-package and generating it based on the first sub-verification code.
[0029] In the above embodiments, verifying the sub-package during the sending process can ensure the integrity and security of the sub-package, which is beneficial to further improving the reliability of the charging pile sub-component software upgrade method.
[0030] In one embodiment, the sub-package carries packet address information corresponding to the sub-package; after sequentially sending the sub-package to the sub-component, the method further includes:
[0031] Obtain the full package verification result; the full package verification result is generated by the sub-component after merging the sub-package according to the sub-package and the group address information of the sub-package to obtain the ready package, and then performing security verification on the ready package.
[0032] In the above embodiments, after all sub-packages are sent to the sub-components in sequence, a second security verification is performed on the ready-to-use package obtained after the package merging process. This can ensure the integrity and security of the ready-to-use package and help to further improve the reliability of the charging pile sub-component software upgrade method.
[0033] In one embodiment, after obtaining the full packet verification result, the method further includes:
[0034] Send a reset command to the sub-component.
[0035] In the above embodiments, after receiving the successful verification result of the entire package, a reset command is sent to the sub-component to instruct the sub-component to perform a reset operation. This can avoid system redundancy of the sub-component due to software upgrades, which could affect the performance of the charging pile.
[0036] Secondly, this application also provides a software upgrade device for charging pile components. The device includes:
[0037] The acquisition module is used to obtain the sub-component identifier and upgrade package of the sub-component to be upgraded;
[0038] An information extraction module is used to extract the version information of the upgrade software package;
[0039] The judgment module is used to obtain the sub-component version information of the sub-component corresponding to the sub-component identifier, and determine whether the sub-component needs to be upgraded based on the version information of the upgrade package and the sub-component version information;
[0040] The distribution module is used to distribute the upgrade package to the sub-component if the judgment module determines that the sub-component needs to be upgraded; the upgrade package is used to upgrade the software of the sub-component.
[0041] In one embodiment, the judgment module is further configured to: obtain the working status information of the charging pile, and determine whether the current working status supports software upgrade based on the working status information;
[0042] The information extraction module is specifically used to: if the judgment result of the judgment module is that software upgrade is supported, then execute the step of extracting the version information of the upgrade software package.
[0043] In one embodiment, the charging pile component software upgrade device further includes:
[0044] A security verification module is used to perform security verification on the upgrade software package;
[0045] The information extraction module is specifically used to: if the security verification result is a pass, extract the version information of the upgrade software package.
[0046] In one embodiment, the disbursement module includes:
[0047] An acquisition unit is used to acquire the size of the reserved buffer of the sub-component;
[0048] A judgment unit is used to determine whether the size of the upgrade package is greater than the size of the reserved buffer.
[0049] The distribution unit is used to, if the judgment result of the judgment unit is yes, divide the upgrade software package into sub-packages according to the size of the reserved buffer, and send the sub-packages to the sub-components in sequence.
[0050] In one embodiment, the sub-package includes at least a first sub-package and a second sub-package; the distribution unit is specifically configured to: send the first sub-package to the sub-component and send a first sub-verification code of the first sub-package to the sub-component; obtain a first verification result, and if the first verification result is a successful verification, send the second sub-package to the sub-component; the first verification result is generated by the sub-component calculating the first sub-verification code of the received first sub-package and generating it based on the first sub-verification code.
[0051] In one embodiment, the distribution module further includes: a verification result acquisition unit, used to acquire the whole package verification result; the whole package verification result is generated by the sub-component after merging the sub-package according to the sub-package and the group address information of the sub-package to obtain the ready-to-use package, and then performing security verification on the ready-to-use package.
[0052] In one embodiment, the dispensing module further includes a reset unit for sending a reset command to the subcomponent.
[0053] Thirdly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0054] Obtain the sub-component identifier and upgrade package of the sub-component to be upgraded;
[0055] Extract the version information of the upgrade software package;
[0056] Obtain the subcomponent version information of the subcomponent corresponding to the subcomponent identifier, and determine whether the subcomponent needs to be upgraded based on the version information of the upgrade package and the subcomponent version information;
[0057] If the sub-component needs to be upgraded, the upgrade package is distributed to the sub-component; the upgrade package is used to upgrade the software of the sub-component.
[0058] Fourthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0059] Obtain the sub-component identifier and upgrade package of the sub-component to be upgraded;
[0060] Extract the version information of the upgrade software package;
[0061] Obtain the subcomponent version information of the subcomponent corresponding to the subcomponent identifier, and determine whether the subcomponent needs to be upgraded based on the version information of the upgrade package and the subcomponent version information;
[0062] If the sub-component needs to be upgraded, the upgrade package is distributed to the sub-component; the upgrade package is used to upgrade the software of the sub-component.
[0063] Fifthly, this application also provides a charging pile. The charging pile includes a main controller and a sub-component, the main controller being connected to the sub-component for implementing the steps of the method described above. Attached Figure Description
[0064] Figure 1 This is an application environment diagram of a charging pile component software upgrade method in one embodiment;
[0065] Figure 2 This is a flowchart illustrating a software upgrade method for a charging pile component in one embodiment;
[0066] Figure 3 This is a flowchart illustrating a software upgrade method for a charging pile component in another embodiment;
[0067] Figure 4 This is a schematic diagram illustrating the process of distributing an upgrade package to a sub-component in one embodiment;
[0068] Figure 5 This is a flowchart illustrating the process of sequentially sending sub-packages to sub-components in one embodiment;
[0069] Figure 6 This is a flowchart illustrating the software upgrade method for a charging pile component in yet another embodiment;
[0070] Figure 7 This is a flowchart illustrating the software upgrade method for charging pile components in another embodiment;
[0071] Figure 8 This is a schematic diagram illustrating the interaction process between the main controller and sub-components during the upgrade process in one embodiment;
[0072] Figure 9 This is a structural block diagram of a charging pile component software upgrade device in one embodiment. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0074] In traditional technology, charging pile manufacturers directly purchase sub-components from multiple suppliers, assemble them, and then install the charging piles. Therefore, when upgrading the software of sub-components, after-sales personnel from different suppliers need to travel to the charging pile site with specialized upgrade tools, resulting in low efficiency. Furthermore, the same sub-component in different charging piles may have multiple suppliers, and sub-components from the same supplier may have multiple hardware versions. Different suppliers or hardware versions require different matching software versions, necessitating repeated verification by after-sales personnel to determine the correct software version. This undoubtedly increases their workload and hinders efficiency. If only the remote upgrade method for the main controller is referenced—first obtaining the software version information of the main controller in one charging pile to determine if an upgrade is needed, then upgrading the software in that main controller, and so on, until all charging piles' main controllers are upgraded—it's equivalent to upgrading different charging piles one by one, again failing to achieve batch upgrades and offering limited efficiency improvements. Therefore, this application provides a method for upgrading the software of charging pile components that can improve work efficiency.
[0075] The charging pile component software upgrade method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network, and server 104 communicates with charging pile 106 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other network servers. During the software upgrade process of the charging pile sub-component: the sub-component identifier and upgrade package of the sub-component to be upgraded are obtained; the version information of the upgrade package is extracted; the sub-component version information corresponding to the sub-component identifier is obtained, and based on the version information of the upgrade package and the sub-component version information, it is determined whether the sub-component needs to be upgraded; if the sub-component needs to be upgraded, the upgrade package is distributed to the sub-component; the upgrade package is used to upgrade the software of the sub-component. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0076] In one embodiment, such as Figure 2 As shown, a method for upgrading the software of a charging pile component is provided, which can be applied to... Figure 1 The method will be illustrated using the charging pile 106 as an example, specifically in the case of the main controller within the charging pile 106. The method includes steps S202 to S208.
[0077] Step S202: Obtain the sub-component identifier and upgrade package of the sub-component to be upgraded.
[0078] The hardware of a charging pile typically includes a main controller and multiple sub-components, such as batteries, charging / discharging modules, and protection modules. A sub-component identifier is information used to uniquely identify a sub-component within the charging pile. This identifier can be a combination of at least one of numbers, letters, and characters. An upgrade package, provided by the sub-component supplier, is a software package used to upgrade the software of the sub-component to be upgraded. This upgrade package can be a hexadecimal .hex file or other format files, and may contain software code data, software version information, sub-component identifiers, sub-component hardware version information, and digital signatures.
[0079] Specifically, all sub-components in a charging pile can be uniformly coded, so that each sub-component corresponds to a unique sub-component identifier. When a sub-component needs to be upgraded, the corresponding sub-component to be upgraded can be associated with the sub-component identifier, thereby achieving synchronous upgrades of multiple different sub-components. Furthermore, all charging piles can be uniformly coded, so that each charging pile corresponds to a unique charging pile identifier. This charging pile identifier can be the charging pile's network IP address, or a string identifier composed of at least one combination of numbers, letters, and characters. When different charging pile sub-components need to be upgraded, the corresponding charging pile to be upgraded can be associated with the charging pile identifier, thereby achieving synchronous upgrades of multiple different charging piles.
[0080] Staff can upload the charging pile identifier, the sub-component identifier, and the upgrade software package for each sub-component to be upgraded to the server via a terminal. The main controller then retrieves the sub-component identifier and upgrade software package from the server. Furthermore, the main controller can retrieve these identifiers from the server either actively or passively. For example, the server can send the sub-component identifier and upgrade software package to the corresponding charging pile based on the charging pile identifier; alternatively, the server can send an upgrade command to each charging pile, which then actively retrieves the sub-component identifier and upgrade software package from the server based on the upgrade command.
[0081] Step S205: Extract the version information of the upgrade package.
[0082] The upgrade package version information includes software version information and the hardware version information of the sub-components to which the upgrade package applies. This software version information uniquely identifies the software version of the upgrade package. During software development, software version information can be used to identify and differentiate different software versions of the same sub-component. Specifically, the main controller can obtain the upgrade package version information by extracting information stored at a specific address within the upgrade package.
[0083] Step S206: Obtain the sub-component version information of the sub-component corresponding to the sub-component identifier, and determine whether the sub-component needs to be upgraded based on the version information of the upgrade package and the sub-component version information.
[0084] The sub-component version information includes both software and hardware version information. The hardware version information is flashed into the sub-component's flash memory by the supplier during product testing and is unchangeable. The software version information identifies the current software version used by the sub-component and changes as the software version changes. On one hand, sub-components supplied by the same supplier may have multiple hardware versions, each supporting different software versions; on the other hand, for individual charging stations, it's possible that maintenance personnel have already performed individual software upgrades.
[0085] Based on this, the main controller obtains the sub-component version information of the sub-component corresponding to the sub-component identifier within the charging pile, and determines whether the sub-component needs to be upgraded based on the sub-component version information and the upgrade package version information: if the software version of the upgrade package is applicable to the sub-component, and the software version of the sub-component is inconsistent with the software version corresponding to the upgrade package, the sub-component needs to be upgraded; otherwise, the sub-component does not need to be upgraded.
[0086] Step S208: If a sub-component needs to be upgraded, the upgrade package is sent to that sub-component.
[0087] The upgrade software package is used to upgrade the software of sub-components. Specifically, if it is determined that a sub-component corresponding to the upgrade software package in the charging pile needs an upgrade, the upgrade software package is distributed to that sub-component so that it can use the corresponding upgrade software package to perform the software upgrade. It should be noted that if the sub-component does not need an upgrade, a feedback message indicating an upgrade mismatch is sent to the terminal via the server. Furthermore, after the sub-component completes the upgrade, it reports the completion of the upgrade to the main controller, which then relays the upgrade result to the terminal via the server, allowing staff to stay informed about the progress of the work.
[0088] In addition, during the process of the main controller distributing the upgrade package to the sub-components, it can periodically send upgrade heartbeats to the sub-components, and the sub-components can periodically reply to the upgrade heartbeats. If the main controller does not receive an upgrade heartbeat reply from the sub-components within a set time, it will exit the upgrade process and send the corresponding feedback information to the terminal.
[0089] The aforementioned method for upgrading the software of charging pile sub-components has two main advantages. First, it obtains the sub-component identifier and upgrade package of the sub-component to be upgraded, and distributes the upgrade package to the corresponding sub-component when an upgrade is needed, thus performing a software upgrade. This method is simple, supports synchronous upgrades of sub-components from different suppliers, and improves the efficiency of the charging pile sub-component software upgrade process. Second, it determines whether a sub-component needs an upgrade based on the version information of the upgrade package and the version information of the corresponding sub-component in the charging pile. This enables automatic error prevention during the upgrade process, avoiding charging pile malfunctions due to incorrect software flashing, and thus enhancing the scientific nature of the charging pile sub-component software upgrade method.
[0090] In one embodiment, such as Figure 3 As shown, before step S205, there is also step S203: obtaining the working status information of the charging pile, and determining whether the current working status supports software upgrade based on the working status information. Step S203 can be executed before, after, or synchronously with step S202.
[0091] The charging pile's operational status information includes battery level, charging gun connection status, and operating current; operational status includes charging, discharging, and standby states. Specifically, based on the charging pile's operational status information, the current operational status of the charging pile can be determined, and whether the current operational status supports software upgrades can be determined according to preset rules. If the current operational status of the charging pile supports software upgrades, step S205 is executed; if the current operational status of the charging pile does not support software upgrades, the process waits for a preset time and then re-acquires the charging pile's operational status information.
[0092] Furthermore, the specific content of the preset rules is not unique and can be set differently according to the configuration of the charging pile, as long as it is ensured that the transmission of the upgrade software package does not affect the normal operation of the charging pile. For example, software upgrades can be supported only in standby mode, or in both standby and charging modes.
[0093] In the above embodiments, obtaining the working status information of the charging pile before extracting the version information of the upgrade software package, and determining whether the current working status supports the software upgrade based on the working status information, can ensure that the software upgrade process does not affect the normal operation of the charging pile, and is conducive to improving the scientific nature of the charging pile sub-component software upgrade method.
[0094] In one embodiment, please refer to... Figure 3Before step S205, step S204 is included: performing a security verification on the upgrade software package. In this embodiment, step S205 includes: if the security verification result is a pass, extracting the version information of the upgrade software package. Step S204 can be executed before, after, or simultaneously with step S202; similarly, step S204 can also be executed before, after, or simultaneously with step S203.
[0095] Security verification is a process of verifying transmitted data using certain methods, typically used to ensure data integrity and accuracy. Specifically, the main controller first parses the upgrade package to obtain the software code data within it. Then, based on a preset algorithm, it calculates the checksum of this software code data, which is the actual checksum of the upgrade package. It also obtains the corresponding original checksum and compares the calculated actual checksum with the original checksum. If they match, the security verification passes; otherwise, it fails. Further, if the security verification passes, step S205 is executed; if the security verification fails, feedback is sent to the terminal indicating information leakage, so that terminal personnel can promptly understand the situation and take countermeasures.
[0096] It's understandable that there isn't only one method for security verification. For example, hash verification or CRC (Cyclic Redundancy Check) verification methods can be used. Taking CRC verification as an example, the main controller can calculate the actual CRC value of the software code data in the upgrade package using the CRC32 algorithm, obtain the digital signature contained in the software code data, and use the corresponding RSA decryption algorithm to obtain the original CRC value. The actual CRC value is then compared with the original CRC value. If they are equal, the security verification passes; otherwise, it fails. If the security verification fails, the current upgrade process is stopped, and the server sends a notification to the terminal that the information has been leaked.
[0097] In the above embodiments, before extracting the version information of the upgrade software package, a security verification is performed on the upgrade software package to ensure its security, prevent the charging pile from being attacked, and improve the security of the charging pile component software upgrade method.
[0098] In one embodiment, such as Figure 4 As shown, the upgrade package is distributed to the sub-component, including steps S402 to S406.
[0099] Step S402: Obtain the size of the reserved buffer of the sub-component.
[0100] The reserved buffer in the sub-component is used for data caching during the transmission of the upgrade software package. The size of this reserved buffer is not unique; for example, it could be 1KB or 2KB. Specifically, the main controller can obtain the size of the reserved buffer from the sub-component either actively or passively. For example, the main controller can send a request for a range command to the sub-component, which will then reserve a buffer of a set size based on its own address range division and report the size and location of the buffer back to the main controller.
[0101] Furthermore, before the main controller obtains the size of the reserved buffer for the sub-component, it can also obtain the sub-component's operating status and, based on the sub-component's operating status and set rules, determine whether the sub-component is currently allowed to be updated online. If yes, step S402 is executed; otherwise, the system waits for a set time and then re-obtains the sub-component's operating status. The specific content of this set rule is not unique and can be set differently depending on the specific type of sub-component, as long as it ensures that the transmission of the upgrade software package does not affect the normal operation of the charging pile. For example, online updates can be supported only in standby mode, or online updates can be supported in both standby and charging modes. It should be noted that the above-mentioned action of obtaining the sub-component's operating status and determining whether the sub-component is currently allowed to be updated online based on the sub-component's operating status and set rules can be executed by either the main controller or the sub-component.
[0102] Step S404: Determine whether the size of the upgrade package is greater than the size of the reserved buffer.
[0103] The size of the upgrade package refers to the size of the software code data contained within it. Specifically, after the main controller obtains the size of the reserved buffer for the sub-component, it compares this size with the size of the upgrade package. If the size of the upgrade package is less than or equal to the size of the reserved buffer, the main controller can send the entire upgrade package to the reserved buffer, completing the upgrade package distribution.
[0104] If the size of the upgrade package is greater than the size of the reserved buffer, then step S406 is executed: according to the size of the reserved buffer, the upgrade package is divided into sub-packages, and the sub-packages are sent to the sub-components in sequence.
[0105] Packet splitting is the process of dividing the upgrade package into multiple sub-packages. If the size of the upgrade package exceeds the size of the reserved buffer, it needs to be split before being sent to ensure successful delivery. Specifically, the main controller can divide the upgrade package into at least two sub-packages based on the size of the reserved buffer, and then send each sub-package to the sub-component sequentially. It should be noted that the sizes of the sub-packages can be the same or different, as long as they are less than or equal to the size of the reserved buffer.
[0106] In the above embodiments, during the process of distributing the upgrade package to the sub-component, the size of the reserved buffer of the sub-component is also obtained, and data transmission is performed differently according to the relationship between the size of the reserved buffer and the upgrade package. This can ensure the smooth distribution of the upgrade package under different circumstances and is conducive to expanding the application scenarios of the charging pile sub-component software upgrade method.
[0107] In one embodiment, the sub-package carries the packet address information corresponding to the sub-package. Please refer to [link / reference needed]. Figure 4 After sending the sub-packages to the sub-components in sequence, the process also includes step S407: obtaining the full package verification result.
[0108] The overall package verification result is generated by the sub-component merging the sub-packages according to their packet address information to obtain the ready-to-use package, and then performing a security verification on the ready-to-use package. This packet address information can refer to the starting address information and / or the ending address information of the sub-packages.
[0109] Specifically, after receiving the sub-package, the sub-component merges the sub-packages according to their packet address information to obtain the ready-to-use package. It then performs a security check on the ready-to-use package: calculating the actual checksum of the ready-to-use package and comparing it with the original checksum of the upgrade package. If they match, the sub-component sends a successful full-package checksum to the main controller; otherwise, it sends a failed full-package checksum to the main controller. Further, if the checksum passes, the sub-component performs a software upgrade and update based on the ready-to-use package.
[0110] In the above embodiments, after all sub-packages are sent to the sub-components in sequence, a second security verification is performed on the ready-to-use package obtained after the package merging process. This can ensure the integrity and security of the ready-to-use package and help to further improve the reliability of the charging pile sub-component software upgrade method.
[0111] In one embodiment, please refer to... Figure 4 After step S407, step S408 is also included: sending a reset command to the sub-component.
[0112] The reset command can be used to instruct sub-components to erase corresponding stored data generated during the upgrade process, such as data stored in the reserved buffer and software code data before the upgrade, to release storage space and provide a hardware foundation for the normal operation of subsequent sub-components. It can also be used to instruct sub-components to switch states, so that the main controller can determine the current operating status of the charging pile based on the status of each sub-component and output corresponding prompts. For example, if one or more sub-components are being upgraded, the main controller can control indicator lights to flash, or notify the user through the charging pile's interface, mini-program, or official account that the charging pile is being upgraded and charging service is not supported, so that the user can promptly obtain the current operating status of the charging pile.
[0113] Specifically, after receiving the successful verification result of the entire package, the main controller sends a reset command to the sub-component, instructing the sub-component to perform a reset operation and complete the sub-component software upgrade. It can be understood that after the reset is completed, the charging pile sub-component upgrade is finished.
[0114] In the above embodiments, after receiving the successful verification result of the entire package, a reset command is sent to the sub-component to instruct the sub-component to perform a reset operation. This can avoid system redundancy of the sub-component due to software upgrades, which could affect the performance of the charging pile.
[0115] In one embodiment, the sub-package includes at least a first sub-package and a second sub-package; in this embodiment, as... Figure 5 As shown, the sub-packages are sent to the sub-components sequentially, including steps S502 and S504.
[0116] Step S502: Send the first sub-package to the sub-component and send the first sub-verification code of the first sub-package to the sub-component.
[0117] The first sub-checksum is used to verify the integrity of the first sub-package. Specifically, the main controller can first send the first sub-package to the sub-component, and then send the first sub-checksum of the first sub-package to the sub-component after the first sub-package is sent; alternatively, the main controller can send the first sub-package and its first sub-checksum together to the sub-component.
[0118] Step S504: Obtain the first verification result, and if the first verification result is successful, send the second sub-package to the sub-component.
[0119] The first verification result is generated by the sub-component calculating the first sub-verification code of the received first sub-package and generating a new verification code based on the first sub-verification code and the first sub-check code. Specifically, after receiving the first sub-package, the sub-component calculates the verification value of the software code data contained in the first sub-package based on a set algorithm, which is the first sub-verification code of the first sub-package. The sub-verification code and the first sub-verification code are compared. If they match, the sub-component sends a first verification result indicating successful verification to the main controller; otherwise, it sends a first verification result indicating failed verification to the main controller. If the verification passes, the main controller sends the second sub-package to the sub-component, and performs the same verification on the second sub-package, until all sub-packages corresponding to the upgrade package have been sent. If the verification fails, the upgrade package is re-processed into multiple packages. It should be noted that the preset algorithm used in the above process can be a hash check, CRC check, or other related verification methods.
[0120] In the above embodiments, verifying the sub-package during the sending process can ensure the integrity and security of the sub-package, which is beneficial to further improving the reliability of the charging pile sub-component software upgrade method.
[0121] To facilitate understanding, the following will be combined with Figure 6 to Figure 8 This document provides a detailed explanation of the software upgrade methods for charging pile components.
[0122] In one embodiment, such as Figure 6As shown, staff upload the charging pile identifier, the sub-component identifier, and the upgrade software packages for each sub-component to the server via a backend terminal. The main controller in the charging pile corresponding to the charging pile identifier downloads the sub-component identifiers and upgrade software packages for each sub-component to be upgraded from the server through the charging pile's internal communication components. This main controller can be a hardware module containing various processing chips and their peripheral circuits, capable of logic operations. The processing chip can be a microcontroller, a DSP (Digital Signal Processing) chip, or an FPGA (Field Programmable Gate Array) chip. After receiving the upgrade software package, the main controller parses it to obtain the information contained within, such as software code data, software version information, sub-component identifiers, sub-component hardware version information, and digital signatures. The main controller establishes a communication connection with the sub-component corresponding to the sub-component identifier within the charging pile, issues upgrade commands to the sub-component, and, through interaction with the sub-component, distributes the corresponding upgrade software packages to the sub-component so that the sub-component can complete the software upgrade. Furthermore, if the charging station is in charging / discharging mode, the upgrade of sub-components will only proceed after the charging / discharging process is complete and the charging gun is completely disconnected from the vehicle. Additionally, during the upgrade process, the main controller can control the fault light to flash, indicating to the user that charging / discharging operations are currently unsupported. If a user sends a charging / discharging command to the charging station during the upgrade process, the main controller will prevent the charging station from executing the command and instead notify the user through the charging station's interface, mini-program, or official WeChat account that the charging station is currently undergoing an upgrade and charging / discharging operations are not supported.
[0123] In one embodiment, such as Figure 7 As shown, during the process of uploading data to the server via the terminal, staff can specify a single charging pile for upgrade or simultaneously specify multiple charging piles for batch upgrades. The server, based on the charging pile identifier contained in the received instruction, sends the sub-component identifier to be upgraded and the upgrade software package to the corresponding charging pile. The charging pile identifier can be an IP address. After receiving the upgrade software package, the charging pile main controller first obtains the charging pile's operating status information and determines whether it is currently executing a charging / discharging command. If so, it waits for a preset time and re-obtains the charging pile's operating status information. If not, it determines that the charging pile's current operating status supports the software upgrade, performs data parsing of the upgrade software package, and extracts information such as the software version, software code data, sub-component identifier, sub-component hardware version, and digital signature from the upgrade software package.
[0124] After data parsing is completed, the main controller performs security verification on the upgrade package to confirm the information's security: it obtains the software code data of the upgrade package, calculates the CRC value according to the CRC32 algorithm, obtains the digital signature of the upgrade package, and calculates the original CRC value of the upgrade package using the RSA decryption algorithm; then it compares the calculated CRC value with the original CRC value. If the two are equal, the data is secure; otherwise, it indicates that the data has been stolen or tampered with, and the data is insecure; if the data is insecure, the current upgrade process is stopped, and the server sends a notification to the terminal that the information has been leaked, so that the terminal staff can be informed of the situation in a timely manner and take countermeasures.
[0125] On the other hand, the main controller identifies the sub-components in the charging pile that require OTA (Over-the-Air Technology) upgrades based on the sub-component identifiers. It then obtains the hardware and software version information of these sub-components and compares it with the hardware version information parsed from the upgrade package to determine if an upgrade is needed. If the software version of the upgrade package is compatible with the sub-component, and the sub-component's software version is inconsistent with the corresponding software version of the upgrade package, the sub-component needs an upgrade; otherwise, it does not require an upgrade. If the sub-component does not need an upgrade, the server sends an upgrade mismatch message to the terminal, automatically preventing errors during the upgrade process and avoiding charging pile malfunctions due to incorrect software flashing. If the sub-component needs an upgrade, an upgrade command is sent to the sub-component, and the corresponding upgrade package is distributed to it. Upon receiving the upgrade command, the sub-component initiates the upgrade process and, upon completion, sends the result back to the main controller, which then sends the upgrade result back to the terminal via the server.
[0126] The specific interaction process between the main controller and sub-components during the OTA upgrade process is as follows: Figure 8 As shown. Specifically, as... Figure 8 As shown, the main controller first sends a download command to the sub-component. After receiving the download command, the sub-component first determines whether downloading is supported based on its own operating status. If downloading is supported, the sub-component sends a download command response to the main controller, which receives the response. If downloading is not supported, the sub-component waits for a set time and then re-determines whether downloading is supported based on its own operating status. If the main controller does not receive a download command response within 2 seconds, it stops sending download commands.
[0127] Upon receiving a response to the download command, the main controller sends a request range instruction to the sub-component. The sub-component, based on its own address range allocation, reserves a buffer of a predetermined size and sends the size and location of this buffer back to the main controller in the request range response. Similarly, if the main controller does not receive a request range response within 2 seconds, it stops requesting ranges.
[0128] After obtaining the size of the reserved buffer for each sub-component, the main controller compares this size with the size of the upgrade package. If the size of the upgrade package is less than or equal to the size of the reserved buffer, the main controller can send the entire upgrade package to the reserved buffer, completing the upgrade package distribution. If the size of the upgrade package is greater than the size of the reserved buffer, the main controller, based on the size of the reserved buffer, splits the upgrade package into at least two sub-packages and sends a start package assembly command to the sub-component, sending each sub-package sequentially to the sub-component. It can be understood that the size of each sub-package should be less than or equal to the size of the reserved buffer. The size of the reserved buffer is not unique and can be set differently depending on the hardware conditions of different sub-components; for example, it could be 1KB or 2KB. Taking the case where each sub-package is 1KB in size as an example, each sub-package contains 1KB of data, divided into 256 data frames, numbered from 0x00 to 0xFF.
[0129] Furthermore, each sub-package carries its starting address and sub-package number. Each time a sub-component receives a sub-package, it calculates a sub-checksum of the software code data contained within that sub-package based on a predefined algorithm, obtains the sub-verification code from the main controller, and compares the sub-verification code with the sub-checksum. If they match, the sub-component reports a successful verification result to the main controller; otherwise, it reports a failed verification result. If the verification passes, the main controller sends the next sub-package to the sub-component, and the same logic is used to verify each subsequent sub-package until all sub-packages corresponding to the upgrade package have been sent. If the verification fails, the upgrade package is re-processed from the starting address of the previous sub-package.
[0130] Furthermore, after each sub-package completes verification, provided the verification passes, the sub-software code data within the sub-package is burned to the corresponding address in the download area based on the sub-package's starting address and size. Data in the reserved buffer is then erased to merge the sub-packages, resulting in a ready-to-use package corresponding to the original upgrade package. After obtaining the ready-to-use package, the main controller sends a program verification command to the sub-component module, instructing it to perform a security verification on the ready-to-use package: calculating the actual verification value of the ready-to-use package and comparing it with the original verification value of the upgrade package. If they match, the sub-component sends a verification result indicating successful verification to the main controller via a program verification response; otherwise, it sends a verification result indicating failed verification to the main controller. Further, if the verification passes, the sub-component performs software upgrades and updates based on the ready-to-use package. Similarly, if the main controller does not receive a program verification response within 2 seconds, the program verification stops.
[0131] After the program verification passes, the main controller sends a reset command to the sub-components, instructing them to erase the corresponding stored data generated during the upgrade process, such as the stored data in the reserved buffer and the software code data before the upgrade, to free up storage space and provide the hardware foundation for the normal operation of the sub-components. The main controller also instructs the sub-components to switch states so that the main controller can determine the current operating status of the charging pile based on the status of each sub-component and output corresponding prompts. Specifically, after receiving the reset command, the sub-components wait 5 seconds before resetting to ensure that the online program update is complete.
[0132] It should be noted that during the process of the main controller distributing the upgrade package to the sub-component, it can periodically send upgrade heartbeats to the sub-component, and the sub-component will periodically reply to the upgrade heartbeats. If the main controller does not receive an upgrade heartbeat reply from the sub-component within a set time, it will exit the upgrade process and send the corresponding feedback information to the terminal through the server.
[0133] The aforementioned charging pile sub-component software upgrade method has two main advantages. First, it obtains the sub-component identifier and upgrade package of the sub-component to be upgraded, and distributes the upgrade package to the corresponding sub-component when an upgrade is needed. This method is simple, supports synchronous upgrades of sub-components from different suppliers, and improves the efficiency of the charging pile sub-component software upgrade process. Second, it determines whether a sub-component needs an upgrade based on the version information of the upgrade package and the version information of the corresponding sub-component in the charging pile. This enables automatic error prevention during the upgrade process, avoiding charging pile malfunctions due to incorrect software flashing, thus enhancing the scientific rigor of the charging pile sub-component software upgrade method. Furthermore, multiple security checks are performed on the upgrade package during the sub-component software upgrade process, improving data security and thus enhancing the reliability of the charging pile sub-component software upgrade method.
[0134] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0135] Based on the same inventive concept, this application also provides a charging pile component software upgrade device for implementing the charging pile component software upgrade method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more charging pile component software upgrade device embodiments provided below can be found in the limitations of the charging pile component software upgrade method described above, and will not be repeated here.
[0136] In one embodiment, such as Figure 9 As shown, a charging pile component software upgrade device 900 is provided, including: an acquisition module 902, an information extraction module 904, a judgment module 906, and an issuance module 908, wherein:
[0137] Module 902 is used to obtain the sub-component identifier and upgrade package of the sub-component to be upgraded;
[0138] Information extraction module 904 is used to extract version information of the upgrade software package;
[0139] The judgment module 906 is used to obtain the sub-component version information of the sub-component corresponding to the sub-component identifier, and determine whether the sub-component needs to be upgraded based on the version information of the upgrade package and the sub-component version information.
[0140] The distribution module 908 is used to distribute the upgrade package to the sub-component if the judgment result of the judgment module 906 is that the sub-component needs to be upgraded; the upgrade package is used to upgrade the software of the sub-component.
[0141] In one embodiment, the judgment module 906 is further configured to: obtain the working status information of the charging pile, and determine whether the current working status supports software upgrade based on the working status information; the information extraction module 904 is specifically configured to: if the judgment result of the judgment module is that software upgrade is supported, then execute the step of extracting the version information of the upgrade software package.
[0142] In one embodiment, the charging pile component software upgrade device 900 further includes: a security verification module for performing security verification on the upgrade software package; and an information extraction module 904 specifically for: if the security verification result is a pass, extracting the version information of the upgrade software package.
[0143] In one embodiment, the distribution module 908 includes: an acquisition unit for acquiring the size of the reserved buffer of the sub-component; a judgment unit for judging whether the size of the upgrade package is greater than the size of the reserved buffer; and a distribution unit for, if the judgment result of the judgment unit is yes, performing sub-packet processing on the upgrade package according to the size of the reserved buffer to obtain sub-packages, and sending the sub-packages to the sub-components sequentially.
[0144] In one embodiment, the sub-package includes at least a first sub-package and a second sub-package; the distribution unit is specifically configured to: send the first sub-package to the sub-component and send the first sub-verification code of the first sub-package to the sub-component; obtain a first verification result, and if the first verification result is a successful verification, send the second sub-package to the sub-component; the first verification result is calculated by the sub-component using the first sub-verification code of the received first sub-package and generated based on the first sub-verification code and the first sub-verification code.
[0145] In one embodiment, the distribution module 908 further includes: a verification result acquisition unit, used to acquire the whole package verification result; the whole package verification result is generated by the sub-component after merging the sub-package according to the sub-package and the group address information of the sub-package to obtain the software package to be used, and then performing security verification on the software package to be used.
[0146] In one embodiment, the issuing module 908 further includes a reset unit for sending a reset command to the subcomponent.
[0147] Each module in the aforementioned charging pile component software upgrade device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0148] In one embodiment, a charging station is provided, which includes a main controller and a sub-component, the main controller being connected to the sub-component for implementing the steps of the method described above.
[0149] The main controller can be a hardware module containing various processing chips and their peripheral circuits, possessing logic operation functions. This processing chip can be a microcontroller, DSP chip, or FPGA chip. The sub-components can be batteries, charging / discharging modules, and protection modules, etc. Specific limitations regarding the software upgrade methods for charging pile sub-components are detailed above and will not be repeated here. Specifically, the main controller works collaboratively with each sub-component to realize the charging and discharging functions of the charging pile. Furthermore, the charging pile also includes a communication component, through which the main controller establishes a connection with the server.
[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0151] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0152] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0153] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for upgrading the software of a charging pile component, characterized in that, The method includes: Obtain the sub-component identifier and upgrade package of the sub-component to be upgraded; Extract the version information of the upgrade software package; Obtain the subcomponent version information of the subcomponent corresponding to the subcomponent identifier, and determine whether the subcomponent needs to be upgraded based on the version information of the upgrade package and the subcomponent version information; If the sub-component needs to be upgraded, the upgrade package is distributed to the sub-component; the upgrade package is used to upgrade the software of the sub-component. The main controller obtains the size of the reserved buffer of the sub-component in two ways: actively obtaining or passively receiving. After obtaining the size of the reserved buffer of the sub-component, the main controller compares the size of the reserved buffer with the size of the upgrade package. If the size of the upgrade package is less than or equal to the size of the reserved buffer, the main controller sends the entire upgrade package to the reserved buffer, completing the distribution of the upgrade package. If the size of the upgrade package is greater than the size of the reserved buffer, the main controller performs packet processing on the upgrade package according to the size of the reserved buffer to obtain at least two sub-packages, and sends a start packet assembly command to the sub-component, sending each sub-package sequentially to the sub-component. The size of each sub-package should be less than or equal to the size of the reserved buffer. The sub-package includes at least a first sub-package and a second sub-package; the step of sequentially sending each of the sub-packages to the sub-component includes: sending the first sub-package to the sub-component and sending a first sub-verification code of the first sub-package to the sub-component; obtaining a first verification result, and if the first verification result is a successful verification, sending the second sub-package to the sub-component; the first verification result is generated by the sub-component calculating the first sub-verification code of the received first sub-package and generating it based on the first sub-verification code. The sub-package carries the packet address information corresponding to the sub-package; after the sub-package is sent to the sub-component in sequence, the method further includes: obtaining the whole packet verification result; the whole packet verification result is generated by the sub-component after performing a packet merging process on the sub-package and the packet address information of the sub-package to obtain the ready-to-use package, and performing a security verification on the ready-to-use package.
2. The method according to claim 1, characterized in that, Before extracting the version information of the upgrade package, the process also includes: Obtain the working status information of the charging pile, and determine whether the current working status supports software upgrade based on the working status information; If so, then proceed with the step of extracting the version information of the upgrade package.
3. The method according to claim 1, characterized in that, Before extracting the version information of the upgrade package, the process also includes: Perform security verification on the upgrade software package; The step of extracting the version information of the upgrade package includes: If the security verification result is a pass, the version information of the upgrade software package is extracted.
4. The method according to claim 1, characterized in that, After obtaining the full package verification result, the process also includes: Send a reset command to the sub-component.
5. A software upgrade device for a charging pile component, characterized in that, The device includes: The acquisition module is used to obtain the sub-component identifier and upgrade package of the sub-component to be upgraded; An information extraction module is used to extract the version information of the upgrade software package; The judgment module is used to obtain the sub-component version information of the sub-component corresponding to the sub-component identifier, and determine whether the sub-component needs to be upgraded based on the version information of the upgrade package and the sub-component version information; The distribution module is used to distribute the upgrade package to the sub-component if the judgment module determines that the sub-component needs to be upgraded; the upgrade package is used to upgrade the software of the sub-component. The device further includes: a method by which the main controller obtains the size of the reserved buffer of the sub-component, including active acquisition or passive reception; after obtaining the size of the reserved buffer of the sub-component, the main controller compares the size of the reserved buffer with the size of the upgrade package; if the size of the upgrade package is less than or equal to the size of the reserved buffer, the main controller sends the entire upgrade package to the reserved buffer to complete the distribution of the upgrade package; if the size of the upgrade package is greater than the size of the reserved buffer, the main controller performs packet processing on the upgrade package according to the size of the reserved buffer to obtain at least two sub-packages, and sends a start packet assembly command to the sub-component, sending each sub-package sequentially to the sub-component, wherein the size of each sub-package should be less than or equal to the size of the reserved buffer; The sub-package includes at least a first sub-package and a second sub-package; the device is configured to: send the first sub-package to the sub-component and send a first sub-verification code of the first sub-package to the sub-component; obtain a first verification result, and if the first verification result is a successful verification, send the second sub-package to the sub-component; the first verification result is generated by the sub-component calculating the first sub-verification code of the received first sub-package and generating it based on the first sub-verification code and the first sub-verification code; The sub-package carries the packet address information corresponding to the sub-package; the device further includes: a verification result acquisition unit, used to acquire the whole package verification result; the whole package verification result is generated by the sub-component after performing a combined package processing on the sub-package according to the sub-package and the packet address information of the sub-package to obtain a ready-to-use package, and performing a security verification on the ready-to-use package.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
7. A charging pile, characterized in that, The charging pile includes a main controller and a sub-component, wherein the main controller is connected to the sub-component and is used to implement the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Charger remote online upgrade method and system
CN107797812A
Charging pile upgrading method and device and charging pile system
CN113535202A