Method and device for determining controller upgrade time arrangement scheme, equipment and medium

By obtaining the controller upgrade time and number of communication lines in the vehicle electronic system, determining the shortest time for parallel flash writing, and generating a controller upgrade time arrangement solution that meets this time requirement, the controller firmware upgrade in the vehicle electronic system is solved. The system downtime problem improves the brushing efficiency and performance.

CN119473339APending Publication Date: 2025-02-18DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411406319.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In modern vehicle electronic systems, firmware upgrades of the controller may cause the system to shut down for a long time, affecting the normal operation of the vehicle, and the prior art lacks effective solutions to reasonably arrange the arrangement of the controllers to meet the time requirements of parallel flash writing.

Method used

By obtaining the number of communication lines hanging under the controller, the multiple sets of upgrade time, and setting the maximum brushing time, the shortest time for all control units to flash in parallel, and based on this, all controller upgrade time satisfying parallel brushing in parallel are generated. Arrangement plan.

Benefits of technology

It realizes an excellent parallel writing effect, reduces the brushing time, thereby improving efficiency and performance, and provides a flexible controller upgrade time scheduling solution to meet the parallel writing time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473339A_ABST
    Figure CN119473339A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for determining a controller upgrading time arrangement scheme, equipment and a medium, and the method comprises the steps: obtaining the number of communication lines under a controller, multiple sets of the upgrading time of the controller and the set maximum flashing time, and enabling the multiple sets to comprise upgrading time sequences of all control units under the controller; determining the shortest time for parallel flashing of all the control units based on the number of the communication lines and the multiple sets; and if the shortest time is smaller than or equal to the set maximum flashing time, determining all arrangement schemes of the controller upgrading time meeting parallel flashing based on the number of the communication lines, the upgrading time sequence and the set maximum flashing time. According to the method, the upgrading time of the controller can be flexibly arranged, and the optimal parallel flashing effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent vehicle control technology, and in particular to a method, device, equipment and medium for determining a controller upgrade time arrangement scheme. Background Art

[0002] In modern vehicle electronic systems, controller firmware upgrades have become a key step in maintaining and improving vehicle functions. However, due to the large number of controllers in a vehicle and their complex functions, firmware upgrades for each controller individually may cause the system to shut down for a long time, affecting the normal operation of the vehicle. In order to reduce the downtime of the entire system and improve the efficiency of firmware upgrades, the existing technology has begun to adopt a parallel flashing method, that is, upgrading multiple controllers at the same time.

[0003] However, how to properly arrange the layout of controllers to ensure the time requirements for parallel flashing has become a challenge, and there is currently a lack of effective solutions to this challenge. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and medium for determining a controller upgrade time scheduling scheme, and provide a scheme for determining a controller upgrade time scheduling scheme, which flexibly arranges the time for controller upgrades and achieves a better parallel flashing effect, which is beneficial to reducing the flashing time, thereby improving efficiency and performance.

[0005] In a first aspect, the present invention provides the following technical solution through an embodiment of the present invention:

[0006] A method for determining a controller upgrade time arrangement scheme, comprising:

[0007] Obtain the number of communication lines under the controller, a multiple set of upgrade time of the controller, and a set maximum write time, wherein the multiple set includes the upgrade time sequence of all control units under the controller; based on the number of communication lines and the multiple set, determine the shortest time for parallel writing of all control units; if the shortest time is less than or equal to the set maximum write time, then based on the number of communication lines, the upgrade time sequence, and the set maximum write time, determine all arrangements of controller upgrade time that meet the requirements of parallel writing.

[0008] Preferably, the shortest time for parallel flashing of all control units is determined based on the number of communication lines and the multiple sets, including: arranging the upgrade times in the multiple sets in non-increasing order to obtain a sorted upgrade time sequence; establishing a component set with an initial value of zero, and setting the initial shortest time to zero, wherein the component set contains multiple subsets, and the subsets are composed of the sum of the upgrade times in the multiple sets, and the number of subsets in the component set is equal to the number of communication lines; based on the sorted upgrade time sequence, the component set and the initial shortest time, the shortest time for parallel flashing of all control units is determined.

[0009] Preferably, the shortest time for parallel writing of all control units is determined based on the sorted upgrade time sequence, the component set and the initial shortest time, including: based on the sorted upgrade time sequence, the component set and the initial shortest time, performing the following shortest time update steps: starting from the first upgrade time in the sorted upgrade time sequence, adding the upgrade time to the current and smallest subset in the component set, updating the upgrade time corresponding to the subset to the increased upgrade time, if the increased upgrade time is greater than the initial shortest time, updating the increased upgrade time to the initial shortest time; repeating the shortest time update step until each upgrade time in the upgrade time sequence is added to the component set, and determining the last updated increased upgrade time as the shortest time for parallel writing of all control units.

[0010] Preferably, the method of determining all arrangement schemes of controller upgrade time that meet parallel flashing based on the number of communication lines, the upgrade time sequence and the set maximum flashing time includes: generating multiple arrangement schemes to be screened through a recursive function based on the number of communication lines, the upgrade time sequence and the set maximum flashing time; from the multiple arrangement schemes to be screened, screening out repeated allocations containing the same upgrade time, and determining all arrangement schemes of controller upgrade time that meet parallel flashing.

