Manufacturing method of firmware upgrading total package and firmware upgrading method

By producing a unified packaging of differential packages and full packages, the problem of low firmware download efficiency of charging piles is solved, rapid upgrades and efficient updates are achieved, and user experience and compatibility are improved.

CN119292628APending Publication Date: 2025-01-10AUTEL UNITED CREATION SOFTWARE DEV CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411409491.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the prior art, the firmware download efficiency of charging piles is low, resulting in a large amount of bandwidth resources consumed by the download process, which will reduce the user experience for a long time.

Method used

By obtaining the issuance full package and the basic full package, making multiple differential packages, and packaging the differential package and the full package into a firmware upgrade general package, selecting the appropriate differential package or full package for firmware upgrade based on the local firmware version information.

Benefits of technology

It realizes rapid firmware upgrades, reduces download resource consumption, improves the efficiency and compatibility of charging pile firmware updates, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292628A_ABST
    Figure CN119292628A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a manufacturing method of a total firmware upgrade package and a firmware upgrade method. The manufacturing method of the total firmware upgrade package comprises the following steps: acquiring an issuing total package; determining a plurality of basic versions of which the version information is different from the release version and corresponding basic full-volume packets; respectively manufacturing a plurality of differential packages of different basic versions based on the issued full-volume package and each basic full-volume package; and manufacturing a firmware upgrading total package according to all the differential packages and the issued full package. And manufacturing a plurality of differential packages of different basic versions based on the issued total package, and uniformly packaging the differential packages of the plurality of basic versions and the total package to manufacture a firmware upgrading total package. When a plurality of charging piles need to upgrade the firmware, the differential package matched with the local basic version can be found from the total package so as to realize quick firmware upgrade, and the consumption of downloading resources is reduced. Meanwhile, for part of charging piles with backward versions, the full package can be downloaded in a targeted mode to complete firmware upgrading, and the method has good compatibility for the charging piles with various versions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of firmware upgrade, and in particular to a method for producing a firmware upgrade package and a firmware upgrade method. Background Art

[0002] As the new energy market continues to expand, new energy technologies are also developing rapidly. As one of the charging infrastructures, charging piles need to continuously upgrade their firmware to meet users' various needs for charging piles.

[0003] In the prior art, charging piles in the station need to download firmware update resources from the download server. In order to improve user perception, the frequency of firmware updates needs to be increased. However, each update requires re-downloading of the firmware, and the firmware data volume is relatively large, resulting in a large consumption of bandwidth resources during the download process, and the download time is too long, the download efficiency is not high, and the user experience is reduced. Summary of the invention

[0004] The embodiments of the present application aim to provide a method for producing a firmware upgrade package and a firmware upgrade method, so as to solve the technical problem of low firmware download efficiency of charging piles in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a method for preparing a firmware upgrade package, comprising:

[0006] Obtain a release full package, the version information of which is the release version;

[0007] Determine a plurality of base versions whose version information is different from the release version and a base full package corresponding to the base version;

[0008] Based on the released full package and each of the basic full packages, a plurality of differential packages corresponding to different basic versions are respectively produced;

[0009] The firmware upgrade package is produced according to all the differential packages and the released full package.

[0010] Optionally, the step of respectively producing a plurality of differential packages corresponding to different basic versions based on the released full package and each of the basic full packages includes:

[0011] Determine the difference between the released full package and each of the basic full packages based on a preset difference algorithm;

[0012] The differential package corresponding to each of the basic versions is produced based on the differential algorithm.

[0013] Optionally, the preparing the firmware upgrade total package according to all the differential packages and the full package includes:

[0014] Generate summary information of the full package and the differential package;

[0015] Packing the summary information of the full package and the differential package according to a preset order to generate firmware summary information;

[0016] The firmware summary information, the full package and the differential package are packaged in sequence according to the preset order to produce the firmware upgrade total package.

