CN115586907A - Program updating method, program updating device and electronic equipment - Google Patents

Program updating method, program updating device and electronic equipment Download PDF

Info

Publication number
CN115586907A
CN115586907A CN202110758895.5A CN202110758895A CN115586907A CN 115586907 A CN115586907 A CN 115586907A CN 202110758895 A CN202110758895 A CN 202110758895A CN 115586907 A CN115586907 A CN 115586907A
Authority
CN
China
Prior art keywords
program
equipment
updating
language
group
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
CN202110758895.5A
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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN202110758895.5A priority Critical patent/CN115586907A/en
Publication of CN115586907A publication Critical patent/CN115586907A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Abstract

The application discloses a program updating method, a program updating device and electronic equipment. The method comprises the following steps: detecting whether each first device in a first device group meets a preset condition, wherein the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that the vehicle is not provided with potential safety hazards after the first device is limited to send data; determining third equipment in the first equipment group according to the detection result of each first equipment; and limiting the determined data transmission behaviors of all the third devices, and updating the program of the second device. Through the scheme, the success rate of program updating of the equipment in the vehicle can be effectively improved.

Description

Program updating method, program updating device and electronic equipment
Technical Field
The present application relates to the field of vehicle technologies, and in particular, to a program updating method, a program updating apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, the number of devices on a vehicle is large, and due to continuous development of technologies, programs in the vehicle devices are required to be updated and upgraded frequently. In the related art, when a program of a certain device of a vehicle is updated, the situation of update failure often occurs, and in such a situation, a user can only update the program of the device again, so that the experience is very poor.
Disclosure of Invention
In view of this, the present application provides a program updating method, a program updating apparatus, an electronic device, and a computer-readable storage medium, which can effectively improve the success rate of updating a program of a device in a vehicle.
In a first aspect, the present application provides a program updating method applied to an electronic device, including:
detecting whether each first device in a first device group meets a preset condition, wherein the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that no potential safety hazard exists in a vehicle after the first device is limited to send data;
determining a third device in the first device group according to the detection result of each first device;
and limiting the determined data transmission behaviors of all the third devices, and updating the program of the second device.
Optionally, the determining, according to the detection result of each first device, a third device in the first device group includes:
judging whether each first device meets the preset condition or not according to each detection result;
if all the first devices meet the preset condition, all the first devices are determined as third devices;
and if any first equipment does not meet the preset condition, not determining any first equipment as third equipment.
Optionally, the determining, according to the detection result of each first device, a third device in the first device group includes:
and determining the first equipment meeting the preset condition in the first equipment group as third equipment according to the detection result of each first equipment.
Optionally, the limiting the determined data sending behaviors of all the third devices includes:
and sending a talk-back instruction to all the determined third devices, wherein the talk-back instruction is used for limiting the third devices to send data.
Optionally, the limiting the determined data sending behaviors of all the third devices includes:
sending a language-forbidden instruction and a first language-forbidden mark to all the determined third devices, wherein the language-forbidden instruction is used for limiting the third devices to send data, and the first language-forbidden mark is used for indicating that the language-forbidden instruction is allowed to be executed;
the program updating method further includes:
and if the third device is not determined in the first device group, sending the language-forbidden instruction and a second language-forbidden mark to each first device in the first device group, where the second language-forbidden mark is used to indicate that the language-forbidden instruction is not allowed to be executed.
Optionally, the language-forbidding instruction is used to forbid the third device from sending data, or the language-forbidding instruction is used to limit the frequency at which the third device sends data.
Optionally, after the sending the language-prohibiting instruction and the second language-prohibiting flag to each first device in the first device group, the method further includes:
monitoring a reminding message sent by first equipment in the first equipment group, wherein the reminding message is used for indicating that the state of the first equipment is changed;
and responding to the reminding message, and returning to execute the step of detecting whether each first device in the first device group meets the preset condition.
Optionally, the first device is a device that affects the running safety of the vehicle.
Optionally, the first device group further includes at least one fourth device, and before the updating the program of the second device, the method further includes:
and limiting the data transmission behaviors of all fourth devices, wherein the fourth devices are devices which do not influence the running safety of the vehicle.
Optionally, the program updating method further includes:
acquiring a program update file associated with the second device from an upper computer;
the program for updating the second device includes:
and updating the program of the second device according to the program update file.
Optionally, the program for updating the second device according to the program update file includes:
if the second device is the electronic device, updating the program of the second device by executing the program update file;
and if the second device is not the electronic device, sending the program update file to the second device to instruct the second device to execute the program update file to complete program update.
Optionally, before detecting whether each first device in the first device group meets a preset condition, the method further includes:
receiving a program updating request, wherein the program updating request carries an equipment identifier;
and determining the equipment corresponding to the equipment identification as the second equipment.
Optionally, the electronic device is a device that is still in a normal power state after the entire vehicle is powered off and dormant, and before the detecting whether each first device in the first device group meets the preset condition, the method further includes:
detecting whether each first device is in a power-on state;
and controlling the first equipment which is not in the power-on state to be powered on.
In a second aspect, the present application provides a program updating apparatus, applied to an electronic device, including:
the device comprises a detection unit, a data processing unit and a data processing unit, wherein the detection unit is used for detecting whether each first device in a first device group meets a preset condition or not, the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that no potential safety hazard exists in a vehicle after the first device is limited to send data;
a determining unit, configured to determine a third device in the first device group according to a detection result of each first device;
and the updating unit is used for limiting the determined data sending behaviors of all the third devices and updating the program of the second device.
In a third aspect, the present application provides an electronic device, which includes 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 the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect.
It can be seen from the above that, in this scheme, it is first detected whether each first device in the first device group meets a preset condition, where the first device group and the second device are connected to the same bus, and the preset condition is that there is no potential safety hazard in the vehicle after the first device is limited to transmit data, then a third device is determined according to the detection result in the first device group, and finally, the data transmission behavior of the third device is limited, and the program of the second device is updated. According to the scheme, on the premise of ensuring the running safety of the vehicle, the equipment in the first equipment group is limited from sending data so as to reduce the network load of the bus where the second equipment is located, and therefore the success rate of program updating of the equipment in the vehicle is effectively improved.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic application environment diagram of a program updating method provided in an embodiment of the present application;
FIG. 2 is a flowchart of an implementation of a program update method provided in an embodiment of the present application;
fig. 3 is a block diagram of a program update apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In practical application, the program updating method provided by the application can be applied to electronic equipment with data processing capability, such as a controller on a vehicle, and an in-vehicle terminal. For convenience of description, the following description will be given only by taking the controller as an example, and the processing logic applied to the in-vehicle terminal is similar, and will not be repeated.
Next, referring to fig. 1, an application scenario of a program updating method provided in an embodiment of the present application is described with reference to fig. 1.
The application scenario in fig. 1 includes an electronic device, a bus, a first device group, and a second device, where the first device group includes a first device 1, a first device 2, and a first device 3. The electronic device is configured to execute the program updating method provided in the embodiment of the present application, the second device is a device that needs to update a program, and the first device group and the second device are connected to the same bus, that is, the first device 1, the first device 2, the first device 3, and the second device are connected to the same bus. Wherein the electronic device can communicate with any device on the bus through the bus. For example, the Electronic device may be a Body Control Module (BCM) in a Vehicle, the second device may be a Battery Management System (BMS) in the Vehicle, the first device 1 may be an Electronic Stability Program (ESP) in the Vehicle, the first device 2 may be an Electronic Parking System (EPB) in the Vehicle, the first device 3 may be a Vehicle Controller Unit (VCU) in the Vehicle, and the bus may be a Controller Area Network (CAN) bus. It should be noted that the application scenario in fig. 1 is only an example, and does not limit the application in any way.
A program updating method provided in an embodiment of the present application is described below. Referring to fig. 2, the program updating method applied to an electronic device includes:
step 201, detecting whether each first device in the first device group meets a preset condition.
In an embodiment of the present application, the first device group includes at least one first device, and the first device group and the second device are connected to the same bus. The second device may be any device on the vehicle that needs to update the program, that is, when the program needs to be updated on any device on the vehicle, the device may be used as the second device, and then, the other device connected to the same bus as the second device may be used as the first device. For example, the vehicle includes a device 1, a device 2, a device 3, a device 4, and a device 5, the device 1, the device 2, and the device 3 are all connected to the bus 1, the device 4 and the device 5 are not connected to the bus 1, and when the second device is the device 1, the first device group includes the device 2 and the device 3.
And after the preset condition is that the equipment is limited to send data, the vehicle has no potential safety hazard. If the first equipment is detected to meet the preset condition, the situation that the potential safety hazard does not exist in the vehicle after the first equipment is limited to send data is shown.
Alternatively, the first device may be a device that affects the operational safety of the vehicle. It should be noted that, there are devices on the vehicle that may affect the safety of the vehicle, that is, if the devices cannot work properly, the vehicle may have a safety accident (e.g., spontaneous combustion, collision), and therefore, for safety, the first device may be a device that affects the safety of the vehicle, and it should be understood that the device that affects the safety of the vehicle may be defined in advance by the automobile manufacturer according to experience, for example, a Transmission Control Unit (TCU) may be defined as a device that affects the safety of the vehicle.
Step 202, determining a third device in the first device group according to the detection result of each first device.
In this embodiment of the present application, after detecting whether each first device in the first device group meets the preset condition, a detection result of each first device may be obtained, where the detection result is used to indicate whether the corresponding first device meets the preset condition. Then, the third device may be determined in the first device group based on the detection results of the respective first devices. For example, all or part of the first devices in the first device group may be regarded as the third devices according to the detection result.
Step 203, limiting the determined data transmission behaviors of all the third devices, and updating the program of the second device.
In this embodiment of the application, after the third device is determined in the first device group, the data transmission behaviors of all the determined third devices may be limited. Wherein the data transmission action refers to an action of the third device to transmit data of any format onto the bus. After limiting the data transmission behavior of the third device, the network load on the bus will be reduced, and then the electronic device can perform program update on the second device.
Optionally, step 203 specifically includes:
and sending a language forbidding instruction to all the determined third devices.
The language-forbidden instruction is used to limit the third device from sending data, that is, after the third device executes the language-forbidden instruction, the third device is limited from sending data.
Illustratively, the talk-back instruction is used to prohibit the third device from sending data, i.e., the third device will not send any data onto the bus when executing the talk-back instruction. Alternatively, the talk-back instruction is used to limit the frequency of data transmission by the third device, i.e. the third device executing the talk-back instruction will limit the frequency of data transmission by the third device, for example, the frequency of data transmission by the third device is limited below a preset frequency threshold. By the two modes, the network load of the bus where the second equipment is located can be reduced, and therefore the success rate of program updating of the second equipment is improved.
In one embodiment, the electronic device may start updating the second device immediately after sending the talk-disable instruction, thereby reducing the waiting time of the user.
In another embodiment, the electronic device may wait for a talk-back result fed back by the third device after sending the talk-back instruction, where the talk-back result is used to indicate that the third device has been successfully restricted from sending data. And the electronic equipment starts to update the program of the second equipment when receiving the language forbidden result. Therefore, the program updating of the second device can be avoided when the third device does not limit the data transmission, and the success rate of the program updating is improved.
Optionally, step 203 specifically includes:
sending a language forbidden instruction and a first language forbidden mark to all the determined third equipment;
the program updating method further includes:
and if the third equipment is not determined in the first equipment group, sending a language-forbidden instruction and a second language-forbidden mark to each first equipment in the first equipment group.
In this embodiment, the first disable flag is used to indicate that the instruction is allowed to be executed, and the second disable flag is used to indicate that the instruction is not allowed to be executed. Specifically, the forbidden words may be represented by a combination of one or more of numbers, letters, and symbols, for example, the first forbidden word is 0, and the second forbidden word is 1, or the first forbidden word is a and the second forbidden word is B, or the first forbidden word is A1 and the second forbidden word is A2, where the form of the forbidden word is not limited herein.
The electronic device may send the language-forbidding instruction and the first language-forbidding flag to all the determined third devices, and the third devices receive the language-forbidding instruction and recognize that the language-forbidding flag is the first language-forbidding flag, determine to execute the language-forbidding instruction. Accordingly, if the third device is not determined in the first device group, the electronic device may send the language-prohibiting instruction and the second language-prohibiting flag to each first device in the first device group, and the first device receives the language-prohibiting instruction and recognizes that the language-prohibiting flag is the second language-prohibiting flag, then it is determined not to execute the language-prohibiting instruction. By sending the language-forbidden instruction and the language-forbidden flag, the first device can know that the current language-forbidden requirement exists, and based on this, after sending the language-forbidden instruction and the second language-forbidden flag to the first device, the program updating method further includes:
monitoring a reminding message sent by first equipment in a first equipment group;
and responding to the reminding message, and returning to execute the step of detecting whether each first device in the first device group meets the preset condition.
The reminding message is used for indicating that the state of the first equipment is changed. The first device starts monitoring the state of the device itself upon receiving the talk-prohibit instruction and the second talk-prohibit flag. It should be noted that, according to different functions of the device, different states monitored by the first device may also be different, for example, the first device group includes a TCU, and the states monitored by the TCU are whether the clutch device is engaged or not and whether a fault occurs or not, and the first device group includes a Motor Control Unit (MCU) and an Engine Control Module (ECM), and then the MCU and the ECM both monitor whether the rotation speed is 0, whether the torque is output or not and whether a fault occurs or not. The first device sends a reminding message to the electronic device once monitoring that the state of the first device changes. In this way, after the state of the first device changes, the first device may change from not meeting the preset condition to meeting the preset condition, and based on this, whenever the state of the first device changes, a reminding message is sent to the electronic device to remind the electronic device to perform step 201 and subsequent steps, so that the electronic device can update the program of the second device in the shortest time.
In one possible implementation, if the third device is not determined in the first device group, the electronic device may not send the talk-disable instruction to any device in the first device group. In this regard, the first device in the first device group should be configured to execute the talk-prohibit instruction when receiving the talk-prohibit instruction, in which case the electronic device does not need to send the talk-prohibit flag, and the first device in the first device group does not need to confirm whether the talk-prohibit flag is the first talk-prohibit flag or the second talk-prohibit flag, as compared to the way the talk-prohibit instruction and the talk-prohibit flag are sent.
Optionally, the first device group further includes at least one fourth device, and before the updating the program of the second device, the method further includes:
and limiting the data transmission behaviors of all the fourth devices.
The fourth device is a device which does not affect the running safety of the vehicle. Therefore, no matter whether the data transmission behavior of the fourth device is limited or not, the vehicle is not caused to have a potential safety hazard. In order to improve the success rate of program upgrade, the electronic device may directly limit the data transmission behaviors of all the fourth devices before updating the program of the second device, without detecting whether the fourth devices satisfy a preset condition.
Optionally, the program updating method further includes:
acquiring a program update file associated with the second device from an upper computer;
the step 203 specifically includes:
and S2031, updating the program of the second device according to the program update file.
The upper computer is connected with the electronic equipment, so that communication between the upper computer and the electronic equipment is realized, the connection can be wireless connection or wired connection, and the connection is not limited here. For example, when the electronic device is a controller, the upper computer may be a vehicle-mounted terminal (central control device) in which a program update file associated with the second device is stored; when the electronic apparatus is a vehicle-mounted terminal (center control apparatus), the upper computer may be a server communicable with the vehicle-mounted terminal, in which a program update file associated with the second apparatus is stored. The program update file associated with the second device is a file for performing program update on the second device.
Optionally, step 2031 specifically includes:
if the second device is the electronic device, updating the program of the second device by executing the program update file;
and if the second equipment is not the electronic equipment, sending the program update file to the second equipment.
In the embodiment of the present application, the second device that needs to update the program may be the electronic device itself that executes the program updating method, or may be another device other than the electronic device. If the second device is the electronic device itself, the electronic device may directly execute the program update file to update the program in the second device (the electronic device), and if the second device is not the electronic device, the electronic device may send the program update file to the second device, and after receiving the program update file, the second device may execute the program update file to update the program in the second device.
Optionally, before the step 201, the program updating method further includes:
receiving a program updating request, wherein the program updating request carries an equipment identifier;
and determining the device corresponding to the device identification as the second device.
In the embodiment of the application, when the program needs to be updated, a program updating request can be sent to the electronic device through the upper computer, and the program updating request carries the device identifier. The electronic device receives the program updating request, and can analyze the program updating request, so as to extract the device identifier carried in the program updating request. The device corresponding to the device identifier is the device that needs to be updated currently, and in the embodiment of the present application, the device corresponding to the device identifier is determined as the second device.
Optionally, the step 202 specifically includes:
judging whether each first device meets a preset condition or not according to each detection result;
if all the first equipment meets the preset conditions, all the first equipment is determined as third equipment;
and if any first equipment does not meet the preset condition, not determining any first equipment as third equipment.
In this embodiment of the application, the electronic device may respectively detect whether the preset condition is satisfied in each of the first devices. If each of the first devices meets the preset condition, each of the first devices in the first device group may be determined as a third device. And if any first equipment in the first equipment group does not meet the preset condition, not determining any first equipment in the first equipment group as third equipment. It should be noted that, based on different functions of the devices, the preset conditions corresponding to the first devices may be different, for example, the first device group includes a TCU, an ECM, and an MCU, where the preset conditions corresponding to the TCU are that the clutch device is not engaged and has no fault, the preset conditions corresponding to the ECM are that the rotation speed is 0, the output torque is 0 and has no fault, and the preset conditions corresponding to the MCU are also that the rotation speed is 0, the output torque is 0 and has no fault.
Optionally, the step 202 specifically includes:
and determining the first equipment meeting the preset condition in the first equipment group as third equipment according to the detection result of each first equipment.
In this embodiment of the application, the electronic device may respectively detect whether the preset condition is satisfied in each of the first devices. And then determining a first device in the first device group, which meets a preset condition, as a third device. For example, assuming that five first devices are included in the first device group, if three of the first devices satisfy the preset condition, the three first devices are determined as the third device, and if all five devices satisfy the preset condition, all of the five first devices are determined as the third device.
Optionally, in order to enable the electronic device to respond to the program update demand in time, the electronic device may select a normal power module on the vehicle, that is, the electronic device is a device that is still in a normal power state after the entire vehicle is powered off and sleeps. Based on this, if there is a program updating requirement, before step 201, the program updating method further includes:
detecting whether each first device is in a power-on state;
and controlling the first equipment which is not in the power-on state to be powered on.
In the embodiment of the application, when the program in the second device needs to be updated, the whole vehicle may be in a power-on working state or a power-off dormant state. Therefore, before step 201, the electronic device may first detect whether each first device in the first device group is in a powered-on state, and if there is a first device in the first device group that is not in the powered-on state, the electronic device may control devices in the device group that affect vehicle operation safety to be powered on. Specifically, the electronic device may control a relay associated with the first device that is not in the power-on state to pull in, so as to implement power-on, where the relay is used to control whether the power supply apparatus supplies power to the first device.
It can be seen from the above that, in this scheme, it is first detected whether each first device in the first device group meets a preset condition, where the first device group and the second device are connected to the same bus, and the preset condition is that there is no potential safety hazard in the vehicle after the first device is limited to transmit data, then a third device is determined according to the detection result in the first device group, and finally, the data transmission behavior of the third device is limited, and the program of the second device is updated. According to the scheme, on the premise of ensuring the running safety of the vehicle, the equipment in the first equipment group is limited to send data so as to reduce the network load of the bus where the second equipment is located, and therefore the program updating success rate of the equipment in the vehicle is effectively improved.
Corresponding to the program updating method provided above, the embodiment of the present application further provides a program updating apparatus, which is applied to an electronic device. As shown in fig. 3, the program updating apparatus 300 in the embodiment of the present application includes:
the detection unit 301 is configured to detect whether each first device in a first device group meets a preset condition, where the first device group includes at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that a vehicle does not have a potential safety hazard after the first device is limited to send data;
a determining unit 302, configured to determine a third device in the first device group according to a detection result of each first device;
an updating unit 303, configured to limit the determined data transmission behaviors of all the third devices, and update the program of the second device.
Optionally, the determining unit 302 includes:
a judging subunit, configured to judge, according to each detection result, whether each of the first devices satisfies the preset condition;
a first determining subunit, configured to determine, if each of the first devices satisfies the preset condition, each of the first devices as a third device;
and the second determining subunit is configured to not determine any first device as the third device if any first device does not meet the preset condition.
Optionally, the determining unit 302 is specifically configured to determine, according to a detection result of each first device, a first device in the first device group that meets the preset condition as a third device.
Optionally, the updating unit 303 is specifically configured to send a prohibit instruction to all the determined third devices, and update the program of the second device, where the prohibit instruction is used to limit the third devices from sending data.
Optionally, the updating unit 303 is specifically configured to send a prohibit instruction and a first prohibit flag to all the determined third devices, and update the program of the second device, where the prohibit instruction is used to limit the third devices from sending data, and the first prohibit flag is used to indicate that the prohibit instruction is allowed to be executed;
the program updating apparatus 300 is further configured to send the language-forbidden instruction and a second language-forbidden flag to each first device in the first device group if the third device is not determined in the first device group, where the second language-forbidden flag is used to indicate that the language-forbidden instruction is not allowed to be executed.
Optionally, the language-forbidding instruction is used to forbid the third device from sending data, or the language-forbidding instruction is used to limit the frequency at which the third device sends data.
Optionally, the program updating apparatus 300 further includes:
the monitoring unit is used for monitoring a reminding message sent by equipment influencing the running safety of the vehicle in the equipment group, wherein the reminding message is used for indicating that the state of the equipment is changed;
and the returning unit is used for responding to the reminding message and returning to execute the step of detecting whether each first device in the first device group meets the preset condition.
Optionally, the first device is a device that affects the running safety of the vehicle.
Optionally, the first device group further includes at least one fourth device, and before the updating the program of the second device, the method further includes:
and limiting the data transmission behaviors of all fourth devices, wherein the fourth devices are devices which do not influence the running safety of the vehicle.
Optionally, the program updating apparatus 300 is further configured to obtain a program update file associated with the second device from an upper computer;
accordingly, the updating unit 303 includes:
and the program updating subunit is used for updating the program of the second device according to the program updating file.
Optionally, the program updating subunit includes:
a first updating subunit, configured to update the program of the second device by executing the program update file if the second device is the electronic device;
a second updating subunit, configured to, if the second device is not the electronic device, send the program update file to the second device, so as to instruct the second device to execute the program update file and complete program updating.
Optionally, the program updating apparatus 300 further includes:
a request receiving unit, configured to receive a program update request, where the program update request carries an equipment identifier;
and a target determining unit, configured to determine a device corresponding to the device identifier as the second device.
Optionally, the electronic device is a device that is still in a normal power state after the entire vehicle is powered off and dormant, and the program updating apparatus 300 further includes:
the power-on detection unit is used for detecting whether each first device is in a power-on state or not;
and the power-on control unit is used for controlling the first equipment which is not in the power-on state to be powered on.
As can be seen from the above, in this scheme, it is first detected whether each first device in the first device group meets a preset condition, where the first device group and the second device are connected to the same bus, and the preset condition is that there is no potential safety hazard in the vehicle after the first device is limited to transmit data, then a third device is determined according to a detection result in the first device group, and finally, a data transmission behavior of the third device is limited, and a program is updated for the second device. According to the scheme, on the premise of ensuring the running safety of the vehicle, the equipment in the first equipment group is limited from sending data so as to reduce the network load of the bus where the second equipment is located, and therefore the success rate of program updating of the equipment in the vehicle is effectively improved.
Corresponding to the program updating method provided above, an embodiment of the present application further provides an electronic device, and referring to fig. 3, an electronic device 4 in the embodiment of the present application includes: a memory 401, one or more processors 402 (only one shown in fig. 4), and computer programs stored on the memory 401 and executable on the processors. Wherein: the memory 401 is used for storing software programs and units, and the processor 402 executes various functional applications and data processing by running the software programs and units stored in the memory 401, so as to acquire resources corresponding to the preset events. Specifically, the processor 402, by running the above-mentioned computer program stored in the memory 401, implements the steps of:
detecting whether each first device in a first device group meets a preset condition, wherein the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that no potential safety hazard exists in a vehicle after the first device is limited to send data;
determining a third device in the first device group according to the detection result of each first device;
and limiting the determined data transmission behaviors of all the third devices, and updating the program of the second device.
Assuming that the foregoing is the first possible implementation manner, in a second possible implementation manner provided based on the first possible implementation manner, the determining, according to the detection result of each first device, a third device in the first device group includes:
judging whether each first device meets the preset condition or not according to each detection result;
if all the first devices meet the preset condition, all the first devices are determined as third devices;
and if any first equipment does not meet the preset condition, not determining any first equipment as third equipment.
In a third possible implementation manner provided on the basis of the first possible implementation manner, the determining, according to the detection result of each first device, a third device in the first device group includes:
and determining the first equipment meeting the preset condition in the first equipment group as third equipment according to the detection result of each first equipment.
In a fourth possible implementation manner provided based on the first possible implementation manner, the limiting the determined data transmission behaviors of all the third devices includes:
and sending a talk-back instruction to all the determined third devices, wherein the talk-back instruction is used for limiting the third devices to send data.
In a fifth possible implementation manner provided on the basis of the first possible implementation manner, the limiting the determined data transmission behaviors of all the third devices includes:
sending a language-forbidden instruction and a first language-forbidden flag to all the determined third devices, wherein the language-forbidden instruction is used for limiting the third devices to send data, and the first language-forbidden flag is used for indicating that the language-forbidden instruction is allowed to be executed;
the program updating method further includes:
and if the third device is not determined in the first device group, sending the language-forbidden instruction and a second language-forbidden flag to each first device in the first device group, where the second language-forbidden flag is used to indicate that the language-forbidden instruction is not allowed to be executed.
In a sixth possible implementation manner provided as the basis of the fourth possible implementation manner or the fifth possible implementation manner, the prohibit instruction is used to prohibit the third device from transmitting data, or the prohibit instruction is used to limit the frequency at which the third device transmits data.
In a seventh possible implementation manner provided on the basis of the fifth possible implementation manner, after the instruction to disable the language and the second disable flag are sent to each of the first devices in the first device group, the processor 402 further implements the following steps when executing the computer program stored in the memory 401:
monitoring a reminding message sent by first equipment in the first equipment group, wherein the reminding message is used for indicating that the state of the first equipment is changed;
and responding to the reminding message, and returning to execute the step of detecting whether each first device in the first device group meets the preset condition.
In an eighth possible embodiment provided on the basis of the first possible embodiment, the first device is a device that affects the running safety of the vehicle.
In a ninth possible implementation manner provided on the basis of the eighth possible implementation manner, the first device group further includes at least one fourth device, and before the updating the program of the second device, the processor 402 further implements the following steps when executing the computer program stored in the memory 401:
and limiting the data transmission behaviors of all fourth devices, wherein the fourth devices are devices which do not influence the running safety of the vehicle.
In a tenth possible implementation provided on the basis of the first possible implementation, the processor 402 further implements the following steps when running the computer program stored in the memory 401:
acquiring a program update file associated with the second device from an upper computer;
the program for updating the second device includes:
and updating the program of the second device according to the program update file.
In an eleventh possible embodiment based on the tenth possible embodiment, the program for updating the second device according to the program update file includes:
if the second device is the electronic device, updating the program of the second device by executing the program update file;
and if the second device is not the electronic device, sending the program update file to the second device to instruct the second device to execute the program update file to complete program update.
In a twelfth possible implementation manner provided on the basis of the first possible implementation manner, before the detecting whether each first device in the first device group satisfies the preset condition, the processor 402 further implements the following steps when executing the computer program stored in the memory 401:
receiving a program updating request, wherein the program updating request carries an equipment identifier;
and determining the equipment corresponding to the equipment identification as the second equipment.
In a thirteenth possible implementation manner provided on the basis of the first possible implementation manner, the electronic device is a device that is still in a normal power state after the entire vehicle is put into power sleep, and before detecting whether each first device in the first device group meets a preset condition, the processor 402 further implements the following steps when running the computer program stored in the memory 401:
detecting whether each first device is in a power-on state;
and controlling the first equipment which is not in the power-on state to be powered on.
It should be understood that in the embodiments of the present Application, the Processor 402 may be a Central Processing Unit (CPU), and the Processor may be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 401 may include both read-only memory and random-access memory and provides instructions and data to processor 402. Some or all of memory 401 may also include non-volatile random access memory. For example, the memory 401 may also store information of device classes.
It can be seen from the above that, in this scheme, it is first detected whether each first device in the first device group meets a preset condition, where the first device group and the second device are connected to the same bus, and the preset condition is that there is no potential safety hazard in the vehicle after the first device is limited to transmit data, then a third device is determined according to the detection result in the first device group, and finally, the data transmission behavior of the third device is limited, and the program of the second device is updated. According to the scheme, on the premise of ensuring the running safety of the vehicle, the equipment in the first equipment group is limited from sending data so as to reduce the network load of the bus where the second equipment is located, and therefore the success rate of program updating of the equipment in the vehicle is effectively improved.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of external device software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by the present application, and the computer program can also be executed by associated hardware, and the computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above can be realized. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer readable Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier signal, telecommunications signal, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain other contents which can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include an electrical carrier signal and a telecommunication signal according to the legislation and the patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (16)