[0011] Preferably, based on the number of communication lines, the upgrade time sequence and the set maximum refresh time, a plurality of arrangement schemes to be screened are generated through a recursive function, including: establishing a first set with an initial value of zero and a second set with an initial value of zero, the second set being a set containing the sum of each subset in the first set, and performing the following recursive steps through a recursive function: judging whether the number of subsets in the first set is equal to the number of communication lines, and judging whether the maximum value in the second set is greater than the set maximum refresh time; if both are not satisfied, then based on the upgrade time sequence, all subsets corresponding to the upgrade time sequence are generated, and a recursive calculation sub-step is performed based on all the subsets: a single subset of all the subsets is called for recursive calculation to obtain a remaining time set and a partition set And a partition composition set, wherein the remaining time set is a set of remaining upgrade times in the upgrade time sequence after recursive calculation, the partition set is a set of subsets currently performing recursive calculations in the first set, and the partition composition set is a set consisting of the sum of subsets currently performing recursive calculations in the second set; the remaining time set is used as the next upgrade time sequence, the partition set is used as the next first set, and the partition composition set is used as the next second set, and the recursive steps are repeated until it is determined that the number of subsets in the first set is equal to the number of communication lines, and it is determined that the remaining time set is an empty set, then the partition set is stored in a result set, and the calculation of the recursive function is terminated, and multiple arrangement schemes to be screened are determined based on the result set.

[0012] Preferably, the calling of a single subset among all the subsets for recursive calculation to obtain a remaining time set, a partition set and a partition composition set includes: adding the single subset to the first set to obtain a partition set, and adding the sum of the single subset to the second set to obtain a partition composition set; establishing a remaining time set with an initial value of zero, and establishing a dictionary to record the number of occurrences of each upgrade time in the single subset based on the dictionary; traversing the upgrade time sequence, for each upgrade time, searching the dictionary for the number of occurrences of the upgrade time, if the number is greater than or equal to 1, subtracting 1 from the number, and if the number is equal to 0, adding the upgrade time to the remaining time set to obtain the remaining time set.

[0013] Preferably, the method of screening out repeated allocations containing the same upgrade time from the multiple arrangement schemes to be screened includes: establishing a target result set with an initial value of zero, and performing the following screening steps: for all subsets in the result set, performing non-decreasing sorting on the subsets of the result set and each multiset in the subsets of the result set, determining whether the subset of the result set exists in the target result set, and if not, storing the subset of the result set in the target result set; and repeatedly performing the screening steps until all subsets in the result set are traversed and repeated allocations containing the same upgrade time are screened out.

[0014] In a second aspect, the present invention provides the following technical solution through an embodiment of the present invention:

[0015] A device for determining a controller upgrade time arrangement scheme, comprising:

[0016] An acquisition module, used for acquiring the number of communication lines under the controller, a multiple set of upgrade time of the controller, and setting a maximum flash writing time, wherein the multiple set includes the upgrade time sequence of all control units under the controller;

[0017] A shortest time determination module, used to determine the shortest time for parallel flashing of all control units based on the number of communication lines and the multiset;

[0018] The arrangement scheme determination module is used to determine all arrangement schemes of controller upgrade time that meet parallel flashing based on the number of communication lines, the upgrade time sequence and the set maximum flashing time if the shortest time is less than or equal to the set maximum flashing time.

[0019] In a third aspect, the present invention provides the following technical solution through an embodiment of the present invention:

[0020] An electronic device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.

[0021] In a fourth aspect, the present invention provides the following technical solution through an embodiment of the present invention:

[0022] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0024] The method for determining the controller upgrade time arrangement scheme provided by the embodiment of the present invention is aimed at the problem that there is no perfect solution for applying parallel flashing to network topology design. The present application can perform software update operations on multiple ECUs at the same time, and when different numbers of communication lines are connected, the shortest parallel upgrade time that can be achieved under different numbers of communication lines is output simultaneously. The shortest parallel flashing time can be determined under the given number of communication lines and controller upgrade time to meet the parallel flashing time requirements. Based on the number of communication lines and the upgrade time of the controller, multiple arrangements of the controller upgrade time are calculated to meet the parallel flashing time requirements, provide a reference for network topology design, flexibly arrange the time of controller upgrade, achieve a better parallel flashing effect, and help reduce the flashing time, thereby improving efficiency and performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 It is a flow chart of a method for determining a controller upgrade time arrangement scheme in an embodiment of the present invention;

[0027] Figure 2 A schematic diagram of a process for determining an arrangement scheme in an embodiment of the present invention;

[0028] Figure 3 It is a structural schematic diagram of a device for determining a controller upgrade time arrangement scheme in an embodiment of the present invention;

[0029] Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In the field of automobile manufacturing, in order to improve production efficiency and reduce costs while ensuring software quality and security, it is necessary to quickly and reliably load and update the software in the automotive electronic control unit (ECU), and the traditional serial writing method has a bottleneck in the flash writing speed, so the automotive industry has begun to adopt parallel flash writing technology. This technology allows software update operations to be performed on multiple ECUs at the same time. With the popularization of parallel flash writing technology, the design of network topology also needs to consider the time requirements for parallel flash writing. Therefore, the present application provides a controller upgrade time arrangement scheme, which can meet the parallel flash writing time requirements when different numbers of communication lines are hung down, and output the shortest parallel upgrade time achievable under different numbers of communication lines, aiming to provide a reference for network topology design, greatly improving production efficiency and work efficiency.

[0031] In view of this, the embodiments of the present application provide a method, device, equipment and medium for determining a controller upgrade time scheduling scheme, and provide a scheme for determining a controller upgrade time scheduling scheme, which can flexibly arrange the time for controller upgrades and achieve a better parallel flashing effect, which is beneficial to reducing the flashing time, thereby improving efficiency and performance.

