Charging pile software upgrading method, electronic equipment and computer readable storage medium

The composite differential patch file, generated and encrypted with a differential algorithm, solves the compatibility problem of cross-version upgrades for charging pile software, achieving efficient and secure software upgrades, and is suitable for rapid upgrades of charging pile equipment.

CN121833012APending Publication Date: 2026-04-10SHAANXI GREEN ENERGY ELECTRONIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI GREEN ENERGY ELECTRONIC TECH CO LTD
Filing Date
2026-03-13
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing charging pile software upgrade methods have compatibility issues when upgrading across versions, which can easily lead to functional abnormalities, and also consume a lot of network bandwidth and take a long time.

Method used

A differential algorithm is used to compare and package the old and new versions of the software, generating a composite differential patch file, which is then encrypted, signed, and transmitted to the charging upgrade module. After the signature is approved, the charging upgrade module directly upgrades the new version based on the old version of the software and the patch file.

Benefits of technology

It improves the compatibility of charging pile software across versions, reduces network bandwidth usage and upgrade time, and ensures the normal operation of the charging pile software upgrade function, especially suitable for the rapid synchronous upgrade of large-scale distributed charging pile clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833012A_ABST
    Figure CN121833012A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of charging piles, and discloses a charging pile software upgrading method, electronic equipment and a computer readable storage medium, a server is adopted to compare and package new-version software and old-version software based on a differentiation difference algorithm, and a small-size composite difference patch file is generated; and the encrypted signature of the composite differential patch file is transmitted to the charging upgrading module in the charging pile to replace the traditional full package transmission, so that the network bandwidth occupation can be remarkably reduced, the software upgrading time consumption is saved, and the method is particularly suitable for the rapid synchronous upgrading of a large-scale distributed charging pile cluster. And under the condition that the charging upgrading module checks that the signature of the composite differential patch file is passed, the difference caused by cross-version upgrading can be ignored, and new-version software can be obtained directly based on old-version software and the composite differential patch file, so that the cross-version upgrading compatibility of the charging pile software is improved, and the normal upgrading function of the charging pile software is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of charging pile technology, and in particular to a charging pile software upgrade method, electronic device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of the new energy industry, charging piles, as the core infrastructure for charging conversion, have been widely used in electric vehicles and energy storage systems. When new functional requirements or software updates emerge in charging piles on the market, the software of the charging pile equipment needs to be adaptively upgraded to meet the daily use of the charging piles. Currently, mainstream charging pile upgrade methods can meet the upgrade needs of some scenarios, but each upgrade requires the transfer of a complete installation package, and does not take into account the compatibility of cross-version upgrades, which can easily lead to software upgrade malfunctions due to version jumps. Summary of the Invention

[0003] This invention aims to at least partially address one of the technical problems in related technologies. To this end, this invention proposes a charging pile software upgrade method, an electronic device, and a computer-readable storage medium, which can improve the cross-version upgrade compatibility of charging pile software.

[0004] In a first aspect, embodiments of the present invention provide a charging pile software upgrade method, applied to a server in a software upgrade system, the software upgrade system further including a charging upgrade module disposed within the charging pile, the method comprising: The new and old versions of the software are compared and packaged based on the differential algorithm to generate a composite differential patch file. The composite differential patch file is encrypted and signed, and then transmitted to the charging upgrade module. This allows the charging upgrade module to upgrade the software to the new version based on the old version and the composite differential patch file, provided that the signature of the composite differential patch file passes the verification.

[0005] Optionally, in one embodiment of the present invention, the step of comparing and packaging the new version of the software and the old version of the software based on the differential algorithm to generate a composite differential patch file includes: The new and old versions of the software are decompressed into text files to obtain new and old text files respectively; and the new and old versions of the software are decompressed into binary files to obtain new and old binary files respectively. Based on the comparison difference between the new text file and the old text file, a first difference file is obtained; and based on the comparison difference between the new binary file and the old binary file, a second difference file is obtained. The first difference file and the second difference file are packaged and compressed to generate a composite difference patch file.

[0006] Optionally, in one embodiment of the present invention, obtaining the first difference file based on the comparison difference between the new text file and the old text file includes: The new text file and the old text file are parsed respectively to obtain the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file. Based on the binary comparison of the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file, a first content file and a second content file are obtained. The first content file includes all the contents of the first functional modules that are the same as each of the contents of the second functional modules. The second content file includes all the contents of the second functional modules that are different from each of the contents of the first functional modules. A first difference file is obtained based on the first content file and the second content file.

