ECU reset detection methods, devices, electronic equipment and storage media

By acquiring ECU characteristic parameters, using a weighted algorithm to calculate the theoretical time consumption, dynamically adjusting the timeout threshold and waiting interval, and combining it with UDS service response messages, the problems of misjudgment and communication conflicts in the unified diagnostic service are solved, and the accurate perception and intelligent scheduling of ECU reset progress are realized.

CN122086440APending Publication Date: 2026-05-26WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610400605.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The existing unified diagnostic service suffers from problems such as the rigidity of timing decisions leading to misjudgments, the inability to accurately perceive the ECU reset progress, and the potential for bus communication conflicts when multiple ECUs are working together.

Method used

By acquiring ECU characteristic parameters, a weighted algorithm is used to calculate the theoretical reset time. The reset response timeout threshold and segmented waiting interval are dynamically adjusted. Combined with the reset phase encoding and weight in the extended UDS service response message, the reset progress and remaining time are accurately calculated.

Benefits of technology

It achieves timing-adaptive decision-making for ECU reset detection, reduces the false judgment rate, accurately senses the reset progress, avoids bus communication conflicts, and requires no hardware modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086440A_ABST
    Figure CN122086440A_ABST
Patent Text Reader

Abstract

This invention provides an ECU reset detection method, device, electronic device, and storage medium, belonging to the field of electronic testing technology. The method includes: calculating the estimated theoretical reset time using a weighted algorithm on the ECU's characteristic parameters; determining the ECU's reset response timeout threshold and segmented waiting interval based on the theoretical timeout; sending a progress query command to the ECU to query the current reset stage according to the segmented waiting interval, and obtaining the current reset stage code fed back by the ECU within the reset response timeout threshold; determining the weight corresponding to the current reset stage code; and determining the reset progress and remaining reset time based on the theoretical timeout, the weight corresponding to the current reset stage code, and the time already elapsed in the current reset stage. This invention can solve the problems of existing unified diagnostic services, such as the tendency to trigger misjudgments due to rigid timing decisions, the inability to accurately perceive reset progress, and the potential for bus communication conflicts during multi-ECU collaboration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic testing technology, specifically to an ECU reset testing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Traditional UDS 11 service (Unified Diagnostic Service) has three major defects: 1. Fixed timing decisions, using fixed timeout thresholds, without dynamic adjustment based on ECU type and load, easily triggering misjudgments; 2. Unquantifiable reset status, unable to accurately perceive reset progress, only able to judge through "success / failure" results, making anomaly tracing difficult; 3. No algorithm support for multi-ECU collaboration, reset sequence and timing are all set by experience, easily causing bus communication conflicts.

[0003] In summary, existing unified diagnostic services suffer from problems such as the tendency to trigger misjudgments due to rigid timing decisions, the inability to accurately perceive reset progress, and the potential for bus communication conflicts caused by multi-ECU collaboration. Summary of the Invention

[0004] In view of this, it is necessary to provide an ECU reset detection method, device, electronic device and storage medium to solve the technical problems of existing unified diagnostic services, such as easy misjudgment due to the solidification of timing decisions, inability to accurately perceive the reset progress, and easy bus communication conflicts caused by multi-ECU collaboration.

[0005] To address the aforementioned problems, in a first aspect, the present invention provides an ECU reset detection method, comprising: Obtain ECU characteristic parameters, and use a weighted algorithm to calculate the estimated theoretical time consumption for this reset; Based on the theoretical time consumption, the reset response timeout threshold and segmented waiting interval of the ECU are determined; According to the segmented waiting interval, a progress query command for querying the current reset stage of the ECU is sent to the ECU to obtain the current reset stage code fed back by the ECU. If the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. Based on the reset phase and corresponding weight contained in the extended UDS service response message, determine the weight corresponding to the current reset phase code; Based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time already consumed in the current reset stage, the reset progress is determined, and based on the theoretical time consumption and the time already consumed in the current reset stage, the remaining reset time consumption is determined.