1. A program updating method applied to an electronic device includes:
detecting whether each first device in a first device group meets a preset condition, wherein the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that no potential safety hazard exists in a vehicle after the first device is limited to send data;
determining third equipment in the first equipment group according to the detection result of each first equipment;
and limiting the determined data transmission behaviors of all the third devices, and updating the program of the second device.
2. The program update method according to claim 1, wherein the determining, in the first device group, a third device based on the detection result of each first device includes:
judging whether each first device meets the preset condition or not according to each detection result;
if all the first equipment meets the preset conditions, all the first equipment is determined as third equipment;
and if any first equipment does not meet the preset condition, not determining any first equipment as third equipment.
3. The program update method according to claim 1, wherein the determining, in the first device group, a third device based on the detection result of each first device includes:
and according to the detection result of each first device, determining the first device meeting the preset condition in the first device group as a third device.
4. The program updating method according to claim 1, wherein the limiting the determined data transmission behaviors of all the third devices comprises:
and sending a language-forbidden instruction to all the determined third devices, wherein the language-forbidden instruction is used for limiting the third devices to send data.
5. The program updating method according to claim 1, wherein the limiting the determined data transmission behaviors of all the third devices comprises:
sending a language-forbidden instruction and a first language-forbidden mark to all the determined third devices, wherein the language-forbidden instruction is used for limiting the third devices to send data, and the first language-forbidden mark is used for indicating that the language-forbidden instruction is allowed to be executed;
the program updating method further includes:
and if the third device is not determined in the first device group, sending the language-forbidden instruction and a second language-forbidden mark to each first device in the first device group, wherein the second language-forbidden mark is used for indicating that the language-forbidden instruction is not allowed to be executed.
6. The program update method according to claim 4 or 5, wherein the prohibit instruction is used to prohibit the third device from transmitting data, or the prohibit instruction is used to limit the frequency at which the third device transmits data.
7. The program update method according to claim 5, further comprising, after the sending the language-barring instruction and the second language-barring flag to each first device in the first device group:
monitoring a reminding message sent by first equipment in the first equipment group, wherein the reminding message is used for indicating that the state of the first equipment is changed;
and responding to the reminding message, and returning to execute the step of detecting whether each first device in the first device group meets the preset condition.
8. The program updating method according to claim 1, wherein the first device is a device that affects vehicle running safety.
9. The program update method according to claim 8, wherein the first device group further includes at least one fourth device, and before the updating the program of the second device, further includes:
and limiting the data transmission behaviors of all fourth devices, wherein the fourth devices are devices which do not influence the running safety of the vehicle.
10. The program update method according to claim 1, characterized in that the program update method further comprises:
acquiring a program update file associated with the second device from an upper computer;
the program for updating the second device includes:
and updating the program of the second device according to the program update file.
11. The program update method according to claim 10, wherein the updating the program of the second device according to the program update file includes:
if the second device is the electronic device, updating the program of the second device by executing the program update file;
and if the second equipment is not the electronic equipment, sending the program update file to the second equipment so as to instruct the second equipment to execute the program update file and finish program update.
12. The program updating method according to claim 1, prior to the detecting whether each first device in the first device group satisfies a preset condition, further comprising:
receiving a program updating request, wherein the program updating request carries an equipment identifier;
and determining the device corresponding to the device identification as the second device.
13. The program updating method according to claim 1, wherein the electronic device is a device that remains in a normal power state after the entire vehicle is powered off and sleeps, and before the detecting whether each first device in the first device group meets a preset condition, the method further comprises:
detecting whether each first device is in a power-on state;
and controlling the first equipment which is not in the power-on state to be powered on.
14. A program update apparatus applied to an electronic device, comprising:
the device comprises a detection unit, a control unit and a processing unit, wherein the detection unit is used for detecting whether each first device in a first device group meets a preset condition or not, the first device group comprises at least one first device, the first device group and a second device are connected to the same bus, and the preset condition is that no potential safety hazard exists in a vehicle after the first device is limited to send data;
a determining unit, configured to determine a third device in the first device group according to a detection result of each first device;
and the updating unit is used for limiting the determined data sending behaviors of all the third devices and updating the program of the second device.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 13 when executing the computer program.
16. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 13.
CN202110758895.5A 2021-07-05 2021-07-05 Program updating method, program updating device and electronic equipment Pending CN115586907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110758895.5A CN115586907A (en) 2021-07-05 2021-07-05 Program updating method, program updating device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110758895.5A CN115586907A (en) 2021-07-05 2021-07-05 Program updating method, program updating device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115586907A true CN115586907A (en) 2023-01-10