[0007] Optionally, in one embodiment of the present invention, obtaining the second difference file based on the comparison difference between the new binary file and the old binary file includes: The new binary file and the old binary file are parsed respectively to obtain the contents of multiple third functional modules in the new binary file and the contents of multiple fourth functional modules in the old binary file. Based on the binary comparison of multiple third functional module contents in the new binary file and multiple fourth functional module contents in the old binary file, a third content file and a fourth content file are obtained. The third content file includes all fourth functional module contents that are the same as each of the third functional module contents, and the fourth content file includes all fourth functional module contents that are different from each of the third functional module contents. Delete the third content file and retain the fourth content file; The fourth content file is converted into a corresponding patch file using the bsdiff differential algorithm, and the patch file is used to replace the new binary file to obtain the second differential file.

[0008] Optionally, in one embodiment of the present invention, obtaining the first difference file based on the first content file and the second content file includes: Delete the first content file from the new text file to obtain the corrected text file; The corrected text file and the second content file are combined to obtain the first difference file.

[0009] Secondly, embodiments of the present invention provide a charging pile software upgrade method, applied to a charging upgrade module in a software upgrade system, wherein the charging upgrade module is disposed within the charging pile, and the software upgrade system further includes a server, the method comprising: Receive a composite differential patch file transmitted by the server with encrypted signature, wherein the composite differential patch file is generated by the server by comparing and packaging the new version of the software and the old version of the software based on a differential algorithm; If the signature of the composite differential patch file passes verification, the new version of the software is upgraded based on the old version and the composite differential patch file.

[0010] Optionally, in one embodiment of the present invention, the upgrade to obtain the new version of software based on the old version of software and the composite differential patch file includes: The old version of the software and the composite differential patch file are decompressed respectively to obtain the old text file and the patch file. The new version of the software is obtained by upgrading based on the old text file and the patch file.

[0011] Optionally, in one embodiment of the present invention, the upgrade to obtain the new version of the software based on the old text file and the patch file includes: The old text file is replaced by the patch file to obtain the updated old text file; Based on the composite differential patch file and the old text update file, a new binary file is obtained; The new version of the software is obtained by packaging the new binary file.

[0012] Thirdly, embodiments of the present invention provide an electronic device, comprising: At least one processor; At least one memory for storing at least one program; The charging pile software upgrade method as described in the first and second aspects is implemented when at least one of the programs is executed by at least one of the processors.

[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the charging pile software upgrade method as described in the first and second aspects.

[0014] The charging pile software upgrade method, electronic device, and computer-readable storage medium proposed in this invention address the potential heterogeneity of firmware, configuration, and resource files in the charging pile software. By employing a server-based differential algorithm to compare and package the new and old versions of the software, a smaller composite differential patch file is generated. This composite differential patch file is then encrypted, signed, and transmitted to the charging upgrade module within the charging pile, replacing the traditional full-package transmission. This significantly reduces network bandwidth usage and saves software upgrade time. Furthermore, if the composite differential patch file signature is verified, the charging upgrade module can ignore the differences caused by cross-version upgrades and directly upgrade to the new version of the software based on the old version and the composite differential patch file, thereby improving the cross-version upgrade compatibility of the charging pile software and ensuring the normal operation of the charging pile software upgrade function. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of a software upgrade system for performing a charging pile software upgrade method according to an embodiment of the present invention; Figure 2 This is a flowchart of a charging pile software upgrade method provided in an embodiment of the present invention; Figure 3 yes Figure 2 The flowchart of step S1000 in the middle; Figure 4 yes Figure 3 A partial flowchart of step S1200, "Obtain the first difference file based on the comparison difference between the new text file and the old text file"; Figure 5 yes Figure 4 The flowchart of step S1230 in the text; Figure 6 yes Figure 3 A partial flowchart of step S1200, "Obtain the second difference file based on the comparison difference between the new binary file and the old binary file"; Figure 7 This is a flowchart of a charging pile software upgrade method provided in another embodiment of the present invention; Figure 8 yes Figure 7 The flowchart of step S4000 in the middle; Figure 9 yes Figure 8 The flowchart of step S4200 in the process; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.

[0018] Figure 1 This is a schematic diagram of a software upgrade system for performing a charging pile software upgrade method, provided as an embodiment of this application.

[0019] like Figure 1 As shown, the software upgrade system includes, but is not limited to, a server and a charging upgrade module installed in the charging pile. The server can establish a communication connection with the charging upgrade module through technologies such as segmented transmission and breakpoint resume, and can adapt to the complex network environment where the charging pile is located (such as weak 4G signal, unstable WiFi, etc.) to ensure that the upgrade task can still be reliably completed under low-quality network conditions. The server mainly provides functions such as version management, differential generation, upgrade task distribution and status monitoring, while the charging upgrade module is mainly used to integrate differential merging engine, security verification module and rollback controller.

[0020] In one embodiment, the security verification module in the charging upgrade module introduces an end-to-end encrypted signature and integrity verification mechanism to prevent patch files from being tampered with during transmission or storage, ensure that the charging pile only executes upgrade instructions from legitimate sources, and avoid the risk of malicious code injection.

[0021] In one embodiment, the rollback controller in the charging upgrade module introduces a local rollback engine and a cloud collaboration mechanism. When the upgrade fails, it automatically restores to a stable version and reports fault information. It supports remote diagnosis and version rollback management, which can minimize the downtime of charging pile equipment. For example, by reporting error logs (such as merging progress and network status), the cloud platform can accurately locate the problem (such as the failure of specific fragment transmission) and guide the operation and maintenance personnel to perform targeted repairs.

[0022] The software upgrade system and application scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will understand that as software upgrade systems evolve and new application scenarios emerge, the technical solutions provided in this application are also applicable to similar technical problems.

[0023] It will be understood by those skilled in the art that Figure 1The software upgrade system shown does not constitute a limitation on the embodiments of this application, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0024] based on Figure 1 The structure of the software upgrade system shown in the figure is illustrated, and various embodiments of the charging pile software upgrade method of this application are proposed.