[0006] In one possible implementation, the ECU characteristic parameters include: ECU type, ECU current load, and ECU historical average reset time.

[0007] In one possible implementation, the formula for calculating the estimated theoretical time consumption of this reset is: T est = T base (Type) × (1 + k×Load) ×α+ T hist ×(1 -α) Among them, T est This is the estimated theoretical time for this reset, where Type is the ECU type and T is the time taken. base (Type) represents the base reset time for different types of ECUs, k is the load influence coefficient, α is the preset weighting coefficient, Load is the current load of the ECU, and T hist This represents the average time taken for historical ECU resets.

[0008] In one possible implementation, based on the theoretical timeout, the reset response timeout threshold and segmented waiting interval of the ECU are determined, including: The reset response timeout threshold of the ECU is obtained by multiplying the theoretical time consumption by the preset redundancy coefficient. The segmented waiting interval of the ECU is obtained by dividing the theoretical time by the preset number of segments.

[0009] In one possible implementation, the preset redundancy coefficient is greater than 1.

[0010] In one possible implementation, the formula for calculating the reset progress is: Progress=w 已完成 + [(t current - t start(i) ) / (T est × ω i )] ×ω i Where Progress represents the reset progress, w 已完成 To reset the total weights of the completed phases, t current t represents the timestamp corresponding to the time elapsed in the current reset phase. start(i) For the timestamp of entering the i-th stage of reset, T est ω is the theoretical time estimated for this reset. i This represents the weight for the current reset phase.

[0011] In one possible implementation, the formula for calculating the remaining reset time is: T remain = T est - (t current - t start(1) ), Among them, T remainTo reset the remaining time, t start(1) For the timestamp of the reset start, T est The theoretical time t is the estimated time for this reset. current This is the timestamp corresponding to the time elapsed in the current reset phase.

[0012] Secondly, the present invention also provides an ECU reset detection device, comprising: The time estimation module is used to obtain ECU characteristic parameters, and to calculate the theoretical time estimated for this reset using a weighted algorithm on the ECU characteristic parameters. The timeout threshold and interval calculation module is used to determine the reset response timeout threshold and segmented waiting interval of the ECU based on the theoretical time consumption. The reset code acquisition module is used to send a progress query command to the ECU to query the current reset stage according to the segmented waiting interval, so as to obtain the current reset stage code fed back by the ECU, and if the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. The weight determination module is used to determine the weight corresponding to the current reset phase code based on the reset phase and corresponding weight contained in the extended UDS service response message. The reset detection module is used to determine the reset progress based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time consumed in the current reset stage, and to determine the remaining reset time based on the theoretical time consumption and the time consumed in the current reset stage.

[0013] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the ECU reset detection method as described in any of the preceding claims.

[0014] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the ECU reset detection method as described in any of the preceding claims.

[0015] The beneficial effects of the above implementation are as follows: The ECU reset detection method, device, electronic device and storage medium provided by the present invention calculate the estimated theoretical time consumption of the current reset by using a weighted algorithm on the ECU characteristic parameters, and then determine the ECU reset response timeout threshold and segmented waiting interval based on the theoretical time consumption. Therefore, the reset response timeout threshold calculated by the present invention is not a fixed threshold, but can be dynamically adjusted according to the real-time acquired ECU characteristic parameters, perform timing adaptive decision-making, dynamically match the reset characteristics of different ECUs, thereby reducing the risk of misjudgment caused by the solidification of timing decisions.

[0016] Furthermore, based on the theoretical time consumption, the weight corresponding to the current reset stage encoding, and the time already consumed in the current reset stage, the present invention determines the reset progress, and can accurately calculate the reset progress.

