Storage fault detection method and device, vehicle-mounted equipment, storage medium and program product
By dividing memory partitions in the on-board controller and configuring priority, periodic checks and fault detection are performed on each memory partition, the illegal tampering of ROM memory is solved, and the security and stability of the vehicle control system are improved.
Patent Information
- Application Number
- CN202510392779.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, the ROM memory of the on-board controller lacks periodic inspection, resulting in the inability to detect storage failures in time, prevent illegal data tampering, and lack of partition priority definition and differentiated post-processing measures, affecting the safe operation of the vehicle control system.
By dividing storage partitions in the on-board controller and configuring priority, each storage partition is subject to periodic checks and fault detection, and corresponding fault processing strategies are performed according to the priority, including code reporting, repair processing and reset operations to ensure the integrity and security of the stored content.
Real-time fault detection of storage partitions is realized, illegal tampering is prevented, the safety and robustness of the vehicle control system is improved, and the stable operation of the vehicle controller is ensured.
Smart Images

Figure CN120276899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle control, and particularly to a storage fault detection method, device, vehicle-mounted device, storage medium and program product. Background Art
[0002] A read-only memory (ROM) is a core component of a vehicle-mounted controller. In particular, the accuracy and integrity of the ROM memory can directly affect the execution ability of the vehicle-mounted controller, and even lead to unexpected vehicle performance, thus endangering the personal safety of the people in the vehicle and around the vehicle. In related technologies, periodic checks on ROM storage are usually not supported, resulting in the inability to avoid real-time data illegal tampering / security protection requirements. In addition, there is also a lack of partitioning of the storage area, definition of the priority of the corresponding partition, and corresponding implementation of differentiated post-processing measures to achieve the purpose of ensuring the safe operation of the vehicle control system. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a storage fault detection method, device, vehicle-mounted device, storage medium and program product that can timely detect the storage faults of the controller.
[0004] In a first aspect, the present application provides a storage fault detection method applied to a vehicle-mounted controller, including:
[0005] Verifying the storage content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the verification result of each storage partition;
[0006] Performing fault detection based on the priority of each storage partition and the verification result of each storage partition to obtain a detection result.
[0007] In one embodiment, the performing fault detection based on the priority of each storage partition and the verification result of each storage partition to obtain a detection result includes:
[0008] For the verification result of each storage partition, if the verification result indicates that the target storage partition fails the verification, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the verification result.
[0009] In one embodiment, the performing fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result includes:
[0010] If the current fault detection count does not reach the preset detection count, for the next storage partition within the current cycle or the storage partition to be detected in the next cycle, return to execute the step of verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each storage partition;
[0011] If the current fault detection count reaches the preset detection count, perform fault detection according to the priority of the target storage partition to obtain a detection result.
[0012] In one embodiment, the performing fault detection according to the priority of the target storage partition to obtain a detection result includes:
[0013] Determine whether the priority of the target storage partition is a high priority;
[0014] If it is determined that the priority of the target storage partition is a high priority, perform error code reporting and repair processing on the fault of the target storage partition;
[0015] If it is determined that the priority of the target storage partition is not a high priority, perform error code reporting on the fault of the target storage partition.
[0016] In one embodiment, the performing repair processing on the fault of the target storage partition includes:
[0017] Control the vehicle-mounted controller to reset;
[0018] Perform re-inspection on the target storage partition after reset to obtain a re-inspection result;
[0019] If the re-inspection result indicates re-inspection failure, perform repair processing on the fault of the target storage partition according to the preset re-inspection count; if the re-inspection result indicates re-inspection success, control the vehicle-mounted controller to continue running.
[0020] In one embodiment, the performing repair processing on the fault of the target storage partition according to the preset re-inspection count includes:
[0021] If the current re-inspection count does not reach the preset re-inspection count, return to execute the step of controlling the vehicle-mounted controller to reset;
[0022] If the current re-inspection count reaches the preset re-inspection count, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
[0023] In one embodiment, the verifying the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the verification results of each storage partition includes:
[0024] Perform cyclic redundancy check on the stored contents in each storage partition of the vehicle-mounted controller within the current cycle to obtain the actual check values of each storage partition;
[0025] Compare the actual check values of each storage partition with the preset check values of each storage partition to obtain the check results of each storage partition.
[0026] In one embodiment, the method further includes:
[0027] Compile the original stored contents in each storage partition of the vehicle-mounted controller to generate compiled files for each storage partition;
[0028] Perform cyclic redundancy check on the compiled files of each storage partition to obtain the preset check values of each storage partition, and store the preset check values of each storage partition.
[0029] In a second aspect, the present application also provides a storage fault detection device, including:
[0030] A check module for checking the stored contents in each storage partition of the vehicle-mounted controller to obtain the check results of each storage partition;
[0031] A detection module for performing fault detection based on the priorities of each storage partition and the check results of each storage partition to obtain a detection result.
[0032] In a third aspect, the present application also provides a vehicle-mounted device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Check the stored contents in each storage partition of the vehicle-mounted controller within the current cycle to obtain the check results of each storage partition;
[0034] Perform fault detection based on the priorities of each storage partition and the check results of each storage partition to obtain a detection result.
[0035] In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Check the stored contents in each storage partition of the vehicle-mounted controller within the current cycle to obtain the check results of each storage partition;
[0037] Perform fault detection based on the priorities of each storage partition and the check results of each storage partition to obtain a detection result.
[0038] Fifth aspect, the present application further provides a computer program product, including a computer program, which when executed by a processor, implements the following steps:
[0039] Verify the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the verification results of each storage partition;
[0040] Perform fault detection based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result.
[0041] The above storage fault detection method, device, vehicle-mounted device, storage medium and program product verify the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the verification results of each storage partition, and perform fault detection based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result. By flexibly setting different storage partitions and corresponding priorities, and then combining the verification results of the storage partitions corresponding to the priorities for fault detection, the above method realizes hierarchical fault detection of storage partitions, can prevent the stored content in the storage partitions from being illegally tampered with, and can also improve the security and robustness of the control system operation; in addition, the above method proposes to perform periodic detection of the storage partitions when the vehicle-mounted controller starts to execute tasks, realizes real-time detection of the storage partitions, and can enable the vehicle controller to discover storage faults in time to ensure the operation stability of the vehicle controller. Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0043] Figure 1 It is an application environment diagram of the storage fault detection method in an embodiment;
[0044] Figure 2 It is a schematic flowchart of the storage fault detection method in an embodiment;
[0045] Figure 3 It is a schematic diagram of a storage partition in an embodiment;
[0046] Figure 4 It is a schematic flowchart of the storage fault detection method in an embodiment;
[0047] Figure 5 It is a schematic flowchart of the storage fault detection method in an embodiment;
[0048] Figure 6 One of the schematic diagrams of fault detection for a storage partition in an embodiment;
[0049] Figure 7 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0050] Figure 8 One of the schematic diagrams of fault detection for a storage partition in an embodiment;
[0051] Figure 9 One of the schematic diagrams of fault detection for a storage partition in an embodiment;
[0052] Figure 10 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0053] Figure 11 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0054] Figure 12 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0055] Figure 13 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0056] Figure 14 Schematic diagram of obtaining a preset check value in an embodiment;
[0057] Figure 15 One of the schematic flowcharts of a storage fault detection method in an embodiment;
[0058] Figure 16 Structural block diagram of a storage fault detection device in an embodiment;
[0059] Figure 17 Internal structure diagram of an in-vehicle device in an embodiment. Detailed implementation manners
[0060] In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0061] In the embodiments of the present application, the term "a plurality of" means two or more, and other quantifiers are similar thereto.
[0062] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0063] With the rapid development of intelligent vehicles, the diversification and functional complexity of in-vehicle controllers have ensued, correspondingly increasing the difficulty of detecting in-vehicle controllers; and the ROM is the core component of the in-vehicle controller, and the storage performance of the ROM can directly affect the execution ability of the in-vehicle controller, thereby affecting the safe operation of the intelligent vehicle control system.
[0064] In view of this, the embodiments of the present application propose a storage fault detection method, device, in-vehicle controller, storage medium and program product, which can meet the vehicle functional safety and information security requirements by dividing the storage area of the ROM and configuring corresponding priorities for each divided storage area for real-time fault checking.
[0065] It should be noted that the beneficial effects brought by the embodiments of the present application or the technical problems solved are not limited to this one, and there may be other implicit or related problems. For specific details, please refer to the descriptions in the following embodiments.
[0066] The storage fault detection method provided by the embodiments of the present application can be applied to the in-vehicle controller 101 as Figure 1 shown. The in-vehicle controller 101 is disposed on the vehicle 102, or can be disposed on the in-vehicle device of the vehicle 102, or connected to the in-vehicle device. The in-vehicle controller 101 can achieve various controls of the vehicle. The in-vehicle controller may include a power system, an input / output circuit, an A / D conversion channel, a memory, and a microcontroller unit (MCU), and the memory includes a ROM storage area for storing various control codes and control data, and is divided into multiple storage areas, and corresponding codes and data are stored in each storage area. Those skilled in the art can understand that Figure 1 the structure shown in
[0067] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the in-vehicle controller to which the solution of the present application is applied. The specific in-vehicle controller may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. Figure 2 In an exemplary embodiment, as Figure 1Taking the vehicle-mounted controller 101 in [Example] as an example, the following steps are included, where:
[0068] S201, Check the stored content in each storage partition in the vehicle-mounted controller within the current cycle to obtain the check results of each storage partition.
[0069] Among them, the check result is used to indicate that the corresponding storage partition passes the check or the corresponding storage partition fails the check; when the check result indicates that the corresponding storage partition passes the check, it indicates that there is a fault in the corresponding storage partition, or it indicates that the stored content in the corresponding storage partition is incorrect or tampered with; when the check result indicates that the corresponding storage partition passes the check, it indicates that there is no fault in the corresponding storage partition, or it indicates that the stored content in the corresponding storage partition is correct or not tampered with. Multiple storage partitions in the vehicle-mounted controller can be pre-divided according to the functional safety objectives and information security objectives of the vehicle, and are respectively set corresponding to each controller core on the vehicle-mounted controller. For example, as shown in Figure 3 shown, the vehicle-mounted controller includes controller core 0, controller core 1, controller core 2,........, controller core n, which are correspondingly divided into n storage partitions, and each storage partition corresponds to a controller core.
[0070] In the embodiments of the present application, the vehicle-mounted controller can pre-divide the storage space into multiple storage partitions according to the number of controller cores, and pre-define the functional safety objectives and information security objectives for the vehicle model project, and store the stored content such as code, data, and information in different storage partitions according to the target level. When the vehicle-mounted controller is running, it runs tasks based on a certain cycle, and within each current cycle, it can extract the stored content from each storage partition in real time, and use the corresponding check algorithm to check the stored content in each storage partition to obtain the check results of each storage partition. It should be noted that when performing real-time checks, each storage partition can be checked sequentially, or each storage partition can be checked simultaneously to obtain the check results of each storage partition.
[0071] S202, Perform fault detection according to the priorities of each storage partition and the check results of each storage partition to obtain the detection results.
[0072] Among them, the priorities of the storage partitions can be divided into high priority, medium priority, and low priority; optionally, the priorities of the storage partitions can also be divided into other priorities, and the division of priorities can be determined according to the actual detection strategy. The priorities of the storage partitions can be determined in advance according to the functional safety objectives and information security objectives defined in the vehicle model project, and the controller can store the stored contents such as code, data, and information in the storage partitions corresponding to the priorities according to the levels of the storage partitions. For example, important data such as braking and vehicle control parameters can be placed in the storage partitions with high priority. Again, for the functional safety objectives and information security objectives defined in the vehicle model project by the in-vehicle controller, the code and data are stored in different storage partitions according to the levels of the objectives, so as to define the priorities of each storage partition, such as Figure 3 As shown, among them, the code and data for implementing high-level functional safety objectives and information security objectives are stored in the storage partitions with high priority, and the code and data for implementing medium and low-level functional safety objectives and information security objectives are stored in the storage partitions with low priority.
[0073] In the embodiment of the present application, when the in-vehicle controller obtains the verification results of each storage partition based on the foregoing steps, it can determine the priorities of each storage partition, adopt the fault handling strategies corresponding to the priorities of each storage partition, and combine the verification results of each storage partition to perform fault detection on each storage partition to obtain the detection results. For example, for a storage partition, if the priority of the storage partition is high priority, the fault handling strategy corresponding to the high priority is adopted correspondingly, and the fault detection is performed on the storage partition in combination with the verification result of the storage partition to obtain the detection result corresponding to the storage partition with high priority; if the priority of the storage partition is low priority, the fault handling strategy corresponding to the low priority is adopted correspondingly, and the fault detection is performed on the storage partition in combination with the verification result of the storage partition to obtain the detection result corresponding to the storage partition with low priority. It should be noted that the above-mentioned fault handling strategy is used to represent the fault handling method for the storage partition, and the fault handling strategies corresponding to different priority storage partitions are different; the verification result of the above-mentioned storage partition indicates whether the storage partition passes the verification. If it passes the verification, it means that there is no fault in the storage partition; if it does not pass the verification, it means that there is a fault in the storage partition. At this time, the in-vehicle controller can adopt the corresponding fault handling strategy to handle the fault existing in the storage partition to ensure the stable operation of the control system of the controller.
[0074] Optionally, a verification function start module can be set on the in-vehicle controller. The verification function start module can be automatically triggered when the vehicle starts, or can be triggered by the user through the display interface of the in-vehicle controller; when the verification function start module is triggered, the in-vehicle controller starts the function of periodically verifying the storage partition and executes the method described in this embodiment for detection.
[0075] The storage fault detection method described in the above embodiments is applied to a vehicle-mounted controller. By verifying the stored content in each storage partition of the vehicle-mounted controller within the current cycle, the verification results of each storage partition are obtained, and fault detection is performed based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result. By flexibly setting different storage partitions and corresponding priorities, and then combining the verification results of the storage partitions corresponding to the priorities for fault detection, the method realizes hierarchical fault detection of the storage partitions, can prevent the stored content in the storage partitions from being illegally tampered with, and can also improve the security and robustness of the control system operation. In addition, the above method proposes to perform periodic detection of the storage partitions when the vehicle-mounted controller starts to execute tasks, realizes real-time detection of the storage partitions, and enables the vehicle controller to timely discover storage faults to ensure the operation stability of the vehicle controller.
[0076] In an exemplary embodiment, a fault detection method is provided, that is, the above S202 "performing fault detection based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result", as Figure 4 shown, includes:
[0077] S301, for the verification result of each storage partition, if the verification result indicates that the target storage partition fails the verification, then execute step S302; if the verification result indicates that the target storage partition passes the verification, then execute step S303.
[0078] The embodiment of the present application relates to a method for a controller to perform fault detection on each storage partition within a cycle. After obtaining the verification result by verifying each storage partition, if the verification result indicates that the target storage partition fails the verification, it means that there is a fault in the storage partition or the stored content in the storage partition is incorrect. At this time, corresponding fault handling strategies can be further adopted to handle the occurred faults; if the verification result indicates that the target storage partition passes the verification, it means that there is no fault in the storage partition or the stored content in the storage partition is correct. At this time, the next storage partition can be continued to be detected or the next round of fault detection can be performed.
[0079] S302, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result.
[0080] Wherein, the target storage partition is the storage partition corresponding to the verification result.
[0081] The embodiments of the present application relate to a fault handling method corresponding to the case where a storage partition fails or the stored content therein is incorrect; when a fault or incorrect stored content is detected, in order to avoid misjudgment by the vehicle-mounted controller, the vehicle-mounted controller can record the current number of fault detections, and when it is determined that the number of fault detections reaches a preset number of fault detections, then perform a fault detection according to the priority of the target storage partition to obtain a detection result; when it is determined that the number of fault detections does not reach the preset number of fault detections, if the target storage partition is not the last storage partition in the current cycle, then the stored content in the next storage partition can be continuously verified to obtain a verification result of the next storage partition, and then a fault detection is performed according to the priority of the next storage partition to obtain a detection result; if the target storage partition is the last storage partition in the current cycle, then the stored content in each storage partition of the next cycle can be verified, and a fault detection is performed according to the verification results of each storage partition of the next cycle and the priorities of each storage partition to obtain a detection result. Here, the detection method for each storage partition of the next cycle can return to execute the above-mentioned Figure 2 method described in the embodiment.
[0082] S303, for the next storage partition in the current cycle or the storage partition to be detected in the next cycle, return to execute the steps of S201 above.
[0083] The embodiments of the present application relate to a fault handling method corresponding to the case where no fault occurs in the target storage partition or the stored content therein is incorrect; when no fault or incorrect stored content is detected, if the target storage partition is not the last storage partition in the current cycle, then the stored content in the next storage partition can be continuously verified to obtain a verification result of the next storage partition, and then a fault detection is performed according to the priority of the next storage partition to obtain a detection result; if the target storage partition is the last storage partition in the current cycle, then the stored content in each storage partition to be detected in the next cycle can be verified, and a fault detection is performed according to the verification results of each storage partition of the next cycle and the priorities of each storage partition to obtain a detection result. Here, the detection method for each storage partition to be detected in the next cycle can return to execute the above-mentioned Figure 2 method described in the embodiment.
[0084] For the method described in the above embodiment, after verifying each storage partition, when the verification result indicates non-passing, the vehicle-mounted controller can first record the number of fault detections, and when the number of fault detections reaches the preset number of fault detections, then perform a fault confirmation and a post-processing mechanism, which can avoid false monitoring, improve the accuracy of fault detection, and further improve the operation stability of the control system.
[0085] In an exemplary embodiment, a fault detection method is provided, that is, the above-mentioned S202 "perform fault detection according to the priorities of each storage partition and the verification results of each storage partition to obtain a detection result", as Figure 5 shown, including:
[0086] S401, record the current number of detected faults, and compare the current number of detected faults with a preset number of detected faults; if the current number of detected faults has not reached the preset number of detected faults, then execute step S402; if the current number of detected faults has reached the preset number of detected faults, then execute step S403.
[0087] The embodiment of the present application relates to a method for a vehicle-mounted controller to confirm a fault. When the vehicle-mounted controller detects that the target storage partition fails the verification based on the foregoing steps, it can further record the current number of detected faults first, obtain the preset number of detected faults, and then compare the current number of detected faults with the preset number of detected faults. If the current number of detected faults has not reached the preset number of detected faults, it means that the verification result of the detected target storage partition may not be accurate at this time. To ensure the accuracy of the detection, the target storage partition is still not confirmed to have a fault at this time, and the target storage partition needs to be verified continuously; if the current number of detected faults has reached the preset number of detected faults, it means that the verification results of the detected target storage partition over a period of time all indicate that the verification is passed, then it is confirmed that the target storage partition has a fault or the stored content therein is incorrect, and fault handling needs to be performed at this time.
[0088] S402, for the next storage partition in the current cycle or the storage partition to be detected in the next cycle, return to execute the step of verifying the stored content in each storage partition in the vehicle-mounted controller to obtain the verification results of each storage partition.
[0089] The embodiments of the present application relate to a scenario where it is determined that the current number of detected faults has not reached the preset number of detections. In such a scenario, the controller determines whether the currently detected target storage partition is the last storage partition within the current cycle. If it is the last storage partition, for the next storage partition within the current cycle, the steps of verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each storage partition are returned for execution, so as to verify the next storage partition, and fault detection is performed based on the verification result of the next storage partition and the priority of the next storage partition to obtain a detection result. The above steps are repeatedly executed until the detection of the last storage partition of the current cycle is completed, and then the detection of each storage partition of the next cycle is entered. If it is not the last storage partition, for the storage partitions to be detected within the next cycle, the steps of verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each storage partition are returned for execution, so as to verify each storage partition in the next round, and fault detection is performed based on the verification results of each storage partition in the next round and the priorities of each storage partition in the next round to obtain a detection result. The above steps are repeatedly executed to achieve periodic fault detection of each storage partition. Exemplarily, refer to Figure 6 As shown, after the control system is initialized and started, the vehicle-mounted controller runs tasks based on a certain cycle (for example, time t) and completes a round of verification from storage partition 0 to storage partition n in real time at time t. If the verification results of storage partitions 0 to n all pass, the next round of storage verification is entered, and this cycle is repeated to ensure the real-time consistency and validity of the stored content in the storage partitions.
[0090] S403, perform fault detection according to the priority of the target storage partition to obtain a detection result.
[0091] The embodiments of the present application relate to a scenario where it is determined that the current number of detected faults has reached the preset number of detections. In such a scenario, the vehicle-mounted controller can start a fault handling mechanism to perform fault detection in combination with the priority of the target storage partition to obtain a detection result. Since the priorities of different storage partitions store stored content of different importance levels, different fault handling mechanisms are required for fault detection. Exemplarily, when the priority of the target storage partition is divided into high priority, medium priority, and low priority, the fault handling mechanism corresponding to the high priority is used to perform fault detection on the target storage partition to obtain the detection result of the target storage partition; the fault handling mechanism corresponding to the medium priority is used to perform fault detection on the target storage partition to obtain the detection result of the target storage partition; the fault handling mechanism corresponding to the low priority is used to perform fault detection on the target storage partition to obtain the detection result of the target storage partition.
[0092] The method described in the above embodiments proposes a method for fault detection by combining the priorities of target storage partitions, realizing hierarchical fault handling. It can accurately locate faults and efficiently handle faults at the same time, improving the security and stability of the control system.
[0093] In an exemplary embodiment, a fault detection method is provided, which is the above S403 "performing fault detection according to the priority of the target storage partition to obtain a detection result", as Figure 7 shown, including:
[0094] S501, determining whether the priority of the target storage partition is a high priority; if it is determined that the priority of the target storage partition is a high priority, then step S502 is executed; if it is determined that the priority of the target storage partition is not a high priority, then step S503 is executed.
[0095] S502, performing a fault code reporting process and a repair process on the fault of the target storage partition.
[0096] S503, performing a fault code reporting process on the fault of the target storage partition.
[0097] Embodiments of the present application relate to a method for fault detection based on the priority of a storage partition. The corresponding fault detection method includes: when the controller detects that the check result of the target storage partition indicates that the check fails, it is determined whether the priority of the target storage partition is a high priority. If it is determined that the priority of the target storage partition is a high priority, the fault handling strategy corresponding to the high priority can be used to perform fault detection on the target storage partition. At this time, on the one hand, the vehicle-mounted controller can perform a fault code reporting process on the fault of the target storage partition. Optionally, the vehicle-mounted controller can display the fault information on the display interface or output the fault information through other output devices to notify the user that there is a fault in the storage of the vehicle-mounted controller. On the other hand, the vehicle-mounted controller can perform a fault repair process on the fault of the target storage partition, and attempt to repair the storage partition or the tampering behavior of the stored content in the storage partition. If it is determined that the priority of the target storage partition is not a high priority, the fault handling strategy corresponding to the non-high priority can be used to perform fault detection on the target storage partition. At this time, the vehicle-mounted controller can perform a fault code reporting process on the fault of the target storage partition. Optionally, the vehicle-mounted controller can display the fault information on the display interface or output the fault information through other output devices to notify the user that there is a fault in the storage of the vehicle-mounted controller. It should be noted that since the stored content in the target storage partition with high priority is of high importance, embodiments of the present application also provide a mechanism for fault repair of the target storage partition when a fault in the target storage partition is detected to ensure the safe operation of the control system; since the stored content in the target storage partition with non-high priority is not of very high importance, it means that this fault will not affect the operation of the control system. Therefore, when a fault in the target storage partition is detected in embodiments of the present application, only a fault code reporting process is required.
[0098] Exemplarily illustrate the fault detection method for a storage partition with low priority. Refer to Figure 8 As shown, after the control system is initialized and started, the vehicle-mounted controller runs tasks based on a certain period (for example, time t) and completes a round of checks from storage partition 0 to storage partition n in real time at time t. Assume that at this time, it is found that the check result indicates that the check fails in the target storage segment partition with low priority (for example, storage partition 2). Then the vehicle-mounted controller enters the fault confirmation state and counts the number of fault detections, that is, after the count of the number of fault detections reaches N times continuously (N times is the preset detection times), the fault is confirmed to avoid misdiagnosis by the vehicle-mounted controller. After the fault of the target storage partition with low priority is confirmed, the vehicle-mounted controller reports the fault code to prompt the interested parties that the storage partition of the vehicle-mounted controller is damaged or illegally tampered with.
[0099] Exemplarily illustrate the fault detection method for a storage partition with high priority. Refer to Figure 9As shown, after the control system is initialized and started, the vehicle-mounted controller runs tasks based on a certain period (for example, time t), and completes a round of verification from storage partition 0 to storage partition n in real time at time t. Assume that at this time, in the target storage segment partition with high priority (such as storage partition n), it is found that the verification result indicates that the verification fails. Then the vehicle-mounted controller starts to enter the fault confirmation state, counts the number of fault detections, that is, after the number of fault detections continuously reaches N times (N times is the preset detection times), and then performs fault confirmation to avoid misdiagnosis by the vehicle-mounted controller. After the fault of the target storage partition with high priority is confirmed, the vehicle-mounted controller reports a fault code to prompt the stakeholders that the storage partition of the vehicle-mounted controller is damaged or illegally tampered with, and at the same time attempts to repair the storage partition or illegal tampering behavior through system reset and re-verification measures.
[0100] In an exemplary embodiment, a fault repair method is provided, as Figure 10 shown, the method includes:
[0101] S601, control the vehicle-mounted controller to perform a reset, and re-check the target storage partition after the reset to obtain a re-check result; if the re-check result indicates that the re-check fails, execute step S602; if the re-check result indicates that the re-check is successful, execute step S603.
[0102] S602, repair the fault of the target storage partition according to the preset number of re-checks.
[0103] S603, control the vehicle-mounted controller to continue running.
[0104] Among them, the preset number of re-checks can be determined in advance according to the detection requirements.
[0105] In the embodiment of the present application, when the vehicle-mounted controller determines that the target storage partition needs to be repaired according to the steps described in the foregoing embodiment, it can first control the vehicle-mounted controller to perform a reset, and then use the method described in the foregoing Figures 2 - 9 embodiment to re-check the target storage partition after the reset to obtain the re-check result corresponding to the target storage partition after the reset. If the re-check result indicates that the re-check fails, it means that the fault of the target storage partition has not been repaired yet. At this time, the above repair method can be used to repair the target storage partition several times, record the current number of re-checks for each repair, and compare the current number of re-checks with the preset number of re-checks. Finally, repair the fault of the target storage partition according to the comparison result; if the re-check result indicates that the re-check is successful, it means that the fault of the target storage partition has been repaired successfully. At this time, the vehicle-mounted controller can be controlled to continue running and continue to perform periodic storage partition detection.
[0106] In an exemplary embodiment, a fault repair method according to a preset number of re-checks is provided, asFigure 11 As shown, the method includes:
[0107] S701, repair the fault of the target storage partition according to the preset re-check times. If the current re-check times have not reached the preset re-check times, execute step S702; if the current re-check times have reached the preset re-check times, execute step S703;
[0108] S702, return to execute the step of controlling the vehicle-mounted controller to reset.
[0109] S703, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter the safe state.
[0110] In the embodiment of the present application, when the controller completes the re-check of the current target storage partition based on the steps described in the foregoing embodiment, record the current re-check times of the current repair, and compare the current re-check times with the preset re-check times. If the current re-check times reach the preset re-check times, and the re-check result after re-check is still that the target storage partition fails the verification, it means that the fault of the target storage partition cannot be repaired by reset, and the importance of the stored content in this high-priority target storage partition is very high. At this time, it is necessary to turn off the output of the vehicle-mounted controller, that is, turn off the vehicle control system, so that the vehicle-mounted controller enters the safe state, so as to avoid the operation disorder of the vehicle control system caused by the storage fault of the target storage partition, thereby improving the operation stability of the vehicle control system. For an exemplary description of the method described in the embodiment of the present application, see Figure 9 As shown, when the controller monitors a verification error in a high-priority storage partition, a quick re-check is performed on the faulty storage partition (such as Figure 9 the storage partition n in) through a reset measure. If the re-check passes after the vehicle-mounted controller is reset, the vehicle-mounted controller continues to run; if the re-check still fails after the vehicle-mounted controller is reset, the vehicle-mounted controller is reset and re-checked again until the number of resets reaches the upper limit of the preset re-check times. If the re-check still fails, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter the safe state. This embodiment sets up a multi-time re-check mechanism, which can improve the fault repair rate, can improve the repair success rate of the control system to a certain extent, and thus ensure the operation safety and stability of the control system.
[0111] In an exemplary embodiment, a method for verifying a storage partition is provided, such as Figure 12 As shown, the method includes:
[0112] S801, perform cyclic redundancy verification on the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the actual verification value of each storage partition.
[0113] Among them, cyclic redundancy check (CRC) is a verification method for verifying the consistency of stored data.
[0114] In the embodiments of the present application, the vehicle-mounted controller runs tasks based on a certain cycle at the running time, and uses the CRC verification algorithm to calculate the CRC verification results of the actual stored contents (including codes and data) in each storage partition in the controller in real time, that is, the actual verification values of each storage partition are obtained.
[0115] S802. Compare the actual verification values of each storage partition with the preset verification values of each storage partition to obtain the verification results of each storage partition.
[0116] In the embodiments of the present application, when the vehicle-mounted controller calculates the actual verification values of each storage partition based on the foregoing steps, the actual verification values of each storage partition can be compared with the preset verification values of each storage partition stored previously. If the actual verification value of the storage partition is consistent with the preset verification value of the storage partition stored previously, it is determined that the verification result indicates that the verification has passed; if the actual verification value of the storage partition is inconsistent with the preset verification value of the storage partition stored previously, it is determined that the verification result indicates that the verification has failed. It should be noted that the storage format of the preset verification value of the storage partition is the same as the storage format of the actual verification value of the storage partition. When the storage format of the calculated actual verification value of the storage partition is inconsistent with the storage format of the preset verification value of the storage partition, the vehicle-mounted controller also needs to convert the storage format of the actual verification value of the storage partition to be consistent with the storage format of the preset verification value of the storage partition. For example, the storage format of the preset verification value is a hex file.
[0117] In an exemplary embodiment, a method for obtaining the preset verification values of each storage partition is also provided, as Figure 13 shown. This method includes:
[0118] S901. Compile the original stored contents in each storage partition of the vehicle-mounted controller to generate the compiled files of each storage partition.
[0119] In the embodiments of the present application, during the development stage, the vehicle-mounted controller can generate the compiled files of each storage partition through a compiler based on the code compilation and software component process for the original stored contents (for example, the original code and data source files) that have passed the test verification. For example, a hex file is generated.
[0120] S902. Perform cyclic redundancy check on the compiled files of each storage partition to obtain the preset verification values of each storage partition, and store the preset verification values of each storage partition.
[0121] In the embodiments of the present application, after the vehicle-mounted controller generates the compiled files of each storage partition based on the original stored content, the cyclic redundancy check of the compiled files of each storage partition can be further performed through a specific CRC check algorithm to calculate the preset check values of each storage partition. Then, the preset check values of each storage partition are stored for later use to check each storage partition using the preset check values of each storage partition.
[0122] Illustratively describe the method described in the above embodiments, such as Figure 14 As shown, the vehicle-mounted controller can generate the hex files of each storage partition through a compiler based on the original stored content (e.g., original code and data source files) that has passed the test verification according to the code compilation and software component process, and calculate the CRC check values of the compiled files of each storage partition through a specific CRC check algorithm. Finally, the result containing the CRC check values is constructed through the hex integration tool, and the preset check values of each storage partition are finally obtained.
[0123] Based on the methods described in all the above embodiments, a storage fault detection method is provided, such as Figure 15 As shown, the method includes:
[0124] S1001, perform cyclic redundancy check on the stored content in each storage partition in the vehicle-mounted controller in the current cycle to obtain the actual check values of each storage partition.
[0125] S1002, compare the actual check values of each storage partition with the preset check values of each storage partition to obtain the check results of each storage partition.
[0126] S1003, for the check result of each storage partition, if the check result indicates that the target storage partition fails the check, record the number of detected faults, determine whether the current number of detected faults reaches the preset number of detected faults. If the current number of detected faults does not reach the preset number of detected faults, execute step S1004; if the current number of detected faults reaches the preset number of detected faults, execute steps S1005 - S1011;
[0127] S1004, for the next storage partition in the current cycle or the storage partition to be detected in the next cycle, return to execute step S1001 to re-detect the next storage partition or the storage partition to be detected in the next cycle.
[0128] S1005, determine whether the priority of the target storage partition is a high priority; if it is determined that the priority of the target storage partition is a high priority, execute step S1006; if it is determined that the priority of the target storage partition is not a high priority, execute step S1011;
[0129] S1006. Perform error code reporting for the faults of the target storage partition, control the vehicle-mounted controller to reset, and recheck the target storage partition after reset to obtain the recheck result. If the recheck result indicates recheck failure, execute step S1007; if the recheck result indicates recheck success, execute step S1010;
[0130] S1007. Repair the faults of the target storage partition according to the preset recheck times; if the current recheck times have not reached the preset recheck times, execute step S1008; if the current recheck times have reached the preset recheck times, execute step S1009;
[0131] S1008. Return to execute the step of controlling the vehicle-mounted controller to reset;
[0132] S1009. Turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter the safe state.
[0133] S1010. Control the vehicle-mounted controller to continue running;
[0134] S1011. Perform error code reporting for the faults of the target storage partition.
[0135] The method described in the above embodiments has been explained in each of the foregoing embodiments. For detailed content, please refer to the foregoing content and will not be elaborated here. Exemplarily, the above method achieves the following: at the running time, the vehicle-mounted controller calculates the current actual CRC check results of each storage partition in the vehicle-mounted controller based on a certain cycle for running tasks. Specifically, the microprocessor MCU of the above vehicle-mounted controller compares the CRC check results calculated in real time with the CRC reference values stored in the vehicle-mounted controller. If the check result passes, the vehicle-mounted controller passes the current round of storage check and proceeds to the next round of inspection; if the check result fails, the priority of the storage partition that fails the inspection is further determined; if the check fails for a storage partition with a low priority, the vehicle-mounted controller performs post-processing such as fault code reporting to prompt the interested parties of the damage or illegal tampering of the storage partition of the vehicle-mounted controller; if the check fails for a storage partition with a high priority, in addition to performing fault code reporting, the vehicle-mounted controller also needs to trigger a reset of the vehicle-mounted controller to attempt to repair the storage partition or the illegal tampering behavior, so as to avoid losses to personal safety or important vehicle information assets caused by abnormal operation of the vehicle-mounted controller, thereby improving the running safety and stability of the control system. In summary, the above method realizes the flexible setting of the storage partitions of key data according to the functional safety and information security objectives, and provides a method for real-time detecting the storage faults of the storage partitions, which can prevent data from being illegally tampered with; on the other hand, the above method also performs hierarchical degradation measures, taking into account the safety and robustness of the control system. In addition, the above method uses software verification to perform safety verification, without increasing the hardware cost and improving the fault detection efficiency.
[0136] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of the steps or stages in other steps or other steps.
[0137] Based on the same inventive concept, an embodiment of the present application further provides a storage fault detection device for implementing the storage fault detection method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the storage fault detection device provided below can refer to the limitations on the storage fault detection method in the above text and will not be repeated here.
[0138] In an exemplary embodiment, as Figure 16 shown, a storage fault detection device is provided, including:
[0139] A verification module 161, configured to verify the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the verification results of each storage partition.
[0140] A detection module 162, configured to perform fault detection based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result.
[0141] In an exemplary embodiment, the above detection module 162 includes:
[0142] A detection unit, configured to, for the verification result of each storage partition, if the verification result indicates that the target storage partition fails the verification, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the verification result.
[0143] In an exemplary embodiment, the above detection unit includes:
[0144] A first detection subunit, configured to, when the current number of detected faults does not reach the preset number of detected faults, return to execute the step of verifying the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the verification results of each storage partition for the next storage partition in the current cycle or the storage partition to be detected in the next cycle;
[0145] A second detection subunit, configured to, when the current number of detected faults reaches the preset number of detected faults, perform fault detection based on the priority of the target storage partition to obtain a detection result.
[0146] In an exemplary embodiment, the above-mentioned second detection subunit is specifically configured to determine whether the priority of the target storage partition is a high priority; if it is determined that the priority of the target storage partition is a high priority, error code reporting and repair processing are performed on the failure of the target storage partition; if it is determined that the priority of the target storage partition is not a high priority, error code reporting is performed on the failure of the target storage partition.
[0147] In an exemplary embodiment, the above-mentioned second detection subunit is further specifically configured to control the vehicle-mounted controller to be reset; perform re-checking on the target storage partition after reset to obtain a re-check result; if the re-check result indicates a re-check failure, repair processing is performed on the failure of the target storage partition according to the preset number of re-checks; if the re-check result indicates a successful re-check, control the vehicle-mounted controller to continue running.
[0148] In an exemplary embodiment, the above-mentioned second detection subunit is further specifically configured to, when the current number of re-checks has not reached the preset number of re-checks, return to execute the step of controlling the vehicle-mounted controller to be reset; when the current number of re-checks reaches the preset number of re-checks, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
[0149] In an exemplary embodiment, the above-mentioned verification module 161 includes:
[0150] A first verification unit, configured to perform cyclic redundancy verification on the stored content in each storage partition in the vehicle-mounted controller in the current cycle to obtain the actual verification value of each storage partition;
[0151] A second verification unit, configured to compare the actual verification value of each storage partition with the preset verification value of each storage partition to obtain the verification result of each storage partition.
[0152] In an exemplary embodiment, the above-mentioned storage fault detection device further includes:
[0153] A compilation module, configured to compile the original stored content in each storage partition in the vehicle-mounted controller to generate a compilation file for each storage partition;
[0154] An acquisition module, configured to perform cyclic redundancy verification on the compilation files of each storage partition to obtain the preset verification value of each storage partition, and store the preset verification value of each storage partition.
[0155] Each module in the above storage fault detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of the processor, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0156] The storage fault detection method provided by the embodiments of the present application can be applied to, for example, Figure 17 the in-vehicle device shown in Figure 17 The in-vehicle device includes a controller, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the controller, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the controller of the in-vehicle device is used to provide computing and control capabilities. The memory of the in-vehicle device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the in-vehicle device is used to exchange information between the controller and external devices. The communication interface of the in-vehicle device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the controller, it implements a storage fault detection method. The display unit of the in-vehicle device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the in-vehicle device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the in-vehicle device, or an external keyboard, touchpad, or mouse, etc.
[0157] Those skilled in the art can understand that Figure 17 the structure shown in
[0158] merely represents a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the in-vehicle device to which the solution of the present application is applied. The specific in-vehicle device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0159] Verify the stored content in each storage partition of the vehicle-mounted controller during the current cycle to obtain the verification results of each storage partition;
[0160] Perform fault detection based on the priorities of each storage partition and the verification results of each storage partition to obtain a detection result.
[0161] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0162] For the verification result of each storage partition, if the verification result indicates that the target storage partition fails the verification, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the verification result.
[0163] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0164] If the current number of detected faults has not reached the preset number of detected faults, for the next storage partition in the current cycle or the storage partition to be detected in the next cycle, return to execute the step of verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each storage partition;
[0165] If the current number of detected faults reaches the preset number of detected faults, perform fault detection based on the priority of the target storage partition to obtain a detection result.
[0166] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0167] Determine whether the priority of the target storage partition is a high priority;
[0168] If it is determined that the priority of the target storage partition is a high priority, perform fault code reporting and repair processing on the fault of the target storage partition;
[0169] If it is determined that the priority of the target storage partition is not a high priority, perform fault code reporting on the fault of the target storage partition.
[0170] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0171] Control the vehicle-mounted controller to reset;
[0172] Retest the target storage partition after reset to obtain a retest result;
[0173] If the retest result indicates a retest failure, repair the fault of the target storage partition according to the preset number of retest times; if the retest result indicates a retest success, control the vehicle-mounted controller to continue running.
[0174] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0175] If the current number of retest times has not reached the preset number of retest times, return to execute the step of controlling the vehicle-mounted controller to reset;
[0176] If the current number of retest times reaches the preset number of retest times, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
[0177] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0178] Perform cyclic redundancy check on the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the actual check value of each storage partition;
[0179] Compare the actual check value of each storage partition with the preset check value of each storage partition to obtain the check result of each storage partition.
[0180] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0181] Compile the original stored content in each storage partition of the vehicle-mounted controller to generate a compiled file for each storage partition;
[0182] Perform cyclic redundancy check on the compiled file of each storage partition to obtain the preset check value of each storage partition, and store the preset check value of each storage partition.
[0183] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0184] Perform check on the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the check result of each storage partition;
[0185] Perform fault detection according to the priority of each storage partition and the check result of each storage partition to obtain a detection result.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0187] For the verification result of each of the storage partitions, if the verification result indicates that the target storage partition fails the verification, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the verification result.
[0188] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0189] If the current number of detected faults has not reached the preset number of detected faults, return to execute the step of verifying the stored content in each storage partition in the vehicle-mounted controller to obtain the verification results of each storage partition for the next storage partition in the current cycle or the storage partition to be detected in the next cycle;
[0190] If the current number of detected faults reaches the preset number of detected faults, perform fault detection based on the priority of the target storage partition to obtain a detection result.
[0191] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0192] Determine whether the priority of the target storage partition is a high priority;
[0193] If it is determined that the priority of the target storage partition is a high priority, perform fault code reporting and repair processing on the fault of the target storage partition;
[0194] If it is determined that the priority of the target storage partition is not a high priority, perform fault code reporting on the fault of the target storage partition.
[0195] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0196] Control the vehicle-mounted controller to reset;
[0197] Perform re-verification on the target storage partition after reset to obtain a re-verification result;
[0198] If the re-verification result indicates re-verification failure, perform repair processing on the fault of the target storage partition according to the preset number of re-verification times; if the re-verification result indicates re-verification success, control the vehicle-mounted controller to continue running.
[0199] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0200] If the current number of re-verification times has not reached the preset number of re-verification times, return to execute the step of controlling the vehicle-mounted controller to reset;
[0201] If the current number of rechecks reaches the preset number of rechecks, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0203] Perform cyclic redundancy check on the stored contents in each storage partition of the vehicle-mounted controller within the current cycle to obtain the actual check values of each storage partition;
[0204] Compare the actual check values of each storage partition with the preset check values of each storage partition to obtain the check results of each storage partition.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0206] Compile the original stored contents in each storage partition of the vehicle-mounted controller to generate compiled files for each storage partition;
[0207] Perform cyclic redundancy check on the compiled files of each storage partition to obtain the preset check values of each storage partition, and store the preset check values of each storage partition.
[0208] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps:
[0209] Perform check on the stored contents in each storage partition of the vehicle-mounted controller within the current cycle to obtain the check results of each storage partition;
[0210] Perform fault detection according to the priorities of each storage partition and the check results of each storage partition to obtain a detection result.
[0211] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0212] For the check result of each storage partition, if the check result indicates that the target storage partition fails the check, record the number of detected faults, and perform fault detection according to the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the check result.
[0213] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0214] If the current fault detection count does not reach the preset detection count, then for the next storage partition within the current cycle or the storage partition to be detected in the next cycle, return to execute the step of verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each storage partition;
[0215] If the current fault detection count reaches the preset detection count, then perform fault detection according to the priority of the target storage partition to obtain a detection result.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0217] Determine whether the priority of the target storage partition is a high priority;
[0218] If it is determined that the priority of the target storage partition is a high priority, then perform error code reporting and repair processing on the fault of the target storage partition;
[0219] If it is determined that the priority of the target storage partition is not a high priority, then perform error code reporting on the fault of the target storage partition.
[0220] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0221] Control the vehicle-mounted controller to be reset;
[0222] Perform re-inspection on the target storage partition after reset to obtain a re-inspection result;
[0223] If the re-inspection result indicates re-inspection failure, then perform repair processing on the fault of the target storage partition according to the preset re-inspection count; if the re-inspection result indicates re-inspection success, then control the vehicle-mounted controller to continue running.
[0224] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0225] If the current re-inspection count does not reach the preset re-inspection count, then return to execute the step of controlling the vehicle-mounted controller to be reset;
[0226] If the current re-inspection count reaches the preset re-inspection count, then turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
[0227] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0228] Perform cyclic redundancy check on the stored content in each storage partition of the vehicle-mounted controller within the current cycle to obtain the actual verification values of each storage partition;
[0229] Compare the actual check values of each of the storage partitions with the preset check values of each of the storage partitions to obtain the check results of each of the storage partitions.
[0230] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0231] Compile the original storage content in each storage partition in the vehicle-mounted controller to generate a compiled file for each of the storage partitions;
[0232] Perform a cyclic redundancy check on the compiled file of each storage partition to obtain the preset check value of each storage partition, and store the preset check value of each storage partition.
[0233] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0234] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0235] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for detecting storage faults, characterized in that, Applied to a vehicle-mounted controller, the method includes: Checking the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the check results of each storage partition; Performing fault detection based on the priorities of each storage partition and the check results of each storage partition to obtain a detection result.
2. The method according to claim 1, wherein The performing fault detection based on the priorities of each storage partition and the check results of each storage partition to obtain a detection result includes: For the check result of each storage partition, if the check result indicates that the target storage partition fails the check, record the number of detected faults, and perform fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result; the target storage partition is the storage partition corresponding to the check result.
3. The method according to claim 2, wherein The performing fault detection based on the current number of detected faults of the target storage partition and the priority of the target storage partition to obtain a detection result includes: If the current number of detected faults has not reached the preset number of detected faults, return to execute the step of checking the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the check results of each storage partition for the next storage partition in the current cycle or the storage partition to be detected in the next cycle; If the current number of detected faults reaches the preset number of detected faults, perform fault detection based on the priority of the target storage partition to obtain a detection result.
4. The method according to claim 3, characterized in that, The performing fault detection based on the priority of the target storage partition to obtain a detection result includes: Determining whether the priority of the target storage partition is a high priority; If it is determined that the priority of the target storage partition is a high priority, perform fault code reporting and repair processing on the fault of the target storage partition; If it is determined that the priority of the target storage partition is not a high priority, perform fault code reporting on the fault of the target storage partition.
5. The method according to claim 4, characterized in that, The performing repair processing on the fault of the target storage partition includes: Controlling the vehicle-mounted controller to reset; Performing re-check on the target storage partition after reset to obtain a re-check result; If the re-check result indicates re-check failure, perform repair processing on the fault of the target storage partition according to the preset number of re-checks; if the re-check result indicates re-check success, control the vehicle-mounted controller to continue running.
6. The method according to claim 5, characterized in that The performing repair processing on the fault of the target storage partition according to the preset number of re-checks includes: If the current number of re-checks has not reached the preset number of re-checks, return to execute the step of controlling the vehicle-mounted controller to reset; If the current number of re-checks reaches the preset number of re-checks, turn off the output of the vehicle-mounted controller to make the vehicle-mounted controller enter a safe state.
7. The method according to any one of claims 1-6, characterized in that, The checking the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the check results of each storage partition includes: Performing cyclic redundancy check on the stored content in each storage partition of the vehicle-mounted controller in the current cycle to obtain the actual check values of each storage partition; Compare the actual check values of each of the storage partitions with the preset check values of each of the storage partitions to obtain the check results of each of the storage partitions.
8. The method according to claim 7, wherein The method further includes: Compile the original stored content in each storage partition of the vehicle-mounted controller to generate a compiled file for each of the storage partitions; Perform cyclic redundancy check on the compiled files of each of the storage partitions to obtain the preset check values of each of the storage partitions, and store the preset check values of each of the storage partitions.
9. A storage fault detection device, characterized in that, The device includes: A verification module for verifying the stored content in each storage partition of the vehicle-mounted controller to obtain the verification results of each of the storage partitions; A detection module for performing fault detection based on the priorities of each of the storage partitions and the verification results of each of the storage partitions to obtain a detection result.
10. A vehicle-mounted device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.