[0017] In a second aspect, an embodiment of the present application provides a firmware upgrade method, including:

[0018] In response to the upgrade instruction, obtaining firmware summary information;

[0019] Determine, according to the firmware summary information, a firmware upgrade package provided by the server, wherein the firmware upgrade package includes at least one full package and differential packages of multiple versions;

[0020] Determine that the full package or the differential package matching the local firmware version information is the target firmware update package;

[0021] The target firmware update package is downloaded and firmware is upgraded according to the target firmware update package.

[0022] Optionally, the firmware upgrade total package includes multiple firmware upgrade packages, the firmware summary information includes summary information of all the firmware update packages, and determining the firmware upgrade total package provided by the server according to the firmware summary information includes:

[0023] Determining summary information of each firmware update package according to the firmware summary information;

[0024] According to the summary information of the firmware update package, it is determined whether the firmware update package is the full package or the differential package.

[0025] Optionally, after determining, according to the summary information of the firmware update package, that the firmware update package is the full package or the differential package, the method further includes:

[0026] Determine whether the differential package exists in the firmware upgrade total package;

[0027] When the differential package does not exist in the firmware upgrade total package, the full package is determined to be the target firmware update package.

[0028] Optionally, determining the full package or the differential package matching the local firmware version information as the target firmware update package includes:

[0029] Determine the local version information of the local firmware and the basic version information of each of the differential packages;

[0030] Determine whether the basic version information is consistent with the local version information;

[0031] If so, determining that the differential package whose basic version information is consistent with the local version information and the full package are the target firmware update package;

[0032] If it does not exist, the full package is determined to be the target firmware update package.

[0033] Optionally, after downloading the target firmware update package and performing firmware upgrade according to the target firmware update package, the method further includes:

[0034] Determining whether the firmware upgrade is successful;

[0035] When the firmware upgrade is unsuccessful, a version rollback operation is performed.

[0036] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic device implements the method described in the first aspect or the second aspect.

[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method described in the first aspect or the second aspect.

[0038] The embodiments of the present application can achieve the following technical effects: based on the issued full package, multiple differential packages of different basic versions are produced, and the differential packages of multiple basic versions and the full package are uniformly packaged to produce a firmware upgrade package. When multiple charging piles need to upgrade their firmware, a differential package matching the local basic version can be found from the firmware upgrade package to quickly upgrade the firmware and reduce the consumption of download resources. At the same time, for some charging piles with relatively backward versions, the full package can also be downloaded specifically to complete the firmware upgrade, which has good compatibility with various versions of charging piles. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1A schematic diagram of an application scenario of a method for making a firmware upgrade package provided in an embodiment of the present application;

[0041] Figure 2 A flowchart of a method for making a firmware upgrade package provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of a differential packet production process provided in an embodiment of the present application;

[0043] Figure 4 A flowchart of a method for packaging firmware summary information, a full package, and a differential package in sequence according to a preset order to produce a firmware upgrade package provided by an embodiment of the present application;

[0044] Figure 5 A flowchart of a firmware upgrade method provided in one embodiment of the present application;

[0045] Figure 6 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0047] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0048] First, the application scenario of the method for making a firmware upgrade package provided in an embodiment of the present application is introduced.

[0049] See also Figure 1 , Figure 1 Schematic diagram of an application scenario of the method for making a firmware upgrade package provided in an embodiment of the present application. The scenario includes multiple charging piles 10 and a download server 20. The charging pile 10 can establish a communication connection with the download server 20 to download a firmware upgrade package from the download server 20, thereby updating and upgrading the firmware of the charging pile 10.

[0050] The charging pile 10 is used to provide power to other electrical devices such as new energy vehicles. Each charging pile 10 is configured with firmware, which is defined as a driver program stored inside the charging pile. The charging pile 10 uses the firmware to perform actions according to set standards to achieve its assigned functions, which is used to support the charging pile 10 to interact with users and charge electrical devices. Different charging piles 10 may be configured with different versions of firmware. Each charging pile 10 can communicate with the download server 20, so that each charging pile 10 can request the download server 20 to download a firmware upgrade package to upgrade the lower version of the firmware to the latest version of the firmware.

