Program updating method, program updating device and electronic equipment

By detecting and limiting the data transmission behavior of devices in the vehicle equipment group, the problem of program update failure is solved, the update success rate is improved and the network load is reduced.

CN115586907BActive Publication Date: 2025-03-21BYD CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110758895.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-05
Publication Date
2025-03-21
Estimated Expiration
2041-07-05

AI Technical Summary

Technical Problem

车辆设备程序更新时常出现更新失败的情况,导致用户需要重新更新,体验不佳。

Method used

Detect whether each device in the first device group meets the preset conditions, determine the third device, and limit its data transmission behavior, and finally update the program of the second device.

Benefits of technology

The success rate of program updates of equipment in the vehicle is improved, ensuring that the network load on the bus where the second device is located is reduced while ensuring the safety of the vehicle operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115586907B_ABST
    Figure CN115586907B_ABST
Patent Text Reader

Abstract

The present application discloses a program update method, a program update device and an electronic device. The method comprises: detecting whether each first device in a first device group meets a preset condition, the first device group comprises at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after restricting the first device from sending data; determining a third device in the first device group according to the detection results of each first device; restricting the data sending behavior of all the determined third devices, and updating the program of the second device. Through the scheme of the present application, the success rate of program updates of devices in the vehicle can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a program updating method, a program updating device, an electronic device, and a computer-readable storage medium. Background Art

[0002] At present, there are many devices on vehicles. With the continuous development of technology, it is often necessary to update and upgrade the programs in the vehicle devices. In the related art, when updating the program of a certain device in the vehicle, the update often fails. In this case, the user can only update the program of the device again, which is a very bad experience. Summary of the invention

[0003] In view of this, the present application provides a program update method, a program update device, an electronic device and a computer-readable storage medium, which can effectively improve the program update success rate of equipment in a vehicle.

[0004] In a first aspect, the present application provides a program update method, applied to an electronic device, comprising:

[0005] Detecting whether each first device in the first device group meets a preset condition, the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data;

[0006] Determine a third device in the first device group according to the detection results of each first device;

[0007] The data sending behaviors of all the determined third devices are restricted, and the program of the second device is updated.

[0008] Optionally, the determining of the third device in the first device group according to the detection results of each first device includes:

[0009] According to each detection result, determining whether each of the first devices satisfies the preset conditions;

[0010] If each of the first devices satisfies the preset condition, each of the first devices is determined as a third device;

[0011] If any first device does not meet the above preset conditions, any first device will not be determined as the third device.

[0012] Optionally, the determining of the third device in the first device group according to the detection results of each first device includes:

[0013] According to the detection results of each first device, the first device in the first device group that meets the preset condition is determined as the third device.

[0014] Optionally, the above-mentioned limiting the data sending behavior of all determined third devices includes:

[0015] A mute instruction is sent to all the third devices determined above, where the mute instruction is used to restrict the third devices from sending data.

[0016] Optionally, the above-mentioned limiting the data sending behavior of all determined third devices includes:

[0017] Sending a mute instruction and a first mute flag to all the third devices determined above, wherein the mute instruction is used to restrict the third devices from sending data, and the first mute flag is used to indicate that the mute instruction is allowed to be executed;

[0018] The above program updating method further includes:

[0019] If the third device is not determined in the first device group, the mute instruction and the second mute flag are sent to each first device in the first device group, where the second mute flag is used to indicate that the mute instruction is not allowed to be executed.

[0020] Optionally, the mute instruction is used to prohibit the third device from sending data, or the mute instruction is used to limit the frequency of the third device sending data.

[0021] Optionally, after sending the mute instruction and the second mute flag to each first device in the first device group, the method further includes:

[0022] monitoring a reminder message sent by a first device in the first device group, where the reminder message is used to indicate that a state of the first device has changed;

[0023] In response to the reminder message, the process returns to the step of detecting whether each first device in the first device group meets a preset condition.

[0024] Optionally, the first device mentioned above is a device that affects the safety of vehicle operation.

[0025] Optionally, the first device group further includes at least one fourth device, and before the program for updating the second device, further includes:

[0026] Restrictions are placed on data transmission behaviors of all fourth devices, wherein the fourth devices are devices that do not affect the safety of vehicle operation.