[0032] The technical solution of the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0033] A method for determining a controller upgrade time arrangement scheme, comprising: obtaining the number of communication lines hanging under the controller, a multiple set of the controller upgrade time, and setting a maximum flushing time, wherein the multiple set includes the upgrade time sequence of all control units hanging under the controller; based on the number of communication lines and the multiple set, determining the shortest time for parallel flushing of all control units; if the shortest time is less than or equal to the set maximum flushing time, then based on the number of communication lines, the upgrade time sequence, and the set maximum flushing time, determining all arrangements for the controller upgrade time that meet the parallel flushing requirements.

[0034] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0035] In a first aspect, an embodiment of the present invention provides a method for determining a controller upgrade time arrangement scheme. Specifically, Figure 1 As shown, the method includes the following steps S101 to S103:

[0036] Step S101, obtaining the number of communication lines under the controller, a multi-set of the upgrade time of the controller, and setting a maximum flashing time, wherein the multi-set includes the upgrade time sequence of all control units under the controller;

[0037] Step S102: determining the shortest time for parallel flashing of all control units based on the number of communication lines and the multiset.

[0038] In the specific implementation process, first obtain the number of communication lines n (n = 1, 2, 3, ...) under the controller. It should be noted that n does not exceed the maximum number of parallel operations that the controller can handle. The multiset T of the upgrade time of all ECUs under the controller. If it has been determined that some ECUs need to be connected to the same network segment, the corresponding element in T is the sum of the upgrade time of these ECUs, otherwise the corresponding element in T is the upgrade time of a single ECU. The multiset contains the upgrade time sequence of all control units (ECUs) under the controller, for example: multiset T = [2, 3, 3, 3, 5], in minutes. Set the maximum flashing time t to the time that needs to be parallelized within the time.

[0039] For ease of understanding, in this embodiment, the multiset T of the controller upgrade time is set to [2, 3, 3, 3, 5], the number of communication lines n is 3; the parallel writing time that needs to be met is t = 8, in minutes, and the method for determining the controller upgrade time arrangement scheme is described below:

[0040] In a specific embodiment, according to the number of communication lines and multisets, a greedy strategy is used to determine the shortest time t for parallel flashing of all control units under the controller. min .

[0041] In one embodiment, based on the number of communication lines and multiple sets, determining the shortest time for parallel flashing of all control units can include: arranging the upgrade times in the multiple sets in non-increasing order to obtain a sorted upgrade time sequence; establishing a component set with an initial value of zero, and setting the initial shortest time to zero, wherein the component set includes multiple subsets, and the subsets are composed of the sum of the upgrade times in the multiple sets, and the number of subsets in the component set is equal to the number of communication lines; based on the sorted upgrade time, the component set and the initial shortest time, determining the shortest time for parallel flashing of all control units.

[0042] Specifically, the multiple sets T of the controller upgrade time are arranged in a non-increasing order (for example, in a descending order) to obtain a sorted upgrade time sequence RT; initialize a component set S with n upgrade time number = {S k |1≤k≤n}, the composition set S contains n subsets, each subset is composed of the sum of the upgrade time in the multi-set, S represents the sum of n subsets, and the values ​​in S are all 0 in the initial state; then set the shortest time t with the initial value of zero min , the shortest time of initialization is used to represent the maximum value of S.

[0043] For example, the upgrade time series RT = {5, 3, 3, 3, 2}, and the final value of the integrated S is {5, 6, 5}.

[0044] In one embodiment, based on the sorted upgrade time, the component set and the initial shortest time, determining the shortest time for parallel writing of all control units may include: based on the sorted upgrade time, the component set and the initial shortest time, performing the following shortest time update steps: starting from the first upgrade time in the sorted upgrade time sequence, adding the upgrade time to the current and smallest subset in the component set, updating the upgrade time corresponding to the subset to the increased upgrade time, if the increased upgrade time is greater than the initial shortest time, updating the increased upgrade time to the initial shortest time; repeating the shortest time update step until each upgrade time in the upgrade time sequence is added to the component set, and determining the last updated increased upgrade time as the shortest time for parallel writing of all control units.

[0045] Specifically, based on the sorted upgrade time RT, the component set S and the initial shortest time t min , perform the following shortest time update steps: starting from the first upgrade time in the upgrade time sequence RT, sequentially add the upgrade time to the current and smallest subset in the constituent set, and update the sum of the subset to S k ; If the upgrade time is added, S k Greater than the shortest time t min , then update t min For S k .

[0046] Repeat the shortest time update step until all upgrade times are allocated, and finally t min The value is the shortest time for all control units attached to the controller to be flashed in parallel.

[0047] For example, when RT = {5, 3, 3, 3, 2} and the final value of S is {5, 6, 5}, t min =6.

[0048] If the shortest time is greater than the set maximum refresh time, it indicates that there is no arrangement plan that meets the requirements. In this case, a prompt indicating that there is no arrangement plan that meets the requirements is output to indicate that the input set maximum refresh time is too small and needs to be adjusted to be greater than or equal to the shortest time.

[0049] Step S103, if the shortest time is less than or equal to the set maximum flash time, all controller upgrade time arrangements that meet parallel flashing are determined based on the number of communication lines, the upgrade time sequence and the set maximum flash time.

[0050] In a specific embodiment, based on the number of communication lines, the upgrade time sequence and the set maximum refresh time, all arrangement schemes of the controller upgrade time that meet the parallel refresh are determined, which may include: based on the number of communication lines, the upgrade time sequence and the set maximum refresh time, a plurality of arrangement schemes to be screened are generated through a recursive function; from the plurality of arrangement schemes to be screened, repeated allocations containing the same upgrade time are screened out, and all arrangement schemes of the controller upgrade time that meet the parallel refresh are determined.