[0025] Figure 2 This is a flowchart illustrating a charging pile software upgrade method according to an embodiment of the present invention. Figure 2 As shown, this charging pile software upgrade method can be applied to, but is not limited to, applications such as... Figure 1 The server in the software upgrade system shown includes, but is not limited to, steps S1000 to S2000.

[0026] Step S1000: Based on the differential algorithm, compare and package the new version of the software and the old version of the software to generate a composite differential patch file; Step S2000: The composite differential patch file is encrypted and signed and transmitted to the charging upgrade module, so that the charging upgrade module can upgrade to the new version of the software based on the old version and the composite differential patch file after verifying that the composite differential patch file signature is successful.

[0027] In this step, to address the potential heterogeneity of firmware, configuration, and resource files in the charging pile software, a server uses a differential algorithm to compare and package the new and old versions of the software, generating a smaller composite differential patch file. This composite differential patch file is then encrypted, signed, and transmitted to the charging upgrade module within the charging pile, replacing the traditional full-package transmission. This significantly reduces network bandwidth usage and saves software upgrade time, making it particularly suitable for rapid synchronous upgrades of large-scale distributed charging pile clusters. Furthermore, once the composite differential patch file signature is verified, the charging upgrade module can ignore the differences caused by cross-version upgrades and directly upgrade to the new version of the software based on the old version and the composite differential patch file, thereby improving the cross-version upgrade compatibility of the charging pile software and ensuring the normal operation of the charging pile software upgrade function.

[0028] In one embodiment, the specific implementation of encrypted signature transmission can be various, such as, but not limited to, using asymmetric encryption (RSA-2048) and SHA-256 hash verification to strengthen end-to-end security protection, have anti-tampering capabilities, effectively resist man-in-the-middle attacks and malicious code injection, and further improve the patch tampering detection rate.

[0029] In one embodiment, the specific method by which the charging upgrade module verifies the signature of the composite differential patch file is well known to those skilled in the art, such as the signature authentication method under SHA-256 hash verification, etc., and will not be described in detail here to avoid redundancy.

[0030] like Figure 3 As shown, in one embodiment of the present invention, step S1000 may include, but is not limited to, the following steps: Step S1100: Decompress the new version of the software and the old version of the software into text files to obtain new text files and old text files respectively; and decompress the new version of the software and the old version of the software into binary files to obtain new binary files and old binary files respectively. Step S1200: Based on the comparison difference between the new text file and the old text file, a first difference file is obtained; and based on the comparison difference between the new binary file and the old binary file, a second difference file is obtained. Step S1300: Package and compress the first difference file and the second difference file to generate a composite difference patch file.