[0027] Optionally, the program updating method further includes:

[0028] Obtaining a program update file associated with the second device from a host computer;

[0029] The program for updating the second device includes:

[0030] The program of the second device is updated according to the program update file.

[0031] Optionally, updating the program of the second device according to the program update file includes:

[0032] If the second device is the electronic device, updating the program of the second device by executing the program update file;

[0033] If the second device is not the electronic device, the program update file is sent to the second device to instruct the second device to execute the program update file to complete the program update.

[0034] Optionally, before detecting whether each first device in the first device group meets a preset condition, the method further includes:

[0035] receiving a program update request, wherein the program update request carries a device identifier;

[0036] The device corresponding to the device identifier is determined as the second device.

[0037] Optionally, the electronic device is a device that is still in a normal power state after the entire vehicle is powered off and put into hibernation. Before the above-mentioned detection of whether each first device in the first device group meets the preset condition, the following step is further included:

[0038] Detecting whether each of the first devices is in a powered-on state;

[0039] Control a first device that is not in a powered-on state to power on.

[0040] In a second aspect, the present application provides a program updating device, applied to an electronic device, comprising:

[0041] A detection unit, used to detect whether each first device in the first device group meets a preset condition, the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data;

[0042] a determining unit, configured to determine a third device in the first device group according to the detection results of each first device;

[0043] An updating unit is used to restrict the data sending behaviors of all determined third devices and update the program of the second device.

[0044] In a third aspect, the present application provides 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 steps of the method of the first aspect when executing the computer program.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.

[0046] As can be seen from the above, in this solution, it is first detected whether each first device in the first device group meets the preset condition. The first device group is connected to the same bus as the second device. The preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data. Then, the third device is determined in the first device group according to the detection result. Finally, the data sending behavior of the third device is restricted, and the program of the second device is updated. Under the premise of ensuring the safety of vehicle operation, this solution restricts the devices in the first device group from sending data to reduce the network load of the bus where the second device is located, thereby effectively improving the success rate of program updates for devices in the vehicle.

[0047] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 It is a schematic diagram of the application environment of the program update method provided in the embodiment of the present application;

[0050] Figure 2 is a flowchart of the implementation of the program update method provided in the embodiment of the present application;

[0051] Figure 3 is a structural block diagram of a program updating device provided in an embodiment of the present application;

[0052] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0054] In practical applications, a program update method provided by the present application can be applied to electronic devices with data processing capabilities, such as controllers on vehicles, or vehicle-mounted terminals. For the convenience of description, the following only uses the application to the controller as an example for explanation, and the processing logic applied to the vehicle-mounted terminal is similar and will not be repeated.

[0055] Next, see Figure 1 , combined with Figure 1 An application scenario of a program updating method provided in an embodiment of the present application is introduced.

[0056] Figure 1 The application scenario includes an electronic device, a bus, a first device group and a second device, wherein the first device group includes a first device 1, a first device 2 and a first device 3. The electronic device is used to execute a program update method provided in an embodiment of the present application, the second device is a device that needs to update the program, and the first device group and the second device are connected on the same bus, that is, the first device 1, the first device 2, the first device 3 and the second device are connected on the same bus. Among them, 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 (Body Control Module, BCM) in a vehicle, the second device may be a battery management system (Battery Management System, BMS) in a vehicle, the first device 1 may be an electronic stability program (Electronic Stability Program, ESP) in a vehicle, the first device 2 may be an electronic parking system (Electronic Parking Brake, EPB) in a vehicle, the first device 3 may be a vehicle control unit (Vehicle Control Unit, VCU) in a vehicle, and the bus may be a controller area network (Controller Area Network, CAN) bus. It should be noted that, Figure 1 The application scenario is only an example and does not limit the present application in any way.

[0057] The following describes a program update method provided by an embodiment of the present application. Figure 2 , the program updating method is applied to an electronic device, comprising:

[0058] Step 201: Detect whether each first device in the first device group meets a preset condition.

[0059] In the 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 can be any device on the vehicle that needs to update the program, that is, when it is necessary to update the program of any device on the vehicle, the device can be used as the second device, and then the other devices connected to the same bus as the second device can be used as the first device. For example, the vehicle includes device 1, device 2, device 3, device 4 and device 5, and device 1, device 2 and device 3 are all connected to bus 1, and device 4 and device 5 are not connected to bus 1. When the second device is device 1, the first device group includes device 2 and device 3.