[0051] The firmware upgrade package is used to upgrade the firmware version built into the charging pile 10. Specifically, the firmware upgrade package is produced by the manufacturer and stored in the download server 20, so that all charging piles 20 can find the firmware upgrade package in the download server 20 and download it, thereby completing the firmware version upgrade of the charging pile 20. The firmware upgrade package can be in the form of a differential package or a full package, which will be described in detail later and will not be described here.

[0052] The download server 20 is used to provide the firmware upgrade package to the charging pile 10 for download. Specifically, the manufacturer first makes a firmware upgrade package, and then stores the firmware upgrade package in the download server 20. Then, the download server 20 and the charging pile 10 transmit data through the HTTP protocol or the FTP protocol. Finally, the charging pile 10 completes the firmware version upgrade according to the firmware upgrade package. It can also be downloaded and seeded by a charging pile 10, and then sent to other charging piles 10 through P2P technology. It can be understood that the server 20 here can be a physical server or a logical server virtualized by multiple physical servers. The server 20 can also be a server group composed of multiple servers that can communicate with each other, and each functional module can be distributed on each server in the server group.

[0053] Based on the download server 20 in the application scenario introduced above, the method for producing the firmware upgrade package provided in the embodiment of the present application is described below.

[0054] See also Figure 2 , Figure 2 A flowchart of a method for making a firmware upgrade package provided in an embodiment of the present application specifically includes the following steps:

[0055] S21. Obtain a release full package, where the version information of the release full package is the release version.

[0056] In this step, the full package released is the complete firmware information to be released by the manufacturer, that is, the full package released can be directly installed on the charging pile, completely replacing the original firmware to support the charging pile to realize the complete new firmware functions. Specifically, since the full package released has complete firmware information, its data volume is relatively large and the download time is relatively long. If the update frequency is high, it is easy to cause unnecessary burdens on the charging pile and the users who use the charging pile. In contrast, using the full package to upgrade the firmware can be understood as reinstalling the latest version of the firmware. Therefore, no matter how old the local firmware version of the charging pile is, it does not affect the installation of the new firmware on the charging pile. That is, the user does not need to select the corresponding firmware update package for download according to the local version.

[0057] In this step, the version information is a flag used to indicate the number of releases corresponding to the released firmware upgrade package. Specifically, the version information can be expressed as a version number. Each time a manufacturer releases a new firmware, a unique version number will be configured for the firmware so that the unique corresponding firmware can be determined by the version number. And the version number increases with the increasing number of releases. For example, the version number of the first release of the firmware is V1.00, the version number of the second release of the firmware is V1.02, and the version number of the third release of the firmware is V1.03. Specifically in this embodiment, for the full release package to be released this time, its version information is defined as the release version. It should be noted that not only the version information of the full release package is the release version, but also the version information of the differential package corresponding to the same firmware is the release version. That is, as long as the firmware of the firmware upgrade package points to the same firmware, its version information is the same, and it does not matter whether the firmware upgrade package is in the form of a differential package or a full package.

[0058] S22. Determine a base version whose version information is different from the released version and a base full package corresponding to the base version.

[0059] In this step, the basic full package is firmware information that is different from other versions of the released full package, and the basic version is version information that is different from the released version and corresponds to the basic full package. Specifically, the basic version can include multiple version information, as long as the version number of the basic full package (i.e., version information) lags behind the version number of the released full package. For example, different charging piles may be configured with different versions of firmware. The release version number of the full package released by the manufacturer this time is V1.08, then the version information of the local firmware in the charging pile is the basic version, and its version number can be V1.07, V1.06, V1.05, and so on.

