Parallel upgrading method, device, system, equipment, medium and program product
By using the network segment address and the first upgrade duration in the upgrade file package in the smart car to determine the upgrade order of the controller, the problem that traditional parallel upgrade methods are difficult to adapt to complex scenarios is solved, and the upgrade efficiency is improved.
Patent Information
- Application Number
- CN202411423123.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-14
AI Technical Summary
The controller update scenarios at different stages in smart cars are complex, and traditional parallel upgrade methods are difficult to cover, which affects the upgrade efficiency.
By obtaining the network segment address and the first upgrade duration in the upgrade file package, the total upgrade duration of each network segment address and the upgrade order of the controller are determined, and the parallel upgrade method is optimized to adapt to different usage scenarios.
It improves the parallel upgrade efficiency of controllers in smart cars, can determine the upgrade order of controllers more quickly and accurately, and is suitable for a variety of complex scenarios.
Smart Images

Figure CN119449604A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of software updating, and in particular, relates to a parallel upgrading method, apparatus, system, device, medium and program product. Background Art
[0002] With the development of smart cars, whether it is to enhance the user experience, optimize the performance of the whole vehicle or fix known problems, software updates for cars have become a norm. Software updates run through the end of the production line (End Of Line, EOL), over-the-air download technology, and after-sales diagnostic upgrades, so it is particularly important to be able to update the software in any scenario.
[0003] In related technologies, in-vehicle Ethernet has been gradually applied and popularized in various smart cars. The in-vehicle Ethernet is used to access the edge node gateway in the car, and then the edge node gateway uses a parallel upgrade method to update the various controllers in the car. However, in different stages of smart cars, such as production, use or after-sales, the updates of various controllers in smart cars are differentiated. That is to say, the number of controllers upgraded each time is different, and there are different combinations, which makes it difficult for traditional parallel upgrade methods to cover these complex scenarios, affecting the upgrade efficiency. Summary of the invention
[0004] The embodiments of the present application provide a parallel upgrade method, apparatus, system, device, medium and program product, which can cope with different controller update scenarios and improve upgrade efficiency.
[0005] On the one hand, an embodiment of the present application provides a parallel upgrade method, applied to a processor, the method comprising:
[0006] Obtain an upgrade file package, wherein the upgrade file package includes a network segment address corresponding to each controller in the plurality of controllers, an upgrade software package, and a first upgrade duration, wherein the network segment address is used to indicate a network segment address for connecting the controller to a gateway, and the first upgrade duration is used to indicate an upgrade duration for the controller to be upgraded using the upgrade software package;
[0007] Determine a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration;
[0008] Determining a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration, where the first upgrade sequence is used to indicate an order in which the upgrade file packages are sent to the gateway;
[0009] The upgrade file package is sent to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file package to the controller, and then the controller is upgraded according to the upgrade file package.
[0010] Optionally, determining a total upgrade duration of each network segment address based on the network segment address and the first upgrade duration includes:
[0011] Determine a controller set on each network segment address based on the network segment address;
[0012] For each of the controller sets, the first upgrade duration of each of the controllers in the controller set is counted respectively to obtain the total upgrade duration of each network segment address.
[0013] Optionally, determining a first upgrade sequence of the plurality of controllers according to the total upgrade duration and the first upgrade duration includes:
[0014] Sort the network segment addresses according to the total upgrade duration of each network segment address to obtain a network segment sequence;
[0015] For each network segment address, sort each controller according to the order of the first upgrade duration of each controller belonging to the network segment address to obtain the controller order of each network segment address;
[0016] The first upgrade sequence is determined according to the network segment sequence and the controller sequence of each network segment address.
[0017] Optionally, after determining the first upgrade sequence according to the network segment sequence and the controller sequence of each network segment address, the method further includes:
[0018] Obtaining the cache space corresponding to each network segment address and the connection protocol between the processor and the gateway;
[0019] For the upgrade file package of each controller, respectively executing: dividing the upgrade file package corresponding to the controller according to the cache space and the connection protocol to obtain multiple upgrade sub-file packages;
[0020] Determining a second upgrade duration for each of the upgrade sub-file packages;
[0021] For each upgrade file package, the multiple upgrade sub-file packages are sorted according to the size order of each of the second upgrade durations to obtain the order of the upgrade sub-file packages in the same upgrade file package;
[0022] The upgrade sub-file packages in each upgrade file package are sent to the gateway in sequence, so that the gateway sends the upgrade sub-file packages in sequence to the corresponding controller, thereby enabling the controller to perform software upgrade according to the upgrade sub-file packages in sequence.
[0023] Optionally, the sending the upgrade sub-file packages in each upgrade file package to the gateway in sequence includes:
[0024] For the same controller, generating a sending queue of multiple upgrade sub-file packages according to the sequence of the upgrade sub-file packages;
[0025] Determining the number of upgrade sub-file packages to be sent each time according to the cache space and the data size corresponding to the upgrade sub-file packages;
[0026] Dividing the upgrade sub-file packages in the sending queue into at least one sending batch according to the number of the upgrade sub-file packages;
[0027] The upgrade sub-file packages of at least one sending batch are sent to the gateway in batches according to the upgrade sub-file package sequence, so that the gateway sends different batches of upgrade sub-file packages to the controller according to the upgrade sub-file package sequence, thereby enabling the controller to be upgraded according to the upgrade sub-file packages.
[0028] Optionally, sending the at least one sending batch of upgrade sub-file packages to the gateway in batches according to the upgrade sub-file package sequence includes:
[0029] In the case where the sending batch is determined to be multiple, obtaining the remaining cache space of each of the network segment addresses, the remaining cache space being used to represent the remaining cache space of the network segment address when storing the upgrade sub-file packages of the current batch;
[0030] When the upgrade results of the current batch sent by the gateway are not received and the remaining cache space corresponding to the network segment address is greater than the data size of the upgrade sub-file package corresponding to the network segment address in the next batch, the next batch of upgrade sub-file packages are sent for the network segment address.
[0031] On the other hand, an embodiment of the present application further provides a parallel upgrade method, which is applied to a gateway, wherein the gateway is communicatively connected to the controller via at least one network segment address, and the gateway is communicatively connected to the processor, and the method includes:
[0032] Receiving an upgrade file package sent by the processor;
[0033] Parsing the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers;
[0034] According to the preset storage location mapping relationship and the network segment address corresponding to the upgrade file package, the upgrade software package is cached to the cache space corresponding to each network segment address;
[0035] The upgrade software package is sent to the controller according to the preset conversion protocol and the cache order of the upgrade files in the cache space, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
[0036] On the other hand, an embodiment of the present application provides a parallel upgrade device, applied to a processor, the device comprising:
[0037] an acquisition module, configured to acquire an upgrade file package, wherein the upgrade file package includes a network segment address corresponding to each controller in a plurality of controllers, an upgrade software package, and a first upgrade duration, wherein the network segment address is used to indicate a network segment address for connecting the controller to a gateway, and the first upgrade duration is used to indicate an upgrade duration for the controller to be upgraded using the upgrade software package;
[0038] A determination module, configured to determine a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration;
[0039] The determination module is further used to determine a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration, wherein the first upgrade sequence is used to represent an order in which the upgrade file packages are sent to the gateway;
[0040] The sending module is used to send the upgrade file package to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file to the controller, and then the controller is upgraded according to the upgrade file.
[0041] On the other hand, an embodiment of the present application provides a parallel upgrade device, which is applied to a gateway, and the device includes:
[0042] A receiving module, used for receiving an upgrade file package sent by the processor;
[0043] A parsing module, used to parse the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers;
[0044] A cache module, used for caching the upgrade file to a cache space corresponding to each network segment address according to a preset storage location mapping relationship and a network segment address corresponding to the upgrade file;
[0045] The sending module is used to send the upgrade software package to the controller according to the cache order of the upgrade files in the cache space according to the preset conversion protocol, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
[0046] In another aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0047] When the processor executes the computer program instructions, the parallel upgrade method as described in the first aspect is implemented.
[0048] On the other hand, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the parallel upgrade method described in the first aspect is implemented.
[0049] On the other hand, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the parallel upgrade method described in the first aspect.
[0050] The parallel upgrade method, apparatus, device and computer storage medium of the embodiments of the present application can, when performing parallel upgrades on multiple controllers, first determine the network segment address and the first upgrade duration of each controller through the acquired upgrade file, and then determine the total upgrade duration of each network segment in the gateway through the network segment address and the first upgrade duration, that is, determine the controller that needs to be upgraded in each network segment, which can be applied to different usage scenarios, and then determine the first upgrade order of multiple controllers in each network segment according to the total upgrade duration and the first upgrade duration. In the process of determining the first upgrade order, by directly obtaining the first upgrade duration, not only can the sorting algorithm of multiple controllers be optimized, but also the first upgrade order can be determined more directly and accurately through the total upgrade duration and the first upgrade duration, so as to more quickly determine the upgrade order of the controllers and improve the upgrade efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0052] Figure 1 is a structural diagram of a parallel upgrade system provided by an embodiment of the present application;
[0053] Figure 2 It is a flowchart of an interactive method of a parallel upgrade system provided by an embodiment of the present application;
[0054] Figure 3 It is a flowchart of a parallel upgrade method provided by an embodiment of the present application;
[0055] Figure 4 It is a flowchart of a parallel upgrade method provided by an embodiment of the present application;
[0056] Figure 5 is a structural diagram of a parallel upgrade device provided by another embodiment of the present application;
[0057] Figure 6 is a structural diagram of a parallel upgrade device provided by another embodiment of the present application;
[0058] Figure 7 It is a structural diagram of an electronic device provided by yet another embodiment of the present application. DETAILED DESCRIPTION
[0059] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0060] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0061] In order to solve the problems of the prior art, the embodiments of the present application provide a parallel upgrade method, device, equipment, computer storage medium and computer program product. When upgrading multiple controllers in parallel, the network segment address and the first upgrade duration of each controller can be determined by first obtaining the upgrade file, and then the total upgrade duration of each network segment in the gateway can be determined by the network segment address and the first upgrade duration, that is, the controller that needs to be upgraded in each network segment is determined, which can be applied to different usage scenarios, and then the first upgrade order of multiple controllers in each network segment is determined according to the total upgrade duration and the first upgrade duration. In the process of determining the first upgrade order, by directly obtaining the first upgrade duration, not only can the sorting algorithm of multiple controllers be optimized, but also the first upgrade order can be determined more directly and accurately by the total upgrade duration and the first upgrade duration, so as to more quickly determine the upgrade order of the controller and improve the upgrade efficiency.
[0062] The following first introduces the parallel upgrade system provided by the embodiment of the present application.
[0063] Reference Figure 1 An embodiment of the present application provides a parallel upgrade system. The parallel upgrade system may include a processor and a gateway, and the processor is communicatively connected with the gateway.
[0064] In a specific embodiment, when flashing and upgrading multiple controllers on a car, engineers can upload the upgrade file package to the update platform, and then the processor can download the upgrade file package from the software update platform and transmit it to the gateway, which then transmits the upgrade file package to the multiple controllers on the car respectively.
[0065] In some embodiments, the processor may be an OTA diagnostic instrument, a factory EOL flashing device, or an after-sales diagnostic instrument, and the gateway may be an OTA module, wherein the processor may be communicatively connected to the gateway via Ethernet.
[0066] In some embodiments, a plurality of network segment addresses may be provided on the gateway, and on each network segment address, the gateway is communicatively connected with at least one controller.
[0067] In this embodiment, the gateway and the controller are connected via a CAN bus or a CANFD bus.
[0068] The following is an introduction to the interactive method of the parallel upgrade system provided in the embodiment of the present application.
[0069] Figure 2 FIG. 1 is a flow chart showing an interactive method of a parallel upgrade system provided by an embodiment of the present application. Figure 2 As shown, the interactive method of parallel upgrading the system may include:
[0070] S201: The processor obtains an upgrade file package.
[0071] S202, the processor determines a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration;
[0072] S203, the processor determines a first upgrade sequence of the plurality of controllers according to the total upgrade duration and the first upgrade duration;
[0073] S204, the processor sends the upgrade file package to the gateway according to the first upgrade sequence;
[0074] S205, the gateway receives the upgrade file package sent by the processor;
[0075] S206, the gateway parses the upgrade file package to obtain the network segment address and upgrade software package corresponding to each of the multiple controllers;
[0076] S207, caching the upgrade software package to the cache space corresponding to each WanGuDong address according to the preset storage location mapping relationship and the network segment address corresponding to the upgrade file package;
[0077] S208: Send the upgrade software package to the controller according to the cache order of the upgrade files in the cache space according to the preset conversion protocol, so that the controller is upgraded.
[0078] In some embodiments, in S201, the vehicle engineer can upload the upgrade file package to the update platform, and then the update engineer can download the upgrade file package on the update platform through the processor, and can also cache it offline in the processor through other storage files, which is not limited here.
[0079] It is worth noting that after using the processor to update multiple controllers on the first car, the processor can save the upgrade file package. If multiple controllers of other cars of the same model are upgraded, the processor can directly call the cached upgrade file package to upgrade multiple controllers of other cars of the same model.
[0080] As an example, the upgrade file package may include the network segment address, upgrade software package and first upgrade duration corresponding to each controller in multiple controllers, wherein the network segment address is used to indicate the network segment address of the controller connected to the gateway, and the first upgrade duration is used to indicate the upgrade duration for the controller to be upgraded using the upgrade software package.
[0081] In some embodiments, in S202, since there are different scenarios when updating multiple controllers on a car, for example, the car has three network segment addresses, each network segment address is communicatively connected to three controllers, and only one controller on each network segment address needs to be upgraded. At this time, the total upgrade duration of each network segment address can be determined by the network segment address in the upgrade file package and the first upgrade duration corresponding to each controller, so as to facilitate the subsequent sending of the upgrade file package to the gateway, save sending time, and improve upgrade efficiency.
[0082] In some embodiments, in S203, the order of the network segment addresses is determined according to the total upgrade time, and the order of each controller in each network segment address is determined according to the first upgrade time, so as to determine the first upgrade time, which can accurately determine the upgrade order of multiple controllers and improve the upgrade efficiency.
[0083] In some embodiments, in S205, due to the limitation of the communication protocol, the upgrade file package received by the gateway is split into multiple files by the processor and received one by one.
[0084] In some embodiments, in S20 6, since the controllers that need to be updated on each network segment address are different and the number is different, the scenario of updating the controller is more complicated. Therefore, the network segment address of the controller that needs to be updated and the upgrade file package will be stored in the upgrade file. At this time, the gateway can parse the network segment address and the upgrade file package to determine the controller that needs to be updated.
[0085] In some embodiments, in S207, after the gateway receives the upgrade file package, a cache space is pre-configured in the gateway for each network segment address so as to cache the upgrade file package of the controller in each network segment address, thereby facilitating sending the upgrade file package to the controller on the network segment address.
[0086] In an embodiment of the present application, when multiple controllers are upgraded in parallel, the network segment address and the first upgrade duration of each controller are first determined through the acquired upgrade file, and then the total upgrade duration of each network segment in the gateway is determined through the network segment address and the first upgrade duration, that is, the controller that needs to be upgraded in each network segment is determined, which can be applied to different usage scenarios. Then, the first upgrade order of multiple controllers in each network segment is determined according to the total upgrade duration and the first upgrade duration. In the process of determining the first upgrade order, not only the sorting algorithm of multiple controllers can be optimized by directly obtaining the first upgrade duration, but also the first upgrade order can be determined more directly and accurately through the total upgrade duration and the first upgrade duration, so as to more quickly determine the upgrade order of the controllers and improve the upgrade efficiency.
[0087] Reference Figure 3The embodiment of the present application further provides a parallel upgrade method, which is applied to a processor. The parallel upgrade method may include S301-S304:
[0088] S301, obtaining an upgrade file package.
[0089] In some embodiments, as an example, the upgrade file package includes the network segment address, upgrade software package and first upgrade duration corresponding to each controller in multiple controllers, the network segment address is used to indicate the network segment address of the controller connected to the gateway, and the first upgrade duration is used to indicate the upgrade duration for the controller to be upgraded using the upgrade software package.
[0090] In this embodiment, when the processor obtains the upgrade file package, it can download the upgrade file package released by the engineer through the update platform, or read the upgrade file package cached on the cache device for acquisition. The cache device can be a storage hard disk or a USB flash drive.
[0091] Placing the required upgrade duration of each upgrade file package, ie, the first upgrade duration, in the upgrade file package can facilitate subsequent determination of the order in which the upgrade file packages are sent according to the first upgrade duration, thereby reducing the difficulty of sorting and improving the sending efficiency.
[0092] S302: Determine the total upgrade duration of each network segment address based on the network segment address and the first upgrade duration.
[0093] In some embodiments, in order to improve the upgrade efficiency, it is necessary to accurately calculate the total upgrade time of each network segment address in order to arrange the upgrade order of each network segment address. There may be different upgrade scenarios for each network segment address, which may not meet the needs of parallel upgrades through each network segment address. Therefore, it is necessary to determine the controller based on the upgrade file package of each controller, and then count the controllers that need to be updated on each network segment address to obtain the total upgrade time of each network segment address.
[0094] In some specific embodiments, the upgrade scenario may be: three CAN buses are set on the gateway, namely the first network segment address, the second network segment address and the third network segment address, wherein three controllers are connected to the first network segment address, three controllers are connected to the second network segment address, and three controllers are connected to the third network segment address, but the controllers upgraded each time for each network segment may be inconsistent, for example, there are two controllers that need to be upgraded on the first network segment address, two controllers that need to be upgraded on the second network segment address, and one controller that needs to be upgraded on the third network segment address. It can also be that there is one controller that needs to be upgraded on the first network segment address, two controllers that need to be updated on the second network segment address, and three controllers that need to be updated on the third network segment address, that is, the number of controllers upgraded each time is inconsistent, resulting in inconsistent upgrade scenarios and inconsistent upgrade time for each network segment address. For the parallel upgrade method, it will affect the upgrade efficiency, so the total upgrade time on each network segment address can be first counted to determine the controller that needs to be updated on each network segment address, and then the total upgrade time can be determined by the first upgrade time of each controller.
[0095] In some embodiments, S302 may include:
[0096] Determine the controller set on each network segment address based on the network segment address;
[0097] For each controller set, the first upgrade duration of each controller in the controller set is counted respectively to obtain the total upgrade duration of each network segment address.
[0098] In this embodiment, after the processor obtains the upgrade file package, the processor can parse the upgrade file package to obtain the first upgrade duration and network segment address in the upgrade file package, and then determine the controller set connected to the network segment address based on the network segment address. For example, there are three controllers connected to the first network segment address, but only two controllers need to be upgraded in this upgrade on the first network segment address, that is, the two controllers can be determined as a controller set, and then the first upgrade duration of the two controllers is counted, and the two first upgrade durations are summed to obtain the total upgrade duration, that is, the total upgrade duration is determined as the total upgrade duration of the first network segment address. The total upgrade duration for other network segment addresses can be determined in the above manner, and no further details will be given here.
[0099] It is worth noting that the network segment address in the upgrade file package is the network segment address of the controller connected to the gateway. For the same network segment address, each controller has a unique number. For example: the first controller on the first network segment address can be numbered ECU_1_1 in the upgrade file package; the second controller on the first network segment address can be numbered ECU_1_2 in the upgrade file package.
[0100] S303: Determine a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration.
[0101] As an example, the first upgrade sequence is used to represent the sequence of sending upgrade file packages to the gateway.
[0102] In this embodiment, before sending the upgrade file package, in order to send it in a more orderly manner and save the waiting time of the processor sending the upgrade file package, S303 may include:
[0103] Sort the network segment addresses according to the total upgrade time of each network segment address to obtain the network segment sequence;
[0104] For each network segment address, sort each controller according to the order of the first upgrade duration of each controller belonging to the network segment address to obtain the controller order of each network segment address;
[0105] The first upgrade sequence is determined according to the sequence of network segments and the sequence of controllers of each network segment address.
[0106] In this embodiment, since the controller sends an upgrade file package to the gateway when it is upgraded, the controller will upgrade itself according to the upgrade file package after receiving the upgrade file package. Therefore, the first upgrade order of the controller is the sending order of the upgrade file package. In order to be able to send the upgrade file package more accurately and quickly, the network segment addresses are first sorted, that is, the order of the network segment addresses is first sorted according to the total upgrade time of each network segment address, and then the controllers that need to be upgraded on each network segment address are sorted to obtain the controller order on each network segment address. Finally, the first upgrade order is determined according to the network segment order and the controller order, and the upgrade file package is sent according to the first upgrade order.
[0107] Specifically, in this embodiment, when determining the order of network segments, the order of network segment addresses can be determined in descending order according to the total upgrade time of each network segment address, or the order of network segment addresses can be determined in ascending order according to the total upgrade time of each network segment address, and there is no limitation here.
[0108] For example, take three network segment addresses as an example, where there are two controllers that need to be updated on the first network segment address, namely the first controller and the second controller, there are two controllers that need to be updated on the second network segment address, namely the third controller and the fourth controller, there is one controller that needs to be updated on the third network segment address, namely the fifth controller, the first upgrade time of the first controller is 110S, the first upgrade time of the second controller is 130S, the first upgrade time of the third controller is 120S, the first upgrade time of the fourth controller is 140S, and the first upgrade time of the fifth controller is 180S. The total upgrade time of the first network segment address is 240S, and the total upgrade time of the second network segment address is 2 60S, the total upgrade time of the third network segment address is 180S, the network segment sequence is the second network segment address, the first network segment address and the third network segment address, the controller sequence of the first network segment address is the first controller and the second controller, the controller sequence of the second network segment address is the third controller and the fourth controller, and the controller sequence of the third network segment address is the fifth controller; due to the parallel upgrade method, that is, each network segment address will send an upgrade file package, so the three network segment addresses are a group, that is, the third controller, the first controller and the fifth controller are the first group, and the second controller and the fourth controller are the second group. At this time, the first upgrade order is the third controller, the first controller, the fifth controller, the fourth controller, and the second controller.
[0109] It is worth noting that, in the above example, the network segments are sorted in descending order, and the controllers are sorted in descending order.
[0110] In addition, in this embodiment, the first upgrade sequence is the arrangement sequence of the multiple controllers, that is, the entire upgrade queue of the upgrade file package.
[0111] In some other embodiments, after determining the first upgrade sequence according to the network segment sequence and the controller sequence of each network segment address, the method further includes:
[0112] Obtain the cache space corresponding to each network segment address and the connection protocol between the processor and the gateway;
[0113] For the upgrade file package of each controller, respectively perform: splitting the upgrade file package corresponding to the controller according to the cache space and the connection protocol to obtain multiple upgrade sub-file packages;
[0114] Determine the second upgrade duration of each upgrade sub-file package;
[0115] For each upgrade file package, sort the multiple upgrade sub-file packages according to the order of the second upgrade durations to obtain the order of the upgrade sub-file packages in the same upgrade file package;
[0116] The upgrade sub-file packages in each upgrade file package are sent to the gateway in sequence, so that the gateway sends the upgrade sub-file packages in sequence to the corresponding controller, and then the controller performs software upgrade according to the upgrade sub-file packages in sequence.
[0117] In this embodiment, after obtaining the first upgrade sequence, in order to reduce the situation where the gateway's cache space is smaller than the data of the upgrade file package, resulting in the gateway being unable to receive the upgrade file package sent by the processor or unable to store the upgrade file package, the cache space corresponding to each network segment address in the gateway is obtained, and then for the upgrade file package corresponding to each controller, the upgrade file package is divided using the connection protocol between the processor and the gateway and the connection protocol between the gateway and the controller. The same upgrade file package can be sent multiple times, and only one upgrade sub-file package of the upgrade file package is sent each time. This can save sending time, meet the cache space requirements, and improve upgrade efficiency.
[0118] Specifically, the upgrade file package can be segmented according to the cache space and the connection protocol to obtain multiple upgrade sub-file packages. That is, the data size of each upgrade sub-file package can be determined according to the cache space, the maximum data volume of each upgrade sub-file package is no more than half of the cache space, and the data size of the upgrade sub-file packages obtained by segmentation is smaller than the maximum transmission volume of the connection protocol.
[0119] In order to upgrade the controller more accurately, after obtaining multiple upgrade sub-file packages, it is necessary to determine the upgrade duration of each upgrade sub-file package based on the data size of the divided upgrade sub-file package, and then sort the upgrade sub-file packages to obtain the upgrade sub-file package order, that is, when sending the upgrade file package, the upgrade sub-file packages are sent one by one according to the upgrade sub-file package order of the upgrade file package, so that the controller can be continuously updated according to the upgrade sub-file packages.
[0120] S304: Send an upgrade file package to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file package to the controller, and then the controller is upgraded according to the upgrade file package.
[0121] In some embodiments, when sending the upgrade file package to the gateway according to the first upgrade order, the upgrade file package is sent to the gateway according to the cache space of each network segment address in the gateway. Specifically, it can be sent in the form of a queue, that is, for the first network segment address, the upgrade file package of the first controller can be sent to the gateway first, and then after waiting for a preset period of time, during the upgrade of the first controller, the upgrade file package of the second controller is sent to the gateway, that is, there is no need to wait for the upgrade of the first controller to be completed before sending the upgrade file package of the second controller, thereby shortening the waiting time.
[0122] In some embodiments, when each upgrade file package is divided into multiple upgrade sub-file packages, sequentially sending the upgrade sub-file packages in each upgrade file package to the gateway includes:
[0123] For the same controller, multiple upgrade sub-file package sending queues are generated according to the upgrade sub-file package sequence;
[0124] Determine the number of upgrade sub-file packages to be sent each time according to the cache space and the data size corresponding to the upgrade sub-file packages;
[0125] Dividing the upgrade sub-file packages in the sending queue into at least one sending batch according to the number of the upgrade sub-file packages;
[0126] At least one batch of upgrade sub-file packages is sent to the gateway in batches according to the upgrade sub-file package sequence, so that the gateway sends different batches of upgrade sub-file packages to the controller according to the upgrade sub-file package sequence, thereby enabling the controller to be upgraded according to the upgrade sub-file packages.
[0127] Specifically, since each upgrade file package is divided into multiple upgrade sub-file packages, when sending the upgrade file package, a sending queue for the sub-file packages can be generated according to the order of the multiple upgrade sub-file packages, and then the number of upgrade sub-file packages to be sent each time is determined by the cache space and the data size corresponding to the upgrade sub-file packages, that is, the number of batches for sending the upgrade sub-file packages is determined, and then the upgrade sub-file packages are sent in batches.
[0128] For example, the upgrade file package corresponding to the first controller is divided into three upgrade sub-file packages, namely A1, A2 and A3, the upgrade file package corresponding to the second controller is divided into three upgrade sub-file packages, namely B1, B2 and B3, the upgrade file package corresponding to the third controller is divided into three upgrade sub-file packages, respectively C1, C2 and C3, the upgrade file package corresponding to the fourth controller is divided into three upgrade sub-file packages, respectively D1, D2 and D3, and the upgrade file package corresponding to the fifth controller is divided into three sub-file packages, respectively E1, E2 and E3. The order of the upgrade sub-file packages is determined to be C1, A1, E1, C2, A2, E2, C3, A3, E3, D1, B1, D2, B2, D3, B3; since they are controllers with three different network segment addresses, they can be divided into six batches, namely, C1, A1, E1 are the first batch of upgrade sub-file packages sent, C2, A2, E2 are the second batch of upgrade sub-file packages sent, C3, A3, E3 are the third batch of upgrade sub-file packages sent, D1, B1 are the fourth batch of upgrade sub-file packages sent, D2, B2 are the fifth batch of upgrade sub-file packages sent, and D3, B3 are the sixth batch of upgrade sub-file packages sent.
[0129] In some other embodiments, sending the upgrade sub-file packages of at least one sending batch to the gateway in batches according to the order of the upgrade sub-file packages includes:
[0130] When there are multiple batches to be sent, the remaining cache space of each network segment address is obtained, where the remaining cache space is used to indicate the remaining cache space of the network segment address when storing the upgrade sub-file packages of the current batch;
[0131] If the upgrade results of the current batch sent by the gateway are not received and the remaining cache space corresponding to the network segment address is larger than the data size of the upgrade sub-file package corresponding to the network segment address in the next batch, the next batch of upgrade sub-file packages are sent for the network segment address.
[0132] Specifically, when the upgrade sub-file packages are sent to the gateway in batches, in order to save waiting time, the second batch can be sent when the controller has not completed the upgrade according to all the sent upgrade sub-file packages, thereby greatly improving the upgrade efficiency.
[0133] For example, after sending the first batch of upgrade sub-file packages, the remaining cache space corresponding to the first network segment address is greater than the data size of A2. At this time, after the first batch is sent, the upgrade sub-file packages of A2 in the second batch can be sent. However, at this time, the remaining storage space corresponding to the second network segment address is less than the data size of C2. At this time, the sending order of the second batch can be adjusted, and the upgrade sub-file packages of A2 are sent first, and then the upgrade sub-file packages of C2 are sent.
[0134] In an embodiment of the present application, when multiple controllers are upgraded in parallel, the network segment address and the first upgrade duration of each controller are first determined through the acquired upgrade file, and then the total upgrade duration of each network segment in the gateway is determined through the network segment address and the first upgrade duration, that is, the controller that needs to be upgraded in each network segment is determined, which can be applied to different usage scenarios. Then, the first upgrade order of multiple controllers in each network segment is determined according to the total upgrade duration and the first upgrade duration. In the process of determining the first upgrade order, not only the sorting algorithm of multiple controllers can be optimized by directly obtaining the first upgrade duration, but also the first upgrade order can be determined more directly and accurately through the total upgrade duration and the first upgrade duration, so as to more quickly determine the upgrade order of the controllers and improve the upgrade efficiency.
[0135] Reference Figure 4 The embodiment of the present application further provides a parallel upgrade method, which is applied to a gateway. The method may include S401-S404:
[0136] S401, receiving an upgrade file package sent by a processor;
[0137] S402, parsing the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers;
[0138] S403, caching the upgrade software package to a cache space corresponding to each network segment address according to a preset storage location mapping relationship and a network segment address corresponding to the upgrade file package;
[0139] S404: Sending the upgrade software package to the controller according to the preset conversion protocol and the cache order of the upgrade files in the cache space, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
[0140] In this embodiment, after the gateway receives the upgrade file package sent by the processor, the gateway can parse the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller, and then cache the upgrade software package in the cache space corresponding to the network segment address according to the preset storage location mapping relationship, and then send the upgrade file package to the controller according to the connection protocol between the gateway and the controller to complete the upgrade of the controller.
[0141] When the upgrade file package is divided into multiple upgrade sub-file packages, the gateway sends the upgrade sub-file packages to the controller according to the upgrade sub-file package sequence. The sending method is consistent with the above-mentioned processor sending method to the gateway, which will not be repeated here.
[0142] It is worth noting that after the controller receives the upgrade file package, the controller is upgraded according to the upgrade file package, and then the controller returns the upgrade result to the gateway. If the upgrade result is determined to be a failure, the gateway will send the upgrade file package again. If the upgrade result is consistently determined to be a failure within the preset number of times, an alarm will be issued to allow the user to check the controller based on the upgrade result.
[0143] In some embodiments, the predicted storage location mapping relationship is determined by the connection protocol between the processor and the gateway and the connection protocol between the gateway and the controller, that is, for the network segment number, the upper four bits of the second byte of the processor's logical address correspond to the upper four bits of the second byte of the controller's logical address, and for the controller number, the lower four bits of the second byte of the processor correspond to the lower four bits of the second byte of the controller's logical address. For example: in the network segment number, b=1, in the controller number, c=2, then the logical address in the processor is 0x1a12, then the corresponding logical address of the controller is 0x612 or 0x712, in the controller's logical address, 6 represents a diagnostic request, and 7 represents a diagnostic response.
[0144] Reference Figure 5 The embodiment of the present application further provides a parallel upgrade device, which is applied to a processor. The parallel upgrade device 500 may include:
[0145] An acquisition module 501 is used to acquire an upgrade file package, where the upgrade file package includes a network segment address corresponding to each controller in the plurality of controllers, an upgrade software package, and a first upgrade duration, where the network segment address is used to indicate a network segment address where the controller is connected to a gateway, and the first upgrade duration is used to indicate an upgrade duration for the controller to be upgraded using the upgrade software package;
[0146] A determination module 502, configured to determine a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration;
[0147] The determination module 502 is further used to determine a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration, where the first upgrade sequence is used to indicate the sequence in which the upgrade file packages are sent to the gateway;
[0148] The sending module 503 is used to send the upgrade file package to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file to the controller, and then the controller is upgraded according to the upgrade file.
[0149] As an optional implementation, the determination module 502 may also be used to:
[0150] Determine the controller set on each network segment address based on the network segment address;
[0151] For each controller set, the first upgrade duration of each controller in the controller set is counted respectively to obtain the total upgrade duration of each network segment address.
[0152] As an optional implementation, the determination module 502 may also be used to:
[0153] Sort the network segment addresses according to the total upgrade time of each network segment address to obtain the network segment sequence;
[0154] For each network segment address, sort each controller according to the order of the first upgrade duration of each controller belonging to the network segment address to obtain the controller order of each network segment address;
[0155] The first upgrade sequence is determined according to the sequence of network segments and the sequence of controllers of each network segment address.
[0156] As an optional implementation, the determination module 502 may also be used to:
[0157] Obtain the cache space corresponding to each network segment address and the connection protocol between the processor and the gateway;
[0158] For the upgrade file package of each controller, respectively perform: splitting the upgrade file package corresponding to the controller according to the cache space and the connection protocol to obtain multiple upgrade sub-file packages;
[0159] Determine the second upgrade duration of each upgrade sub-file package;
[0160] For each upgrade file package, sort the multiple upgrade sub-file packages according to the order of the second upgrade durations to obtain the order of the upgrade sub-file packages in the same upgrade file package;
[0161] The upgrade sub-file packages in each upgrade file package are sent to the gateway in sequence, so that the gateway sends the upgrade sub-file packages in sequence to the corresponding controller, and then the controller performs software upgrade according to the upgrade sub-file packages in sequence.
[0162] As an optional implementation manner, the sending module 504 may also be used for:
[0163] For the same controller, multiple upgrade sub-file package sending queues are generated according to the upgrade sub-file package sequence;
[0164] Determine the number of upgrade sub-file packages to be sent each time according to the cache space and the data size corresponding to the upgrade sub-file packages;
[0165] Dividing the upgrade sub-file packages in the sending queue into at least one sending batch according to the number of the upgrade sub-file packages;
[0166] At least one batch of upgrade sub-file packages is sent to the gateway in batches according to the upgrade sub-file package sequence, so that the gateway sends different batches of upgrade sub-file packages to the controller according to the upgrade sub-file package sequence, thereby enabling the controller to be upgraded according to the upgrade sub-file packages.
[0167] As an optional implementation manner, the sending module 504 may also be used for:
[0168] When there are multiple batches to be sent, the remaining cache space of each network segment address is obtained, where the remaining cache space is used to indicate the remaining cache space of the network segment address when storing the upgrade sub-file packages of the current batch;
[0169] If the upgrade results of the current batch sent by the gateway are not received and the remaining cache space corresponding to the network segment address is larger than the data size of the upgrade sub-file package corresponding to the network segment address in the next batch, the next batch of upgrade sub-file packages are sent for the network segment address.
[0170] Reference Figure 6 The embodiment of the present application further provides a parallel upgrade device 600, which is applied to a gateway. The parallel upgrade device 600 may include:
[0171] The receiving module 601 is used to receive the upgrade file package sent by the processor;
[0172] The parsing module 602 is used to parse the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers;
[0173] The cache module 603 is used to cache the upgrade file to the cache space corresponding to each network segment address according to the preset storage location mapping relationship and the network segment address corresponding to the upgrade file;
[0174] The sending module 604 is used to send the upgrade software package to the controller according to the preset conversion protocol and the cache order of the upgrade files in the cache space, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
[0175] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0176] The electronic device may include a processor 701 and a memory 502 storing computer program instructions.
[0177] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0178] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 702 may include a removable or non-removable (or fixed) medium, or the memory 702 is a non-volatile solid-state memory. The memory 702 may be inside or outside the integrated gateway disaster recovery device.
[0179] In one example, the memory 702 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0180] The memory 502 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the parallel upgrade method according to the first aspect of the present disclosure.
[0181] The processor 701 reads and executes the computer program instructions stored in the memory 702 to implement Figure 3 A parallel upgrade method in the illustrated embodiment.
[0182] In one example, the electronic device may further include a communication interface 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.
[0183] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0184] Bus 704 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hypertransmission (Hyper Transport, HT) interconnection, industry standard architecture (IndustryStandard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 704 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0185] The electronic device can execute the parallel upgrade method in the embodiment of the present application, thereby realizing the combination Figure 3-Figure 6The parallel upgrade method and device described.
[0186] In addition, in combination with the parallel upgrade method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the parallel upgrade methods in the above embodiment is implemented.
[0187] In an optional embodiment, in combination with the parallel upgrade method in the above embodiment, the embodiment of the present application can provide a computer program product for implementation, and the instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device can implement any one of the parallel upgrade methods in the above embodiment.
[0188] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0189] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0190] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0191] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0192] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A parallel upgrade method, characterized in that: Applied to a processor, the method comprises: Obtain an upgrade file package, wherein the upgrade file package includes a network segment address corresponding to each controller in the plurality of controllers, an upgrade software package, and a first upgrade duration, wherein the network segment address is used to indicate a network segment address for connecting the controller to a gateway, and the first upgrade duration is used to indicate an upgrade duration for the controller to be upgraded using the upgrade software package; Determine a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration; Determining a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration, where the first upgrade sequence is used to indicate an order in which the upgrade file packages are sent to the gateway; The upgrade file package is sent to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file package to the controller, and then the controller is upgraded according to the upgrade file package.
2. The method according to claim 1, characterized in that The determining the total upgrade duration of each network segment address based on the network segment address and the first upgrade duration includes: Determine a controller set on each network segment address based on the network segment address; For each of the controller sets, the first upgrade duration of each of the controllers in the controller set is counted respectively to obtain the total upgrade duration of each network segment address.
3. The method according to claim 1, characterized in that The determining a first upgrade sequence of the plurality of controllers according to the total upgrade duration and the first upgrade duration includes: Sort the network segment addresses according to the total upgrade duration of each network segment address to obtain a network segment sequence; For each network segment address, sort each controller according to the order of the first upgrade duration of each controller belonging to the network segment address to obtain the controller order of each network segment address; The first upgrade sequence is determined according to the network segment sequence and the controller sequence of each network segment address.
4. The method according to claim 3, characterized in that After determining the first upgrade sequence according to the network segment sequence and the controller sequence of each network segment address, the method further includes: Obtaining the cache space corresponding to each network segment address and the connection protocol between the processor and the gateway; For the upgrade file package of each controller, respectively executing: dividing the upgrade file package corresponding to the controller according to the cache space and the connection protocol to obtain multiple upgrade sub-file packages; Determining a second upgrade duration for each of the upgrade sub-file packages; For each upgrade file package, the multiple upgrade sub-file packages are sorted according to the size order of each of the second upgrade durations to obtain the order of the upgrade sub-file packages in the same upgrade file package; The upgrade sub-file packages in each upgrade file package are sent to the gateway in sequence, so that the gateway sends the upgrade sub-file packages in sequence to the corresponding controller, thereby enabling the controller to perform software upgrade according to the upgrade sub-file packages in sequence.
5. The method according to claim 4, characterized in that The step of sequentially sending the upgrade sub-file packages in each upgrade file package to the gateway includes: For the same controller, generating a sending queue of multiple upgrade sub-file packages according to the sequence of the upgrade sub-file packages; Determining the number of upgrade sub-file packages to be sent each time according to the cache space and the data size corresponding to the upgrade sub-file packages; Dividing the upgrade sub-file packages in the sending queue into at least one sending batch according to the number of the upgrade sub-file packages; The upgrade sub-file packages of at least one sending batch are sent to the gateway in batches according to the upgrade sub-file package sequence, so that the gateway sends different batches of upgrade sub-file packages to the controller according to the upgrade sub-file package sequence, thereby enabling the controller to be upgraded according to the upgrade sub-file packages.
6. The method according to claim 5, characterized in that Sending the at least one sending batch of upgrade sub-file packages in batches to the gateway according to the upgrade sub-file package sequence, including: In the case where the sending batch is determined to be multiple, obtaining the remaining cache space of each of the network segment addresses, the remaining cache space being used to represent the remaining cache space of the network segment address when storing the upgrade sub-file packages of the current batch; When the upgrade results of the current batch sent by the gateway are not received and the remaining cache space corresponding to the network segment address is greater than the data size of the upgrade sub-file package corresponding to the network segment address in the next batch, the next batch of upgrade sub-file packages are sent for the network segment address.
7. A parallel upgrade method, characterized in that: Applied to a gateway, the gateway is communicatively connected to a controller via at least one network segment address, and the gateway is communicatively connected to a processor, the method comprising: Receiving an upgrade file package sent by the processor; Parsing the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers; According to the preset storage location mapping relationship and the network segment address corresponding to the upgrade file package, the upgrade software package is cached to the cache space corresponding to each network segment address; The upgrade software package is sent to the controller according to the preset conversion protocol and the cache order of the upgrade files in the cache space, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
8. A parallel upgrade device, characterized in that: Applied to a processor, the device comprises: an acquisition module, configured to acquire an upgrade file package, wherein the upgrade file package includes a network segment address corresponding to each controller in a plurality of controllers, an upgrade software package, and a first upgrade duration, wherein the network segment address is used to indicate a network segment address for connecting the controller to a gateway, and the first upgrade duration is used to indicate an upgrade duration for the controller to be upgraded using the upgrade software package; A determination module, configured to determine a total upgrade duration for each network segment address based on the network segment address and the first upgrade duration; The determination module is further used to determine a first upgrade sequence of the multiple controllers according to the total upgrade duration and the first upgrade duration, wherein the first upgrade sequence is used to represent an order in which the upgrade file packages are sent to the gateway; The sending module is used to send the upgrade file package to the gateway according to the first upgrade sequence, so that the gateway sends the upgrade file to the controller, and then the controller is upgraded according to the upgrade file.
9. A parallel upgrade device, characterized in that: Applied to a gateway, the device comprises: A receiving module, used for receiving an upgrade file package sent by the processor; A parsing module, used to parse the upgrade file package to obtain the network segment address and upgrade software package corresponding to each controller in the multiple controllers; A cache module, used for caching the upgrade file to a cache space corresponding to each network segment address according to a preset storage location mapping relationship and the network segment address corresponding to the upgrade file; The sending module is used to send the upgrade software package to the controller according to the cache order of the upgrade files in the cache space according to the preset conversion protocol, so that the controller is upgraded, wherein the cache order is determined based on the first upgrade order of the received upgrade file package.
10. A parallel upgrade system, characterized in that: It includes a processor and a gateway, wherein the processor is communicatively connected with the gateway; The processor is used to execute the parallel upgrade method according to any one of claims 1 to 6; The gateway includes multiple network segment addresses. At each network segment address, the gateway is communicatively connected to at least one controller. The gateway is used to execute the parallel upgrade method as described in claim 7.
11. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the parallel upgrade method according to any one of claims 1 to 7 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the parallel upgrade method according to any one of claims 1 to 7 is implemented.
13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the parallel upgrade method as described in any one of claims 1 to 7.
Citation Information
Cited By
OTA upgrading method, device and equipment, medium and vehicle
CN120568312A
OTA upgrade method, device, equipment, medium and vehicle
CN120568312B