CN113064623A - Remote upgrading method - Google Patents

Remote upgrading method Download PDF

Info

Publication number
CN113064623A
CN113064623A CN202110420401.2A CN202110420401A CN113064623A CN 113064623 A CN113064623 A CN 113064623A CN 202110420401 A CN202110420401 A CN 202110420401A CN 113064623 A CN113064623 A CN 113064623A
Authority
CN
China
Prior art keywords
nodes
target
installation package
electric quantity
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110420401.2A
Other languages
Chinese (zh)
Inventor
黄子亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baoneng Guangzhou Automobile Research Institute Co Ltd
Original Assignee
Baoneng Guangzhou Automobile Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baoneng Guangzhou Automobile Research Institute Co Ltd filed Critical Baoneng Guangzhou Automobile Research Institute Co Ltd
Priority to CN202110420401.2A priority Critical patent/CN113064623A/en
Publication of CN113064623A publication Critical patent/CN113064623A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60LPROPULSION OF ELECTRICALLY-PROPELLED VEHICLES; SUPPLYING ELECTRIC POWER FOR AUXILIARY EQUIPMENT OF ELECTRICALLY-PROPELLED VEHICLES; ELECTRODYNAMIC BRAKE SYSTEMS FOR VEHICLES IN GENERAL; MAGNETIC SUSPENSION OR LEVITATION FOR VEHICLES; MONITORING OPERATING VARIABLES OF ELECTRICALLY-PROPELLED VEHICLES; ELECTRIC SAFETY DEVICES FOR ELECTRICALLY-PROPELLED VEHICLES
    • B60L58/00Methods or circuit arrangements for monitoring or controlling batteries or fuel cells, specially adapted for electric vehicles
    • B60L58/10Methods or circuit arrangements for monitoring or controlling batteries or fuel cells, specially adapted for electric vehicles for monitoring or controlling batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0063Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with circuits adapted for supplying loads from the battery
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0068Battery or charger load switching, e.g. concurrent charging and load supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries

Abstract

The application discloses a remote upgrading method, which can solve the problem that in the prior art, the upgrading time is long during vehicle remote upgrading, and therefore user experience is improved. The remote upgrading method comprises the following steps: the method comprises the steps that a main control node receives a plurality of installation packages from a server and a configuration file corresponding to each installation package; the master control node sends each installation package in the installation packages to the corresponding target child node based on the corresponding relation between the installation packages and the target child nodes; the main control node obtains the actual electric quantity of the storage battery and compares the actual electric quantity with the total electric quantity required by the plurality of target sub-nodes to execute the corresponding installation package refreshing task; and if the main control node determines that the actual electric quantity of the storage battery is not less than the total electric quantity consumed by the plurality of target sub-nodes for executing the corresponding installation package flashing, controlling the plurality of target sub-nodes to execute the flashing tasks of the corresponding installation packages based on a preset control strategy, and controlling the plurality of sub-target nodes to restart after a preset time interval so as to complete the upgrading process.

Description