Family

ID=84771835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110758895.5A Pending CN115586907A (en) 2021-07-05 2021-07-05 Program updating method, program updating device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115586907A (en)

Similar Documents

Publication Publication Date Title
EP1784693B1 (en) Method for providing a rapid response to queries on a vehicle bus
CN105981336B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and abnormality detection method
US10601606B2 (en) Communications on vehicle data buses
CN112104702B (en) Power management method for vehicle TBOX, vehicle TBOX and medium
CN112165697B (en) Tbox sleep wake-up control method and device and terminal equipment
US11288054B2 (en) Vehicular communication system
CN111008704A (en) Processing method, device, equipment and storage medium for federal learning of electric vehicle
CN114043952A (en) Storage battery power supplementing method, vehicle-mounted terminal and computer readable storage medium
CN113626056A (en) Vehicle remote upgrading method and device, electronic equipment, vehicle-mounted terminal and storage medium
CN110995823A (en) Vehicle-mounted terminal offline processing method, device, storage medium and device
CN115586907A (en) Program updating method, program updating device and electronic equipment
US9582946B2 (en) Method for managing breakdown of construction equipment for providing current workable information
CN113160460B (en) Lock management method, electronic device, storage medium and sharing bicycle
CN115150007A (en) Digital key system monitoring method, device, equipment and storage medium
CN112373350B (en) Power supply control method, device, vehicle and storage medium
CN113759872A (en) Processing method after controller reset
CN110399240B (en) Vehicle electronic device and method for processing abnormal operation of vehicle electronic device
CN117616364A (en) Over-the-air (OTA) upgrading method and device
CN111315000A (en) Vehicle data transmission method, device, equipment and storage medium
CN115460028B (en) Vehicle-mounted network dormancy management method and device, vehicle-mounted network system and vehicle
WO2020002267A1 (en) Method, apparatus and system for vehicle-to-vehicle communication
CN113200000B (en) Vehicle quiescent current control method, system, apparatus, and computer-readable storage medium
CN113347272B (en) Message processing method, device, storage medium and equipment
CN116279286B (en) Unlocking method, device, equipment and medium of engine
US11958490B2 (en) Operation management apparatus, system, operation management method, and non-transitory computer readable 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