[0017] Furthermore, based on the theoretical time consumption, the present invention determines the reset response timeout threshold and segmented waiting interval of the ECU, and sends a progress query command to the ECU to query the current reset stage according to the segmented waiting interval, thereby realizing multi-ECU collaborative intelligent scheduling in chronological order and avoiding communication conflicts.

[0018] Therefore, this invention can solve the technical problems of existing unified diagnostic services, such as the tendency to trigger misjudgments due to the rigidity of timing decisions, the inability to accurately perceive the reset progress, and the tendency for bus communication conflicts to occur during multi-ECU collaboration. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of an embodiment of the ECU reset detection method provided by the present invention; Figure 2 This is a schematic block diagram of an embodiment of the ECU reset detection device provided by the present invention; Figure 3 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0022] In the description of the embodiments of this application, unless otherwise stated, "a plurality of" means two or more.

[0023] In this embodiment of the invention, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, apparatus, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product or device.

[0024] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] This invention provides an ECU (Electronic Control Unit) reset detection method, device, electronic device, and storage medium, which are described below.

[0027] This invention provides an ECU reset detection method, which can be implemented by executing an application program on an electronic device such as a diagnostic tool; for example... Figure 1 As shown, the method includes: S101. Obtain ECU characteristic parameters, and use a weighted algorithm to calculate the estimated theoretical time consumption for this reset.

[0028] Understandably, the diagnostic tool sends a custom characteristic detection command to the target ECU to obtain a set of core characteristic parameters fed back by the target ECU. Combining these ECU characteristic parameters, the estimated theoretical time for this reset is determined. The theoretical time can be dynamically calculated based on the ECU type and load, solving the misjudgment problem of traditional fixed thresholds, and requiring no hardware adjustments.

[0029] S102. Based on the theoretical time consumption, determine the reset response timeout threshold and segmented waiting interval of the ECU.

[0030] Understandably, the ECU reset response timeout threshold is used to determine whether the ECU reset response has timed out. When the ECU reset response has not timed out, the reset data fed back by the ECU can be obtained.

[0031] Segmented waiting intervals, meaning that the reset progress is checked once at each interval.

[0032] S103. According to the segmented waiting interval, send a progress query command to the ECU to query the current reset stage of the ECU, so as to obtain the current reset stage code fed back by the ECU, and if the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, determine that the ECU reset has failed.

[0033] Understandably, the diagnostic tool sends progress query commands to the ECUs sequentially according to segmented waiting intervals, enabling multi-ECU collaborative support and performing resets in order to avoid bus communication conflicts. Furthermore, it only retrieves the current reset stage code fed back by the ECU within the reset response timeout threshold.

[0034] S104. Based on the reset phase and corresponding weight contained in the extended UDS service response message, determine the weight corresponding to the current reset phase code.

[0035] Understandably, the UDS 11 service response message is extended by adding a "Reset Phase" field to the response message, defining 5 core phases and their corresponding codes, and setting corresponding reset phase weights to achieve progress quantification.

[0036] S105. Based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time consumed in the current reset stage, determine the reset progress, and based on the theoretical time consumption and the time consumed in the current reset stage, determine the remaining reset time consumption.

[0037] Understandably, the reset progress can be represented by a number between 0 and 1. For example, a reset progress of 0.595 means the reset progress is 59.5%. The difference between the theoretical time taken and the time already taken in the current reset phase is the remaining reset time.

[0038] In some embodiments, the ECU characteristic parameters include: ECU type, current ECU load, and average historical reset time of the ECU.

[0039] Understandably, ECU types include general sensor ECUs, body control ECUs, domain controllers, and smart cockpit ECUs.

[0040] The current load value of the ECU is between 0 and 1, calculated based on the CPU utilization rate fed back by the ECU.

[0041] The average reset time of the ECU in history can be obtained by averaging the reset times of the ECU in history.