[0060] The preset condition is that after the restricted device sends data, there is no potential safety hazard in the vehicle. If it is detected that the first device meets the preset condition, it means that after the restricted device sends data, there is no potential safety hazard in the vehicle.

[0061] Optionally, the first device may be a device that affects the safety of vehicle operation. It should be noted that some devices on the vehicle may affect the safety of vehicle operation, that is, if the device fails to work properly, it may cause a safety accident (such as spontaneous combustion, collision) to the vehicle. Therefore, for safety reasons, the first device may be a device that affects the safety of vehicle operation. It should be understood that the device that affects the safety of vehicle operation can be pre-defined by the automobile manufacturer based on experience. For example, the transmission control unit (TCU) can be defined as a device that affects the safety of vehicle operation.

[0062] Step 202: Determine a third device in the first device group according to the detection results of each first device.

[0063] In the embodiment of the present application, after detecting whether each first device in the first device group meets the preset condition, the detection result of each first device can be obtained, and the detection result is used to indicate whether the corresponding first device meets the preset condition. Then, according to the detection result of each first device, the third device can be determined in the first device group. For example, according to the detection result, all or part of the first devices in the first device group can be used as the third device.

[0064] Step 203: restrict the data sending behaviors of all the determined third devices, and update the program of the second device.

[0065] In the embodiment of the present application, after the third device is determined in the first device group, the data transmission behavior of all the determined third devices can be restricted. The data transmission behavior refers to the behavior of the third device sending data of any format to the bus. After restricting the data transmission behavior of the third device, the network load on the bus will be reduced, and then the electronic device can update the program of the second device.

[0066] Optionally, the above step 203 specifically includes:

[0067] A mute instruction is sent to all determined third devices.

[0068] The mute instruction is used to restrict the third device from sending data, that is, when the third device executes the mute instruction, the data sending by the third device will be restricted.

[0069] Exemplarily, the mute instruction is used to prohibit the third device from sending data, that is, the third device executes the mute instruction and will not send any data to the bus. Alternatively, the mute instruction is used to limit the frequency of data transmission by the third device, that is, the third device executes the mute instruction, which will limit the frequency of data transmission by the third device, for example, limiting the frequency of data transmission by the third device to below a preset frequency threshold. Through the above two methods, the network load of the bus where the second device is located can be reduced, thereby improving the success rate of program update for the second device.

[0070] In one embodiment, the electronic device may start updating the second device immediately after sending the mute instruction, thereby reducing the waiting time of the user.

[0071] In another embodiment, after sending the muting instruction, the electronic device may wait for the muting result fed back by the third device, and the muting result is used to indicate that the third device has been successfully restricted from sending data. The electronic device starts to update the program of the second device only after receiving the muting result. In this way, it is possible to avoid updating the program of the second device when the third device is not restricted from sending data, thereby improving the success rate of the program update.

[0072] Optionally, the above step 203 specifically includes:

[0073] Sending a mute instruction and a first mute flag to all determined third devices;

[0074] The above program updating method further includes:

[0075] If the third device is not determined in the first device group, a mute instruction and a second mute flag are sent to each first device in the first device group.

[0076] In the embodiment of the present application, the first mute flag is used to indicate that the mute instruction is allowed to be executed, and the second mute flag is used to indicate that the mute instruction is not allowed to be executed. Specifically, the mute flag may include a combination of one or more numbers, letters, and symbols to represent it, for example, the first mute flag is 0, the second mute flag is 1, or the first mute flag is A, the second mute flag is B, or the first mute flag is A1, the second mute flag is A2, and the form of the mute flag is not limited here.

[0077] The electronic device may send a mute instruction and a first mute flag to all determined third devices. When the third device receives the mute instruction and identifies the mute flag as the first mute flag, it determines to execute the mute instruction. Accordingly, if the third device is not determined in the first device group, the electronic device may send a mute instruction and a second mute flag to each first device in the first device group. When the first device receives the mute instruction and identifies the mute flag as the second mute flag, it determines not to execute the mute instruction. By sending the mute instruction and the mute flag, the first device can be informed that there is a mute requirement at present. Based on this, after sending the mute instruction and the second mute flag to the first device, the above-mentioned program update method also includes:

[0078] monitoring a reminder message sent by a first device in a first device group;

[0079] In response to the reminder message, return to the step of detecting whether each first device in the first device group meets the preset condition.

[0080] Among them, the reminder message is used to indicate that the state of the first device has changed. After receiving the mute instruction and the second mute flag, the first device begins to monitor the state of the device itself. It should be noted that, depending on the function of the device, the state monitored by different first devices may also be different. For example, the first device group includes TCU, and the state monitored by TCU is whether the clutch device is engaged and whether a fault occurs. The first device group includes a motor controller (Motor Control Unit, MCU) and an engine control module (Engine Control Module, ECM), then MCU and ECM both monitor whether the speed is 0, whether the torque is output, and whether a fault occurs. It should be understood that the state monitored by the device can be pre-configured based on experience, which is not limited here. Once the first device detects that the state of the device itself has changed, it sends a reminder message to the electronic device. In this way, since the state of the first device changes, the first device may change from not meeting the preset condition to meeting the preset condition. Based on this, whenever the state of the first device changes, a reminder message is sent to the electronic device to remind the electronic device to execute step 201 and subsequent steps, so that the electronic device can update the program of the second device in the shortest time.

[0081] In a feasible implementation, if the third device is not determined in the first device group, the electronic device may not send a mute instruction to any device in the first device group. Based on this, the first device in the first device group should be configured to execute the mute instruction when receiving the mute instruction. Compared with the method of sending the mute instruction and the mute mark, in this method, the electronic device does not need to send the mute mark, and the first device in the first device group does not need to confirm whether the mute mark is the first mute mark or the second mute mark.

[0082] Optionally, the first device group further includes at least one fourth device, and before the program for updating the second device, further includes:

[0083] The data transmission behavior of all fourth devices is restricted.

[0084] The fourth device is a device that does not affect the safety of vehicle operation. Therefore, whether or not the data transmission behavior of the fourth device is restricted, there will be no safety hazard to the vehicle. In order to improve the success rate of program upgrades, the electronic device can directly restrict the data transmission behavior of all fourth devices before updating the program of the second device, without detecting whether the fourth device meets the preset conditions.

[0085] Optionally, the program updating method further includes:

[0086] Obtaining a program update file associated with the second device from a host computer;

[0087] The above step 203 specifically includes:

[0088] S2031. Update the program of the second device according to the program update file.

[0089] Among them, the host computer is connected to the electronic device to achieve communication between the host computer and the electronic device. The connection can be a wireless connection or a wired connection, which is not limited here. For example, when the electronic device is a controller, the host computer can be a vehicle-mounted terminal (central control device), and the vehicle-mounted terminal stores a program update file associated with the second device; when the electronic device is a vehicle-mounted terminal (central control device), the host computer can be a server that can communicate with the vehicle-mounted terminal, and the server stores a program update file associated with the second device. Among them, the program update file associated with the second device is a file used to update the program of the second device.

[0090] Optionally, the above step 2031 specifically includes:

[0091] If the second device is an electronic device, updating the program of the second device by executing the program update file;

[0092] If the second device is not an electronic device, the program update file is sent to the second device.

[0093] 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 update method, or it may be another device other than the electronic device. If the second device is the electronic device itself, the electronic device can directly execute the program update file to update the program in the second device (electronic device). If the second device is not an electronic device, the electronic device can send the program update file to the second device. After the second device receives the program update file, it can execute the program update file to update the program of the second device.

[0094] Optionally, before the above step 201, the above program updating method further includes:

[0095] receiving a program update request, the program update request carrying a device identifier;

[0096] A device corresponding to the device identifier is determined as the second device.

[0097] In an embodiment of the present application, when a program update is required, a program update request may be sent to the electronic device through the host computer, and the program update request carries a device identifier. When the electronic device receives the program update request, it may parse the program update request to extract the device identifier carried in the program update request. The device corresponding to the device identifier is the device that currently needs to perform a program update, and in an embodiment of the present application, the device corresponding to the device identifier is determined as the second device.

[0098] Optionally, the above step 202 specifically includes:

[0099] According to each detection result, determining whether each first device meets a preset condition;

[0100] If each of the first devices meets the preset condition, each of the first devices is determined as a third device;

[0101] If any first device does not meet the preset condition, any first device is not determined as the third device.

[0102] In an embodiment of the present application, the electronic device can detect whether the preset conditions are met in each first device respectively. If each first device meets the preset conditions, each first device in the first device group can be determined as a third device. If any first device in the first device group does not meet the preset conditions, any first device in the first device group is not determined as a third device. It should be noted that based on the different functions of the devices, the preset conditions corresponding to each first device may be different. For example, the first device group includes TCU, ECM and MCU. The preset conditions corresponding to TCU are that the clutch device is not engaged and no fault occurs. The preset conditions corresponding to ECM are that the speed is 0, the output torque is 0, and no fault occurs. The preset conditions corresponding to MCU are also that the speed is 0, the output torque is 0, and no fault occurs.

[0103] Optionally, the above step 202 specifically includes:

[0104] According to the detection results of each first device, a first device in the first device group that meets a preset condition is determined as a third device.

[0105] In the embodiment of the present application, the electronic device can detect whether each first device meets the preset condition. Then, the first device that meets the preset condition in the first device group is determined as the third device. For example, assuming that the first device group includes five first devices, if three of the first devices meet the preset condition, the three first devices are determined as the third device, and if all five devices meet the preset condition, all the five first devices are determined as the third device.

[0106] Optionally, in order to enable the electronic device to respond to the program update demand in a timely manner, the electronic device can select the permanent power module on the vehicle, that is, the electronic device is a device that remains in a permanent power state after the entire vehicle is powered off and put into sleep mode. Based on this, if there is a program update demand, before the above step 201, the above program update method also includes:

[0107] Detecting whether each first device is in a powered-on state;

[0108] Control a first device that is not in a powered-on state to power on.

[0109] In the embodiment of the present application, when the program in the second device needs to be updated, the whole vehicle may be in a powered-on working state or in a powered-off dormant state. Therefore, before the above step 201, the electronic device may first detect whether each first device in the first device group is in a powered-on state. If there is a first device in the first device group that is not in a powered-on state, the electronic device may control the power-on of the device in the device group that affects the safety of vehicle operation. Specifically, the electronic device may control the relay associated with the first device that is not in a powered-on state to be energized, thereby achieving power-on, wherein the relay is used to control whether the power supply device supplies power to the first device.

[0110] As can be seen from the above, in this solution, it is first detected whether each first device in the first device group meets the preset condition. The first device group is connected to the same bus as the second device. The preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data. Then, the third device is determined in the first device group according to the detection result. Finally, the data sending behavior of the third device is restricted, and the program of the second device is updated. Under the premise of ensuring the safety of vehicle operation, this solution restricts the devices in the first device group from sending data to reduce the network load of the bus where the second device is located, thereby effectively improving the success rate of program updates for devices in the vehicle.

[0111] Corresponding to the program updating method provided above, the embodiment of the present application also provides a program updating device, which is applied to an electronic device. Figure 3 As shown, the program updating device 300 in the embodiment of the present application includes:

[0112] A detection unit 301 is used to detect whether each first device in a first device group meets a preset condition, the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data;

[0113] A determining unit 302, configured to determine a third device in the first device group according to the detection results of each first device;

[0114] The updating unit 303 is used to restrict the data sending behaviors of all the determined third devices and update the program of the second device.

[0115] Optionally, the determining unit 302 includes:

[0116] A judging subunit, used to judge whether each of the first devices satisfies the preset conditions according to each detection result;

[0117] A first determining subunit, configured to determine each of the first devices as a third device if each of the first devices satisfies the preset condition;

[0118] The second determining subunit is configured to not determine any first device as a third device if any first device does not satisfy the above preset condition.

[0119] Optionally, the determination unit 302 is specifically configured to determine, according to the detection results of each first device, a first device in the first device group that meets the preset condition as a third device.

[0120] Optionally, the updating unit 303 is specifically configured to send a mute instruction to all the third devices determined above, and update a program of the second device, wherein the mute instruction is used to restrict the third devices from sending data.