[0031] In this step, the purpose of text decompression and binary decompression is to obtain the corresponding text file and binary file respectively, and then compare the new text file with the old text file and the new binary file with the old binary file respectively, so as to obtain the first difference file in the text case and the second difference file in the binary case respectively. Then, the first difference file and the second difference file are packaged and compressed, that is, compression sensing technology is introduced to perform secondary compression on the difference part, which can reduce the size of the patch file, thus obtaining a composite difference patch file.

[0032] like Figure 4 As shown, in one embodiment of the present invention, step S1200, "obtaining a first difference file based on the comparison difference between the new text file and the old text file," may include, but is not limited to, the following steps: Step S1210: Parse the new text file and the old text file respectively to obtain the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file. Step S1220: Perform a binary comparison based on the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file to obtain a first content file and a second content file. The first content file includes all first functional module contents that correspond to each second functional module content, and the second content file includes all second functional module contents that are different from each first functional module content. Step S1230: Obtain the first difference file based on the first content file and the second content file.

[0033] In this step, by parsing the new text file and the old text file respectively, the contents of different functional modules in the new text file and the old text file are obtained accordingly. Then, the files are deduplicated by binary comparison, and the first content file and the second content file are obtained. Since the first content file includes all the contents of the first functional modules that are the same as the contents of each second functional module, and the second content file includes all the contents of the second functional modules that are different from the contents of each first functional module, that is, they respectively reflect the overlapping parts of the functional module contents of the new text file and the old text file, the first difference file can be further determined based on the first content file and the second content file.

[0034] In one embodiment, the specific form and structure of the contents of multiple first functional modules and multiple second functional modules need to be determined according to the actual scenario. Generally speaking, each text file includes multiple different functional modules. The purpose of the above comparison of the contents of multiple first functional modules and multiple second functional modules is to locate the modified and optimized positions of the functional modules in the new text file and the old text file, so as to facilitate subsequent operations such as updating and restoring the modified and optimized positions.

[0035] like Figure 5 As shown, in one embodiment of the present invention, step S1230 may include, but is not limited to, the following steps: Step S1231: Delete the first content file in the new text file to obtain the corrected text file; Step S1232: Combine the correction text file and the second content file to obtain the first difference file.

[0036] In this step, the first content file in the new text file is deleted to remove the duplicate parts of the functional module content in the old text file. Then, the first difference file is obtained by combining the difference parts in the new text file relative to the old text file (i.e., the second content file).

[0037] like Figure 6 As shown, in one embodiment of the present invention, step S1200, "obtaining a second difference file based on the comparison difference between the new binary file and the old binary file," may include, but is not limited to, the following steps: Step S1240: Parse the new binary file and the old binary file respectively to obtain the contents of multiple third functional modules in the new binary file and the contents of multiple fourth functional modules in the old binary file. Step S1250: Based on the multiple third functional module contents in the new binary file and the multiple fourth functional module contents in the old binary file, perform binary comparison to obtain a third content file and a fourth content file. The third content file includes all fourth functional module contents that correspond to each third functional module content, and the fourth content file includes all fourth functional module contents that are different from each third functional module content. Step S1260: Delete the third content file and keep the fourth content file; Step S1270: Convert the fourth content file into a corresponding patch file using the bsdiff differential algorithm, and replace the new binary file with the patch file to obtain the second differential file.

[0038] In this step, by deleting the third content file and keeping the fourth content file, the difference between the new binary file and the old binary file is preserved separately. The fourth content file is then converted into a corresponding patch file (such as *.patch) based on the bsdiff difference algorithm. The new binary file is then replaced with the patch file to obtain the second difference file corresponding to the difference in the binary case.

[0039] In one embodiment, the bsdiff differential algorithm, a well-known update algorithm for binary files, may include, but is not limited to, steps such as constructing a suffix array of the fourth content file, finding the longest matching prefix of the suffix array, and generating a corresponding patch file based on the determined longest matching prefix. For example, in a specific example, an improved bsdiff differential algorithm is used to extract differences from charging pile firmware files (such as `v1.0.bin` and `v1.1.bin`) to generate a patch file `v1.0_to_v1.1.patch` (whose size is only 5% of the full package). All .patch files are packaged and compressed to generate setup.tar.gz, which reduces the size of the full upgrade package by 95%. It also supports generating continuous patches from any historical version (such as v1.0→v2.0→v3.0), avoiding redundant operations of forced full upgrades.