[0051] In one embodiment, based on the number of communication lines, the upgrade time sequence, and the set maximum flashing time, a plurality of arrangement schemes to be screened are generated by a recursive function, which may include: establishing a first set with an initial value of zero and a second set with an initial value of zero, the second set being a set including the sum of each subset in the first set, and performing the following recursive steps by the recursive function:

[0052] Determine whether the number of subsets in the first set is equal to the number of communication lines, and determine whether the maximum value in the second set is greater than the set maximum refresh time; if both are not satisfied, then based on the upgrade time sequence, generate all subsets corresponding to the upgrade time sequence, and perform recursive calculation sub-steps based on all subsets: call a single subset from all subsets for recursive calculation to obtain a remaining time set, a partition set, and a partition composition set, wherein the remaining time set is a set of remaining upgrade time in the upgrade time sequence after recursive calculation, the partition set is a set of subsets in the first set that are currently performing recursive calculations, and the partition composition set is a set in the second set that is composed of the sum of subsets that are currently performing recursive calculations.

[0053] The remaining time set is used as the next upgrade time sequence, the partitioned set is used as the next first set, and the partitioned composition set is used as the next second set. The recursive steps are repeated until it is determined that the number of subsets in the first set is equal to the number of communication lines. When the number of subsets in the first set is equal to the number of communication lines, it is determined whether the remaining time set is an empty set. If it is an empty set, the partitioned set is stored in the result set, and the calculation of the recursive function is terminated. Based on the result set, multiple arrangement schemes to be screened are determined.

[0054] In a specific embodiment, the remaining time set is used as the next upgrade time sequence, the partition set is used as the next initial partition set, and the partition composition set is used as the next initial partition composition set. After repeatedly executing the recursive steps, the method may further include:

[0055] If it is determined that the maximum value in the second set is greater than the set maximum refresh time, or it is determined that the number of divisions in the first set is equal to the number of communication lines n, and the remaining time set NR is not an empty set, then the last added subset in the first set and the second set will be eliminated, and the calculation of the recursive function will be terminated, and the recursive calculation sub-steps will be repeated until a single subset in all subsets is retrieved.

[0056] Based on the remaining time set obtained by the last recursive calculation, continue to execute based on the upgrade time sequence, generate all subsets corresponding to the upgrade time sequence, and perform recursive calculation sub-steps based on all subsets until it is determined that the number of subsets in the first set is equal to the number of communication lines n, and the remaining time set NR is an empty set, then store the first set in the result set, terminate the calculation of the recursive function, and determine multiple arrangement schemes to be screened based on the result set.

[0057] In one embodiment, a single subset of all subsets is retrieved for recursive calculation to obtain a remaining time set, a partition set, and a partition composition set, which may include: adding a single subset to a first set to obtain a partition set, and adding the sum of the single subset to a second set to obtain a partition composition set; establishing a remaining time set with an initial value of zero, and establishing a dictionary to record the number of occurrences of each upgrade time in the single subset based on the dictionary; traversing the upgrade time sequence, for each upgrade time, searching the dictionary for the number of occurrences of the upgrade time, if the number is greater than or equal to 1, subtracting 1 from the number, and if the number is equal to 0, adding the upgrade time to the remaining time set to obtain the remaining time set.

[0058] A recursive function refers to a function that can directly or indirectly call itself. Correspondingly, a function that calls itself in its body is called a recursive call. For example, a recursive function can be update_c(x). First, based on the upgrade time series, generate all subsets SS corresponding to the upgrade time series; for each subset SS in all subsets SS i , perform recursive calculations, including: subsetting the subset SS i Add to the first set to get the partition set P, and add the subset SS i The sum is added to the second set to obtain the partitioned set S; calculate the next remaining time set NR: First, initialize the remaining time set NR to an empty set, create a dictionary, and record SS in the dictionary i The number of times each upgrade time appears in the dictionary; then traverse the upgrade time sequence R, and for each upgrade time, find the number of times the upgrade time appears in the dictionary. If the number is greater than or equal to 1, subtract 1 from the recorded number. If the upgrade time is not found in the dictionary (that is, the upgrade time has not appeared), add the upgrade time to the remaining time set to obtain the remaining time set NR.

[0059] Specifically, based on the number of communication lines, the upgrade time sequence, and the set maximum flashing time, all arrangements of controller upgrade time that meet the parallel flashing can be determined, which can include: constructing a recursive function G, which accepts three parameters: the remaining time set NR, the set P generated by the current division, and the set S containing the sum of each set in P, and executing the following recursive steps S201 to S203:

[0060] Step S201, if the maximum value of S is greater than the set maximum flushing time t, the function terminates;

[0061] If the number of partitions in P is equal to the number of communication lines n, and R is an empty set, then P is stored in the result set RS = {RS j |j=1,2,3,…}, and the function terminates; and R is not an empty set, the function terminates.

[0062] Step S202: Based on the upgrade time sequence R, all subsets SS corresponding to the upgrade time sequence R are generated.

[0063] In one embodiment, based on the upgrade time sequence, generating all subsets corresponding to the upgrade time sequence may include: using a recursive algorithm to generate all subsets SS of R. That is, first define a recursive function that accepts the current index and the current subset as parameters; in each call, add the current subset to the result list, and traverse the elements of the set backward from the current index, add the current element to the subset, and then continue to generate subsets recursively.

[0064] For example, in this embodiment, the first R={5,3,3,3,2}, SS={{5},{3},{3},{3},{2},{5,3},{5,3},{5,3},{5,2},{3,3},{3,3},{3,2},{3,3},{3,2},{3,2},{5,3,3},{5,3,3} ,{5,3,2},{5,3,3},{5,3,2},{5,3,2},{3,3,3},{3,3,2},{3,3,2},{3,3,2},{5,3,3,3},{5,3,3,2},{5,3,3,2},{3,3,3,2},{5,3,3,2}}.