[0121] Optionally, the updating unit 303 is specifically configured to send a mute instruction and a first mute flag to all the third devices determined above, and update the program of the second device, wherein the mute instruction is used to restrict the third device from sending data, and the first mute flag is used to indicate that the mute instruction is allowed to be executed;

[0122] The program updating apparatus 300 is further configured to send the mute instruction and the second mute flag to each first device in the first device group if the third device is not determined in the first device group, wherein the second mute flag is configured to indicate that the mute instruction is not allowed to be executed.

[0123] Optionally, the mute instruction is used to prohibit the third device from sending data, or the mute instruction is used to limit the frequency of the third device sending data.

[0124] Optionally, the program updating device 300 further includes:

[0125] A monitoring unit, used to monitor the reminder message sent by the equipment in the equipment group that affects the safety of vehicle operation, wherein the reminder message is used to indicate that the status of the equipment has changed;

[0126] The returning unit is used to respond to the reminder message and return to the step of detecting whether each first device in the first device group meets the preset condition.

[0127] Optionally, the first device mentioned above is a device that affects the safety of vehicle operation.

[0128] Optionally, the first device group further includes at least one fourth device, and before the program for updating the second device, further includes:

[0129] Restrictions are placed on data transmission behaviors of all fourth devices, wherein the fourth devices are devices that do not affect the safety of vehicle operation.

[0130] Optionally, the program updating apparatus 300 is further configured to obtain a program update file associated with the second device from a host computer;

[0131] Accordingly, the updating unit 303 includes:

[0132] The program updating subunit is used to update the program of the second device according to the program updating file.

[0133] Optionally, the program updating subunit includes:

[0134] 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;

[0135] The second updating subunit is used for sending the program update file to the second device if the second device is not the electronic device, so as to instruct the second device to execute the program update file to complete the program update.

[0136] Optionally, the program updating device 300 further includes:

[0137] A request receiving unit, used to receive a program update request, wherein the program update request carries a device identifier;

[0138] The target determination unit is used to determine the device corresponding to the above-mentioned device identifier as the above-mentioned second device.

[0139] Optionally, the electronic device is a device that is still in a normal power state after the entire vehicle is powered off and put into hibernation, and the program updating device 300 further includes:

[0140] A power-on detection unit, used to detect whether each first device is in a powered-on state;

[0141] The power-on control unit is used to control the first device which is not in the power-on state to power on.

[0142] As can be seen from the above, in this solution, it is first detected whether each first device in the first device group meets the preset condition. The first device group is connected to the same bus as the second device. The preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data. Then, the third device is determined in the first device group according to the detection result. Finally, the data sending behavior of the third device is restricted, and the program of the second device is updated. Under the premise of ensuring the safety of vehicle operation, this solution restricts the devices in the first device group from sending data to reduce the network load of the bus where the second device is located, thereby effectively improving the success rate of program updates for devices in the vehicle.

[0143] Corresponding to the program update method provided above, the present application embodiment also provides an electronic device, see Figure 3 The electronic device 4 in the embodiment of the present application includes: a memory 401, one or more processors 402 ( Figure 4Only one is shown) and a computer program stored in the memory 401 and executable on the processor. The memory 401 is used to store 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 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 402 implements the following steps when running the above-mentioned computer program stored in the memory 401:

[0144] Detecting whether each first device in the first device group meets a preset condition, the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data;

[0145] Determine a third device in the first device group according to the detection results of each first device;

[0146] The data sending behaviors of all the determined third devices are restricted, and the program of the second device is updated.

[0147] Assuming that the above is the first possible implementation mode, in a second possible implementation mode provided on the basis of the first possible implementation mode, determining the third device in the first device group according to the detection results of each first device includes:

[0148] According to each detection result, determining whether each of the first devices satisfies the preset conditions;

[0149] If each of the first devices satisfies the preset condition, each of the first devices is determined as a third device;

[0150] If any first device does not meet the above preset conditions, any first device will not be determined as the third device.

[0151] In a third possible implementation manner provided on the basis of the first possible implementation manner, the step of determining the third device in the first device group according to the detection results of each first device includes:

[0152] According to the detection results of each first device, the first device in the first device group that meets the preset condition is determined as the third device.

[0153] In a fourth possible implementation manner provided on the basis of the first possible implementation manner, the limiting of the data sending behaviors of all the determined third devices includes:

[0154] A mute instruction is sent to all the third devices determined above, where the mute instruction is used to restrict the third devices from sending data.

[0155] In a fifth possible implementation manner provided on the basis of the first possible implementation manner, the limiting of the data sending behaviors of all the determined third devices includes:

[0156] Sending a mute instruction and a first mute flag to all the third devices determined above, wherein the mute instruction is used to restrict the third devices from sending data, and the first mute flag is used to indicate that the mute instruction is allowed to be executed;

[0157] The above program updating method further includes:

[0158] If the third device is not determined in the first device group, the mute instruction and the second mute flag are sent to each first device in the first device group, where the second mute flag is used to indicate that the mute instruction is not allowed to be executed.

[0159] In a sixth possible implementation provided based on the fourth possible implementation or the fifth possible implementation, the mute instruction is used to prohibit the third device from sending data, or the mute instruction is used to limit the frequency of the third device sending data.

[0160] In a seventh possible implementation provided on the basis of the fifth possible implementation, after sending the mute instruction and the second mute flag to each first device in the first device group, the processor 402 further implements the following steps when running the computer program stored in the memory 401:

[0161] monitoring a reminder message sent by a first device in the first device group, where the reminder message is used to indicate that a state of the first device has changed;

[0162] In response to the reminder message, the process returns to the step of detecting whether each first device in the first device group meets a preset condition.

[0163] In an eighth possible implementation provided on the basis of the first possible implementation, the first device is a device that affects the safety of vehicle operation.

[0164] In a ninth possible implementation provided on the basis of the eighth possible implementation, the first device group further includes at least one fourth device. Before updating the program of the second device, the processor 402 further implements the following steps by running the computer program stored in the memory 401:

[0165] Restrictions are placed on data transmission behaviors of all fourth devices, wherein the fourth devices are devices that do not affect the safety of vehicle operation.

[0166] 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:

[0167] Obtaining a program update file associated with the second device from a host computer;

[0168] The program for updating the second device includes:

[0169] The program of the second device is updated according to the program update file.

[0170] In an eleventh possible implementation manner provided on the basis of the tenth possible implementation manner, the updating of the program of the second device according to the program update file includes:

[0171] If the second device is the electronic device, updating the program of the second device by executing the program update file;

[0172] If the second device is not the electronic device, the program update file is sent to the second device to instruct the second device to execute the program update file to complete the program update.

[0173] In a twelfth possible implementation provided on the basis of the first possible implementation, 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:

[0174] receiving a program update request, wherein the program update request carries a device identifier;

[0175] The device corresponding to the device identifier is determined as the second device.

[0176] 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 powered off and put into sleep mode. Before the above-mentioned detection of whether each first device in the first device group meets the preset condition, the processor 402 further implements the following steps when running the above-mentioned computer program stored in the memory 401:

[0177] Detecting whether each of the first devices is in a powered-on state;

[0178] Control a first device that is not in a powered-on state to power on.

[0179] It should be understood that in the embodiment of the present application, the processor 402 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) 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 also be any conventional processor, etc.

[0180] The memory 401 may include a read-only memory and a random access memory, and provide instructions and data to the processor 402. A part or all of the memory 401 may also include a non-volatile random access memory. For example, the memory 401 may also store information of a device category.

[0181] As can be seen from the above, in this solution, it is first detected whether each first device in the first device group meets the preset condition. The first device group is connected to the same bus as the second device. The preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data. Then, the third device is determined in the first device group according to the detection result. Finally, the data sending behavior of the third device is restricted, and the program of the second device is updated. Under the premise of ensuring the safety of vehicle operation, this solution restricts the devices in the first device group from sending data to reduce the network load of the bus where the second device is located, thereby effectively improving the success rate of program updates for devices in the vehicle.

[0182] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0183] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0184] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0185] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0186] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0187] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.