[0060] It should be noted that although the basic version may include multiple versions, not all version information that lags behind the release version is the basic version. Specifically, the charging pile may miss the updated version of some firmware due to some reasons, and therefore lag behind a few versions. For example, the firmware of the charging pile missed the upgrade at version V1.05 and was not upgraded to V1.07. Therefore, the firmware upgrade optimization can be performed for the firmware of version V1.05, and V1.05 can be listed as the basic version. For V1.04, the number of charging piles that may miss multiple firmware version upgrades in a row is relatively small, so V1.04 is no longer listed as the basic version. Specifically in the application scenario, technicians in this field can decide whether to determine a certain version information as the basic version based on the actual situation, so as to update and upgrade it, and there is no limitation on this.

[0061] In this step, according to the basic version, the manufacturer can determine the basic full package corresponding to the basic version for subsequent differential package optimization and upgrade. Specifically, since the version information is relative to the only firmware upgrade package, the manufacturer can search the database for the basic full package corresponding to the basic version according to the basic version.

[0062] S23, based on the release full package and each basic full package, respectively create a plurality of differential packages corresponding to different basic versions.

[0063] In this step, the differential package is a firmware upgrade package made by comparing the difference between the basic full package and the released full package. Specifically, after determining the basic version and the released version, the corresponding basic full package and the released full package are determined, and then the difference between the two is determined by comparing the basic full package and the released full package, and the differential package is made according to the difference content. Thus, when the charging pile downloads a differential package that can match the local firmware version, the differential package only contains the difference between the local firmware and the released full package. According to the difference content, the local firmware information of the charging pile is corrected, and the firmware upgrade from the basic version to the released version can be realized. It can be understood that since the differential package mainly includes the difference between the basic full package and the released full package, and the same content between the two does not need to be included, the data volume of the differential package is relatively small, and the time taken for downloading is relatively small. For example, the data volume of the full package is 846Mb, and it takes 14 minutes and 6 seconds to download at a speed of about 1Mb / s, while for the differential package of the same release version, the data volume is 10M, and it only takes 6 seconds to download.

[0064] In this step, each basic full package needs to make a differential package that matches it to meet the needs of fast firmware upgrades for different charging piles. Specifically, corresponding to different basic full packages, there are also differences between different production sub-packages. For example, if the version information of the released full package is V1.08, the version information of one basic full package is V1.07, and the version information of another basic full package is V1.06, then differential packages need to be made separately, and each differential package can only be used for the basic full package that matches it. One of the differential packages is made based on the difference between V1.06 and V1.08, and is used for charging piles with a basic full package version information of V1.06. The other differential package is made based on the difference between V1.07 and V1.08, and is used for charging piles with a basic full package version information of V1.07.

[0065] S24. Create a firmware upgrade package based on all differential packages and the released full package.

[0066] In this step, the manufacturer packages all differential packages and full release packages together to create a firmware upgrade package, and stores the firmware upgrade package in the download server. The specific production method will be described in detail later and will not be introduced here.

[0067] In this step, the firmware upgrade package contains all differential packages and the full release package. When a firmware update is required, information is sent to all charging piles so that they can obtain the download link of the firmware upgrade package from the download server. After the charging pile obtains the download link of the firmware upgrade package, it first downloads the summary information to determine the target firmware update package, and then downloads the target firmware update package from the firmware upgrade package without downloading the entire firmware upgrade package. Specifically, based on the version information of the local firmware, if the charging pile can find a matching differential package in the firmware upgrade package, it can directly download the matching differential package and combine the local firmware to upgrade to the release version of the firmware; if the matching differential package cannot be found in the firmware upgrade package, the full release package is downloaded and the release version of the firmware is installed to directly replace the original local firmware.