Remote upgrading method
Technical Field
The invention relates to the technical field of vehicles, in particular to a remote upgrading method.
Background
Currently, when an electric vehicle needs to be upgraded, remote upgrade of the electric vehicle is generally implemented based on Over the Air Technology (OTA). In the prior art, before formal upgrade, an electric vehicle cannot know which Electronic Control Units (ECUs) of the electric vehicle need to be upgraded, and therefore, it is assumed that all ECUs of the electric vehicle need to be upgraded, so that an electric quantity threshold is set for a storage battery. Once the electric quantity of the current storage battery of the electric automobile is smaller than the electric quantity threshold value, the storage battery needs to be charged first, and the upgrading can be started only after the electric quantity of the storage battery reaches the electric quantity threshold value, but in general, only part of the ECUs of the electric automobile are upgraded. Therefore, in such cases, the battery needs to be charged before the formal upgrade, which undoubtedly increases the time required for the whole upgrade process.
Therefore, before upgrading the electric vehicle in the prior art, as long as the electric quantity of the electric vehicle is not less than the set electric quantity threshold value, the storage battery must be charged first, so that the upgrading time is prolonged.
Disclosure of Invention
The embodiment of the application provides a remote upgrading method, which can solve the problem that in the prior art, the upgrading time is long during remote upgrading of a vehicle.
In a first aspect, an embodiment of the present application provides a remote upgrade method, which is applied to a vehicle, where the vehicle includes a main control node and a plurality of child nodes, the child nodes are located in at least two different network segments, the vehicle is powered by a storage battery and is remotely connected to a server, and the server stores in advance the amount of storage battery power consumed in a unit time when each child node executes a corresponding installation package refresh task in a historical time period, and the method includes:
the master control node receives a plurality of installation packages from the server and a configuration file corresponding to each installation package, wherein the configuration files comprise corresponding relations between the installation packages and target child nodes, the brushing time required by the target child nodes to execute the brushing tasks of the corresponding installation packages and the electric quantity of a storage battery consumed by the target child nodes to execute the brushing tasks of the corresponding installation packages, and the size of the installation packages and the brushing time are in a positive correlation relation when the same target child node executes the brushing tasks of the installation packages;
the master control node sends each installation package in the installation packages to a corresponding target child node based on the corresponding relation between the installation packages and the target child nodes;
the main control node obtains the actual electric quantity of the storage battery and compares the actual electric quantity with the total electric quantity required by the plurality of target sub-nodes to execute the corresponding installation package refreshing task;
and if the main control node determines that the actual electric quantity of the storage battery is not less than the total electric quantity consumed by the plurality of target sub-nodes for executing the corresponding installation package flashing, controlling the plurality of target sub-nodes to execute the flashing tasks of the corresponding installation packages based on a first preset control strategy, and controlling the plurality of sub-target nodes to restart after a first preset time interval so as to complete the upgrading process, wherein the first preset time interval is related to the first preset control strategy.
In the embodiment of the application, the server stores the electric quantity of the storage battery consumed in unit time when each child node executes the corresponding installation package flashing task in the historical time period in advance, and for the same child node, the time for flashing the installation package and the size of the installation package form a positive correlation. Therefore, when the vehicle needs to be upgraded, the main control node can receive not only a plurality of installation packages from the server, but also a configuration file of each installation package from the server, wherein the configuration file comprises the corresponding relation between the installation packages and the target child node, and the target child node executes the required flashing time and the consumed storage battery capacity when the installation packages are flashed. The main control node can be directed against the actual electric quantity of current battery and the required total electric quantity of a plurality of target child node executions corresponding installation package refresh tasks and compare, if the required total electric quantity is not more than the actual electric quantity of battery when a plurality of target child nodes execute installation package refresh tasks, then can directly charge a plurality of target child nodes based on the actual electric quantity of battery, with prior art as long as the actual electric quantity of battery does not reach the set threshold (this set threshold is with all child nodes in the vehicle all need upgrade as the benchmark and set for), just need charge earlier the battery and compare, upgrade latency has been reduced, user experience has been promoted.
Optionally, the master control node pre-stores a correspondence between each child node and a weight value, where the weight value represents a priority of each child node in executing a flash task of the installation package, and when the target child nodes are all in the same network segment, controlling the target child nodes to execute the flash task of the corresponding installation package based on a first preset control policy includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm, and determines weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and the master control node sequentially controls the target sub-nodes to execute the writing tasks of the corresponding installation packages according to the sequence of the weighted values from large to small.
In the embodiment of the application, if a plurality of target child nodes are in the same network segment, the main control node determines respective weight values of the plurality of current target child nodes based on the pre-stored corresponding relationship between each child node and the weight values; and then sequentially controlling the plurality of target child nodes to execute the brushing tasks of the corresponding installation packages based on the sequence of the weighted values from large to small. Namely, the control strategy of sequential upgrading is adopted, so that the control complexity in the upgrading process is reduced.
Optionally, the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval includes:
the master control node takes the brushing time required by each target child node in the plurality of target child nodes as the respective upgrading waiting time;
and the master control node controls the corresponding target child node to restart after the upgrade waiting time is separated.
In the embodiment of the application, the flashing time required by each target child node is used as the respective upgrading waiting time, namely, once each target child node finishes the flashing of the corresponding installation package, the target child node can be restarted, so that the upgrading is finished, and the upgrading time of a single target child node is shortened.
Optionally, when none of the target child nodes is in the same network segment, controlling the target child nodes to execute the write-over task of the corresponding installation package based on a first preset control policy includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm;
and the master control node controls the target sub-nodes to execute the writing task of the corresponding installation package at the same time in parallel.
In the embodiment of the application, if it is determined that the target child nodes are not located in the same network segment, the master control node may execute the write-over task of the corresponding installation package in parallel by the target child nodes. Namely, the control strategy of parallel upgrading is adopted, so that the time required by the upgrading process can be reduced.
Optionally, the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval includes:
the master control node takes the maximum brushing time in the brushing times required by the target child nodes as the current upgrading waiting time;
and the master control node controls the target child nodes to restart after the upgrade waiting time is spaced.
In the embodiment of the application, the time with the largest brushing time in the brushing time required by the plurality of target sub-nodes for executing the brushing task of the installation package in parallel is used as the current upgrading waiting time, so that each target sub-node can complete the brushing task of the corresponding installation package within the upgrading waiting time, and the plurality of target sub-nodes can be upgraded at the same time.
Optionally, the master control node pre-stores a correspondence between each child node and a weight value, where the weight value represents a priority of each child node in executing a flash task of the installation package, and when the target child nodes are in at least two network segments, controlling the target child nodes to execute the flash task of the corresponding installation package based on a first preset control policy includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm, and determines weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and the master control node controls the target sub-node corresponding to each network segment to execute the corresponding installation package flashing task according to the sequence of the weighted values from large to small.
In the embodiment of the application, if a plurality of target sub-nodes are in at least two different network segments, the main control node determines respective weight values of the plurality of current target sub-nodes based on the pre-stored corresponding relationship between each sub-node and the weight values; and then sequentially controlling a plurality of target sub-nodes to execute the writing task of the corresponding installation package based on the sequence of the weighted values from large to small according to each network segment. The control strategy of parallel upgrading is adopted among different network segments, and the strategy of sequential upgrading is adopted in the same network segment, so that the time required by upgrading can be reduced, and the control complexity in the upgrading process can be reduced.
Optionally, the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval includes:
the master control node takes the maximum brushing time in the brushing time required by target child nodes which simultaneously execute brushing tasks in different network segments as the current updating waiting time;
and the master control node controls the target child nodes which are in different network segments and simultaneously execute the programming task to restart after the upgrade waiting time is separated.
In the embodiment of the application, the time with the largest brushing time in the brushing times required by the target sub-nodes which are in different network segments and execute the brushing tasks of the installation packages in parallel is taken as the current updating waiting time, so that the target sub-nodes which are in different network segments and execute the brushing tasks of the installation packages in parallel can finish the brushing tasks of the corresponding installation packages in the updating waiting time, and the target sub-nodes in different network segments can be updated simultaneously.
Optionally, the method further includes:
if the main control node determines that the actual electric quantity of the storage battery is smaller than the total electric quantity consumed by the plurality of target sub-nodes for executing corresponding installation package flashing, the plurality of target sub-nodes are divided into at least two batches based on a preset rule, the corresponding target sub-nodes are controlled to execute an installation package flashing task in batches based on a second preset control strategy, and the storage battery is charged between every two batches;
and the master control node controls the target sub-nodes corresponding to the current batch to restart after a second preset time interval so as to complete the upgrading process aiming at the target sub-nodes of the current batch, wherein the second preset time interval is associated with the second preset control strategy.
In the embodiment of the application, if the actual electric quantity of the storage battery is less than the total electric quantity consumed by the plurality of target sub-nodes for executing the corresponding installation package flashing tasks, the plurality of target sub-nodes can be divided into at least two batches, namely the flashing tasks of the installation package are executed in batches, and the storage battery is allowed to be charged between different batches, so that the storage battery can provide enough electric quantity when the target sub-nodes in each batch execute the corresponding installation package flashing tasks.
Optionally, the at least two batches include a first batch and a second batch, the priority of the target child node in the first batch for executing the installation package flashing is higher than the priority of the target child node in the second batch for executing the installation package flashing, and dividing the target child nodes into the at least two batches based on a preset rule includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm;
and if the main control node determines that the electric quantity distributed by a part of the target sub-nodes in the plurality of target sub-nodes is not less than the electric quantity consumed by the self-executed installation package flashing, taking the part of the sub-nodes as the first batch, and taking other target sub-nodes except the part of the target sub-nodes in the plurality of target sub-nodes as the second batch.
In the embodiment of the application, the main control node distributes electric quantity for the plurality of target nodes based on a maximum-minimum fairness algorithm, if the electric quantity distributed by a part of target sub-nodes is not less than the electric quantity consumed by the main control node for executing the installation package refresh task, the part of target sub-nodes are used as a first batch, and other target sub-nodes except the part of target sub-nodes in the plurality of target sub-nodes are used as a second batch, so that the plurality of target sub-nodes are controlled in batches to complete the upgrade task under the condition that the actual electric quantity of the storage battery is insufficient.
Optionally, the performing, in batches and based on the second preset control policy, the installation package flashing task by the corresponding target child node includes:
the master control node controls the target sub-nodes in the first batch to execute the flash tasks of the corresponding installation packages, and controls the storage battery to be charged after the target sub-nodes in the first batch all complete the flash of the corresponding installation packages, so that the electric quantity of the storage battery is not less than the total electric quantity required by the target sub-nodes in the second batch to execute the flash of the installation packages;
and the master control node controls the target child nodes in the second batch to execute the writing task of the corresponding installation package.
In the embodiment of the application, the main control node controls the target sub-nodes in the first batch to execute the corresponding installation package flashing tasks, then the storage battery is charged, so that the electric quantity of the charged storage battery is not less than the total electric quantity required by the target sub-nodes in the second batch to execute the installation package flashing tasks, and finally the target sub-nodes in the second batch are controlled to execute the installation package flashing tasks, so that the storage battery can provide enough electric quantity supply when the target sub-nodes in each batch execute the installation package flashing tasks, meanwhile, the charging time of the storage battery is controlled within a reasonable range, and the phenomenon that the whole upgrading process consumes a long time is avoided.
Optionally, the method further includes:
the main control node sends the time and the electric quantity actually consumed by each target sub-node when executing the installation package flashing task to the server, so that the server updates the electric quantity consumed in unit time when executing the installation package flashing task by each target sub-node stored by the server.
In the embodiment of the application, the server can update the electric quantity consumed in unit time when each target sub-node executes the installation package flashing task based on the actual consumed time and electric quantity when each target sub-node executes the installation package flashing task, so that the flashing time required for executing the corresponding installation package flashing task for the target sub-node and the pre-estimated value of the consumed electric quantity of the storage battery in the configuration file issued by the server when the vehicle is charged next time are more accurate.
In a second aspect, the present application provides a remote upgrade apparatus, the apparatus is applied to a vehicle, the vehicle includes a plurality of sub-nodes, the vehicle is powered by a storage battery and is remotely connected to a server, the server stores in advance the amount of battery power consumed in a unit time when each sub-node executes a corresponding installation package refresh task in a historical time period, and the size of an installation package when the same sub-node executes the installation package refresh task is in a positive correlation with the refresh time, the apparatus includes:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a plurality of installation packages from a server and a configuration file corresponding to each installation package, the configuration file comprises a corresponding relation between the installation packages and a target child node, the target child node executes the brushing time required by the corresponding installation package brushing and the storage battery electric quantity consumed by the target child node executing the corresponding installation package brushing;
a sending unit, configured to send each installation package of the multiple installation packages to a corresponding target child node based on a correspondence between the installation package and the target child node;
the comparison unit is used for acquiring the actual electric quantity of the storage battery and comparing the actual electric quantity with the total electric quantity required by the plurality of target child nodes for executing the corresponding installation package flash;
the flash unit is used for controlling the target sub-nodes to execute the flash tasks of the corresponding installation packages based on a first preset control strategy when the actual electric quantity of the storage battery is determined to be not less than the total electric quantity required by the target sub-nodes to execute the flash of the corresponding installation packages;
and the restarting unit is used for controlling the plurality of target child nodes to restart after a first preset time interval so as to finish the upgrading process.
Optionally, the device stores a correspondence between each child node and a weight value in advance, where the weight value represents a priority of each child node in executing an installation package flashing task, and when the plurality of target child nodes are all in the same network segment, the flashing unit is specifically configured to:
distributing electric quantity to the target sub-nodes based on a maximum and minimum fairness algorithm, and determining weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and sequentially controlling the target sub-nodes to execute the brushing tasks of the corresponding installation packages according to the sequence of the weighted values from large to small.
Optionally, the restart unit is specifically configured to:
taking the flash time required by each target child node in the plurality of target child nodes as respective upgrade waiting time;
and controlling the corresponding target child node to restart after the upgrade waiting time is separated.
Optionally, when none of the target child nodes is in the same network segment, the flashing unit is specifically configured to:
distributing electric quantity for the plurality of target child nodes based on a maximum and minimum fairness algorithm;
and parallelly controlling the target child nodes to simultaneously execute the writing tasks of the corresponding installation packages.
Optionally, the restart unit is specifically configured to:
taking the maximum brushing time in the brushing times required by the target child nodes as the current upgrading waiting time;
and controlling the plurality of target child nodes to restart after the upgrade waiting time is separated.
Optionally, the device stores in advance a correspondence between each child node and a weight value, where the weight value represents a priority of each child node in executing an installation package flashing task, and when the plurality of target child nodes are in at least two network segments, the flashing unit is specifically configured to:
distributing electric quantity to the target sub-nodes based on a maximum and minimum fairness algorithm, and determining weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and controlling the target sub-nodes corresponding to each network segment to execute corresponding installation package flashing tasks according to the sequence of the weighted values from large to small.
Optionally, the restart unit is specifically configured to:
taking the maximum brushing time in the brushing time required by target child nodes which simultaneously execute brushing tasks in different network segments as the current upgrading waiting time;
and after the upgrade waiting time is separated, controlling the target child nodes which are in different network segments and simultaneously execute the flash task to restart.
Optionally, the flashing unit is further configured to:
if the main control node determines that the actual electric quantity of the storage battery is smaller than the total electric quantity consumed by the plurality of target sub-nodes for executing corresponding installation package flashing, the plurality of target sub-nodes are divided into at least two batches based on a preset rule, the corresponding target sub-nodes are controlled to execute an installation package flashing task in batches based on a second preset control strategy, and the storage battery is charged between every two batches;
the restart unit is further configured to: and after a second preset time interval, controlling the target child node corresponding to the current batch to restart so as to complete the upgrading process aiming at the target child node of the current batch, wherein the second preset time interval is associated with the second preset strategy.
Optionally, the at least two batches include a first batch and a second batch, the amount of power consumed by the target child node in the first batch to perform the installation package flashing is not greater than the actual amount of power of the storage battery, and the priority of the target child node in the first batch to perform the installation package flashing is higher than the priority of the target child node in the second batch to perform the installation package flashing, and the apparatus further includes:
the distribution unit is used for distributing electric quantity to the target child nodes based on a maximum and minimum fairness algorithm;
and the dividing unit is used for taking the part of the sub nodes as the first batch and taking other target sub nodes except the part of the target sub nodes as the second batch when the fact that the electric quantity distributed by the part of the sub nodes in the target sub nodes is not smaller than the electric quantity consumed by the self-executed installation package flashing is determined.
Optionally, the flash unit is further specifically configured to:
controlling the target child nodes in the first batch to execute the flash tasks of the corresponding installation packages, and controlling the storage battery to be charged after the target child nodes in the first batch all complete the flash of the corresponding installation packages, so that the electric quantity of the storage battery is not less than the total electric quantity required by the target child nodes in the second batch to execute the flash of the installation packages;
and controlling the target child nodes in the second batch to execute the flash tasks of the corresponding installation packages.
Optionally, the sending unit is further configured to send, to the server, actual consumed time and electric quantity when each target child node executes the installation package flashing task, so that the server updates the electric quantity, stored by the server, consumed in unit time when each target child node executes the installation package flashing task.
In a third aspect, embodiments of the present application provide a vehicle, which includes a processor and a memory, where the processor is configured to implement the steps of the method according to any one of the embodiments of the first aspect when executing the computer program stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method according to any one of the embodiments of the first aspect.
Drawings
Fig. 1 is an architecture diagram of an electronic device of a vehicle according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a remote upgrade method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a remote upgrade apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments.
Fig. 1 is a schematic view of an architecture of an electronic device in a vehicle according to an embodiment of the present disclosure. Fig. 1 includes a main control node 101, a gateway 102, and a child node 103, where the main control node 101 is configured to implement control over the child nodes 103 through the gateway 102. The main control node 101 is remotely connected to a server (not shown in the figure), and when the child node 103 needs to be upgraded, the main control node can receive an installation package sent from the server and a corresponding relationship between the installation package and the child node to be upgraded. The child node 103 is any one of the electronic devices ECU1 to ECU 9. It should be understood that, since the respective functions of the ECUs 1 to 9 are different, in some scenarios, a plurality of ECUs are required to cooperate to realize a specific function, and therefore, for convenience of management, a plurality of ECUs commonly used for realizing a specific function are generally divided into the same network segment. For example, ECUs 1 to 3 belong to a first segment, ECUs 4 to 6 belong to a second segment, and ECUs 7 to 9 belong to a third segment.
In the prior art, when a vehicle needs to be upgraded remotely, it is assumed that all child nodes 103 (i.e., ECUs 1-9) of the vehicle need to be upgraded to set a threshold value of electric quantity for a battery. Once the current electric quantity of the storage battery is lower than the electric quantity threshold, the electric quantity of the storage battery needs to be charged to the electric quantity threshold first, and then the vehicle can be upgraded. But generally, only part of the sub-nodes 103 are upgraded, and the current electric quantity of the storage battery can actually support the part of the sub-nodes 103 to complete the upgrading process. Therefore, for such a scenario, it is obvious that the battery needs to be charged to the charge threshold before the formal upgrade, which increases the time consumption of the whole upgrade process.
In view of this, an embodiment of the present application provides a remote upgrade method, in which a master node may receive not only a plurality of installation packages from a server, but also a configuration file of each installation package from the server, where the configuration file includes a correspondence between an installation package and a target child node, and a refresh time and a consumed battery power required by the target child node to execute a refresh task of the installation package. On this basis, the main control node can be directed against the actual electric quantity of current battery and the required total electric quantity of a plurality of target child node executions corresponding installation package brush-write task and compare, if a plurality of target child node executions required total electric quantity when installation package brush-write task is not more than the actual electric quantity of battery, then can directly charge a plurality of target child nodes based on the actual electric quantity of battery, and need not to charge the electric quantity threshold value with the electric quantity of battery again, the upgrade latency time has been reduced, user experience has been promoted.
The technical scheme provided by the implementation of the application is described below with reference to the accompanying drawings. Referring to fig. 2, an embodiment of the present invention provides a remote upgrade method, where a flow of the method is described as follows:
step 201: the method comprises the steps that a main control node receives a plurality of installation packages from a server and configuration files corresponding to the installation packages, the configuration files comprise corresponding relations between the installation packages and target sub-nodes, the brushing time required by the corresponding installation package brushing tasks executed by the target sub-nodes and the storage battery electric quantity consumed by the corresponding installation package brushing tasks executed by the target sub-nodes are obtained, and the size of the installation packages and the brushing time are in positive correlation when the same target sub-nodes execute the installation package brushing tasks.
In consideration of the fact that no matter how many child nodes are required to be upgraded currently in the prior art, as long as the actual electric quantity of the storage battery does not reach the set threshold value, the electric quantity of the storage battery needs to be charged to the set threshold value, and the child nodes to be upgraded can be upgraded. In some scenes, the actual electric quantity of the storage battery does not reach the set threshold value, but because the number of the child nodes which need to be upgraded is small at present, the actual electric quantity of the storage battery can completely support the child nodes to be upgraded to complete the upgrading process, and then the storage battery is charged in advance, so that the whole upgrading process is helpless, and the whole upgrading time is long.
In view of this, in the embodiment of the present application, in order to reduce time consumption in the process of upgrading the child node to be upgraded, before formal upgrade, the main control node may respectively determine the actual electric quantity of the current storage battery and the total electric quantity that the child node to be upgraded needs to consume in the process of upgrading this time. If the actual electric quantity of the current storage battery is larger than or equal to the total electric quantity required to be consumed by the child node to be upgraded in the upgrading process, the master control node can directly start to upgrade the child node to be upgraded, namely, the time required for charging the electric quantity of the storage battery to the set threshold value is saved, and the time consumed in the whole upgrading process is reduced. Before this, the master control node needs to acquire the total electric quantity required to be consumed by the current child node to be upgraded in the upgrading process.
As a possible implementation manner, the master control node may receive a plurality of installation packages from the server and a configuration file corresponding to each installation package, where each configuration file includes a correspondence between an installation package and a target child node, and the target child node executes the refresh time consumed by the corresponding installation package refresh task and the storage battery power consumed by the target child node when executing the corresponding installation package refresh task.
It should be understood that, for the same child node, since the time consumed when executing the installation package flashing task is in a direct proportional relationship with the size of the installation package, before the server sends the installation package of each target child node to be upgraded to the master control node, the server may first determine the time required for executing the installation package flashing according to the size of the installation package of each target child node to be upgraded, and on this basis, since the storage battery power consumed in the unit time when each child node executes the corresponding installation package flashing task in the upgrading process in the historical time period is stored in the server in advance, the storage battery power required to be consumed when each target child node to be upgraded executes the corresponding installation package flashing at present may be further determined.
Step 202: and the master control node sends each installation package in the plurality of installation packages to the corresponding target child node based on the corresponding relation between the installation packages and the target child nodes.
In the embodiment of the application, after the master control node receives the plurality of installation packages from the server and the configuration file corresponding to each installation package, the plurality of installation packages can be sent to the corresponding target child node, so that the target child node can complete the upgrade based on executing the flashing task of the installation packages.
As a possible implementation manner, the master control node may send each installation package to a corresponding target child node based on a correspondence between the installation package included in the configuration file corresponding to each installation package and the target child node.
It should be understood that the master control node may also check the installation package before sending the installation package to the corresponding target child node, thereby ensuring the integrity and correctness of the installation package received from the server. For example, the main control node may check the installation package by using cyclic redundancy check, or may also use other checking methods, which is not particularly limited in this application.
Step 203: the main control node obtains the actual electric quantity of the storage battery and compares the actual electric quantity with the total electric quantity required by the plurality of target sub-nodes to execute the corresponding installation package refreshing task;
in the embodiment of the application, after the master control node sends each installation package to the corresponding target child node, whether the upgrade process can be directly executed or not is judged according to the actual electric quantity of the storage battery.
As a possible implementation manner, the master control node may obtain an actual electric quantity of the storage battery, and compare the actual electric quantity of the storage battery with a total electric quantity required by the plurality of target child nodes when executing the corresponding installation package refresh task.
Step 204: and the main control node determines that the actual electric quantity of the storage battery is not less than the total electric quantity consumed by the plurality of target sub-nodes for executing the corresponding installation package flash, and then controls the plurality of target sub-nodes to execute the flash tasks of the corresponding installation packages based on a first preset control strategy.
In the embodiment of the application, if the main control node determines that the electric quantity of the storage battery can support the current target child node to complete the upgrading process, the target child node can be directly controlled to start upgrading.
As a possible implementation manner, when the main control node determines that the actual electric quantity of the storage battery is not less than the total electric quantity consumed by the plurality of target sub-nodes to execute the corresponding installation package flashing tasks, the plurality of target sub-nodes may be controlled to execute the corresponding installation package flashing tasks based on a first preset control policy.
Considering that there are many possibilities for the network segment conditions where the target child nodes are located, for example, the target child nodes may all be located in the same network segment, and may also be located in at least two network segments, so that different control strategies may be adopted to control the target child nodes to execute the flash tasks of the corresponding installation packages according to the network segment conditions where the target child nodes are located.
Case 1: and the target child nodes are all located in the same network segment.
In the embodiment of the application, when a plurality of target child nodes are all in the same network segment, the control complexity is considered to be higher when the master control node controls the plurality of target child nodes to execute corresponding installation package write-over tasks in parallel, and therefore, in order to reduce the control complexity, a control strategy of sequential upgrading can be adopted.
Specifically, the main control node may pre-store a corresponding relationship between each child node and a weight value, where the weight value may represent an importance of each child node in the vehicle. For more important child nodes, the corresponding weight values are larger; conversely, for a child node with lower importance, the corresponding weight value may be smaller. The master control node can distribute electric quantity to a plurality of target sub-nodes based on a maximum fairness algorithm, and determines respective weighted values of the target sub-nodes based on the prestored corresponding relation between each sub-node and the weighted values; and then sequentially controlling the plurality of target child nodes to execute the brushing tasks of the corresponding installation packages according to the sequence of the weighted values from large to small. It should be understood that when the target child node executes the installation package flashing task, the target child node cannot perform its own specific function, and therefore, the target child node with a higher weight value preferentially executes the corresponding installation package flashing task, and can preferentially complete the upgrading process of the target child node, so that the normal function can be restored as soon as possible.
For example, the plurality of target child nodes are respectively the ECU1, the ECU2 and the ECU3, the main control node determines that the weight value corresponding to the ECU1 is 3, the weight value corresponding to the ECU2 is 5, and the weight value corresponding to the ECU3 is 2; the electric quantity required by the ECU1 to execute the corresponding installation package upgrading is 2W, the electric quantity required by the ECU2 to execute the corresponding installation package flashing task is 3W, the electric quantity required by the ECU3 to execute the corresponding installation package flashing task is 4W, and the actual electric quantity of the current storage battery is 10W, so that each ECU can be allocated with the electric quantity required by itself to execute the corresponding installation package flashing task based on the maximum and minimum fairness algorithm. Referring to fig. 1, since the ECU1, the ECU2, and the ECU3 belong to the same network segment, the main control node may control the ECU2 to perform the corresponding installation package flashing task first, control the ECU1 to perform the corresponding installation package flashing task, and finally control the ECU3 to perform the corresponding installation package flashing task.
Case 2: and the target child nodes are not in the same network segment.
In the embodiment of the application, when all the target child nodes are in the same network segment, that is, all the target child nodes are in different network segments, in order to reduce the total time consumed by the target child nodes to execute the corresponding installation package flashing task, a parallel flashing control strategy can be adopted.
Specifically, the main control node may first allocate electric quantity to the plurality of target child nodes based on a max-fair algorithm, and then concurrently control the plurality of target child nodes to simultaneously execute the write-over task corresponding to the installation package.
For example, the plurality of target child nodes are the ECU1, the ECU4 and the ECU7, respectively, the electric quantity required by the ECU1 to execute the upgrade of the corresponding installation package is 2W, the electric quantity required by the ECU4 to execute the flash task of the corresponding installation package is 2.5W, the electric quantity required by the ECU7 to execute the flash task of the corresponding installation package is 3W, and the actual electric quantity of the current storage battery is 10W, so that each ECU can allocate the electric quantity required by itself to execute the flash task of the corresponding installation package based on the max-min fairness algorithm. With continued reference to fig. 1, since the ECU1, the ECU4, and the ECU7 belong to different network segments, the master node may control the ECU1, the ECU4, and the ECU7 to simultaneously perform the flash task of the corresponding installation package.
Case 3: the plurality of target child nodes are in at least two network segments.
In the embodiment of the application, when a plurality of target child nodes are positioned in at least two network segments, aiming at different network segments, a parallel flash strategy can be adopted, so that the time consumption in the upgrading process is reduced; for different target sub-nodes in the same network segment, a sequential flashing strategy can be adopted, so that the control complexity can be reduced.
Specifically, the main control node may pre-store a corresponding relationship between each child node and a weight value, where the weight value may represent an importance of each child node in the vehicle. For more important child nodes, the corresponding weight values are larger; conversely, for a child node with lower importance, the corresponding weight value may be smaller. The master control node can distribute electric quantity to a plurality of target sub-nodes based on a maximum fairness algorithm, and determines respective weighted values of the target sub-nodes based on the prestored corresponding relation between each sub-node and the weighted values; and then respectively controlling the target sub-nodes corresponding to each network segment to execute the corresponding target sub-nodes to execute the corresponding installation package flash tasks according to the sequence of the weighted values from large to small.
For example, the plurality of target child nodes are respectively the ECU1, the ECU2, the ECU4 and the ECU5, the main control node determines that the weight value corresponding to the ECU1 is 3, the weight value corresponding to the ECU2 is 5, the weight value corresponding to the ECU4 is 4, and the weight value corresponding to the ECU5 is 2; the electric quantity required by the ECU1 to execute the corresponding installation package upgrade is 2W, the electric quantity required by the ECU2 to execute the corresponding installation package flash task is 3W, the electric quantity required by the ECU4 to execute the corresponding installation package flash task is 3.5W, the electric quantity required by the ECU4 to execute the corresponding installation package flash task is 2.7W, and the actual electric quantity of the current storage battery is 15W, so that each ECU can distribute the electric quantity required by itself to execute the corresponding installation package flash task based on the maximum and minimum fairness algorithm. With continued reference to fig. 1, since ECU1 and ECU2 belong to the same segment, for example, ECU1 and ECU2 belong to a first segment; the ECU4 and the ECU5 belong to another segment, for example, the ECU4 and the ECU5 belong to a second segment. Therefore, the main control node can control the target nodes in the first network segment and the second network segment to execute the corresponding installation package flash tasks at the same time. First, the master node may control ECU2 to perform the corresponding installation package flash task concurrently with ECU4, and then control ECU1 to perform the corresponding installation package flash task concurrently with ECU 5.
Step 205: and the main control node controls the restart of the plurality of sub-target nodes after a first preset time interval so as to complete the upgrading process, wherein the first preset time interval is related to a first preset control strategy.
In the embodiment of the application, after the plurality of target child nodes execute the corresponding installation package refresh tasks, the plurality of target child nodes can smoothly complete the upgrade only by restarting, and therefore the master control node needs to control the plurality of target child nodes to restart.
As a possible implementation manner, the master control node controls the restart of the plurality of target child nodes after a first preset time interval, so as to complete the upgrade process.
Considering that different control strategies are adopted in step 204 to control the multiple target child nodes to execute the corresponding installation package refresh tasks, it may also be determined when the multiple target child nodes are restarted according to the different control strategies.
Case 1: when a plurality of target sub-nodes are in the same network segment.
In the embodiment of the application, when a plurality of target sub-nodes are in the same network segment, each target sub-node is controlled to execute the corresponding flash task of the installation package based on the sequence of the weighted values from large to small, so that when the plurality of target sub-nodes are restarted, the flash time required by each target sub-node can be used as the respective upgrade waiting time, that is, once each target sub-node finishes the flash task of the corresponding installation package, the target sub-node can be restarted under the control of the main control node, thereby completing the whole upgrade process without waiting for other target sub-nodes.
Case 2: when the plurality of target child nodes are not in the same network segment.
In the embodiment of the application, when a plurality of target child nodes are not in the same network segment, a parallel control strategy is adopted to control the plurality of target child nodes to simultaneously execute the corresponding installation package flashing tasks, so that when the plurality of target child nodes are restarted, the time with the largest flashing time in the flashing time required by the plurality of target child nodes for executing the installation package flashing tasks in parallel can be used as the current upgrading waiting time, and the plurality of target child nodes are controlled to restart after the upgrading waiting time is separated, so that each target child node can complete the flashing task of the corresponding installation package within the upgrading waiting time, and the upgrading of the plurality of target child nodes can be completed at the same time.
Case 3: when multiple target sub-nodes are in at least two network segments.
In the embodiment of the application, when a plurality of target sub-nodes are in at least two network segments, a control strategy of parallel upgrading is adopted for the target sub-nodes in the network segments; and aiming at the target child nodes of the same network segment, a control strategy of sequential upgrading is adopted. Therefore, when the target sub-nodes are restarted, the time with the largest brushing time in the brushing time required by the target sub-nodes which are in different network segments and execute the brushing task of the installation package in parallel is taken as the current upgrading waiting time, and the target sub-nodes which are in different network segments and execute the brushing task at the same time are controlled to restart after the upgrading waiting time is separated, so that the target sub-nodes which are in different network segments and execute the brushing task of the installation package in parallel can be ensured to finish the brushing task of the corresponding installation package in the upgrading waiting time, and the upgrading of the target sub-nodes in different network segments can be finished at the same time.
In some embodiments, the actual electric quantity of the storage battery may be less than the total electric quantity consumed by the plurality of target sub-nodes to execute the corresponding installation package flash task, and at this time, a part of the target sub-nodes in the plurality of target sub-nodes may be controlled to complete the upgrade based on the current actual electric quantity of the storage battery, and then the storage battery is charged, and then the remaining part of the target sub-nodes are controlled to complete the upgrade. That is to say, when the actual electric quantity of the storage battery is not enough to support the plurality of target sub-nodes to complete the upgrading process, the upgrading process of the plurality of target sub-nodes may be divided into at least two batches to complete the upgrading process respectively.
As a possible implementation manner, when the main control node determines that the actual electric quantity of the storage battery is less than the total electric quantity consumed by the plurality of target sub-nodes to execute the corresponding installation package flashing task, the plurality of target sub-nodes may be divided into at least two batches based on a preset rule.
Specifically, the at least two batches include a first batch and a second batch, and the priority of executing the corresponding installation package flashing task by the target child node in the first batch is higher than the priority of executing the corresponding installation package flashing task by the target child node in the second batch. The method comprises the steps that a main control node distributes electric quantity for a plurality of target nodes based on a maximum and minimum fairness algorithm, if the main control node determines that the electric quantity distributed by a part of target sub-nodes in the plurality of target sub-nodes is not smaller than the electric quantity consumed by the main control node for executing an installation package flashing task, the part of target sub-nodes are used as a first batch, and other target sub-nodes except the part of target sub-nodes in the plurality of target sub-nodes are used as a second batch.
For example, the target child nodes include the ECU1, the ECU2, the ECU3, and the ECU4, the amount of power consumed by the ECU1 to execute the corresponding installation package refresh task is 2W, the amount of power consumed by the ECU2 to execute the corresponding installation package refresh task is 2.6W, the amount of power consumed by the ECU3 to execute the corresponding installation package refresh task is 4W, the amount of power consumed by the ECU4 to execute the corresponding installation package refresh task is 5W, the actual amount of power of the battery is 10W, after the master node performs power allocation to the ECUs 1 to the ECUs 4 based on the max-min fairness algorithm, the amount of power allocated to the ECU1 is 2W, the amount of power allocated to the ECU2 is 2.6W, and the amounts of power allocated to the ECUs 3 and 4 are 2.7W. Therefore, the electric power allocated to the ECU1 and the ECU2 both satisfy the electric power demand when the ECU itself executes the installation package flashing task, and the electric power allocated to the EUC4 and the ECU5 both do not satisfy the electric power demand when the ECU itself executes the installation package flashing task. Thus, the ECUs 1 and 2 were preferentially upgraded as the first lot, and the ECUs 3 and 4 were the second lot.
In the embodiment of the application, after the target child nodes are divided into at least two batches, the corresponding target child nodes can be controlled to execute the installation package flashing task based on the second preset control strategy in batches.
Specifically, the master control node may control the target child nodes in the first batch to execute the flash tasks corresponding to the installation packages, and control the storage battery to charge after the target child nodes in the first batch all complete the flash tasks of the installation packages, for example, the storage battery is charged at a high voltage by using a power battery until the electric quantity of the storage battery is not less than the total electric quantity required when the target child nodes in the second batch execute the flash tasks of the installation packages. And after the storage battery is charged, the main control node continuously controls the target child nodes in the second batch to execute the writing task of the corresponding installation package. The storage batteries are charged between every two batches, so that the storage batteries can provide enough electric quantity supply when the target child nodes in each batch execute the installation package flashing task, meanwhile, the charging time of the storage batteries is controlled within a reasonable range, and the long time consumption of the whole upgrading process is avoided.
It should be understood that, when the target child nodes in the first batch and the second batch are respectively controlled to execute the corresponding installation package flash tasks, a targeted control strategy is still adopted based on the network segment conditions where the target child nodes in the first batch and the second batch are located, and the specific implementation manner may refer to step 204, which is not described herein again.
In this embodiment of the application, after the target child nodes in the first batch and the second batch start to execute the corresponding installation package flashing tasks, the master control node may control the target child nodes in the first batch and the second batch to restart at an interval of a second preset duration, and the specific implementation manner may refer to step 205, which is also not described herein.
In some embodiments, in order to ensure that the electric quantity consumed when the server executes the corresponding installation package flashing task for the target child node in the configuration file sent to the main control node is more accurate, and avoid the situation that the target child node fails to be upgraded due to inaccurate electric quantity estimation, in the embodiments of the present application, after each upgrade is completed, the electric quantity consumed in a unit time when the corresponding target child node in the server executes the corresponding installation package flashing task may be updated.
As a possible implementation manner, the master node may send, to the server, the time and the electric quantity actually consumed by each target child node when executing the corresponding installation package refresh task, so that the server may update, based on the information, the electric quantity consumed in unit time when the target child node executes the installation package refresh task, which is stored in advance.
Referring to fig. 3, based on the same inventive concept, an embodiment of the present application provides a remote upgrade apparatus applied to a vehicle, where the vehicle includes a plurality of sub-nodes, the vehicle is powered by a storage battery and is remotely connected to a server, the server stores in advance the amount of storage battery power consumed in a unit time when each sub-node executes a corresponding installation package refresh task in a historical time period, and the size of an installation package when the same sub-node executes the installation package refresh task is positively correlated with the refresh time, the apparatus includes: a receiving unit 301, a sending unit 302, a comparing unit 303, a flash unit 304 and a restart unit 305.
The receiving unit 301 is configured to receive a plurality of installation packages from a server and a configuration file corresponding to each installation package, where the configuration file includes a corresponding relationship between the installation package and a target child node, and the target child node performs the refresh time required by the corresponding installation package and the battery power consumed by the target child node to perform the corresponding installation package refresh;
a sending unit 302, configured to send each installation package of the multiple installation packages to a corresponding target child node based on a correspondence between the installation package and the target child node;
a comparing unit 303, configured to obtain actual electric quantity of the storage battery, and compare the actual electric quantity with total electric quantity required by the plurality of target child nodes to execute corresponding installation package flashing;
the flashing unit 304 is configured to control the plurality of target sub-nodes to execute the flashing tasks of the corresponding installation packages based on a first preset control strategy when it is determined that the actual electric quantity of the storage battery is not less than the total electric quantity required by the plurality of target sub-nodes to execute the flashing of the corresponding installation packages;
and a restarting unit 305, configured to control the plurality of target child nodes to restart after a first preset time interval, so as to complete an upgrading process.
Optionally, the device pre-stores a corresponding relationship between each child node and a weight value, where the weight value represents a priority of each child node in executing an installation package flashing task, and when a plurality of target child nodes are in the same network segment, the flashing unit 304 is specifically configured to:
distributing electric quantity for a plurality of target sub-nodes based on a maximum and minimum fairness algorithm, and determining weighted values corresponding to the plurality of target sub-nodes based on the corresponding relation of each pre-stored sub-node and the weighted values;
and sequentially controlling the plurality of target child nodes to execute the brushing tasks of the corresponding installation packages according to the sequence of the weighted values from large to small.
Optionally, the restarting unit 305 is specifically configured to:
taking the flash time required by each target child node in the plurality of target child nodes as respective upgrade waiting time;
and controlling the corresponding target child node to restart after the interval upgrade waiting time.
Optionally, when none of the target child nodes is in the same network segment, the flash unit 304 is specifically configured to:
distributing electric quantity for a plurality of target child nodes based on a maximum and minimum fairness algorithm;
and parallelly controlling a plurality of target child nodes to simultaneously execute the writing task of the corresponding installation package.
Optionally, the restarting unit 305 is specifically configured to:
taking the maximum brushing time in the brushing time required by the target child nodes as the current upgrading waiting time;
and controlling the restart of the plurality of target child nodes after the interval upgrade waiting time.
Optionally, the device pre-stores a corresponding relationship between each child node and a weight value, where the weight value represents a priority of each child node in executing an installation package flashing task, and when a plurality of target child nodes are in at least two network segments, the flashing unit 304 is specifically configured to:
distributing electric quantity for a plurality of target sub-nodes based on a maximum and minimum fairness algorithm, and determining weighted values corresponding to the plurality of target sub-nodes based on the corresponding relation of each pre-stored sub-node and the weighted values;
and controlling the target sub-nodes corresponding to each network segment to execute corresponding installation package flashing tasks according to the sequence of the weighted values from large to small.
Optionally, the restarting unit 305 is specifically configured to:
taking the maximum brushing time in the brushing time required by target child nodes which simultaneously execute brushing tasks in different network segments as the current upgrading waiting time;
and after the interval upgrading waiting time, controlling the target child nodes which are in different network segments and simultaneously execute the brushing task to restart.
Optionally, the flash unit 304 is further configured to:
if the main control node determines that the actual electric quantity of the storage battery is smaller than the total electric quantity consumed by the plurality of target sub-nodes for executing corresponding installation package flashing, the plurality of target sub-nodes are divided into at least two batches based on a preset rule, and the corresponding target sub-nodes are controlled to execute an installation package flashing task in batches based on a second preset control strategy, wherein the storage battery is charged between every two batches;
the restart unit 305 is further configured to: and after a second preset time interval, controlling the target child node corresponding to the current batch to restart so as to complete the upgrading process aiming at the target child node of the current batch, wherein the second preset time interval is associated with a second preset strategy.
Optionally, the at least two batches include a first batch and a second batch, the electric quantity consumed by the target child node in the first batch to execute the installation package flash is not greater than the actual electric quantity of the storage battery, and the priority of the target child node in the first batch to execute the installation package flash is higher than the priority of the target child node in the second batch to execute the installation package flash, and the apparatus further includes:
the distribution unit is used for distributing electric quantity for the target child nodes based on a maximum and minimum fairness algorithm;
and the dividing unit is used for taking part of the sub nodes as a first batch and taking other target sub nodes except the part of the target sub nodes as a second batch when the fact that the electric quantity distributed by the part of the sub nodes in the target sub nodes is not smaller than the electric quantity consumed by the self-executed installation package flashing is determined.
Optionally, the flash unit 304 is further specifically configured to:
controlling the target child nodes in the first batch to execute the flash tasks of the corresponding installation packages, and controlling the storage battery to be charged after the target child nodes in the first batch all complete the flash of the corresponding installation packages, so that the electric quantity of the storage battery is not less than the total electric quantity required by the target child nodes in the second batch to execute the flash of the installation packages;
and controlling the target child nodes in the second batch to execute the flash tasks of the corresponding installation packages.
Optionally, the sending unit 302 is further configured to send, to the server, actual consumed time and electric quantity when each target child node executes the installation package flashing task, so that the server updates the electric quantity, stored by the server, consumed in unit time when each target child node executes the installation package flashing task.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present application provides a vehicle, where the vehicle includes at least one processor 401, and the processor 401 is configured to execute a computer program stored in a memory, so as to implement the steps of the remote upgrade method provided by the embodiment of the present invention and shown in fig. 2.
Optionally, the processor 401 may be specifically a central processing unit, a specific ASIC, and may be one or more integrated circuits for controlling the execution of the program.
Optionally, the vehicle may further comprise a memory 402 connected to the at least one processor 401, the memory 402 may comprise ROM, RAM and disk memory. The memory 402 is used for storing data required by the processors 401 during operation, that is, storing instructions executable by the at least one processor 401, and the at least one processor 401 executes the instructions stored in the memory 402 to perform the method shown in fig. 2. The number of the memories 402 is one or more. The memory 402 is also shown in fig. 4, but it should be understood that the memory 402 is not an optional functional block, and is shown in fig. 4 by a dotted line.
The physical devices corresponding to the receiving unit 301, the sending unit 302, the comparing unit 303, the writing unit 304, and the restarting unit 305 may be the aforementioned processor 401. The vehicle may be used to perform the method provided by the embodiment shown in fig. 2. Therefore, regarding the functions that can be realized by the functional modules in the vehicle, reference may be made to the corresponding description in the embodiment shown in fig. 2, which is not repeated herein.
Embodiments of the present invention also provide a computer storage medium, where the computer storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the method as described in fig. 2.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. The utility model provides a remote upgrade method, its characterized in that is applied to the vehicle, the vehicle includes master control node and a plurality of sub-node, a plurality of sub-node are in at least two different network segments, the vehicle passes through the battery and supplies power, and with server remote connection, the battery power that consumes in unit time when each sub-node carries out corresponding installation package write-over task in the historical time section is prestored in the server, the size of installation package becomes positive correlation with write-over time when same sub-node carries out installation package write-over task, the method includes:
the master control node receives a plurality of installation packages from the server and a configuration file corresponding to each installation package, wherein the configuration file comprises a corresponding relation between the installation packages and a target child node, the target child node executes the brushing time required by the corresponding installation package brushing task and the electric quantity of a storage battery consumed by the target child node executing the corresponding installation package brushing task;
the master control node sends each installation package in the installation packages to a corresponding target child node based on the corresponding relation between the installation packages and the target child nodes;
the main control node obtains the actual electric quantity of the storage battery and compares the actual electric quantity with the total electric quantity required by the plurality of target sub-nodes to execute the corresponding installation package refreshing task;
if the main control node determines that the actual electric quantity of the storage battery is not less than the total electric quantity consumed by the plurality of target sub-nodes for executing the corresponding installation package flashing, the plurality of target sub-nodes are controlled to execute the flashing tasks of the corresponding installation packages based on a first preset control strategy;
and the master control node controls the plurality of sub-target nodes to restart after a first preset time interval so as to complete an upgrading process, wherein the first preset time is related to the first preset control strategy.
2. The method of claim 1, wherein the master node pre-stores a correspondence between each child node and a weight value, the weight value characterizes a priority of each child node for executing the installation package flashing task, and when the target child nodes are all in the same network segment, controlling the target child nodes to execute the flashing tasks of the corresponding installation packages based on a first preset control policy includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm, and determines weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and the master control node sequentially controls the target sub-nodes to execute the writing tasks of the corresponding installation packages according to the sequence of the weighted values from large to small.
3. The method of claim 2, wherein the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval comprises:
the master control node takes the brushing time required by each target child node in the plurality of target child nodes as the respective upgrading waiting time;
and the master control node controls the corresponding target child node to restart after the upgrade waiting time is separated.
4. The method of claim 1, wherein when none of the target child nodes are in the same network segment, controlling the target child nodes to perform the flash tasks of the corresponding installation packages based on a first preset control policy comprises:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm;
and the master control node controls the target sub-nodes to execute the writing task of the corresponding installation package at the same time in parallel.
5. The method of claim 4, wherein the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval comprises:
the master control node takes the maximum brushing time in the brushing times required by the target child nodes as the current upgrading waiting time;
and the master control node controls the target child nodes to restart after the upgrade waiting time is spaced.
6. The method of claim 1, wherein the master node pre-stores therein a correspondence between each of the child nodes and a weight value, the weight value characterizing a priority of each of the child nodes for executing the installation package refresh task, and when the target child nodes are in at least two network segments, controlling the target child nodes to execute the refresh tasks of the corresponding installation packages based on a first preset control policy includes:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm, and determines weighted values corresponding to the target sub-nodes based on the corresponding relation of the pre-stored sub-nodes and the weighted values;
and the master control node controls the target sub-node corresponding to each network segment to execute the corresponding installation package flashing task according to the sequence of the weighted values from large to small.
7. The method of claim 6, wherein the controlling, by the master node, the plurality of sub-target nodes to restart after a first preset time interval comprises:
the master control node takes the maximum brushing time in the brushing time required by target child nodes which simultaneously execute brushing tasks in different network segments as the current updating waiting time;
and the master control node controls the target child nodes which are in different network segments and simultaneously execute the programming task to restart after the upgrade waiting time is separated.
8. The method of claim 1, further comprising:
if the main control node determines that the actual electric quantity of the storage battery is smaller than the total electric quantity consumed by the plurality of target sub-nodes for executing corresponding installation package flashing, the plurality of target sub-nodes are divided into at least two batches based on a preset rule, the corresponding target sub-nodes are controlled to execute an installation package flashing task in batches based on a second preset control strategy, and the storage battery is charged between every two batches;
and the master control node controls the target child nodes corresponding to the current batch to restart after a second preset time interval so as to complete the upgrading process aiming at the target child nodes of the current batch, wherein the second preset time interval is associated with the second preset strategy.
9. The method of claim 8, wherein the at least two batches comprise a first batch and a second batch, the amount of power consumed by the target child node in the first batch to perform the installation package flashing is not greater than the actual amount of power of the battery, the priority of the target child node in the first batch to perform the installation package flashing is higher than the priority of the target child node in the second batch to perform the installation package flashing, and the dividing the target child nodes into the at least two batches based on a preset rule comprises:
the master control node distributes electric quantity to the target sub-nodes based on a maximum-minimum fairness algorithm;
and if the main control node determines that the electric quantity distributed by a part of the target sub-nodes is not less than the electric quantity consumed by the per se executed installation package flashing, taking the part of the sub-nodes as the first batch, and taking other target sub-nodes except the part of the target sub-nodes in the target sub-nodes as the second batch.
10. The method of claim 9, wherein controlling the corresponding target child node to perform the installation package refresh task in batches and based on the second preset control strategy comprises:
the master control node controls the target sub-nodes in the first batch to execute the flash tasks of the corresponding installation packages, and controls the storage battery to be charged after the target sub-nodes in the first batch all complete the flash of the corresponding installation packages, so that the electric quantity of the storage battery is not less than the total electric quantity required by the target sub-nodes in the second batch to execute the flash of the installation packages;
and the master control node controls the target child nodes in the second batch to execute the writing task of the corresponding installation package.
CN202110420401.2A 2021-04-19 2021-04-19 Remote upgrading method Pending CN113064623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110420401.2A CN113064623A (en) 2021-04-19 2021-04-19 Remote upgrading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110420401.2A CN113064623A (en) 2021-04-19 2021-04-19 Remote upgrading method