[0188] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A program updating method, characterized in that: Used in electronic equipment, including: Detecting whether each first device in a first device group meets a preset condition, the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data; Determining a third device in the first device group according to the detection results of each first device; restricting data transmission behaviors of all determined third devices, and updating a program of the second device; The determining the third device in the first device group according to the detection results of each first device includes: determining the first device in the first device group that meets the preset condition as the third device according to the detection results of each first device; The restricting the data transmission behavior of all the determined third devices includes: sending a mute instruction and a first mute flag to all the determined third devices, wherein the mute instruction is used to restrict the third devices from sending data, and the first mute flag is used to indicate that the mute instruction is allowed to be executed; the program update method also includes: if no third device is determined in the first device group, sending the mute instruction and the second mute flag to each first device in the first device group, wherein the second mute flag is used to indicate that the mute instruction is not allowed to be executed; After sending the mute instruction and the second mute flag to each first device in the first device group, the method further includes: monitoring a reminder message sent by the first device in the first device group, wherein the reminder message is used to indicate that a status of the first device has changed; and in response to the reminder message, returning to execute the step of detecting whether each first device in the first device group meets a preset condition.

2. The program updating method according to claim 1, characterized in that: The determining, according to the detection results of each first device, a third device in the first device group includes: According to each detection result, determining whether each of the first devices meets the preset condition; If each of the first devices satisfies the preset condition, each of the first devices is determined as a third device; If any first device does not meet the preset condition, any first device is not determined as the third device.

3. The program updating method according to claim 1, characterized in that: The limiting the data sending behaviors of all the determined third devices includes: A mute instruction is sent to all the determined third devices, where the mute instruction is used to restrict the third devices from sending data.

4. The program updating method according to any one of claims 1 to 3, characterized in that: The mute instruction is used to prohibit the third device from sending data, or the mute instruction is used to limit the frequency of the third device sending data.

5. The program updating method according to claim 1, characterized in that: The first device is a device that affects the safety of vehicle operation.

6. The program updating method according to claim 5, characterized in that: The first device group further includes at least one fourth device, and before updating the program of the second device, further includes: Restrictions are placed on data transmission behaviors of all fourth devices, wherein the fourth devices are devices that do not affect the safety of vehicle operation.

7. The program updating method according to claim 1, characterized in that: The program updating method further includes: Acquire a program update file associated with the second device from a host computer; The program for updating the second device includes: The program of the second device is updated according to the program update file.

8. The program updating method according to claim 7, characterized in that: The updating of the program of the second device according to the program update file comprises: If the second device is the electronic device, updating the program of the second device by executing the program update file; If the second device is not the electronic device, the program update file is sent to the second device to instruct the second device to execute the program update file to complete the program update.

9. The program updating method according to claim 1, characterized in that: Before detecting whether each first device in the first device group meets a preset condition, the method further includes: receiving a program update request, wherein the program update request carries a device identifier; A device corresponding to the device identifier is determined as the second device.

10. The program updating method according to claim 1, characterized in that: The electronic device is a device that is still in a normal power state after the whole vehicle is powered off and put into sleep mode. Before detecting whether each first device in the first device group meets the preset conditions, the device further includes: Detecting whether each of the first devices is in a powered-on state; Control a first device that is not in a powered-on state to power on.

11. A program updating device, characterized in that: Used in electronic equipment, including: a detection unit, configured to detect whether each first device in a first device group meets a preset condition, wherein the first device group includes at least one first device, the first device group and the second device are connected to the same bus, and the preset condition is that there is no safety hazard in the vehicle after the first device is restricted from sending data; a determination unit, configured to determine a third device in the first device group according to the detection results of each first device; the determination unit is specifically configured to determine a first device in the first device group that meets the preset condition as the third device; An updating unit, configured to restrict the data transmission behavior of all the determined third devices, and update the program of the second device; the restricting the data transmission behavior of all the determined third devices includes: sending a mute instruction and a first mute flag to all the determined third devices, the mute instruction is used to restrict the third devices from sending data, and the first mute flag is used to indicate that the mute instruction is allowed to be executed; the program updating method also includes: if no third device is determined in the first device group, sending the mute instruction and the second mute flag to each first device in the first device group, the second mute flag is used to indicate that the mute instruction is not allowed to be executed; a monitoring unit, configured to monitor a reminder message sent by a first device in the first device group, wherein the reminder message is used to indicate that a state of the first device has changed; The returning unit is used to return to the step of detecting whether each first device in the first device group meets a preset condition in response to the reminder message.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.

13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Electronic control unit firmware upgrading management method and device, equipment and storage medium

    CN110347412A