[0065] Step S203, retrieve a single subset SS from all subsets SS i , perform the following recursive calculation sub-steps:

[0066] a. Subset SS i Add to the first set P;

[0067] b. Subset SS iThe sum of is added to the second set S;

[0068] c. Calculate the next remaining time set NR: Initialize NR to an empty set; create a dictionary D and record SS in the dictionary D i The number of occurrences of each upgrade time in R; traverse R, for each upgrade time, look up the dictionary, if in the set SS i If the upgrade time has appeared in SSi and the number of times is greater than 0, it will be subtracted once; if the upgrade time has not appeared in SSi, the upgrade time will be added to NR.

[0069] For example, in this embodiment, R={5, 3, 3, 3, 2}, and the first remaining time set NR={3, 3, 3, 2}.

[0070] d. Pass the remaining time set NR, the updated first set P and the second set S into the recursive function G for the next recursion.

[0071] In this embodiment, after the first update, P={{5}}, S={5}.

[0072] e. Eliminate the last set added from the first set P and the second set S.

[0073] In this embodiment, after the first elimination, P = {{5}, {3}}, S = {5, 3}. After step 203 is completed, S = {{{5},{3},{3,3,2}},{{5},{3},{3,3,2}},{{5},{3},{3,3,2}},{{5},{3,3},{3,2}},{{5},{3,3},{3,2}},{{5},{3,2},{3,3}},{{5},{3,2},{3,3}},{{5},{3,2},{3,3}},{{5},{3,3},{3,2}},{{5},{3,2},{3,3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}},{{5},{3,3,2},{3}}. 3,2}},{{3},{5,3},{3,2}},{{3},{5,3},{3,2}},{{3},{5,2},{3,3}},{{3},{3,3},{5,2}},{{3},{3,2},{5,3}},{{3},{3,2},{5,3}},{{3},{3,3,2},{5}},{{3},{5,3},{3,2}},{{3},{5,3},{3,2}},{{3},{5,3},{3,2}},{{3},{5,2},{3,3}},{{3},{3,3},{5,2}},{{3},{3,2},{5,3}},{{ 3},{3,2},{5,3}},{{3},{3,3,2},{5}},{{3},{5},{3,3,2}},{{3},{5,3},{3,2}},{{3},{5,3},{3,2}},{{3},{5,2},{3,3}},{{3},{3,3},{5,2}},{{3},{3,2},{5,3}},{{3},{3,2},{5,3}},{{3},{3,3,2},{5}},{{2},{5,3},{3,3}},{{2},{5,3},{3,3}},{{2},{3,3} ,{5,3}},{{2},{3,3},{5,3}},{{2},{3,3},{5,3}},{{5,3},{3},{3,2}},{{5,3},{3},{3,2}},{{5,3},{2},{3,3}},{{5,3},{3,3},{2}},{{5,3},{3,2},{3}},{{5,3},{3,2},{3}},{{5,3},{3},{3,2}},{{5,3},{3},{3,2}},{{5,3},{2},{3,3}},{{5,3},{3,3},{2}},{{5,3},{3,2},{3}},{{5,3},{3,2},{3}},{{5,3},{3},{3,2}},{{5,3},{3},{3,2}},{{5,3},{2},{3,3}},{{5,3},{3,3},{2}},{{5,3},{3,2},{3}},{{5,3},{3,2},{3}},{{5,2},{3},{3,3}},{{5,2},{3},{3,3}},{{5,2},{3},{3,3}},{{5,2},{3,3},{3}},{{5,2},{3,3},{3}},{{5,2},{3,3},{3}},{{3,3},{5},{3,2}},{{3,3},{3},{5,2}},{{3,3},{2},{5,3}},{{3,3},{5,3},{2}},{{3,3},{5,2},{3}},{{3,3},{3,2},{5}},{{3,3},{5},{3,2}},{{3,3},{3},{5,2}},{{3,3},{2},{5,3}},{{3,3},{5,3},{2}},{{3,3},{5,2},{3}},{{3,3},{3,2},{5}},{{3,2},{5},{3,3}},{{3,2},{3},{5,3}},{{3,2},{3},{5,3}},{{3,2},{5,3},{3}},{{3,2},{5,3},{3}},{{3,2},{3,3},{5}},{{3,3},{5},{3,2}},{{3,3},{3},{5,2}},{{3,3},{2},{5,3}},{{3,3},{5,3},{2}},{{3,3},{5,2},{3}},{{3,3},{3,2},{5}},{{3,2},{5},{3,3}},{{3,2},{3},{5,3}},{{3,2},{3},{5,3}},{{3,2},{5,3},{3}},{{3,2},{5,3},{3}},{{3,2},{3,3},{5}},{{3,2},{5},{3,3}},{{3,2},{3},{5,3}},{{3,2},{3},{5,3}},{{3,2},{5,3},{3}},{{3,2},{5,3},{3}},{{3,2},{3,3},{5}},{{3,3,2},{5},{3}},{{3,3,2},{3},{5}},{{3,3,2},{5},{3}},{{3,3,2},{3},{5}},{{3,3,2},{5},{3}},{{3,3,2},{3},{5}}}。,