Publications (1)

Publication Number Publication Date
CN113064623A true CN113064623A (en) 2021-07-02

Family

ID=76567028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110420401.2A Pending CN113064623A (en) 2021-04-19 2021-04-19 Remote upgrading method

Country Status (1)

Country Link
CN (1) CN113064623A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436198A (en) * 2007-03-12 2012-05-02 三菱电机株式会社 Control sub-unit and control main unit
US20130345888A1 (en) * 2012-06-20 2013-12-26 Joseph W. Forbes, Jr. Method and apparatus for actively managing electric power over an electric power grid
CN108664258A (en) * 2018-03-27 2018-10-16 斑马网络技术有限公司 Upgrade protection system, vehicle and its guard method
US20190193653A1 (en) * 2016-08-30 2019-06-27 Autonetworks Technologies, Ltd. On-board update device and on-board update system
CN112416371A (en) * 2020-10-19 2021-02-26 东风汽车集团有限公司 Remote upgrading method, device and system for vehicle-mounted system and storage medium
CN112640500A (en) * 2020-09-27 2021-04-09 华为技术有限公司 Vehicle upgrading method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436198A (en) * 2007-03-12 2012-05-02 三菱电机株式会社 Control sub-unit and control main unit
US20130345888A1 (en) * 2012-06-20 2013-12-26 Joseph W. Forbes, Jr. Method and apparatus for actively managing electric power over an electric power grid
US20190193653A1 (en) * 2016-08-30 2019-06-27 Autonetworks Technologies, Ltd. On-board update device and on-board update system
CN108664258A (en) * 2018-03-27 2018-10-16 斑马网络技术有限公司 Upgrade protection system, vehicle and its guard method
CN112640500A (en) * 2020-09-27 2021-04-09 华为技术有限公司 Vehicle upgrading method and device
CN112416371A (en) * 2020-10-19 2021-02-26 东风汽车集团有限公司 Remote upgrading method, device and system for vehicle-mounted system and storage medium