[0068] In summary, the embodiment of the present application produces multiple differential packages of different basic versions based on the issued full package, and uniformly packages the differential packages of multiple basic versions with the full package to produce a firmware upgrade package. When multiple charging piles need to upgrade their firmware, a differential package that matches the local basic version can be found in the total package to quickly upgrade the firmware and reduce the consumption of download resources. At the same time, for some charging piles with backward versions, the full package can also be downloaded specifically to complete the firmware upgrade, which has good compatibility with various versions of charging piles.

[0069] The following describes a method for making a differential package in an embodiment of the present application.

[0070] See also Figure 3 , Figure 3 The differential packet production process provided in an embodiment of the present application specifically includes the following steps:

[0071] S31. Determine the difference between the released full package and each basic full package based on a preset differential algorithm.

[0072] S32. Create a differential package corresponding to each basic version based on a differential algorithm.

[0073] In step S31, there are certain differences between the released full package and the basic full package, which can be determined by a preset differential algorithm or directly determined by comparing binary data. For example, the differential algorithm is the Bsdiff algorithm. First, the content of the basic full package is sorted by sorting technology. The sorting can use the time complexity and space complexity of suffix sorting, or it can be sorted using hash technology, which is not limited. Then generate a subsequent permutation array, find the maximum matching length of the permutation array, and thereby determine the similar matching area and the non-matching area, where the non-matching area is the difference content. For more detailed technical content and principles of the differential algorithm, refer to some common algorithms in the field, such as the Bsdiff algorithm, the Xdelta3 algorithm, and the Rsync algorithm, which will not be introduced in detail here.

[0074] In step S32, by compressing and packaging the difference content and the same content, a differential package corresponding to the basic version can be obtained. Specifically, taking the Bsdiff algorithm as an example, the differential package includes four parts: a header (Header), a control block (Ctrlblock), a similar file (Diff block) and a file to be inserted (Extra block). By compressing the control block, similar files and files to be inserted, the amount of data in the differential package can be greatly reduced. Specifically in the embodiment, if the amount of differential package data corresponding to a certain basic version is greater than a certain threshold, such as 200Mb, no differential package is made for the basic version. The number of differential packages made depends on the number of basic versions selected, and usually 3 basic versions are selected to make differential packages.

[0075] The following describes a method for making a firmware upgrade package in an embodiment of the present application.

[0076] See also Figure 4 , Figure 4 A flowchart of a method for packaging firmware summary information, full package and differential package in sequence according to a preset order to produce a firmware upgrade package is provided in an embodiment of the present application, specifically including the following steps:

[0077] S41. Generate summary information of the full package and the differential package.

[0078] S42. Pack summary information of the full package and the differential package according to a preset order to generate firmware summary information.

[0079] S43, packaging the firmware summary information, the full package and the differential package in sequence according to a preset order to produce a firmware upgrade total package.

[0080] In step S41, the full package and the differential package are both firmware upgrade packages, and each firmware upgrade package generates header information, i.e., summary information, which is used to describe part of the information of the full package, such as the firmware code, firmware version number, firmware information offset, and MD5 checksum.

[0081] In step S42, the firmware summary information is a collection of summary information of all firmware upgrade packages, and the firmware summary information also constitutes the summary information of the firmware upgrade package. Specifically, the firmware summary information includes the version number, firmware code, file type, total data volume, number of files, and CRC32 check value of the firmware upgrade package, which are used to represent the firmware upgrade package as a whole, and also includes the summary information of each firmware upgrade package and the Sha256 checksum of the entire firmware upgrade package.

[0082] In step S43, the firmware summary information, the full package, and the differential package are packaged and integrated in sequence to produce a firmware upgrade package. Therefore, when the charging pile responds to the upgrade instruction and downloads the corresponding firmware upgrade package from the download server, it is not necessary to download the entire firmware upgrade package, but only the firmware summary information needs to be downloaded first. Then, based on the firmware summary information and the local firmware information, the target firmware upgrade package that needs to be downloaded in the firmware upgrade package is determined. Finally, the location of the target firmware upgrade package is determined from the firmware upgrade package based on the firmware summary information, and the target firmware upgrade package is downloaded according to the location to complete the firmware upgrade.