[0042] In some embodiments, the formula for calculating the estimated theoretical time required for this reset is as follows: T est = T base (Type) × (1 + k×Load) ×α+ T hist ×(1 -α) Among them, T est This is the estimated theoretical time for this reset, where Type is the ECU type and T is the time taken. base (Type) represents the base reset time for different types of ECUs, k is the load influence coefficient, α is the preset weighting coefficient, Load is the current load of the ECU, and T hist This represents the average time taken for historical ECU resets.

[0043] Understandably, the base reset time for different types of ECUs can be calibrated using a large number of samples. For example, when Type=1, it indicates a common sensor ECU, T base (Type)=150ms; when Type=2, it indicates the vehicle body control ECU, T base (Type)=300ms; When Type=3, it indicates a domain controller, T base (Type)=800ms; When Type=4, it indicates the intelligent cockpit ECU, T base (Type)=600ms.

[0044] With the load influence coefficient fixed at 0.8, experimental calibration showed that for every 0.1 increase in load, the reset time increased by 8%.

[0045] The weighting coefficient is fixed at 0.6, but can be set to balance the impact of base time consumption and historical time consumption. The larger α is, the higher the weight of base time consumption.

[0046] In some embodiments, determining the ECU reset response timeout threshold and segmented waiting interval based on the theoretical time consumption includes: The reset response timeout threshold of the ECU is obtained by multiplying the theoretical time consumption by the preset redundancy coefficient. The segmented waiting interval of the ECU is obtained by dividing the theoretical time by the preset number of segments.

[0047] The preset redundancy coefficient is greater than 1.

[0048] Understandably, the preset redundancy coefficient can be 1.5, the preset number of segments can be 5, and the preset redundancy coefficient is greater than 1 to reserve redundancy in order to avoid timeouts caused by unforeseen circumstances.

[0049] In some embodiments, the formula for calculating the reset progress is: Progress=w 已完成 + [(t current - t start(i) ) / (T est × ω i )] ×ω i Where Progress represents the reset progress, w 已完成 To reset the total weights of the completed phases, t current t represents the timestamp corresponding to the time elapsed in the current reset phase. start(i) For the timestamp of entering the i-th stage of reset, T est ω is the theoretical time estimated for this reset. i This represents the weight for the current reset phase.

[0050] It is understandable that the total weight of the completed reset phases can be obtained by summing the reset phase weights of different phases based on historical ECU feedback.

[0051] In some embodiments, the formula for calculating the remaining reset time is: T remain = T est - (t current - t start(1) ) Among them, T remain To reset the remaining time, t start(1) For the timestamp of the reset start, T est The theoretical time t is the estimated time for this reset. current This is the timestamp corresponding to the time elapsed in the current reset phase.

[0052] It is understandable that the difference between the timestamp corresponding to the time elapsed in the current reset phase and the timestamp at the start of the reset is the time elapsed in the reset phase, and the difference between the remaining reset time and the time elapsed in the reset phase is the remaining reset time.

[0053] In some embodiments, to address the shortcomings of the prior art, the present invention provides a novel ECU intelligent reset detection method, which achieves: ① time-adaptive decision-making, dynamically matching different ECU reset characteristics; ② quantitative perception of reset progress, accurately outputting the reset stage and remaining time; ③ intelligent scheduling of multiple ECUs to avoid communication conflicts; the entire process requires no hardware modification and is achieved solely through software protocol interaction between the diagnostic instrument and the ECU.

[0054] To achieve the above objectives, the method provided by the present invention includes the following steps: Step 1: ECU Characteristic Parameter Acquisition and Timing Adaptive Algorithm 1.1 Acquisition of ECU Characteristic Parameters The diagnostic tool sends a custom characteristic detection command to the target ECU; ECU feedback core characteristic parameter set S = {Type, Load, T} hist V soft V hard}, where the parameters have the following meanings: Type: ECU type (1=General sensor ECU, 2=Body control ECU, 3=Domain controller, 4=Smart cockpit ECU). Load: Current load of the ECU (0~1, which can be calculated from the CPU utilization rate reported by the ECU). T hist The average historical reset time for this ECU (unit: ms). V soft : Soft reset support indicator (0 = not supported, 1 = supported); V hard Hard reset support flag (0 = not supported, 1 = supported).