[0040] Figure 7 A flowchart illustrating a charging pile software upgrade method according to another embodiment of the present invention. Figure 6 As shown, this charging pile software upgrade method can be applied to, but is not limited to, applications such as... Figure 1 The charging upgrade module in the software upgrade system shown includes, but is not limited to, steps S3000 to S4000.

[0041] Step S3000: Receive the composite differential patch file transmitted by the server with encryption and signature, wherein the composite differential patch file is generated by the server by comparing and packaging the new version software and the old version software based on the differential algorithm; Step S4000: If the signature of the composite differential patch file passes verification, upgrade the software to a new version based on the old version and the composite differential patch file.

[0042] In this step, to address the potential heterogeneity of firmware, configuration, and resource files in the charging pile software, a server uses a differential algorithm to compare and package the new and old versions of the software, generating a smaller composite differential patch file. This composite differential patch file is then encrypted, signed, and transmitted to the charging upgrade module within the charging pile, replacing the traditional full-package transmission. This significantly reduces network bandwidth usage and saves software upgrade time, making it particularly suitable for rapid synchronous upgrades of large-scale distributed charging pile clusters. Furthermore, once the composite differential patch file signature is verified, the charging upgrade module can ignore the differences caused by cross-version upgrades and directly upgrade to the new version of the software based on the old version and the composite differential patch file. This improves the cross-version upgrade compatibility of the charging pile software and ensures the normal operation of the charging pile software upgrade function. In particular, through a lightweight differential merging algorithm and memory optimization design, low-configuration charging pile devices (such as early-model MCUs) can still efficiently complete patch parsing and application, further extending the technical lifecycle of older equipment.

[0043] like Figure 8 As shown, in one embodiment of the present invention, step S4000 may include, but is not limited to, the following steps: Step S4100: Decompress the old version software and the composite differential patch file respectively to obtain the old text file and the patch file. Step S4200: Upgrade to a new version of the software based on the old text files and patch files.

[0044] In this step, the old version of the software and the composite differential patch file are decompressed separately to obtain the old text file and patch file required for the temporary scenario. Then, by combining the old text file and patch file, the new version of the software can be upgraded. This means that the charging pile only needs to temporarily store the patch file and merge and restore the file in time. This will greatly improve the compatibility of charging pile devices with insufficient remaining storage space and avoid the charging pile software upgrade failure due to storage space issues.

[0045] like Figure 9 As shown, in one embodiment of the present invention, step S4200 may include, but is not limited to, the following steps: Step S4210: Replace the old text file with the patch file to obtain the updated old text file; Step S4220: Based on the composite differential patch file and the old text update file, restore to obtain the new binary file; Step S4230: Package the new binary file to obtain the new version of the software.

[0046] In this step, lightweight differential merging is achieved by combining composite differential patch files with old text update files. This means that by finding the differences in the files, the new files are restored, packaged, and compressed into a new version of the software, thus enabling cross-version upgrades. In particular, the charging pile does not need to store the full capacity of the new version file in advance. Instead, it continuously updates the software of the old equipment through minimal patches, which can prevent the charging pile equipment from being prematurely obsolete due to insufficient hardware performance. Moreover, there is no need to consider the version of the new version file. By combining composite differential patch files with old text update files, the corresponding new binary file can be restored, thereby realizing the conversion of the new version of the software. Overall, it achieves low resource consumption. According to experimental statistics, the lightweight differential merging engine has a memory consumption of less than 10MB and a CPU utilization of less than 15%, which allows early low-configuration charging piles (such as 512MB RAM devices) to still complete software upgrades smoothly.

[0047] Figure 10 This is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present invention. Figure 10 As shown, the electronic device 1000 may include, but is not limited to, a memory 1100 and a processor 1200. The number of memories 1100 and processors 1200 may be one or more. Figure 10 Taking a memory 1100 and a processor 1200 as an example; the memory 1100 and the processor 1200 in the device can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.

[0048] The memory 1100, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the charging pile software upgrade method provided in any embodiment of the present invention. The processor 1200 implements the above-described charging pile software upgrade method by running the software programs, instructions, and modules stored in the memory 1100.

[0049] The memory 1100 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function. Furthermore, the memory 1100 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include memory remotely located relative to the processor 1200, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0050] An embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions for performing a charging pile software upgrade method as provided in any embodiment of the present invention.

[0051] An embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the charging pile software upgrade method provided in any embodiment of the present invention.