[0083] Therefore, by producing multiple differential packages of different basic versions based on the release version, and then packaging the differential packages and the full release package into a firmware upgrade package, the cloud server (i.e., the manufacturer) can send firmware upgrade instructions and the download address of the firmware upgrade package to all charging piles, and then the charging piles can judge and select the appropriate target firmware upgrade package based on the local firmware information and the firmware summary information of the firmware upgrade package.

[0084] In other embodiments, the cloud server can also make a differential package about the release version according to each basic version, and then the cloud server obtains the local firmware information of each charging pile, allocates a suitable differential package to it, and provides the download address of the differential package. The charging pile directly downloads the differential package and verifies and installs it. Compared with the previous embodiment, although it is possible to recommend a differential package for each charging pile in a targeted manner and achieve an upgrade completely relying on the differential package, the workload of the cloud server is too huge, which makes the cloud server burdened. And it is necessary to make a differential package according to each basic version. When the span of some basic versions is large, it is difficult to compile and manage the differential package.

[0085] Based on the charging pile 10 in the application scenario, the firmware upgrade method in the embodiment of the present application is introduced below.

[0086] See also Figure 5 , Figure 5 The following is a flowchart of a firmware upgrade method provided in an embodiment of the present application, which specifically includes the following steps:

[0087] S51. In response to an upgrade instruction, obtain firmware summary information.

[0088] S52: Determine a firmware upgrade package provided by the server according to the firmware summary information, where the firmware upgrade package includes at least one full package and differential packages of multiple versions.

[0089] S53: Determine the full package or the differential package matching the local firmware version information as the target firmware update package;

[0090] S54: Download the target firmware update package and perform firmware upgrade according to the target firmware update package.

[0091] In step S51, the cloud server first sends a firmware upgrade instruction to the charging pile. After receiving the upgrade instruction, the charging pile obtains the firmware summary information from the download server according to the file address contained in the upgrade instruction. As mentioned above, the download server stores the firmware upgrade package produced by the manufacturer at this time, and the firmware summary information is part of the firmware upgrade package.

[0092] In step S52, the firmware upgrade total package can be determined according to the firmware summary information. Specifically, the firmware summary information includes the number of firmware upgrade packages, the release version, and summary information of all firmware upgrade packages, etc., thereby determining the release full package and multiple differential packages of the firmware upgrade package. More specifically, step S52 includes the following:

[0093] S521. Determine summary information of each firmware update package according to the firmware summary information.

[0094] S522: Determine whether the firmware update package is a full package or a differential package according to the summary information of the firmware update package.

[0095] In step S521, the firmware summary information includes summary information of all firmware update packages, and the summary information can be directly determined according to the downloaded firmware summary information.

[0096] In step S522, the summary information includes a firmware code that can identify the type of firmware update package. According to the firmware code, it can be determined whether the firmware update package is a full package or a differential package. If it is a differential package, the basic version matched by the differential package can also be determined.

[0097] In some embodiments, after step S522, the following is also included:

[0098] S523: Determine whether there is a differential package in the firmware upgrade total package.

[0099] S524: When there is no differential package in the firmware upgrade total package, the full package is determined as the target firmware update package.

[0100] In step S523, in some scenarios, the amount of data changed in the version update is large, which causes the amount of data in all differential packages made based on the release version to be greater than the set threshold. At this time, the download efficiency improved by making differential packages for the basic version is small, and the full package can be downloaded directly, and the corresponding firmware upgrade package may not contain differential packages.

[0101] In step S524, when no differential packet is detected in the firmware upgrade package, the charging pile obtains the position of the full packet in the firmware upgrade package and determines it as the target firmware upgrade package.

[0102] In step S53, the target firmware update package is a firmware upgrade package that needs to be downloaded and is determined from the firmware upgrade package. Specifically, step S53 includes the following:

[0103] S531: Determine the local version information of the local firmware and the basic version information of each differential package.

[0104] S532: Determine whether basic version information is consistent with local version information.

[0105] S533: If it exists, determine the differential package whose basic version information is consistent with the local version information as the target firmware update package.

[0106] S534: If it does not exist, determine the full package as the target firmware update package.

[0107] In step S531, the charging pile first determines the version information of the local firmware, and then determines the basic version information corresponding to each differential package according to all summary information in the firmware summary information.

[0108] In step S532, determine whether the basic version information of the differential package is consistent with the local version information of the local firmware, that is, determine whether the version numbers of the two are the same. For example, the version number of the differential package is V1.05-V1.08, where V1.05 is the basic version information, and the version number of the local firmware is V1.05, then the two are the same, and it can be determined that the differential package is the target firmware update package. On the contrary, the firmware upgrade total package contains three differential packages, whose version numbers are V1.05-V1.08, V1.06-V1.08, and V1.07-V1.08, respectively, and the version number of the local firmware is V1.04, then there is no consistent differential package, so the full package is determined to be the target firmware update package.

[0109] In step S54, the charging pile directly downloads the target firmware update package according to the address of the target firmware update package in the firmware upgrade package, and ignores other firmware upgrade packages in the firmware upgrade package. After downloading the target firmware update package, if it is a full release package, the target firmware update package is installed to replace the local firmware; if it is a differential package, the firmware upgrade is completed by combining the local firmware and the target firmware update package.

[0110] In some embodiments, after step S54, the method further includes:

[0111] S55: Determine whether the firmware upgrade is successful.

[0112] S56: When the firmware upgrade fails, perform a version rollback operation.

[0113] In step S55, the downloaded target firmware update package may fail to be installed, which may be due to the incomplete downloaded target firmware update package, or the local firmware may be missing some files, etc. In some scenarios, even if the firmware is successfully installed, the released version of the firmware may be unstable and crash due to some defects in the released version of the firmware itself, which can also be judged as a firmware upgrade failure.

[0114] In step S56, if the firmware upgrade is determined to be unsuccessful, a version rollback operation needs to be performed. Specifically, the version rollback method can be performed manually on the charging pile side, or by remote operation and maintenance rollback by the server side or local operation and maintenance, or by automatic rollback by the local APP of the charging pile, which is not limited.

[0115] In summary, the embodiment of the present application produces multiple differential packages of different basic versions based on the released full package, and uniformly packages the differential packages of multiple basic versions with the full package to produce a firmware upgrade package. When multiple charging piles need to upgrade the firmware, a differential package that matches the local basic version can be found from the total package to quickly upgrade the firmware and reduce the consumption of download resources. For some charging piles with relatively backward versions, the full package can also be downloaded in a targeted manner to complete the firmware upgrade, and it has good compatibility for charging piles of various versions. At the same time, differential packages are selectively produced based on the released version, and limited differential packages and full packages are uniformly packaged in the firmware upgrade package. The charging pile determines the target firmware upgrade package and downloads it in a targeted manner. While taking into account the download efficiency, it also effectively alleviates the burden of compiling differential packages and pushing appropriate differential packages on the cloud server side.

[0116] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0117] The present application also provides an electronic device, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the charging pile implements the firmware download method. Figure 6 , Figure 6 Schematic diagram of electronic device architecture provided in one embodiment of the present application. The electronic device 60 can be used as a charging station in the above embodiment, and can also be used as a download server. It includes one or more processors 61 and a memory 62. The memory 62 is connected to one or more processors 61, for example, connected to the processor 61 via a bus. The processor 61 and the memory 62 can be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0118] The memory 62 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the firmware download method based on a multi-stub environment in the embodiment of the present disclosure. The processor 61 implements the functions of the method for making a firmware upgrade package and the firmware upgrade method provided in the above method embodiment by running the non-volatile software programs, instructions and modules stored in the memory 62.