[0055] 1.2 Estimated Reset Time Based on the ECU characteristic parameter set, the theoretical time taken for this reset is estimated by a weighted algorithm, providing a basis for setting the timeout threshold.

[0056] T est = T base (Type) × (1 + k × Load) × α + T hist × (1 - α) The parameters have the following meanings: T est The estimated time for this reset (unit: ms), which is also the theoretical estimated time for this reset; T base (Type): Base reset time for different types of ECUs (calibrated through a large number of samples, e.g., T when Type=1). base=150ms; T when Type=2 base =300ms; T when Type=3 base =800ms; T when Type=4 base =600ms); k: Load impact coefficient (fixed at 0.8, calibrated experimentally; for every 0.1 increase in load, reset time increases by 8%). α: Weighting coefficient (fixed at 0.6, can be set to balance the influence of base time and historical time; the larger α is, the higher the weight of base time).

[0057] 1.3 Adaptive Timeout Threshold Configuration Based on the estimated time T est The calculation of the timeout threshold (reset response timeout) and segmented waiting intervals avoids misjudgments caused by fixed thresholds. The core formula is: T 超时 =T est × 1.5 In particular, a 50% redundancy is reserved during the calculation to avoid timeouts caused by unforeseen circumstances; T 等待 = T est / 5,T 等待 This indicates the segmented waiting interval, meaning that the reset progress is queried once per interval; T 超时 This is an adaptive timeout threshold.

[0058] Step 2: Reset Progress Quantization and Prediction Algorithm 2.1 Extend the UDS 11 service response message by adding a "Reset Phase Field," defining 5 core phases and their corresponding codes to quantify progress. The coding rules are shown in Table 1. Table 1: Encoding Rules Table

[0059] 2.2 Real-time progress and remaining time calculation The diagnostic tool sends progress query commands at segmented waiting intervals, and the ECU responds with the current stage code. Based on the stage weight and elapsed time, the diagnostic tool calculates the reset progress and remaining time. Reset progress = (Sum of weights of completed stages) + (Time elapsed in the current stage / Theoretical time elapsed in the current stage) × Weight of the current stage, that is: Progress = (w1 + ... + w) i-1 )+ [(t current - t start(i) ) / (T est × ω i )] × ω i The meanings of each parameter are as follows: Progress: Resets the real-time progress (0 ≤ Progress ≤ 1, for example, 0.595 is 59.5%). w1+…+w i-1 : Reset the total weight of the completed phases; I: The current reset stage number of the ECU (e.g., stage 0x03 corresponds to i=3); t current : Current timestamp, i.e., the timestamp corresponding to the time elapsed in the current reset phase; t start(i) : The timestamp of entering the i-th stage of reset; Formula for calculating remaining time: T remain = T est - (t current - t start(1) ) Tremain: Remaining reset time (in milliseconds); t start(1) : Reset start timestamp (unit: ms).

[0060] In summary, the key inventive points of this invention include: Timing Adaptive Decision Algorithm: Based on ECU type and load, the estimated time is dynamically calculated, and an adaptive timeout threshold is generated through a weighted formula to solve the misjudgment problem of traditional fixed thresholds without the need for hardware adjustment; Reset progress quantification model: Defines stage codes and weights, calculates real-time progress and remaining time through timestamps, realizes visualization of reset status, and breaks through the limitations of traditional binary result (success / failure) judgment.