[0052] The electronic devices and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of electronic devices and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0053] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0054] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0055] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

Claims

1. A method for upgrading charging pile software, characterized in that, A server used in a software upgrade system, the software upgrade system further including a charging upgrade module disposed within the charging pile, the method comprising: The new and old versions of the software are compared and packaged based on the differential algorithm to generate a composite differential patch file. The composite differential patch file is encrypted and signed, and then transmitted to the charging upgrade module. This allows the charging upgrade module to upgrade the software to the new version based on the old version and the composite differential patch file, provided that the signature of the composite differential patch file passes the verification.

2. The charging pile software upgrade method according to claim 1, characterized in that, The process of comparing and packaging the new and old versions of the software based on the differential algorithm to generate a composite differential patch file includes: The new and old versions of the software are decompressed into text files to obtain new and old text files respectively; and the new and old versions of the software are decompressed into binary files to obtain new and old binary files respectively. Based on the comparison difference between the new text file and the old text file, a first difference file is obtained; and based on the comparison difference between the new binary file and the old binary file, a second difference file is obtained. The first difference file and the second difference file are packaged and compressed to generate a composite difference patch file.

3. The charging pile software upgrade method according to claim 2, characterized in that, The process of obtaining a first difference file based on the comparison difference between the new text file and the old text file includes: The new text file and the old text file are parsed respectively to obtain the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file. Based on the binary comparison of the contents of multiple first functional modules in the new text file and the contents of multiple second functional modules in the old text file, a first content file and a second content file are obtained. The first content file includes all the contents of the first functional modules that are the same as each of the contents of the second functional modules. The second content file includes all the contents of the second functional modules that are different from each of the contents of the first functional modules. A first difference file is obtained based on the first content file and the second content file.

4. The charging pile software upgrade method according to claim 2, characterized in that, The process of obtaining a second difference file based on the comparison difference between the new binary file and the old binary file includes: The new binary file and the old binary file are parsed respectively to obtain the contents of multiple third functional modules in the new binary file and the contents of multiple fourth functional modules in the old binary file. Based on the binary comparison of multiple third functional module contents in the new binary file and multiple fourth functional module contents in the old binary file, a third content file and a fourth content file are obtained. The third content file includes all fourth functional module contents that are the same as each of the third functional module contents, and the fourth content file includes all fourth functional module contents that are different from each of the third functional module contents. Delete the third content file and retain the fourth content file; The fourth content file is converted into a corresponding patch file using the bsdiff differential algorithm, and the patch file is used to replace the new binary file to obtain the second differential file.

5. The charging pile software upgrade method according to claim 3, characterized in that, The process of obtaining the first difference file based on the first content file and the second content file includes: Delete the first content file from the new text file to obtain the corrected text file; The corrected text file and the second content file are combined to obtain the first difference file.

6. A method for upgrading charging pile software, characterized in that, A charging upgrade module is used in a software upgrade system, the charging upgrade module is installed inside the charging pile, the software upgrade system further includes a server, and the method includes: Receive a composite differential patch file transmitted by the server with encrypted signature, wherein the composite differential patch file is generated by the server by comparing and packaging the new version of the software and the old version of the software based on a differential algorithm; If the signature of the composite differential patch file passes verification, the new version of the software is upgraded based on the old version and the composite differential patch file.

7. The charging pile software upgrade method according to claim 6, characterized in that, The process of upgrading the software based on the old version and the composite differential patch file to obtain the new version includes: The old version of the software and the composite differential patch file are decompressed respectively to obtain the old text file and the patch file. The new version of the software is obtained by upgrading based on the old text file and the patch file.

8. The charging pile software upgrade method according to claim 7, characterized in that, The process of upgrading the software to the new version based on the old text file and the patch file includes: The old text file is replaced by the patch file to obtain the updated old text file; Based on the composite differential patch file and the old text update file, a new binary file is obtained; The new version of the software is obtained by packaging the new binary file.

9. An electronic device, characterized in that, Installed in charging stations, including: At least one processor; At least one memory for storing at least one program; The charging pile software upgrade method as described in any one of claims 1 to 8 is implemented when at least one of the programs is executed by at least one of the processors.

10. A computer-readable storage medium, characterized in that, It stores a processor-executable program, which, when executed by the processor, is used to implement the charging pile software upgrade method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Intelligent network connection vehicle remote upgrading device, method, equipment, medium and product

    CN119248323A