First frame message sending time adjustment method, device, electronic device and storage medium
By detecting and adjusting the sending time of the first frame message in real time, the problem of the vehicle controller ECU not successfully receiving the first frame message after the key is powered on is solved, avoiding the occurrence of ACK error frames and ensuring the normal operation of the CAN bus.
Patent Information
- Application Number
- CN202211267254.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-17
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-10-17
AI Technical Summary
The first frame message sent by the vehicle controller ECU after the key is powered on may not be successfully received by other controllers, causing ACK error frames to appear on the CAN bus, affecting the communication rate and sensor performance.
By detecting the success of sending the first frame message in real time, if it is unsuccessful, the preset interval time is used to adjust the sending time of the first frame message to ensure that it is sent after other controllers complete initialization to avoid the occurrence of ACK error frames.
It effectively avoids ACK error frames on the CAN bus, ensuring the successful reception of the first frame message and the normal startup of the vehicle control system.
Smart Images

Figure CN115632745B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CAN communication, and more specifically to a method, device, electronic equipment and storage medium for adjusting the sending time of a first frame message. Background Art
[0002] After the key is powered on, the vehicle controller ECU will send the first frame message to the CAN receiving node of each controller. If the CAN receiving nodes of other controllers have not completed initialization, they cannot receive the first frame message. At this time, the CAN bus corresponding to other controllers will have an Acknowledgement Error (ACK) frame. The ACK error frame will cause problems with some communication rate power-on adaptive sensors on the engine.
[0003] Therefore, how to provide a method for adjusting the sending time of the first frame message to achieve adaptive adjustment of the time when the vehicle control ECU sends the first frame message, so that the CAN receiving nodes of other controllers can successfully receive the first frame message, thereby avoiding the occurrence of ACK error frames on the CAN bus corresponding to other controllers, is a problem that urgently needs to be solved in this application. Summary of the invention
[0004] In view of this, the present invention provides a method, device, electronic device and storage medium for adjusting the first frame message sending time, so as to realize adaptive adjustment of the time when the vehicle control ECU sends the first frame message, so that the CAN receiving nodes of other controllers can successfully receive the first frame message, thereby avoiding the occurrence of ACK error frames on the CAN buses corresponding to other controllers.
[0005] The first aspect of the present invention discloses a method for adjusting the first frame message sending time, which is applied to a vehicle controller ECU. The method comprises:
[0006] When it is detected that the vehicle key is powered on, the first frame message is sent to the CAN receiving nodes of each other controller according to the preset default first frame message sending time;
[0007] Real-time detection of whether the first frame message is sent successfully;
[0008] If the first frame message is sent successfully, the preset default first frame message sending time is determined as the target sending time of the first frame message;
[0009] If the first frame message is not sent successfully, the preset default first frame message sending time is adjusted using a preset interval time, and the sending time of the first frame message is re-determined; wherein the sending time of the first frame message is greater than the preset default first frame message sending time;
[0010] The preset default first frame message sending time is updated using the sending time of the first frame message, and the execution is returned to send the first frame message to the CAN receiving nodes of each other controller according to the preset default first frame message sending time when the vehicle key is detected to be powered on.
[0011] Optionally, the real-time detection of whether the first frame message is sent successfully includes:
[0012] Real-time detection of whether a response field fed back by the CAN receiving node of each of the other controllers based on the first frame message is received;
[0013] When receiving the response field fed back by the CAN communication node of each of the other controllers based on the first frame message, determining whether the response field fed back by the CAN communication node of each of the other controllers based on the first frame message is a dominant bit;
[0014] If the response field fed back by any CAN communication node of the other controller based on the first frame message is a dominant bit, it is determined that the first frame message is sent successfully;
[0015] If the response fields fed back by the CAN communication nodes of the other controllers based on the first frame message are not dominant bits, it is determined that the first frame message is not sent successfully.
[0016] Optionally, the method further includes:
[0017] After adjusting the preset default first frame message at a preset interval and re-determining the sending time of the first frame message, recording the corresponding number of adjustments;
[0018] Determining whether the adjustment number is greater than a preset adjustment number;
[0019] The updating of the preset default first frame message sending time by using the first frame message sending time includes:
[0020] If the adjustment number is not greater than the preset adjustment number, the preset default first frame message sending time is updated using the sending time of the first frame message.
[0021] Optionally, the method further includes:
[0022] If the adjustment times are greater than the preset adjustment times, a corresponding alarm message is output to prompt the corresponding technical personnel to perform corresponding processing.
[0023] The second aspect of the present invention discloses a first frame message sending time adjustment device, which is applied to a vehicle controller ECU, and the device comprises:
[0024] A first frame message sending unit is used to send a first frame message to the CAN receiving nodes of each other controller according to a preset default first frame message sending time when detecting that the key is powered on;
[0025] A real-time detection unit, used for detecting in real time whether the first frame message is sent successfully;
[0026] A determining unit, configured to determine the preset default first frame message sending time as the target sending time of the first frame message if the first frame message is sent successfully;
[0027] An adjustment unit, for adjusting the preset default first frame message sending time by using a preset interval time if the first frame message is not sent successfully, and re-determining the sending time of the first frame message; wherein the sending time of the first frame message is greater than the preset default first frame message sending time;
[0028] The updating unit is used to update the preset default first frame message sending time by using the sending time of the first frame message, and return to execute the first frame message sending unit.
[0029] Optionally, the real-time detection unit includes:
[0030] A real-time detection subunit, used for detecting in real time whether a response field fed back by the CAN receiving node of each of the other controllers based on the first frame message is received;
[0031] A first judgment unit is used to judge whether the response field fed back by the CAN communication node of each of the other controllers based on the first frame message is a dominant bit when receiving the response field fed back by the CAN communication node of each of the other controllers based on the first frame message;
[0032] A first determination unit, configured to determine that the first frame message is successfully sent if the response field fed back by any CAN communication node of the other controller based on the first frame message is a dominant bit;
[0033] The second determination unit is used to determine that the first frame message is not sent successfully if the response field fed back by the CAN communication nodes of each of the other controllers based on the first frame message is not a dominant bit.
[0034] Optionally, the device further comprises:
[0035] An adjustment number recording unit, used for adjusting the preset default first frame message at a preset interval time and re-determining the sending time of the first frame message, and recording the corresponding adjustment number;
[0036] A second judging unit, used to judge whether the adjustment times are greater than a preset adjustment times;
[0037] The updating unit is further configured to update the preset default first frame message sending time using the sending time of the first frame message if the adjustment number is not greater than the preset adjustment number.
[0038] Optionally, the device further comprises:
[0039] The alarm information output unit is used to output corresponding alarm information if the adjustment number is greater than the preset adjustment number, so as to prompt the corresponding technical personnel to perform corresponding processing.
[0040] The third aspect of the present invention discloses an electronic device, comprising: a processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; and the memory is used to store a program, wherein the program is used to implement the method for adjusting the first frame message sending time disclosed in the first aspect of the present invention.
[0041] The fourth aspect of the present invention discloses a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are used to execute the method for adjusting the first frame message sending time disclosed in the first aspect of the present invention.
[0042] The present invention provides a first frame message sending time adjustment method, device, electronic device and storage medium, which are applied to a whole vehicle controller ECU, and can pre-set a default first frame message sending time. When it is detected that the key is powered on, the first frame message can be sent to the CAN receiving nodes of each other controller according to the pre-set default first frame message sending time; and whether the first frame message is sent successfully is detected in real time; when it is determined that the first frame message is sent successfully, the pre-set default first frame message sending time is determined as the target sending time of the first frame message; when it is determined that the first frame message is not sent successfully, the pre-set default first frame message sending time is adjusted by using a pre-set preset interval time, and the sending time of the first frame message is re-determined; the pre-set default first frame message sending time is updated by using the sending time of the first frame message, and finally the execution is returned. When it is detected that the key is powered on, the first frame message can be sent to the CAN receiving nodes of each other controller according to the pre-set default first frame message sending time. According to the technical solution provided by the present invention, when the vehicle controller ECU determines that the sending of the first frame message fails, it indicates that the CAN receiving nodes of other controllers have not yet completed initialization. Then, the preset default first frame message sending time can be adjusted by using the preset preset interval time to postpone the sending time of the first frame message, so that when the first frame message is sent to the CAN receiving nodes of other controllers, the CAN receiving nodes of other controllers have completed initialization, thereby avoiding the occurrence of ACK error frames on the CAN buses corresponding to other controllers. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A schematic diagram of a flow chart of a method for adjusting the first frame message sending time provided by an embodiment of the present invention;
[0045] Figure 2 A schematic flow chart of another method for adjusting the first frame message sending time provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of the structure of a first frame message sending time adjustment device provided by an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0050] It should be noted that the concepts such as "first" and "second" mentioned in the disclosure of the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0051] It should be noted that the modifications of "one" and "plurality" mentioned in the disclosure of the present invention are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0052] See also Figure 1 , shows a flow chart of a method for adjusting the time of sending a first frame message provided by an embodiment of the present invention, the method for adjusting the time of sending a first frame message is applied to a vehicle controller ECU, and the method for adjusting the time of sending a first frame message specifically includes the following methods:
[0053] S101: When it is detected that the vehicle key is powered on, a first frame message is sent to the CAN receiving nodes of other controllers according to a preset default first frame message sending time.
[0054] In the embodiment of the present application, the default first frame message sending time can be preset, for example, the preset default first frame message sending time can be 0ms, 1ms, or 2ms. It can be set according to actual applications and is not limited in the embodiment of the present application.
[0055] It should be noted that the first frame message refers to the first frame message sent by the vehicle controller ECU after the key is powered on.
[0056] In the specific process of executing step S101, when the vehicle controller ECU detects that the vehicle key is powered on, it obtains the current power-on time of the vehicle key. When it is detected that the current time is equal to the preset default first frame message sending time from the power-on time of the vehicle key, the CAN sending node of the vehicle controller ECU is used to send the first frame message to the corresponding CAN receiving nodes of other controllers through each CAN bus.
[0057] It should be noted that the CAN sending node of the vehicle controller ECU can also be used as a receiving node to receive messages sent by the CAN sending nodes of other controllers; correspondingly, the CAN receiving nodes of other controllers can be used as sending nodes.
[0058] S102: Detect in real time whether the first frame message is sent successfully; if the first frame message is sent successfully, execute step S103; if the first frame message is not sent successfully, execute step S104.
[0059] In some embodiments, it has been found through research that the response field in the first frame message sent by the CAN sending node of the vehicle controller ECU to the CAN receiving nodes of each other controller is a recessive bit. If the response field fed back by the CAN receiving node of the other controller is a dominant bit, it means that the CAN receiving node of the other controller has received the corresponding first frame message; if the response field is a recessive bit, it means that the CAN receiving node of the other controller has not received the corresponding first frame message.
[0060] Optionally, in an embodiment of the present application, after the CAN sending node of the vehicle controller ECU sends the first frame message to the corresponding CAN receiving nodes of other controllers through each CAN bus, it can detect in real time whether the response field fed back by the CAN receiving nodes of each other controller based on the first frame message is received; when the response field fed back by the CAN communication nodes of each other controller based on the first frame message is received, it is determined whether the response field fed back by the CAN communication nodes of each other controller based on the first frame message is a dominant bit; if the response field fed back by the CAN communication nodes of any other controller based on the first frame message is a dominant bit, it is determined that the first frame message is sent successfully; if the response fields fed back by the CAN communication nodes of each other controller based on the first frame message are not dominant bits, it is determined that the first frame message is not sent successfully. When it is determined that the first frame message is not sent successfully, step S103 is executed.
[0061] S103: Determine the preset default first frame message sending time as the target sending time of the first frame message.
[0062] During the specific execution of step S103, when it is detected that the first frame message is sent successfully, it can be considered that the currently preset default first frame message sending time is reasonable, and the preset default first frame message sending time can be determined as the target sending time of the first frame message of the vehicle control ECU, so that the vehicle control ECU will send the first frame message to the CAN receiving nodes of each other controller according to the target sending time of the first frame message as long as it detects that the vehicle key is powered on.
[0063] S104: adjusting the preset default first frame message sending time by using the preset interval time, and re-determining the first frame message sending time.
[0064] In the specific execution of step S104, when it is determined that the first frame message is not sent successfully, the preset default first frame message sending time is added to the preset interval time to adjust the preset default first frame message sending time and re-determine the sending time of the first frame message. The sending time of the first frame message is greater than the preset default first frame message.
[0065] It should be noted that the preset interval time may be 1 ms, 2 ms, 3 ms, etc. It may be set according to time application, and the embodiment of the present application is not limited thereto.
[0066] For example, if the preset interval time is 2ms and the preset default first frame message sending time is 3ms, when it is determined that the first frame message is not sent successfully, the preset default first frame message sending time is added to the preset interval time, and the first frame message sending time is re-determined to be 5ms.
[0067] S105: using the sending time of the first frame message to update the preset default first frame message sending time.
[0068] In the specific execution process of step S105, after the sending time of the first frame message is re-determined, the preset default first frame message sending time can be updated using the re-determined occurrence time of the first frame message, and it can be re-judged in real time whether the vehicle key is powered on. When the vehicle key is detected to be powered on, the first frame message can be sent to the CAN receiving nodes of each other controller according to the updated preset default first frame message sending time, that is, return to execute step S101 until it is detected that the first frame message is sent successfully, that is, until a reasonable first frame message sending time is determined.
[0069] It should be noted that after the preset default first frame message sending time is updated using the sending time of the first frame message, the updated preset default first frame message sending time can be stored in the storage unit of the vehicle controller ECU.
[0070] It should also be noted that after the preset default first frame message sending time is updated using the sending time of the first frame message, a corresponding notification can be issued to prompt the technician to power off the entire vehicle key, and then power on the entire vehicle key again after powering off the entire vehicle key.
[0071] For example, the preset interval time is 1ms, if the preset default first frame message sending time is 2ms, when the vehicle controller ECU detects that the key is powered on, it obtains the current key power-on time. When it is detected that the time from the current time to the key power-on time is equal to the preset default first frame message sending time (2ms), the CAN sending node of the vehicle controller ECU is used to send the first frame message to the CAN receiving nodes of each other controller through the CAN bus.
[0072] Real-time detection is performed to determine whether the response field based on the first frame message feedback from the CAN receiving nodes of each other controller is received; when the response field based on the first frame message feedback from the CAN communication nodes of each other controller is received, and the response field based on the first frame message feedback from the CAN communication nodes of each other controller is not a dominant bit, it can be determined that the first frame message is not sent successfully, and the preset default first frame message sending time can be added to the preset interval time, and the first frame message sending time can be re-determined to be 3ms; the preset default first frame message sending time is updated using the re-determined first frame message sending time, and the controller After the vehicle key is powered off, it is determined in real time whether the vehicle key is powered on again; when the vehicle key is detected to be powered on again, it is detected whether the time from the current time to the vehicle key power-on time is equal to the preset default first frame message sending time, and the preset default first frame message sending time is 3ms at this time; when it is detected that the time from the current time to the vehicle key power-on time is 3ms, the CAN sending node of the vehicle controller ECU is used to send the first frame message to the corresponding CAN receiving nodes of other controllers through each CAN bus until a reasonable first frame message sending time is determined.
[0073] The present invention provides a first frame message sending time adjustment method, which is applied to a whole vehicle controller ECU. A default first frame message sending time can be pre-set. When it is detected that a key is powered on, the first frame message can be sent to CAN receiving nodes of various other controllers according to the pre-set default first frame message sending time; and whether the first frame message is sent successfully is detected in real time; when it is determined that the first frame message is sent successfully, the pre-set default first frame message sending time is determined as a target sending time of the first frame message; when it is determined that the first frame message is not sent successfully, the pre-set default first frame message sending time is adjusted by using a pre-set preset interval time, and the sending time of the first frame message is re-determined; the pre-set default first frame message sending time is updated by using the sending time of the first frame message, and finally the execution is returned. When it is detected that the key is powered on, the first frame message can be sent to CAN receiving nodes of various other controllers according to the pre-set default first frame message sending time. According to the technical solution provided by the present invention, when the vehicle controller ECU determines that the sending of the first frame message fails, it indicates that the CAN receiving nodes of other controllers have not yet completed initialization. Then, the preset default first frame message sending time can be adjusted by using the preset preset interval time to postpone the sending time of the first frame message, so that when the first frame message is sent to the CAN receiving nodes of other controllers, the CAN receiving nodes of other controllers have completed initialization, thereby avoiding the occurrence of ACK error frames on the CAN buses corresponding to other controllers.
[0074] For further information, see Figure 2 , shows a flow chart of another method for adjusting the time of sending a first frame message provided by an embodiment of the present invention, the method for adjusting the time of sending a first frame message is applied to a vehicle controller ECU, and the method for adjusting the time of sending a first frame message specifically includes the following methods:
[0075] S201: When it is detected that the key is powered on, a first frame message is sent to the CAN receiving nodes of each other controller according to a preset default first frame message sending time.
[0076] S202: Detect in real time whether the first frame message is sent successfully; if the first frame message is sent successfully, execute step S203; if the first frame message is not sent successfully, execute step S204.
[0077] S203: Determine the preset default first frame message sending time as the target sending time of the first frame message.
[0078] S204: adjusting the preset default first frame message sending time by using the preset interval time, and re-determining the first frame message sending time.
[0079] In the specific execution process of step S201 to step S204, the specific execution process and implementation principle of step S201 to step S204 are the same as those disclosed in the above embodiment of the present application. Figure 1 The specific execution process and implementation principle of steps S101 to S104 are the same as those in Figure 1 The corresponding parts will not be repeated here.
[0080] S205: Record the corresponding adjustment times, and determine whether the adjustment times are greater than the preset adjustment times; if the adjustment times are greater than the preset adjustment times, execute step S206; if the adjustment times are not greater than the preset adjustment times, execute step S207.
[0081] In the process of specifically executing step S205, the corresponding preset adjustment times can be set in advance, and then after adjusting the sending time of the current first frame message, the corresponding adjustment times can be recorded, and it can be determined whether the adjustment times are greater than the preset adjustment times. If the adjustment times are greater than the preset adjustment times, the corresponding alarm information can be output to prompt the corresponding technical personnel to perform corresponding processing in a timely manner.
[0082] If the number of adjustments is not greater than the preset number of adjustments, the preset default first frame message sending time may be updated using the sending time of the first frame message, ie, step S207 is executed.
[0083] It should be noted that the current first frame message sending time may be a preset default first frame message sending time.
[0084] S206: Output corresponding alarm information to prompt corresponding technical personnel to perform corresponding processing.
[0085] S207: using the sending time of the first frame message to update the preset default first frame message sending time.
[0086] In the specific execution process of step S207, the specific execution process and implementation principle of step S207 are the same as those disclosed in the above embodiment of the present invention. Figure 1 The specific execution process and implementation principle of step S105 in are the same as those in Figure 1 The corresponding parts will not be repeated here.
[0087] It should be noted that after executing step S207, the process returns to executing step S201.
[0088] In an embodiment of the present application, when the re-determined first frame message sending time is detected and the current number of adjustments has not reached the preset number of adjustments, the pre-set default first frame message sending time can be updated using the re-determined first frame message occurrence time, so that after the vehicle key is re-detected to be powered on, the first frame message is sent to the CAN receiving nodes of each other controller according to the updated default first frame message sending time until a reasonable first frame message sending time is determined, or the current number of adjustments reaches the preset number of adjustments.
[0089] Based on the method for adjusting the first frame message sending time disclosed in the embodiment of the present invention, the embodiment of the present invention also discloses a device for adjusting the first frame message sending time, such as Figure 3 As shown, the first frame message sending time adjustment device is applied to the vehicle controller ECU, and the device includes:
[0090] The first frame message sending unit 31 is used to send the first frame message to the CAN receiving nodes of each other controller according to the preset default first frame message sending time when the key is detected to be powered on;
[0091] A real-time detection unit 32 is used to detect in real time whether the first frame message is sent successfully;
[0092] The determining unit 33 is used to determine the preset default first frame message sending time as the target sending time of the first frame message if the first frame message is sent successfully;
[0093] The adjusting unit 34 is used to adjust the preset default first frame message sending time by using the preset interval time if the first frame message is not sent successfully, and re-determine the sending time of the first frame message; wherein the sending time of the first frame message is greater than the preset default first frame message sending time;
[0094] The updating unit 35 is used to update the preset default first frame message sending time by using the sending time of the first frame message, and return to execute the first frame message sending unit.
[0095] The specific principles and execution processes of each unit in the first frame message sending time adjustment device disclosed in the above embodiment of the present invention are the same as the first frame message sending time adjustment method disclosed in the above embodiment of the present invention. Please refer to the corresponding parts of the first frame message sending time adjustment method disclosed in the above embodiment of the present invention, and will not be repeated here.
[0096] The present invention provides a first frame message sending time adjustment device, which is applied to a whole vehicle controller ECU and can pre-set a default first frame message sending time. When it is detected that a key is powered on, the first frame message can be sent to CAN receiving nodes of various other controllers according to the pre-set default first frame message sending time; and whether the first frame message is sent successfully is detected in real time; when it is determined that the first frame message is sent successfully, the pre-set default first frame message sending time is determined as the target sending time of the first frame message; when it is determined that the first frame message is not sent successfully, the pre-set default first frame message sending time is adjusted by using a pre-set preset interval time, and the sending time of the first frame message is re-determined; the pre-set default first frame message sending time is updated by using the sending time of the first frame message, and finally the execution is returned. When it is detected that the key is powered on, the first frame message can be sent to CAN receiving nodes of various other controllers according to the pre-set default first frame message sending time. According to the technical solution provided by the present invention, when the vehicle controller ECU determines that the sending of the first frame message fails, it indicates that the CAN receiving nodes of other controllers have not yet completed initialization. Then, the preset default first frame message sending time can be adjusted by using the preset preset interval time to postpone the sending time of the first frame message, so that when the first frame message is sent to the CAN receiving nodes of other controllers, the CAN receiving nodes of other controllers have completed initialization, thereby avoiding the occurrence of ACK error frames on the CAN buses corresponding to other controllers.
[0097] Optional, real-time detection unit, including:
[0098] A real-time detection subunit is used to detect in real time whether the response field fed back by the CAN receiving node of each other controller based on the first frame message is received;
[0099] A first judgment unit is used to judge whether the response field fed back by the CAN communication node of each other controller based on the first frame message is a dominant bit when receiving the response field fed back by the CAN communication node of each other controller based on the first frame message;
[0100] A first determination unit is used to determine that the first frame message is sent successfully if the response field fed back by the CAN communication node of any other controller based on the first frame message is a dominant bit;
[0101] The second determination unit is used to determine that the first frame message is not sent successfully if the response fields fed back by the CAN communication nodes of the other controllers based on the first frame message are not dominant bits.
[0102] Optionally, the first frame message sending time adjustment device provided by the present invention further includes:
[0103] An adjustment number recording unit is used to adjust the preset default first frame message at a preset interval time and record the corresponding adjustment number after re-determining the sending time of the first frame message;
[0104] A second judging unit, used to judge whether the number of adjustment times is greater than a preset number of adjustment times;
[0105] The updating unit is further used to update the preset default first frame message sending time by using the sending time of the first frame message if the adjustment times are not greater than the preset adjustment times.
[0106] Optionally, the first frame message sending time adjustment device provided by the present invention further includes:
[0107] The alarm information output unit is used to output corresponding alarm information if the number of adjustments is greater than the preset number of adjustments, so as to prompt the corresponding technical personnel to perform corresponding processing.
[0108] The present application embodiment provides an electronic device, such as Figure 4 As shown, the electronic device includes a processor 401 and a memory 402, the memory 402 is used to store the method for adjusting the first frame message sending time, and the processor 401 is used to call the program instructions in the memory to execute the steps shown in the method for adjusting the first frame message sending time in the above embodiment.
[0109] An embodiment of the present application provides a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the first frame message sending time adjustment method shown in the above embodiment.
[0110] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0111] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 the present invention.
[0112] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0113] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for adjusting the first frame message sending time, characterized in that: Applied to a vehicle controller ECU, the method comprises: When it is detected that the vehicle key is powered on, the first frame message is sent to the CAN receiving nodes of each other controller according to the preset default first frame message sending time; Real-time detection of whether the first frame message is sent successfully; wherein, the real-time detection of whether the first frame message is sent successfully includes: real-time detection of whether the response field fed back by the CAN receiving nodes of each of the other controllers based on the first frame message is received; when the response field fed back by the CAN communication nodes of each of the other controllers based on the first frame message is received, it is determined whether the response field fed back by the CAN communication nodes of each of the other controllers based on the first frame message is a dominant bit; if the response field fed back by the CAN communication nodes of any of the other controllers based on the first frame message is a dominant bit, it is determined that the first frame message is sent successfully; if the response fields fed back by the CAN communication nodes of each of the other controllers based on the first frame message are not dominant bits, it is determined that the first frame message is not sent successfully; If the first frame message is sent successfully, the preset default first frame message sending time is determined as the target sending time of the first frame message; If the first frame message is not sent successfully, the preset default first frame message sending time is adjusted using a preset interval time, and the sending time of the first frame message is re-determined; wherein the sending time of the first frame message is greater than the preset default first frame message sending time; The preset default first frame message sending time is updated using the sending time of the first frame message, and the execution is returned to send the first frame message to the CAN receiving nodes of each other controller according to the preset default first frame message sending time when the vehicle key is detected to be powered on.
2. The method according to claim 1, characterized in that The method further comprises: After adjusting the preset default first frame message at a preset interval and re-determining the sending time of the first frame message, recording the corresponding number of adjustments; Determining whether the adjustment number is greater than a preset adjustment number; The updating of the preset default first frame message sending time by using the first frame message sending time includes: If the adjustment times are not greater than the preset adjustment times, the preset default first frame message sending time is updated using the sending time of the first frame message.
3. The method according to claim 2, characterized in that The method further comprises: If the adjustment times are greater than the preset adjustment times, a corresponding alarm message is output to prompt the corresponding technical personnel to perform corresponding processing.
4. A first frame message sending time adjustment device, characterized in that: Applied to a vehicle controller ECU, the device comprises: A first frame message sending unit is used to send a first frame message to the CAN receiving nodes of each other controller according to a preset default first frame message sending time when detecting that the key is powered on; A real-time detection unit, used for detecting in real time whether the first frame message is sent successfully; wherein the real-time detection unit includes: a real-time detection subunit, used for detecting in real time whether the response field fed back by the CAN receiving node of each of the other controllers based on the first frame message is received; a first judgment unit, used for judging whether the response field fed back by the CAN communication node of each of the other controllers based on the first frame message is a dominant bit when the response field fed back by the CAN communication node of each of the other controllers based on the first frame message is received; a first determination unit, used for determining that the first frame message is sent successfully if the response field fed back by the CAN communication node of any of the other controllers based on the first frame message is a dominant bit; a second determination unit, used for determining that the first frame message is not sent successfully if the response field fed back by the CAN communication node of each of the other controllers based on the first frame message is not a dominant bit; A determining unit, configured to determine the preset default first frame message sending time as the target sending time of the first frame message if the first frame message is sent successfully; An adjustment unit, for adjusting the preset default first frame message sending time by using a preset interval time if the first frame message is not sent successfully, and re-determining the sending time of the first frame message; wherein the sending time of the first frame message is greater than the preset default first frame message sending time; The updating unit is used to update the preset default first frame message sending time by using the sending time of the first frame message, and return to execute the first frame message sending unit.
5. The device according to claim 4, characterized in that The device also includes: An adjustment number recording unit, used for adjusting the preset default first frame message at a preset interval time and re-determining the sending time of the first frame message, and recording the corresponding adjustment number; A second judging unit, used to judge whether the adjustment times are greater than a preset adjustment times; The updating unit is further configured to update the preset default first frame message sending time using the sending time of the first frame message if the adjustment number is not greater than the preset adjustment number.
6. The device according to claim 5, characterized in that The device also includes: The alarm information output unit is used to output corresponding alarm information if the adjustment number is greater than the preset adjustment number, so as to prompt the corresponding technical personnel to perform corresponding processing.
7. An electronic device, characterized in that: include: A processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program, and the program is used to implement the method for adjusting the first frame message sending time as described in any one of claims 1-3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the method for adjusting the first frame message sending time as described in any one of claims 1-3.