[0074] During the execution of step S201, if it is determined that the maximum value of S is greater than the set maximum refresh time t, or the number of divisions in P is equal to the number of communication lines n, and R is not an empty set, then jump to step e of step S203, and then continue to re-execute step S203, call the next subset in all sets SS, and execute the recursive sub-step; if all subsets in all subsets SS in step S203 are called, then after executing step S201, continue to execute step S202, based on the new upgrade time sequence (i.e., the remaining time set NR), generate all subsets SS corresponding to the new upgrade time sequence, and continue to execute step S203. If during the execution of step S201, it is determined that the number of divisions in the first set P is equal to the number of communication lines n, and R is an empty set, then P is stored in the result set RS = {RS j |j=1,2,3,…}.

[0075] For ease of understanding, the steps of all arrangements for determining controller upgrade time that satisfies parallel flashing proposed in this application are described in detail below:

[0076] Establish a recursive function, and establish a first set P and a second set S containing the sum of each set in P, wherein both the first set P and the second set S are empty sets;

[0077] Determine whether the second set S is greater than t, and determine whether the division result in the first set P is equal to n. If both are not satisfied, generate all subsets SS based on the upgrade time sequence R;

[0078] Retrieve a single subset SS from all subsets SS i , subset SS i Add to P, and set the subset SS i The sum is added to S to calculate the next remaining time set NR; NR, the updated P and S are passed into the recursive function G to execute the steps of determining whether the second set S is greater than t and determining whether the division result in the first set P is equal to n;

[0079] If none of them are satisfied, all subsets SS are generated based on NR, a single subset SSi in all subsets SS is retrieved, and new NR, P and S are obtained. The new NR, P and S are passed into the recursive function G to execute the steps of determining whether the second set S is greater than t and determining whether the division result in the first set P is equal to the target number n;

[0080] At this time, if the partition result in the first set P is equal to the target number n, and R is not an empty set, the last partition result added in P and S is removed, the function terminates, and the next subset SS in all subsets SS is called. i, get new NR, P and S, pass the new NR, P and S into the recursive function G, execute the steps of judging whether the second set S is greater than t, and judging whether the division result in the first set P is equal to the target number n; if the division result in the first set P is equal to the target number n, and R is not an empty set, then the last division result added to P and S is removed, and the function terminates until each element in SS is looped through, the function terminates, and the step of generating all subsets SS based on R is executed to obtain new all subsets SS,

[0081] Repeat the aforementioned recursive calculation sub-steps until the recursive calculation sub-function terminates, and continue to execute the steps of generating all subsets SS based on R to obtain new all subsets SS until R is an empty set, and store the result P in the result set RS.

[0082] Next, after obtaining a plurality of screening arrangement schemes, the method includes: screening out repeated allocations containing the same upgrade time from the plurality of arrangement schemes to be screened, and determining all arrangement schemes that meet the controller upgrade time requirements of parallel flashing.

[0083] In a specific embodiment, repeated allocations containing the same upgrade time are screened out from multiple arrangement schemes to be screened, including: establishing a target result set with an initial value of zero, and performing the following screening steps: for all subsets in the result set, performing non-increasing sorting on the subsets of the result set and each multi-set in the subsets of the result set, determining whether the subset of the result set exists in the target result set, and if not, storing the subset of the result set in the target result set; repeating the screening steps until all subsets in the result set are traversed, and repeated allocations containing the same upgrade time are screened out.

[0084] For the result set RS, filter out duplicate assignments containing the same elements, including:

[0085] a. Initialize the target result set URS that does not contain duplicate sets to be empty;

[0086] b. For RS j Sort each multiset in non-decreasing order and sort the entire RS j Perform non-decreasing sorting. If the multiset does not exist in the target result set URS, store it in the target result set URS.

[0087] c. Repeat step b until all elements RS in the result set RS are traversed. j .

[0088] In this embodiment, after execution is completed, URS = {{{2,3,3},{3},{5}},{{2,3},{3,3},{5}},{{2,3},{3},{3,5}},{{2,5},{3},{3,3}},{{2},{3,3},{3,5}}}.

[0089] like Figure 2 As shown, it is a schematic diagram of the determination process of the arrangement scheme shown in this application. When all the above steps are executed, this embodiment outputs the following content: ① Minimum time value (shortest time) for parallel writing: 6 minutes; ② Number of arrangement schemes: 5; ③ All arrangement schemes (in minutes): {{{2,3,3},{3},{5}}, {{2,3},{3,3},{5}}, {{2,3},{3},{3,5}}, {{2,5},{3},{3,3}}, {{2},{3,3},{3,5}}}. In these arrangement schemes, the time arrangement of the controller on each communication line is listed in detail. It can be seen from the embodiment that this method can effectively formulate the initial controller upgrade time arrangement strategy according to the parallel writing time requirements, and provide a reference for the design of network topology.

[0090] In summary, a method for determining a controller upgrade time arrangement scheme provided by an embodiment of the present invention provides a controller upgrade time arrangement scheme that meets the parallel writing time requirements under different communication lines based on the controller upgrade time, as well as the shortest parallel writing time that can be achieved under different communication lines, which provides a reference for the vehicle network topology design and helps to design a network topology scheme that can meet the parallel writing time requirements. The present application can determine the shortest parallel writing time given the number of communication lines and the controller upgrade time, and calculate the arrangement schemes for multiple controller upgrade times to meet the parallel writing time requirements. The key lies in how to effectively utilize the communication lines and reduce the writing time as much as possible under the time limit of the controller upgrade, thereby improving the efficiency and performance of the system. The method proposed in the present application can flexibly arrange the time for the controller upgrade to achieve a better parallel writing effect. This method is of great significance for improving the efficiency of the system, reducing the controller upgrade time, and optimizing the parallel writing performance.

[0091] In the second aspect, based on the same inventive concept, this embodiment provides a device for determining a controller upgrade time arrangement scheme, such as Figure 3 As shown, including:

[0092] The acquisition module 401 is used to acquire the number of communication lines under the controller, a multiple set of upgrade time of the controller, and set a maximum flash time, wherein the multiple set includes the upgrade time sequence of all control units under the controller;

[0093] A shortest time determination module 402, configured to determine the shortest time for parallel flashing of all control units based on the number of communication lines and the multiset;

[0094] The arrangement scheme determination module 403 is used to determine all arrangement schemes of controller upgrade time that meet parallel flashing based on the number of communication lines, the upgrade time sequence and the set maximum flashing time if the shortest time is less than or equal to the set maximum flashing time.

[0095] As an optional embodiment, the shortest time determination module 402 specifically includes:

[0096] The sorting submodule is used to arrange the upgrade time in multiple sets in non-increasing order to obtain a sorted upgrade time series;

[0097] The initialization submodule is used to establish a component set with an initial value of zero and set the initial shortest time to zero, wherein the component set includes multiple subsets, the subsets are composed of the sum of the upgrade times in the multiple sets, and the number of subsets in the component set is equal to the number of communication lines;

[0098] The determination submodule is used to determine the shortest time for parallel flashing of all control units based on the sorted upgrade time sequence, the component set and the initial shortest time.

[0099] As an optional embodiment, the determination submodule is specifically used to: based on the sorted upgrade time sequence, the component set and the initial shortest time, perform the following shortest time update steps: starting from the first upgrade time in the sorted upgrade time sequence, add the upgrade time to the current and smallest subset in the component set, and update the upgrade time corresponding to the subset to the increased upgrade time; if the increased upgrade time is greater than the initial shortest time, the increased upgrade time is updated to the initial shortest time; repeat the shortest time update step until each upgrade time in the upgrade time sequence is added to the component set, and determine the last updated increased upgrade time as the shortest time for parallel flashing of all control units.

[0100] As an optional embodiment, the arrangement scheme determination module 403 specifically includes:

[0101] The recursive calculation submodule is used to generate multiple layout schemes to be screened through a recursive function based on the number of communication lines, the upgrade time sequence, and the set maximum flashing time;

[0102] The screening submodule is used to screen out repeated allocations containing the same upgrade time from multiple arrangement schemes to be screened, and determine all arrangement schemes that meet the controller upgrade time requirements for parallel flashing.

[0103] As an optional embodiment, the recursive calculation submodule is specifically used for:

[0104] Establish a first set with an initial value of zero and a second set with an initial value of zero, the second set is a set containing the sum of each subset in the first set, and perform the following recursive steps through a recursive function: determine whether the number of subsets in the first set is equal to the number of communication lines, and determine whether the maximum value in the second set is greater than the set maximum flush time; if both are not satisfied, then based on the upgrade time sequence, generate all subsets corresponding to the upgrade time sequence, and perform recursive calculation sub-steps based on all subsets: call a single subset in all subsets for recursive calculation to obtain a remaining time set, a partition set, and a partition composition set, wherein the remaining time set is the upgrade time after recursive calculation The set of remaining upgrade times in the time series, the partition set is the set of subsets in the first set that are currently performing recursive calculations, and the partition composition set is the set consisting of the sum of subsets in the second set that are currently performing recursive calculations; the remaining time set is used as the next upgrade time sequence, the partition set is used as the next first set, and the partition composition set is used as the next second set, and the recursive steps are repeated until it is determined that the number of subsets in the first set is equal to the number of communication lines, and it is determined that the remaining time set is an empty set, then the partition set is stored in the result set, and the calculation of the recursive function is terminated, and multiple arrangement schemes to be screened are determined based on the result set.

[0105] As an optional embodiment, the recursive calculation submodule is specifically used for:

[0106] Add a single subset to the first set to obtain a partition set, and add the sum of the single subsets to the second set to obtain a partition composition set; establish a remaining time set with an initial value of zero, and establish a dictionary to record the number of times each upgrade time in the single subset occurs based on the dictionary; traverse the upgrade time sequence, for each upgrade time, find the number of times the upgrade time occurs in the dictionary, if the number is greater than or equal to 1, then reduce the number by 1, if the number is equal to 0, then add the upgrade time to the remaining time set to obtain the remaining time set.

[0107] As an optional embodiment, the screening submodule is specifically used to: establish a target result set with an initial value of zero, and perform the following screening steps: for all subsets in the result set, perform non-decreasing sorting on the subsets of the result set and each multiset in the subsets of the result set, determine whether there is a subset of the result set in the target result set, and if not, store the subset of the result set in the target result set; repeat the screening steps until all subsets in the result set are traversed, and filter out duplicate allocations containing the same upgrade time.

[0108] The above modules can be implemented by software codes, in which case, the above modules can be stored in the memory of the control device. The above modules can also be implemented by hardware such as integrated circuit chips.

[0109] An embodiment of the present invention provides a device for determining a controller upgrade time scheduling scheme, and its implementation principle and technical effects are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0110] In a third aspect, based on the same inventive concept, this embodiment provides an electronic device 500, such as Figure 4 As shown, it includes: a memory 501, a processor 502 and a computer program 503 stored in the memory and executable on the processor, and when the processor 502 executes the program, the steps of the method for determining the arrangement scheme described in the first aspect are implemented.

[0111] Since the electronic device introduced in this embodiment is an electronic device used to implement the method for determining the arrangement scheme in the embodiment of the present application, based on the method for determining the arrangement scheme introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the electronic device used by the method for determining the arrangement scheme in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0112] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A module that specifies functions in one or more boxes.