[0119] The memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 62 may optionally include a memory remotely arranged relative to the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0120] The program instructions / modules are stored in the memory 62, and when executed by the one or more processors 61, the method for making a firmware upgrade package and the firmware upgrade method in any of the above method embodiments are executed.

[0121] The present disclosure also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 6 A processor 61 in the embodiment may enable the one or more processors to execute the method for making the firmware upgrade package and the firmware upgrade method in any of the above method embodiments.

[0122] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes any one of the methods for making a firmware upgrade package and the firmware upgrade method.

[0123] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Under the concept of the present disclosure, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present disclosure as described above, which are not provided in detail for the sake of simplicity. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A method for making a firmware upgrade package, characterized in that: include: Obtain a release full package, the version information of which is the release version; Determine a plurality of base versions whose version information is different from the release version and a base full package corresponding to the base version; Based on the released full package and each of the basic full packages, a plurality of differential packages corresponding to different basic versions are respectively produced; The firmware upgrade package is produced according to all the differential packages and the released full package.

2. The method according to claim 1, characterized in that The step of respectively producing a plurality of differential packages corresponding to different basic versions based on the released full package and each of the basic full packages comprises: Determining the difference between the released full package and each of the basic full packages based on a preset difference algorithm; The differential package corresponding to each of the basic versions is produced based on the differential algorithm.

3. The method according to claim 1, characterized in that The step of preparing the firmware upgrade package according to all the differential packages and the full package includes: Generate summary information of the full package and the differential package; Packing the summary information of the full package and the differential package according to a preset order to generate firmware summary information; The firmware summary information, the full package and the differential package are packaged in sequence according to the preset order to produce the firmware upgrade total package.

4. A firmware upgrade method, characterized in that: include: In response to the upgrade instruction, obtaining firmware summary information; Determine, according to the firmware summary information, a firmware upgrade package provided by the server, wherein the firmware upgrade package includes at least one full package and differential packages of multiple versions; Determine that the full package or the differential package matching the local firmware version information is the target firmware update package; The target firmware update package is downloaded and firmware is upgraded according to the target firmware update package.

5. The method according to claim 4, characterized in that The firmware upgrade total package includes multiple firmware upgrade packages, the firmware summary information includes summary information of all the firmware update packages, and determining the firmware upgrade total package provided by the server according to the firmware summary information includes: Determining summary information of each firmware update package according to the firmware summary information; According to the summary information of the firmware update package, it is determined whether the firmware update package is the full package or the differential package.

6. The method according to claim 5, characterized in that After determining, according to the summary information of the firmware update package, that the firmware update package is the full package or the differential package, the method further includes: Determine whether the differential package exists in the firmware upgrade total package; When the differential package does not exist in the firmware upgrade total package, the full package is determined to be the target firmware update package.

7. The method according to any one of claims 4 to 6, characterized in that The determining that the full package or the differential package matching the local firmware version information is the target firmware update package includes: Determine the local version information of the local firmware and the basic version information of each of the differential packages; Determine whether the basic version information is consistent with the local version information; If so, determining that the differential package in which the basic version information is consistent with the local version information is the target firmware update package; If it does not exist, the full package is determined to be the target firmware update package.

8. The method according to claim 4, characterized in that After downloading the target firmware update package and performing firmware upgrade according to the target firmware update package, the method further includes: Determining whether the firmware upgrade is successful; When the firmware upgrade is unsuccessful, a version rollback operation is performed.

9. An electronic device, characterized in that: It includes a memory and a processor, the memory is connected to the processor, the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic device implements the method as described in any one of claims 1 to 3 or 4 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 3 or 4 to 8.

Citation Information

Cited By

  • Remote upgrading method of equipment, server, equipment side and system

    CN121050755A

  • Remote upgrading method, server, device end and system of device

    CN121050755B