Similar Documents

Publication Publication Date Title
RU2669526C2 (en) Method for reflashing electronic modules and a vehicle
CN112104702B (en) Power management method for vehicle TBOX, vehicle TBOX and medium
WO2018078456A1 (en) Control device, program updating method, and computer program
CN112463190A (en) Vehicle upgrading method and device
JP2020030607A (en) Vehicular software updating device
CN101009583A (en) Execution method of the scheduled task and execution task of management task, and its terminal device
CN112134940A (en) OTA upgrade task life cycle strategy management method
JP2020135578A (en) Software updating device, vehicle, and software updating method
CN111422095A (en) Charging pile power distribution method and device, charging pile and storage medium
CN111008704A (en) Processing method, device, equipment and storage medium for federal learning of electric vehicle
CN111434517A (en) Method for managing a battery of a vehicle, battery management device and vehicle
CN114968304A (en) OTA (over the air) upgrading method and device, storage medium and electronic equipment
CN113064623A (en) Remote upgrading method
CN113635788A (en) Charging control method and device for electric non-road vehicle, computer equipment and storage medium
CN112835598B (en) Automobile ECU (electronic control Unit) refreshing method and system and computer readable storage medium thereof
CN112428878A (en) Software refreshing control method and device and Internet of vehicles equipment
CN116126368A (en) Whole-vehicle OTA upgrading method and device, electronic equipment and vehicle
CN114895947A (en) Software upgrading method, device, equipment and storage medium of vehicle-mounted controller
CN114537211A (en) Charging control method and device and vehicle
JP2013179808A (en) Control device
CN110677466A (en) Application program downloading method, device, gateway and storage medium
CN116627474B (en) Intelligent equipment intelligent safety management method, device and equipment based on reinforcement learning
CN112395072A (en) Model deployment method and device, storage medium and electronic equipment
CN117749562A (en) Behavior learning-based ECU awakening method, device, equipment and storage medium
CN113110850B (en) Vehicle upgrading method, device, equipment, vehicle and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20220913

AD01 Patent right deemed abandoned