Equipment version processing method and device, electronic equipment and storage medium
By obtaining and calculating differential versions in the upgrade agent equipment and performing differential upgrades in the communication energy storage lithium battery equipment, the problems of low efficiency and poor reliability of large-scale device version upgrades are solved, and efficient and reliable device version management is achieved.
Patent Information
- Application Number
- CN202311507197.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2025-05-13
AI Technical Summary
In large-scale equipment application scenarios, how to achieve efficient and reliable device version upgrades, especially in the communications industry, the version management of communication energy storage lithium battery equipment is complex, and traditional methods have problems such as long upgrade time, low reliability and large storage resource utilization.
By obtaining the version to be upgraded in the upgrade agent device, and calculating the differential version with the basic version, it is sent to the device to be upgraded for differential upgrade. After a successful upgrade, update the differential version collection of the base version and save the version to be upgraded as the new base version.
It reduces the time required to download the version during the version upgrade process, improves the efficiency of version upgrade, reduces the use of storage resources of network management equipment, reduces the coupling between devices to be upgraded, and improves the reliability of version upgrade.
Smart Images

Figure CN119987823A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device management, and in particular to a method, apparatus, electronic device and storage medium for processing device versions. Background Art
[0002] With the development of technology, there are scenarios of large-scale equipment application in many industries. For example, in the communications industry, with the large-scale application of 5G and the general trend of "lead retreat and lithium advance" under the background of dual carbon, the installed scale of communication energy storage lithium batteries is expanding, including the construction of new sites, the renewal and replacement of old power sources, and the renewal and replacement of old power sources.
[0003] How to manage the versions of these large-scale application devices, for example, how to efficiently and reliably upgrade the versions of large-scale application devices, has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, apparatus, electronic device and storage medium for processing device versions.
[0005] To solve the above technical problems, the embodiments of the present application are implemented through the following aspects.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for processing a device version is provided, which is applied to an upgrade agent device, wherein the upgrade agent device is connected to a plurality of devices to be upgraded, and the upgrade agent device is connected to at least one of a network management device and a user device, and the method includes:
[0007] Obtaining a version to be upgraded from the network management device or the user equipment;
[0008] Acquire a first differential version between the version to be upgraded and the saved basic version, and send the first differential version to the multiple devices to be upgraded for differential upgrade;
[0009] In the case where the differential upgrade of the multiple devices to be upgraded is successful, the basic differential version set corresponding to the basic version is updated, and the version to be upgraded is saved as a new basic version.
[0010] According to a second aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a memory, a processor, and computer executable instructions stored on the memory and executable on the processor, wherein the computer executable instructions implement the following steps when executed by the processor: obtaining a version to be upgraded from the network management device or the user device; obtaining a first differential version between the version to be upgraded and a saved basic version, and sending the first differential version to the multiple devices to be upgraded for differential upgrade; and in a case where the differential upgrade of the multiple devices to be upgraded is successful, updating a basic differential version set corresponding to the basic version, saving the version to be upgraded as a new basic version, wherein the updated basic differential version set includes at least one differential version from a historical version to the new basic version, and the historical version is a preset version on the upgrade path of the basic version.
[0011] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the following steps: obtaining a version to be upgraded from the network management device or the user device; obtaining a first differential version between the version to be upgraded and a saved basic version, and sending the first differential version to the multiple devices to be upgraded for differential upgrade; and in a case where the differential upgrade of the multiple devices to be upgraded is successful, updating a basic differential version set corresponding to the basic version, saving the version to be upgraded as a new basic version, the updated basic differential version set including at least one differential version from a historical version to the new basic version, the historical version being a preset version on the upgrade path of the basic version.
[0012] The above technical approach can reduce the time required to download the version during the version upgrade process, improve the efficiency of the version upgrade, and at the same time reduce the occupancy of the storage resources of the network management device, reduce the coupling between different devices to be upgraded during the version upgrade, and improve the reliability of the version upgrade.
[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0014] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 A networking diagram of a communication energy storage lithium battery system shown in an embodiment of the present application is shown;
[0017] Figure 2 A schematic diagram showing an application scenario of the method for processing device versions provided in an embodiment of the present application;
[0018] Figure 3 A schematic diagram showing a process flow of a method for processing a device version provided in an embodiment of the present application;
[0019] Figure 4 Another flowchart of a method for processing a device version provided in an embodiment of the present application is shown;
[0020] Figure 5 Another flowchart of the method for processing the device version provided in the embodiment of the present application is shown;
[0021] Figure 6 Another flowchart of the method for processing the device version provided in the embodiment of the present application is shown;
[0022] Figure 7 A schematic diagram showing a flow chart of a version upgrade method of a lithium battery management component provided in an embodiment of the present application;
[0023] Figure 8 A schematic diagram showing a flow chart of a version upgrade method of a lithium battery power management component provided in an embodiment of the present application;
[0024] Fig. 9 A schematic diagram of the hardware structure of an electronic device for executing the device version processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.
[0026] First, some application scenarios of this application are described. The inventor of this application has noticed that with the development of technology, there are large-scale equipment application scenarios in many industries. Taking the communications industry as an example, the installed scale of communications energy storage lithium batteries is expanding day by day. Figure 1 A networking diagram of a communication energy storage lithium battery system shown in an embodiment of the present application is shown, such as Figure 1As shown, the communication energy storage lithium battery system includes a power system management unit, which connects multiple lithium battery devices through a bus (such as a CAN bus and an RS485 bus), and each lithium battery device may include multiple management components, such as a lithium battery management component and a lithium battery power management component. A network management device can be connected to multiple power system management units. The number of power system management units connected to the network management device is very large, usually reaching hundreds of thousands, and each power system management unit is connected to dozens of lithium battery devices. Due to the many scenarios of lithium battery equipment upgrade and expansion, new construction and renovation, and fault replacement, the processing of the device version of the lithium battery device (including the version of the lithium battery management component and the version of the lithium battery power management component) by the network management device in the related technology is very complicated; and due to the large number of managed devices, the traditional network management device takes a long time to upgrade the centralized network management, and the reliability of the version upgrade is low, which is prone to upgrade failures that affect the business. In addition, in order to cope with the version upgrade requirements of different scenarios, the network management device often needs to save multiple different versions, which puts a lot of pressure on the storage space of the network management device.
[0027] In order to solve the above technical problems, the inventor of this application proposes a method for processing device versions. Figure 2 A schematic diagram showing an application scenario of the method for processing device versions provided in an embodiment of the present application is shown as follows: Figure 2 As shown, multiple devices to be upgraded 120 are connected to the upgrade agent device 110. The upgrade agent device 110 can be connected to the network management device 100, or to the user device 130, or to both the network management device 100 and the user device 130. The above device version processing method can be executed by the upgrade agent device 110.
[0028] Taking the communication energy storage lithium battery system as an example, the power system management unit can be used as the upgrade agent device 110, and the lithium battery management component and the lithium battery power management component in the lithium battery device can be used as the device to be upgraded 120.
[0029] Figure 3 A flow chart showing a method for processing a device version provided in an embodiment of the present application is applied to an upgrade agent device, the upgrade agent device is connected to multiple devices to be upgraded, and the upgrade agent device is connected to at least one of a network management device and a user device, such as Figure 3 As shown, the method may include the following steps:
[0030] In step S101, a version to be upgraded is obtained from a network management device or a user device.
[0031] By way of example, the device to be upgraded 120 may be a lithium battery management component and / or a lithium battery power management component in a lithium battery device, and the upgrade agent device 110 may be a power system management unit, which may be connected to at least one of the network management device 100 and the user device 130, and be used to obtain the version to be upgraded from the network management device 100 or the user device 130.
[0032] In some possible implementations, the upgrade agent device 110 may obtain the version to be upgraded of the device to be upgraded 120 from the network management device 100 through a wired connection (e.g., Ethernet) or a wireless connection (e.g., a 4G or 5G communication network). After the multiple upgrade agent devices 110 connected to the network management device 100 have all obtained the version to be upgraded, the network management device 100 may delete the version to be upgraded, release the storage space of the version to be upgraded, and complete the subsequent version upgrade through the version to be upgraded stored in each upgrade agent device 110 in a distributed manner, thereby reducing the coupling of multiple devices to be upgraded during version upgrade, improving the efficiency of version upgrade, and saving the storage space of the network management device.
[0033] In some other possible implementations, when the upgrade agent device 110 is not connected to the network management device 100 or the connection with the network management device 100 fails, the version to be upgraded can also be obtained from the user device 130, and the user device can be an electronic device of an operation and maintenance engineer (for example, a computer or a mobile storage device storing the version to be upgraded). Therefore, even when it is not connected to the network management device 100, the upgrade agent device 110 can obtain the version to be upgraded and perform a version upgrade of the device to be upgraded 120, thereby improving the flexibility of device version processing.
[0034] In step S102, a first differential version between the version to be upgraded and the saved basic version is obtained, and the first differential version is sent to a plurality of devices to be upgraded for differential upgrade.
[0035] For example, after receiving the version to be upgraded, the upgrade agent device 110 can obtain the first differential version between the version to be upgraded and the saved basic version through any version differential technical solution. In some possible implementations, the version differential technical solution can be, for example, BSDiff. BSDiff is an incremental update differential package algorithm. It finds the minimum difference between the two files by dividing the original file and the target file into blocks, and generates a differential file with the difference. The present application does not limit the version differential technical solution.
[0036] The differential version may include the base version number, the differential version number and the corresponding differential binary file when it is saved. In some possible implementations, the first differential version between the version to be upgraded and the saved base version may be obtained by the following formula 1.
[0037]
[0038] in, is the first difference between the version to be upgraded and the saved basic version, V b (n+1) is the version to be upgraded, V b (n) is the basic version. “-” means the version difference is performed using the version difference technical solution.
[0039] After obtaining the first differential version, the upgrade agent device 110 may send the first differential version to multiple devices to be upgraded 120 according to a preset upgrade strategy for differential upgrade. After obtaining the first differential version from the upgrade agent device 110, the device to be upgraded 120 may restore the first differential version according to the first differential version and the saved basic version through any version differential technical solution (such as BSDiff) to obtain the upgraded version of the device to be upgraded 120. The restored upgraded version is used for version upgrade.
[0040] In some possible implementations, the device to be upgraded 120 may restore the first differential version according to the first differential version and the saved basic version by using the following formula 2 to obtain the version to be upgraded.
[0041]
[0042] in, is the first difference between the version to be upgraded and the saved basic version, V b (n+1) is the version to be upgraded, V b (n) is the basic version. “+” means using the version difference technology solution to perform version difference restoration.
[0043] In some embodiments, in order to ensure the reliability of the version to be upgraded, the device to be upgraded 120 may also verify the restored version to be upgraded, for example, check whether the CRC check code of the version to be upgraded obtained by differential recovery is correct. If the check is wrong, the upgrade is exited and an alarm indicating that the restoration of the version to be upgraded has failed is displayed. If the check is correct, the restored version to be upgraded is used for version upgrade.
[0044] In some embodiments, after upgrading the device version to the restored version to be upgraded, the device to be upgraded 120 may also replace the basic version with the version to be upgraded, and send an upgrade success indication to the upgrade agent device 110 .
[0045] In step S103, when the differential upgrade of multiple devices to be upgraded is successful, the basic differential version set corresponding to the basic version is updated, and the version to be upgraded is saved as a new basic version.
[0046] The updated basic differential version set includes at least one differential version from a historical version to a new basic version, and the historical version is a preset version on the upgrade path of the basic version.
[0047] After the upgrade agent device 110 receives the differential upgrade success indication of each device to be upgraded 120, the version to be upgraded can be saved as a new basic version. And the basic differential version set corresponding to the basic version is updated. In order to synchronize the versions of multiple devices to be upgraded according to the basic differential version set of the updated basic version, after receiving the new version to be upgraded, a new first differential version can be generated according to the new version to be upgraded and the new basic version, so as to complete the upgrade of the new version to be upgraded according to the new first differential version.
[0048] Figure 4 Another flowchart of the method for processing the device version provided in the embodiment of the present application is shown as follows: Figure 4 As shown, step S103 may include the following steps.
[0049] In step S1031, when the basic differential version set is not empty, the second differential version from the historical version to the version to be upgraded is determined according to the basic differential version, the basic version and the version to be upgraded in the basic differential version set, where the basic differential version is the differential version from the historical version to the basic version.
[0050] For example, the second differential version may be determined through the following steps.
[0051] In step 10, differential restoration is performed based on the base version and the base differential version to obtain the historical version.
[0052] In step 20, a difference calculation is performed based on the historical version and the version to be upgraded to obtain a second difference version.
[0053] In some possible implementations, the second differential version may be determined by the following formula three.
[0054]
[0055] in, V is the second differential version from historical version i to version n+1 to be upgraded. b (n+1) is the version to be upgraded, V b (n) is the basic version, is the basic differential version from historical version i to version n to be upgraded. That is, the historical version u obtained by performing differential restoration based on the basic version and the basic differential version b (i) “-” means version differentiation is performed using the version differentiation technical solution.
[0056] In step S1032, a differential version set of the version to be upgraded is established according to the first differential version and the second differential version.
[0057] In step S1033, the differential version set of the version to be upgraded is saved as the updated basic differential version set.
[0058] In some embodiments, when the basic differential version set is empty, a basic differential version set can be established based on the first differential version, and the first differential version can be stored in the basic differential version set. b (n), the version to be upgraded is V b (n+1), when the version to be upgraded V b After (n+1) is saved as a new basic version, the first differential version can be used Create a base differential version set.
[0059] In some embodiments, the updated basic version and the corresponding basic differential version set can also be backed up so that when the upgrade agent device 110 is replaced, the updated basic version and the corresponding basic differential version set can be restored to the new upgrade agent device 110, thereby reducing the impact of device replacement on device version management and further improving the reliability of device version processing.
[0060] The latest basic version and the basic differential version set from each historical version to the latest basic version are saved in the upgrade agent device to facilitate the subsequent processing of the device version of the device 120 to be upgraded. For example, the latest basic version is V b (3) A newly expanded or replaced device 120 to be upgraded has a version of V b (1), the upgrade agent device 110 can convert the differential version corresponding to the version of the device to be upgraded 120 from the basic differential version set The device 120 to be upgraded is sent to complete the upgrade of the device version, without obtaining the version from the network management device, and without sending the complete version V to the device 120 to be upgraded. b (3).
[0061] The above-mentioned technical approach can reduce the time required for downloading the version during the version upgrade process, improve the efficiency of the version upgrade, and reduce the occupancy of the storage resources of the network management device. It can also adopt flexible upgrade strategies for different devices to be upgraded to perform version upgrades, reduce the coupling between different devices to be upgraded during the version upgrade, and improve the reliability of the version upgrade.
[0062] Figure 5 Another flow chart of the method for processing the device version provided in the embodiment of the present application is shown as follows: Figure 5 As shown, before obtaining the version to be upgraded from the network management device or the user equipment, the above method further includes the following steps:
[0063] In step S104, when the upgrade agent device does not include the basic version, the basic version is obtained from the device to be upgraded.
[0064] In the case where the upgrade agent device 110 does not include the basic version (for example, the basic version is deleted by mistake or replaced with a new upgrade agent device), the basic version may be obtained in the following manner.
[0065] In the case that the device to be upgraded 120 includes multiple different versions, the base version is acquired from the first target device to be upgraded.
[0066] The first target device to be upgraded is the device to be upgraded with the latest version among the devices to be upgraded.
[0067] For example, if the multiple devices to be upgraded include different versions V2 and V3, the device to be upgraded that stores the latest version V3 can be used as the first target device to be upgraded, and the latest version V3 can be obtained from the first target device to be upgraded as the basic version.
[0068] By adopting the above-mentioned technical solution, the basic version can be obtained from the first target device to be upgraded with the latest version among multiple devices to be upgraded, without the need to obtain the basic version from the network management device, thereby reducing the occupancy of the storage resources of the network management device. The distributed processing of device versions by the upgrade agent device can also improve the processing efficiency of the device version and improve reliability.
[0069] Figure 6 Another flow chart of the method for processing the device version provided in the embodiment of the present application is shown as follows: Figure 6 As shown, the above method also includes the following steps:
[0070] In step S105, a second target device to be upgraded is detected from the devices to be upgraded.
[0071] The second target device to be upgraded is a device to be upgraded whose version is lower than the basic version among the devices to be upgraded.
[0072] In some possible implementations, the detection of the second target device to be upgraded can be triggered periodically or in response to a user's operation. The upgrade agent device 110 can interact with each device to be upgraded through internal messages, obtain the version of each device to be upgraded, and detect the second target device to be upgraded by comparing the version of the device to be upgraded with the corresponding basic version.
[0073] In step S106, according to the version of the second target device to be upgraded and the base version, a target differential version is obtained from a set of basic differential versions of the base version.
[0074] The target differential version is a differential version between the version of the second target device to be upgraded and the basic version.
[0075] For example, the base version is V b (3) The version of the second target device to be upgraded is V b (1), then the target differential version can be obtained from the base differential version set
[0076] In step S107, the target differential version is sent to the second target device to be upgraded for differential upgrade. By adopting the above technical method, the second target device to be upgraded with inconsistent versions is detected in time through the distributed processing of device versions by the upgrade agent device, and the upgrade of the second target device to be upgraded is completed in time based on the target differential version in the basic differential version set, which can improve the speed of version upgrade, reduce the failure probability of version inconsistency, and further improve the reliability of device version processing.
[0077] In some embodiments, the user experience may be further enhanced through the following steps.
[0078] In step 20, when the second target device to be upgraded is detected, an alarm of device version inconsistency is generated.
[0079] In step 21, when it is determined that the differential upgrade of the second target device to be upgraded is successful, the alarm of the inconsistent device version is restored.
[0080] By adopting the above-mentioned technical method, the distributed device version processing of the upgrade agent device is carried out. When the device version inconsistency is detected, an alarm can be generated in time to show the user the device version inconsistency. When the differential upgrade of the second target device to be upgraded is successful, the corresponding alarm can be restored in time, which can further improve the visualization of device version processing and enhance the user experience.
[0081] Take the power system management unit as the upgrade agent device 110 and the lithium battery management component as the device to be upgraded 120 as an example. Figure 7 A schematic diagram showing a process flow of a version upgrade method of a lithium battery management component provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the method includes the following steps.
[0082] In step S201, the power system management unit obtains the version to be upgraded of the lithium battery management component from the network management device. For example, the version to be upgraded may be V b (3).
[0083] In step S202, the power system management unit obtains a saved basic version of the lithium battery management component, and obtains a first differential version according to the basic version and the version to be upgraded.
[0084] For example, the power system management unit stores a basic version V of the lithium battery management component. b (2) and the base differential version set includes the base differential version The first differential version can be obtained according to formula 1
[0085] In step S203, the power system management unit sends the first differential version to the lithium battery management component to be upgraded.
[0086] When multiple lithium battery management components to be upgraded are connected to the power system management unit, the power system management unit can send the first differential version to the lithium battery management components to be upgraded one by one according to the preset upgrade strategy, and can send the first differential version to be upgraded to the lithium battery management components to be upgraded together or in batches.
[0087] In step S204 , the lithium battery management component receives the first differential version.
[0088] In step S205, the lithium battery management component obtains the version to be upgraded according to the saved basic version and the first differential version.
[0089] For example, the lithium battery management component can be based on the saved basic version V b (2) and the first differential version received The version V to be upgraded is obtained by formula 2 b (3).
[0090] In step S206, the lithium battery management component verifies the merged version to be upgraded. For example, the merged version to be upgraded can be verified by CRC verification.
[0091] In step S207, when the merged version to be upgraded passes verification, the lithium battery management component is upgraded, the basic version is updated with the version to be upgraded, and an upgrade success indication is sent.
[0092] For example, the lithium battery management component can be upgraded using the version to be upgraded, and the version to be upgraded V b (3) Replacement update base version V b (2) Send an upgrade success indication to the power system management unit.
[0093] In step S208, the power system management unit receives an upgrade success indication and determines whether it is the last lithium battery management component.
[0094] In the case that the upgrade success indications of all the lithium battery management components are not received, the process proceeds to step S203 to send the first differential version to the next one or more lithium battery management components to be upgraded.
[0095] In step S209, when the power system management unit receives the upgrade success indication and determines that the upgrade success indications of all lithium battery management components are received, the power system management unit updates the basic version with the version to be upgraded and updates the corresponding basic differential version set.
[0096] For example, the power system management unit may adopt the version to be upgraded V b (3) Replacement update base version V b (2) and calculate the second differential version according to Formula 3 And according to the second differential version and the first differential version A basic differential version set of the version to be upgraded is established, and the basic differential version set of the version to be upgraded is saved as a basic differential version set corresponding to the updated basic version. In some embodiments, after the differential version set of the version to be upgraded is saved as the updated basic differential version set, the old basic version and the corresponding basic differential version set can be deleted to save storage space of the power system management unit.
[0097] By adopting the above technical method, through the layered backup distributed differential upgrade method, the time required to download the complete version during the version upgrade process can be effectively reduced, the speed of version upgrade can be improved, and at the same time, the occupancy of storage resources of network management equipment can be reduced, and the coupling between different devices to be upgraded during version upgrade can be reduced, thereby improving the reliability of device version upgrade.
[0098] Take the power system management unit as the upgrade agent device 110 and the lithium battery power management component as the device to be upgraded 120 as an example. Figure 8 A schematic diagram showing a process flow of a version upgrade method of a lithium battery power management component provided in an embodiment of the present application is shown as follows: Figure 8 As shown, the method includes the following steps.
[0099] In step S301, the power system management unit obtains the version to be upgraded of the lithium battery power management component from the network management device. For example, the version to be upgraded may be V b (3).
[0100] In step S302, the power system management unit obtains a saved basic version of the lithium battery power management component, and obtains a first differential version according to the basic version and the version to be upgraded.
[0101] For example, the power system management unit stores a basic version V of the lithium battery power management component. b (2) and the basic differential version set of the lithium battery power management component includes the basic differential version The first differential version of the lithium battery power management component can be obtained according to formula 1:
[0102] In step S303, the power system management unit sends the first differential version to the lithium battery management component corresponding to the lithium battery power management component to be upgraded.
[0103] In step S304, the lithium battery management component receives the first differential version of the lithium battery power management component.
[0104] In step S305, the lithium battery management component obtains the to-be-upgraded version of the lithium battery power management component according to the saved basic version and the first differential version.
[0105] For example, the lithium battery management component can be based on the basic version V of the stored lithium battery power management component. b (2) and the first differential version received Get the version V to be upgraded through formula 2 b (3).
[0106] In step S306, the lithium battery management component verifies the merged version of the lithium battery power management component to be upgraded. For example, the merged version to be upgraded can be verified by CRC verification.
[0107] In step S307, when the version to be upgraded of the lithium battery power management component is verified to be passed, the lithium battery management component sends the version to be upgraded of the lithium battery power management component to the lithium battery power management component.
[0108] In step S308, the lithium battery power management component is upgraded and an upgrade success indication is sent to the lithium battery management component.
[0109] For example, the lithium battery power management component may be upgraded using the version to be upgraded, and an upgrade success indication may be sent to the lithium battery management component.
[0110] In step S309, the lithium battery management component receives the upgrade success indication, updates the basic version of the lithium battery power management component with the to-be-upgraded version of the lithium battery power management component, and forwards the upgrade success indication.
[0111] In step S310, the power system management unit receives an upgrade success indication and determines whether it is the last lithium battery management component.
[0112] When the lithium battery power management component upgrade success indication forwarded by all lithium battery management components is not received, the process continues to step S303 to send the first differential version to the lithium battery management components corresponding to the next one or more lithium battery power management components to be upgraded.
[0113] In step S311, when it is determined that the lithium battery power management component upgrade success indication forwarded by all lithium battery management components is received, the power system management unit uses the lithium battery power management component to be upgraded to update the basic version of the lithium battery power management component and updates the corresponding basic differential version set.
[0114] For example, the power system management unit may adopt the version to be upgraded V b (3) Replacement update base version V b (2) Calculate the second differential version And according to the second differential version and the first differential version Establish a basic differential version set of the version to be upgraded of the lithium battery power management component, and save the basic differential version set of the version to be upgraded of the lithium battery power management component as the basic differential version set corresponding to the updated basic version. In some embodiments, after saving the basic differential version set of the version to be upgraded of the lithium battery power management component as the basic differential version set corresponding to the updated basic version, the old basic version and the corresponding basic differential version set can be deleted to save the storage space of the power system management unit.
[0115] By adopting the above technical method, through the layered backup distributed differential upgrade method, the time required to download the complete version during the version upgrade process can be effectively reduced, the speed of version upgrade can be improved, and at the same time, the occupancy of storage resources of network management equipment can be reduced, and the coupling between different devices to be upgraded during version upgrade can be reduced, thereby improving the reliability of device version upgrade.
[0116] Fig. 9 A schematic diagram of the hardware structure of an electronic device implementing the embodiment of the present application is shown as follows: Fig. 9As shown, at the hardware level, the electronic device includes a processor, and optionally, an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0117] The processor, the network interface and the memory may be interconnected through an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0118] The memory stores the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0119] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a device for locating the target user at the logical level. The processor executes the program stored in the memory and specifically performs: Figure 3-8 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.
[0120] The above application Figure 3-8The method disclosed in the illustrated embodiment may be implemented in a processor or by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0121] The electronic device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.
[0122] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0123] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 3-8 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.
[0124] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 3-8 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.
[0126] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0127] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0128] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for processing a device version, characterized in that: Applied to an upgrade agent device, the upgrade agent device is connected to a plurality of devices to be upgraded, the upgrade agent device is connected to at least one of a network management device and a user device, the method comprising: Obtaining a version to be upgraded from the network management device or the user device; Acquire a first differential version between the version to be upgraded and the saved basic version, and send the first differential version to the multiple devices to be upgraded for differential upgrade; In the case where the differential upgrade of the multiple devices to be upgraded is successful, the basic differential version set corresponding to the basic version is updated, and the version to be upgraded is saved as a new basic version.
2. The method according to claim 1, characterized in that The updated basic differential version set includes at least one differential version from a historical version to the new basic version, the historical version is a version on the upgrade path of the basic version, and the basic differential version set corresponding to the updated basic version includes: If the basic differential version set is not empty, determining a second differential version from the historical version to the version to be upgraded according to the basic differential versions in the basic differential version set, the basic version and the version to be upgraded, the basic differential version being the differential version from the historical version to the basic version; Establishing a differential version set of the version to be upgraded according to the first differential version and the second differential version; The differential version set of the version to be upgraded is saved as the updated basic differential version set.
3. The method according to claim 1, characterized in that The updating of the basic differential version set corresponding to the basic version includes: When the basic differential version set is empty, the basic differential version set is established according to the first differential version.
4. The method according to claim 2, characterized in that: The determining, according to the basic differential version in the basic differential version set, the basic version and the version to be upgraded, a second differential version from the historical version to the version to be upgraded comprises: Perform differential restoration based on the basic version and the basic differential version to obtain the historical version; The second differential version is obtained by performing a differential calculation based on the historical version and the version to be upgraded.
5. The method according to claim 1, characterized in that Before obtaining the version to be upgraded from the network management device, the method further includes: In the case that the upgrade agent device does not include the basic version, the basic version is obtained from the device to be upgraded.
6. The method according to claim 5, characterized in that The obtaining the basic version from the device to be upgraded includes: In the case that the device to be upgraded includes multiple different versions, the basic version is acquired from a first target device to be upgraded, where the first target device to be upgraded is a device to be upgraded with the latest version among the devices to be upgraded.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Detecting a second target device to be upgraded from the devices to be upgraded, where the second target device to be upgraded is a device to be upgraded whose version is lower than the basic version among the devices to be upgraded; According to the version of the second target device to be upgraded and the base version, obtaining a target differential version from a base differential version set of the base version, the target differential version being a differential version between the version of the second target device to be upgraded and the base version; The target differential version is sent to the second target device to be upgraded for differential upgrade.
8. The method according to claim 7, characterized in that The method further comprises: When a second target device to be upgraded is detected, an alarm of inconsistent device versions is generated; When it is determined that the differential upgrade of the second target device to be upgraded is successful, the alarm of the inconsistency of the device version is restored.
9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor is used to perform the steps of the device version processing method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enable the electronic device to execute the steps of the device version processing method according to any one of claims 1 to 8.