[0114] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction module, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0117] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for determining a controller upgrade time arrangement scheme, characterized in that: include: Obtaining the number of communication lines under the controller, a multiset of the upgrade time of the controller, and setting a maximum flash write time, wherein the multiset includes the upgrade time sequence of all control units under the controller; Determining a minimum time for flashing all control units in parallel based on the number of communication lines and the multiset; If the shortest time is less than or equal to the set maximum flash time, all controller upgrade time arrangements that meet the parallel flashing requirements are determined based on the number of communication lines, the upgrade time sequence, and the set maximum flash time.

2. The method according to claim 1, characterized in that The determining, based on the number of communication lines and the multiset, the shortest time for parallel flashing of all control units comprises: Arrange the upgrade time in the multiple sets in non-increasing order to obtain a sorted upgrade time sequence; Establishing a component set with an initial value of zero, and setting the initial shortest time to zero, wherein the component set includes multiple subsets, the subsets are composed of the sum of the upgrade times in the multiple sets, and the number of subsets in the component set is equal to the number of communication lines; Based on the sorted upgrade time sequence, the component set and the initial shortest time, the shortest time for parallel flashing of all the control units is determined.

3. The method according to claim 2, characterized in that The determining the shortest time for parallel flashing of all control units based on the sorted upgrade time sequence, the component set and the initial shortest time includes: Based on the sorted upgrade time sequence, the component set and the initial shortest time, the following shortest time update steps are performed: Starting from the first upgrade time in the ordered upgrade time sequence, the upgrade time is added to the current and smallest subset in the component set, and the upgrade time corresponding to the subset is updated to the increased upgrade time. If the increased upgrade time is greater than the initial shortest time, the increased upgrade time is updated to the initial shortest time; Repeat the shortest time update step until each upgrade time in the upgrade time sequence is added to the component set, and determine the last updated increased upgrade time as the shortest time for parallel flashing of all control units.

4. The method according to claim 1, characterized in that The step of determining all controller upgrade time arrangement schemes that meet the requirements of parallel flashing based on the number of communication lines, the upgrade time sequence, and the set maximum flashing time includes: Based on the number of communication lines, the upgrade time sequence and the set maximum flash writing time, a plurality of arrangement schemes to be screened are generated through a recursive function; From the multiple arrangement schemes to be screened, repeated allocations containing the same upgrade time are screened out to determine all arrangement schemes that meet the controller upgrade time requirements for parallel flashing.

5. The method according to claim 4, characterized in that The method of generating a plurality of arrangement schemes to be screened based on the number of communication lines, the upgrade time sequence and the set maximum flash writing time through a recursive function includes: A first set with an initial value of zero and a second set with an initial value of zero are established, wherein the second set is a set including the sum of each subset in the first set, and the following recursive steps are performed by a recursive function: Determine whether the number of subsets in the first set is equal to the number of communication lines, and determine whether the maximum value in the second set is greater than the set maximum flushing time; If none of the conditions are satisfied, then based on the upgrade time sequence, all subsets corresponding to the upgrade time sequence are generated, and recursive calculation sub-steps are performed based on all the subsets: Retrieving a single subset from all the subsets for recursive calculation to obtain a remaining time set, a partition set, and a partition composition set, wherein the remaining time set is a set of remaining upgrade times in the upgrade time sequence after recursive calculation, the partition set is a set of subsets in the first set that are currently performing recursive calculation, and the partition composition set is a set consisting of the sum of subsets in the second set that are currently performing recursive calculation; The remaining time set is used as the next upgrade time sequence, the partition set is used as the next first set, and the partition composition set is used as the next second set. The recursive steps are repeated until it is determined that the number of subsets in the first set is equal to the number of communication lines, and it is determined that the remaining time set is an empty set. The partition set is stored in the result set, and the calculation of the recursive function is terminated. Based on the result set, multiple arrangement schemes to be screened are determined.

6. The method according to claim 5, characterized in that The calling of a single subset from all the subsets for recursive calculation to obtain a remaining time set, a partition set, and a partition composition set includes: Adding the single subset to the first set to obtain a partition set, and adding the sum of the single subset to the second set to obtain a partition composition set; Establishing a remaining time set with an initial value of zero, and establishing a dictionary, based on which the number of occurrences of each upgrade time in the single subset is recorded; Traverse the upgrade time sequence, for each upgrade time, search the number of times the upgrade time appears in the dictionary, if the number is greater than or equal to 1, reduce the number by 1, if the number is equal to 0, add the upgrade time to the remaining time set to obtain the remaining time set.

7. The method according to claim 5, characterized in that The step of screening out repeated allocations containing the same upgrade time from the plurality of arrangement schemes to be screened includes: Create a target result set with an initial value of zero and perform the following screening steps: For all subsets in the result set, sort the subsets of the result set and each multiset in the subsets of the result set in a non-decreasing order, determine whether the subset of the result set exists in the target result set, and if not, store the subset of the result set in the target result set; The screening step is repeatedly performed until all subsets in the result set are traversed, and repeated allocations containing the same upgrade time are screened out.

8. A device for determining a controller upgrade time arrangement scheme, characterized in that: include: An acquisition module, used for acquiring the number of communication lines under the controller, a multiple set of upgrade time of the controller, and setting a maximum flash writing time, wherein the multiple set includes the upgrade time sequence of all control units under the controller; A shortest time determination module, used to determine the shortest time for parallel flashing of all control units based on the number of communication lines and the multiset; The arrangement scheme determination module is used to determine all arrangement schemes of controller upgrade time that meet parallel flashing based on the number of communication lines, the upgrade time sequence and the set maximum flashing time if the shortest time is less than or equal to the set maximum flashing time.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.