[0061] Compared with the prior art, the present invention has the following beneficial effects: Significantly improved timing adaptability: Adaptive timeout threshold reduces false positive rate; Accurate reset status perception: Real-time progress quantification and remaining time prediction significantly shorten fault tracing time; No hardware dependency and strong adaptability: The entire process is implemented with pure software algorithms, supporting all existing UDS-compatible ECUs without hardware modification and with low engineering adaptation costs. The algorithm is highly scalable: the weight coefficients and thresholds in the core formula can be optimized through calibration to adapt to the reset requirements of different vehicle models and different types of ECUs.

[0062] like Figure 2 As shown, the present invention also provides an ECU reset detection device 200, comprising: The time estimation module 201 is used to obtain ECU characteristic parameters and calculate the theoretical time estimated for this reset using a weighted algorithm on the ECU characteristic parameters. The timeout threshold and interval calculation module 202 is used to determine the reset response timeout threshold and segmented waiting interval of the ECU based on the theoretical consumption time. The reset code acquisition module 203 is used to send a progress query command to the ECU to query the current reset stage according to the segmented waiting interval, so as to obtain the current reset stage code fed back by the ECU, and if the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. The weight determination module 204 is used to determine the weight corresponding to the current reset phase code based on the reset phase and corresponding weight contained in the extended UDS service response message. The reset detection module 205 is used to determine the reset progress based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time consumed in the current reset stage, and to determine the remaining reset time based on the theoretical time consumption and the time consumed in the current reset stage.

[0063] The ECU reset detection device provided in the above embodiments can realize the technical solutions described in the above ECU reset detection method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above ECU reset detection method embodiments, and will not be repeated here.

[0064] like Figure 3 As shown, the present invention also provides an electronic device 300. The electronic device 300 includes a processor 301, a memory 302, and a display 303. Figure 3 Only some components of the electronic device 300 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0065] In some embodiments, memory 302 may be an internal storage unit of electronic device 300, such as a hard disk or memory of electronic device 300. In other embodiments, memory 302 may also be an external storage device of electronic device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 300.

[0066] Furthermore, the memory 302 may include both internal storage units of the electronic device 300 and external storage devices. The memory 302 is used to store application software and various types of data installed on the electronic device 300.

[0067] In some embodiments, processor 301 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 302 or process data, such as the ECU reset detection method of the present invention.

[0068] In some embodiments, display 303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 303 is used to display information from electronic device 300 and to display a visual user interface. Components 301-303 of electronic device 300 communicate with each other via a system bus.

[0069] In some embodiments of the present invention, when the processor 301 executes the ECU reset detection program in the memory 302, the following steps can be implemented: Obtain ECU characteristic parameters, and use a weighted algorithm to calculate the estimated theoretical time consumption for this reset; Based on the theoretical time consumption, the reset response timeout threshold and segmented waiting interval of the ECU are determined; According to the segmented waiting interval, a progress query command for querying the current reset stage of the ECU is sent to the ECU to obtain the current reset stage code fed back by the ECU. If the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. Based on the reset phase and corresponding weight contained in the extended UDS service response message, determine the weight corresponding to the current reset phase code; Based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time already consumed in the current reset stage, the reset progress is determined, and based on the theoretical time consumption and the time already consumed in the current reset stage, the remaining reset time consumption is determined.

[0070] It should be understood that when the processor 301 executes the ECU reset detection program in the memory 302, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0071] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 300 mentioned. Electronic device 300 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 300 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0072] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the ECU reset detection method provided by the methods described above, the method comprising: Obtain ECU characteristic parameters, and use a weighted algorithm to calculate the estimated theoretical time consumption for this reset; Based on the theoretical time consumption, the reset response timeout threshold and segmented waiting interval of the ECU are determined; According to the segmented waiting interval, a progress query command for querying the current reset stage of the ECU is sent to the ECU to obtain the current reset stage code fed back by the ECU. If the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. Based on the reset phase and corresponding weight contained in the extended UDS service response message, determine the weight corresponding to the current reset phase code; Based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time already consumed in the current reset stage, the reset progress is determined, and based on the theoretical time consumption and the time already consumed in the current reset stage, the remaining reset time consumption is determined.

[0073] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0074] The ECU reset detection method, device, electronic device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An ECU reset detection method, characterized in that, include: Obtain ECU characteristic parameters, and use a weighted algorithm to calculate the estimated theoretical time consumption for this reset; Based on the theoretical time consumption, the reset response timeout threshold and segmented waiting interval of the ECU are determined; According to the segmented waiting interval, a progress query command for querying the current reset stage of the ECU is sent to the ECU to obtain the current reset stage code fed back by the ECU. If the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. Based on the reset phase and corresponding weight contained in the extended UDS service response message, determine the weight corresponding to the current reset phase code; Based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time already consumed in the current reset stage, the reset progress is determined, and based on the theoretical time consumption and the time already consumed in the current reset stage, the remaining reset time consumption is determined.

2. The ECU reset detection method according to claim 1, characterized in that, The ECU characteristic parameters include: ECU type, ECU current load, and ECU historical average reset time.

3. The ECU reset detection method according to claim 2, characterized in that, The formula for calculating the estimated theoretical time required for this reset is as follows: T est = T base (Type) × (1 + k×Load) ×α+ T hist ×(1 -α) Among them, T est This is the estimated theoretical time for this reset, where Type is the ECU type and T is the time taken. base (Type) represents the base reset time for different types of ECUs, k is the load influence coefficient, α is the preset weighting coefficient, Load is the current load of the ECU, and T hist This represents the average time taken for historical ECU resets.

4. The ECU reset detection method according to claim 1, characterized in that, Based on the theoretical time consumption, the reset response timeout threshold and segmented waiting interval of the ECU are determined, including: The reset response timeout threshold of the ECU is obtained by multiplying the theoretical time consumption by the preset redundancy coefficient. The segmented waiting interval of the ECU is obtained by dividing the theoretical time by the preset number of segments.

5. The ECU reset detection method according to claim 4, characterized in that, The preset redundancy coefficient is greater than 1.

6. The ECU reset detection method according to claim 1, characterized in that, The formula for calculating the reset progress is: Progress=w 已完成 + [(t current - t start(i) ) / (T est × ω i )] ×ω i Where Progress represents the reset progress, w 已完成 To reset the total weights of the completed phases, t current t represents the timestamp corresponding to the time elapsed in the current reset phase. start(i) For the timestamp of entering the i-th stage of reset, T est ω is the theoretical time estimated for this reset. i This represents the weight for the current reset phase.

7. The ECU reset detection method according to any one of claims 1-6, characterized in that, The formula for calculating the remaining reset time is: T remain = T est - (t current - t start(1) ), Among them, T remain To reset the remaining time, t start(1) For the timestamp of the reset start, T est The theoretical time t is the estimated time for this reset. current This is the timestamp corresponding to the time elapsed in the current reset phase.

8. An ECU reset detection device, characterized in that, include: The time estimation module is used to obtain ECU characteristic parameters, and to calculate the theoretical time estimated for this reset using a weighted algorithm on the ECU characteristic parameters. The timeout threshold and interval calculation module is used to determine the reset response timeout threshold and segmented waiting interval of the ECU based on the theoretical time consumption. The reset code acquisition module is used to send a progress query command to the ECU to query the current reset stage according to the segmented waiting interval, so as to obtain the current reset stage code fed back by the ECU, and if the current reset stage code fed back by the ECU is not obtained within the reset response timeout threshold, it is determined that the ECU reset has failed. The weight determination module is used to determine the weight corresponding to the current reset phase code based on the reset phase and corresponding weight contained in the extended UDS service response message. The reset detection module is used to determine the reset progress based on the theoretical time consumption, the weight corresponding to the current reset stage code, and the time consumed in the current reset stage, and to determine the remaining reset time based on the theoretical time consumption and the time consumed in the current reset stage.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the ECU reset detection method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the ECU reset detection method as described in any one of claims 1 to 7.