Fault detection method and device, storage medium and electronic device

CN120670195APending Publication Date: 2025-09-19BEIJING CHENZHI SEMICON TECH CO LTD
View PDF 0 Cites -1 Cited by

Patent Information

Application Number
CN202510537501.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-09-19

Smart Images

  • Figure CN120670195A_ABST
    Figure CN120670195A_ABST
Patent Text Reader

Abstract

The invention provides a fault detection method and device, a storage medium and an electronic device, and the method comprises the steps: obtaining first source data and second source data which are inputted to an automobile chip, and the collection conditions of the first source data and the second source data are the same; calculating a first digest value of the first source data, and calculating a second digest value of the second source data; comparing the first abstract value with the second abstract value to obtain a comparison result; and outputting a fault signal based on the comparison result. By adopting the scheme, the technical problem of low fault detection efficiency of the automobile chip in related technologies is solved, the fault detection problem in a big data scene can be efficiently processed, and the requirements of high real-time performance, high safety and high reliability of the automobile chip are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automotive chip technology, and in particular to a fault detection method and device, a storage medium, and an electronic device. Background Art

[0002] With the rapid development of electric vehicle (EV) technology, in-vehicle electronic systems are required to process massive amounts of data, such as image and sensor data. This places extremely high demands on the safety and reliability of automotive chips. The ISO26262 standard has strict regulations for the functional safety of automotive chips, including requirements for real-time and accurate fault detection.

[0003] Related fault detection methods employ dual- or triple-path redundancy to detect faults by comparing multiple inputs or calculation results. However, this approach presents significant physical implementation challenges when processing massive amounts of data, such as limitations on chip area and power consumption. Another challenge is bit-by-bit comparison: while it can detect fine-grained faults, the detection process consumes significant computing resources and time when the data volume is extremely large.

[0004] Currently, no effective solution has been found for the above-mentioned problems existing in the related technologies. Summary of the Invention

[0005] Embodiments of the present invention provide a fault detection method and device, a storage medium, and an electronic device.

[0006] According to one embodiment of the present invention, a fault detection method is provided, comprising: acquiring first source data and second source data input into an automotive chip, wherein the first source data and the second source data are collected under the same collection conditions; calculating a first summary value of the first source data, and calculating a second summary value of the second source data; comparing the first summary value and the second summary value to obtain a comparison result; and outputting a fault signal based on the comparison result.

[0007] Optionally, calculating the first summary value of the first source data includes: filling the first source data into a data block of a preset length; dividing the data block according to a fixed length to obtain multiple sub-data blocks; determining an initial hash value group of the hash algorithm, and using the initial hash value group to perform hash calculation on the multiple sub-data blocks to obtain a first summary value, wherein the initial hash value group includes multiple initial hash values.

[0008] Optionally, using the initial hash value group to perform hash calculation on the multiple sub-data blocks to obtain the first summary value includes: using the initial hash value group to perform hash calculation on the multiple sub-data blocks respectively to obtain corresponding multiple intermediate hash values: outputting the intermediate hash value of the last sub-data block among the multiple intermediate hash values ​​as the first summary value.

[0009] Optionally, comparing the first digest value and the second digest value to obtain a comparison result includes: determining whether the first digest value and the second digest value are consistent; if the first digest value and the second digest value are consistent, determining that the source data corresponding to the first digest value and the source data corresponding to the second digest value are the same; if the first digest value and the second digest value are inconsistent, determining that the source data corresponding to the first digest value and the source data corresponding to the second digest value are different.

[0010] Optionally, calculating the first summary value of the first source data and calculating the second summary value of the second source data include: determining the number of data groups to be grouped; splitting the first source data and the second source data into a first data set and a second data set based on the number of data groups, respectively, wherein the first data set and the second data set contain the same number of multiple data groups; calculating a first summary value set for multiple data groups in the first data set, and calculating a second summary value set for multiple data groups in the second data set, wherein each first summary value in the first summary value set corresponds to a data group in the first data set, and each second summary value in the second summary value set corresponds to a data group in the second data set.

[0011] Optionally, determining the number of data groups to be grouped includes one of the following: determining the number of first data groups to be grouped based on a fixed number; obtaining first attribute information of the first source data, and obtaining second attribute information of the second source data; dynamically calculating the number of second data groups to be grouped based on the first attribute information and the second attribute information.

[0012] Optionally, outputting a fault signal based on the comparison result includes: determining whether the first source data and the second source data are identical based on the comparison result; and outputting a fault indication signal if the first source data and the second source data are not identical.

[0013] According to another embodiment of the present invention, a fault detection device is provided, including: an acquisition module for acquiring first source data and second source data input into an automobile chip, wherein the acquisition conditions of the first source data and the second source data are the same; a calculation module for calculating a first summary value of the first source data and a second summary value of the second source data; a comparison module for comparing the first summary value and the second summary value to obtain a comparison result; and an output module for outputting a fault signal based on the comparison result.

[0014] Optionally, the calculation module includes: a filling unit, used to fill the first source data into a data block of a preset length; a splitting unit, used to split the data block according to a fixed length to obtain multiple sub-data blocks; a first calculation unit, used to determine an initial hash value group of the hash algorithm, and use the initial hash value group to perform hash calculation on the multiple sub-data blocks to obtain a first summary value, wherein the initial hash value group includes multiple initial hash values.

[0015] Optionally, the first calculation unit includes: a calculation subunit, used to use the initial hash value group to perform hash calculations on the multiple sub-data blocks respectively to obtain corresponding multiple intermediate hash values; an output subunit, used to output the intermediate hash value of the last sub-data block among the multiple intermediate hash values ​​as a first summary value.

[0016] Optionally, the comparison module includes: a judgment unit, used to judge whether the first digest value and the second digest value are consistent; a determination unit, used to determine that the source data corresponding to the first digest value and the source data corresponding to the second digest value are the same if the first digest value and the second digest value are consistent; if the first digest value and the second digest value are inconsistent, determine that the source data corresponding to the first digest value and the source data corresponding to the second digest value are different.

[0017] Optionally, the calculation module includes: a determination unit for determining the number of data groups to be grouped; a splitting unit for splitting the first source data and the second source data into a first data set and a second data set, respectively, based on the number of data groups, wherein the first data set and the second data set contain the same number of multiple data groups; a second calculation unit for calculating a first summary value set for multiple data groups in the first data set, and calculating a second summary value set for multiple data groups in the second data set, wherein each first summary value in the first summary value set corresponds to a data group in the first data set, and each second summary value in the second summary value set corresponds to a data group in the second data set.

[0018] Optionally, the determination unit includes one of the following: a first determination subunit, used to determine the number of first data groups to be grouped based on a fixed number; a second determination subunit, used to obtain first attribute information of the first source data, and obtain second attribute information of the second source data; dynamically calculate the number of second data groups to be grouped based on the first attribute information and the second attribute information.

[0019] Optionally, the output module includes: a judgment unit, used to judge whether the first source data and the second source data are the same based on the comparison result; and an output unit, used to output a fault indication signal if the first source data and the second source data are not the same.

[0020] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.

[0021] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0022] Through the present invention, first source data and second source data input into an automobile chip are obtained, wherein the collection conditions of the first source data and the second source data are the same; a first summary value of the first source data is calculated, and a second summary value of the second source data is calculated; the first summary value and the second summary value are compared to obtain a comparison result; a fault signal is output based on the comparison result, and by performing summary processing on the input first source data and the second source data, the amount of data comparison is reduced, the hardware resource occupation of the automobile chip is reduced, and the technical problem of low efficiency of fault detection of automobile chips in related technologies is solved. It can efficiently handle fault detection problems in big data scenarios and meet the requirements of high real-time performance, high security and high reliability of automobile chips. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0024] Figure 1 This is a hardware structure block diagram of a fault detection vehicle-mounted chip according to an embodiment of the present invention;

[0025] Figure 2 is a flowchart of a fault detection method according to an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of the system architecture of an embodiment of the present invention;

[0027] Figure 4 is a structural block diagram of a fault detection device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] The method embodiment provided in the first embodiment of the present application can be executed in a processor, an onboard chip, a vehicle, a computer or a similar electronic terminal. Taking running on an onboard chip as an example, Figure 1 This is a hardware structure diagram of a fault detection vehicle-mounted chip according to an embodiment of the present invention. Figure 1 As shown, the vehicle-mounted chip may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the above-mentioned vehicle chip may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned vehicle-mounted chip. For example, the vehicle-mounted chip may also include Figure 1More or fewer components than shown, or with Figure 1 Different configurations shown.

[0032] The memory 104 can be used to store on-board chip programs, for example, software programs and modules of application software, such as the on-board chip program corresponding to a fault detection method in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the on-board chip program stored in the memory 104, thereby implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the on-board chip via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and system instructions and perform code analysis tasks. The memory 104 is used to store configuration information, script information, etc.

[0033] The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communication provider of the vehicle-mounted chip. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] Optionally, the input and output device 108 further includes a human-computer interaction screen for obtaining human-computer interaction instructions through a human-computer interaction interface and for presenting a human-computer interaction interface;

[0035] In this embodiment, a fault detection method is provided. Figure 2 FIG. 1 is a flow chart of a fault detection method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0036] Step S202, obtaining first source data and second source data input to the automotive chip, wherein the first source data and the second source data are collected under the same conditions;

[0037] Optionally, the first source data and the second source data are data output from two channels of a same sensor of the vehicle, such as a dual-channel camera, a dual-channel sensor, etc.

[0038] The automotive chip of this embodiment can be an automotive chip / automotive-grade chip.

[0039] Step S204: calculating a first digest value of the first source data and calculating a second digest value of the second source data;

[0040] In this embodiment, the first digest value and the second digest value are abbreviated values, compressed values, or hash values ​​calculated on the first source data and the second source data using the same digest algorithm.

[0041] Optionally, the first digest value and the second digest value are abbreviated values, compressed values, or hash values ​​of the first source data and the second source data, respectively. When the first source data and the second source data are identical, the corresponding first digest value and the second digest value are identical; conversely, when the first source data and the second source data are different, the corresponding first digest value and the second digest value are different.

[0042] Step S206: Compare the first digest value and the second digest value to obtain a comparison result;

[0043] Step S208, outputting a fault signal based on the comparison result;

[0044] Through the above steps of this embodiment, the first source data and the second source data input into the automobile chip are obtained, wherein the collection conditions of the first source data and the second source data are the same; a first summary value of the first source data is calculated, and a second summary value of the second source data is calculated; the first summary value and the second summary value are compared to obtain a comparison result; a fault signal is output based on the comparison result. By performing summary processing on the input first source data and the second source data, the amount of data comparison is reduced, the hardware resource occupation of the automobile chip is reduced, and the technical problem of low efficiency of fault detection of automobile chips in related technologies is solved. It can efficiently handle fault detection problems in big data scenarios and meet the requirements of high real-time performance, high security and high reliability of automobile chips.

[0045] In this embodiment, different digest algorithms may be selected to calculate a first digest value of the first source data and to calculate a second digest value of the second source data.

[0046] In one implementation of this embodiment, calculating the first summary value of the first source data includes: padding the first source data into a data block of a preset length; dividing the data block according to a fixed length to obtain multiple sub-data blocks; determining an initial hash value group of the hash algorithm, and using the initial hash value group to perform hash calculation on the multiple sub-data blocks to obtain a first summary value, wherein the initial hash value group includes multiple initial hash values.

[0047] The process of calculating the second summary value of the second source data is similar and will not be repeated here.

[0048] In this embodiment, the digest algorithm is taken as SHA-256 (Secure Hash Algorithm 256-bit) algorithm for example.

[0049] Optionally, filling the first source data into a data block of a preset length includes: filling a symbol of a preset format at the end of the first source data so that the length of the filled data block meets a specific condition after being modulo the block size of the algorithm.

[0050] First, the input data (the first source data and the second source data) must be padded. Digest algorithms typically process fixed-length data blocks, but the input data can be of any length. Padding is done by adding extra bits to the end of the data so that the length of the padded data, modulo the algorithm's block size, meets specific conditions. For example, the SHA-256 algorithm has a block size of 512 bits, so the length of the padded data must be an integer multiple of 512 bits. Padding is done by first adding a 1 bit, then a number of 0 bits, and finally a 64-bit integer representing the length of the original data.

[0051] When data is segmented, the padded data block is divided into blocks of fixed length. For the SHA-256 algorithm, the length of each block is 512 bits.

[0052] The digest algorithm in this embodiment uses a fixed set of initial hash values. In SHA-256, there are eight 32-bit initial hash values ​​that are used to start the hash calculation process and calculate the digest value.

[0053] In one example, using the initial hash value group to perform hash calculations on the multiple sub-data blocks to obtain a first summary value includes: using the initial hash value group to perform hash calculations on the multiple sub-data blocks respectively to obtain corresponding multiple intermediate hash values: outputting the intermediate hash value of the last sub-data block among the multiple intermediate hash values ​​as the first summary value.

[0054] Each sub-data block is processed in turn using the initial hash value group. During the processing, each sub-data block uses the initial hash value group to perform a series of complex mathematical operations, including bit operations, addition operations, etc. The data of the current sub-data block is mixed with the intermediate hash value calculated based on the previous sub-data block to obtain the intermediate hash value of the current initial hash value, until the intermediate hash value of the last sub-database is calculated.

[0055] For example, the SHA-256 algorithm uses multiple functions, such as logic functions (e.g., Ch, Maj) and shift functions (e.g., Sigma0, Sigma1), to repeatedly process sub-data blocks and hash values. After multiple rounds of iterative calculations, an intermediate hash value is obtained for each processed sub-data block. When all sub-data blocks are processed, the intermediate hash value obtained from the last processed sub-data block is the summary value of the entire input data. In the SHA-256 algorithm, the final summary value is a 256-bit hash value presented as a hexadecimal string.

[0056] The digest algorithm of this embodiment has a collision-proof property. This collision-proof property means that it is theoretically difficult to find two different input data that produce the same digest value. This property ensures the uniqueness of the digest value in practical applications. Its principle is based on the following aspects: Digest value length limit: The digest value generated by the digest algorithm is usually fixed and relatively short. For example, the digest value generated by SHA-256 is 256 bits. However, the length of the input data can be arbitrary and potentially very long. From a mathematical perspective, the number of possible input data combinations is far greater than the number of possible digest value combinations. This means that the probability of finding two different input data producing the same digest value is extremely small. This situation is similar to finding two points in a large space that map to the same point in a smaller space, which is extremely difficult. The algorithm also has excellent obfuscation and diffusion properties: The digest algorithm has excellent obfuscation and diffusion properties. Obfuscation means that even a small change in the input data will result in a significant change in the digest value. In other words, changing any one bit of the input data can make the entire digest value appear completely different. Diffusion means that each bit of the input data affects multiple bits of the digest value. For example, the SHA-256 algorithm uses a variety of complex bitwise operations and functions to thoroughly mix and diffuse the information in the input data into the digest value. This property makes it virtually impossible for different input data to produce identical digest values. Even slight differences in the input data can significantly differ after the algorithm processes the final digest value. Based on mathematical puzzles: The security of many digest algorithms relies on known mathematical puzzles, such as the discrete logarithm problem and the large integer factorization problem. These puzzles are extremely difficult to solve with current computing power. To find two different input data that produce the same digest value, an attacker might need to solve these puzzles, which is almost impossible in practice. Therefore, digest algorithms based on these puzzles offer a certain degree of collision resistance, thereby ensuring the uniqueness of the digest value.

[0057] In this embodiment, when calculating the first digest value and the second digest value, the digest calculation can be performed directly on the first source data and the second source data, or the first source data and the second source data can be grouped first and then the digest calculation can be performed on multiple data groups to obtain the first digest value set and the second digest value set.

[0058] In another implementation of this embodiment, calculating the first summary value of the first source data and calculating the second summary value of the second source data include: determining the number of data groups to be grouped; splitting the first source data and the second source data into a first data set and a second data set based on the number of data groups, respectively, wherein the first data set and the second data set contain the same number of multiple data groups; calculating a first summary value set for multiple data groups in the first data set, and calculating a second summary value set for multiple data groups in the second data set, wherein each first summary value in the first summary value set corresponds to a data group in the first data set, and each second summary value in the second summary value set corresponds to a data group in the second data set.

[0059] The first data set includes N (N is an integer greater than 1) data groups, and the second data set includes N data groups. A summary calculation is performed on each data group in the first data set to obtain the corresponding first summary value. After the calculation of the first data set is completed, the first summary value set is obtained. The calculation process of the second summary value set is similar.

[0060] In one example, determining the number of data groups to be grouped includes one of the following: determining the number of first data groups to be grouped based on a fixed number; obtaining first attribute information of the first source data, and obtaining second attribute information of the second source data; dynamically calculating the number of second data groups to be grouped based on the first attribute information and the second attribute information.

[0061] Optionally, the first attribute information and the second attribute information can be data bit width, data frame rate or the system's real-time requirements for data. Since the acquisition conditions of the first source data and the second source data are the same, the first source data and the second source data come from the same device of the car (such as a sensor device). Therefore, under normal circumstances, the first attribute information and the second attribute information are also the same. If the first attribute information is different from the second attribute information, a fault signal can be directly output.

[0062] In this example, the first source data and the second source data are grouped and processed according to fixed size or dynamic rules, and a corresponding summary value is generated for each data group. The dynamic grouping rules can be adjusted based on the data bit width, frame rate, or system real-time requirements. The number of second data groups can be calculated based on the first attribute information and the second attribute information. The number of second data groups is positively correlated with the first attribute information or the second attribute information. For example, a larger bit width means a larger number of data groups, a larger frame rate means a larger number of data groups, and a higher system real-time requirement means a larger number of data groups.

[0063] In an example of this embodiment, comparing the first digest value and the second digest value to obtain a comparison result includes: determining whether the first digest value and the second digest value are consistent; if the first digest value and the second digest value are consistent, determining that the source data corresponding to the first digest value and the source data corresponding to the second digest value are the same; if the first digest value and the second digest value are inconsistent, determining that the source data corresponding to the first digest value and the source data corresponding to the second digest value are different.

[0064] In another example of this embodiment, the first source data and the second source data are respectively split into a first data set and a second data set. A first digest value set is calculated for multiple data groups in the first data set, and a second digest value set is calculated for multiple data groups in the second data set. Each set of digest values ​​in the first digest value set and the second digest value set are compared one by one. If the digest values ​​of a set are inconsistent, the corresponding data group is marked as a faulty group.

[0065] By grouping and comparing summary values, faults can be effectively detected, the fault location can be located more accurately, and a fault signal carrying the fault location can be output.

[0066] In this embodiment, outputting a fault signal based on the comparison result includes: determining whether the first source data and the second source data are identical based on the comparison result; and outputting a fault indication signal if the first source data and the second source data are not identical.

[0067] The fault indication signal is used to indicate that a device of the first source data and the second source data (such as a dual-channel camera, a dual-channel lidar) has failed.

[0068] Optionally, the vehicle's safety mechanism may be triggered based on the fault indication signal, such as entering a safety mode or notifying an upper-level system.

[0069] This embodiment proposes a fault detection method based on group comparison of data summaries. By summarizing the input data to reduce the amount of data comparison, and then performing group comparison on the summary results, it can effectively detect faults and output fault indication signals. This method is suitable for scenarios that process large amounts of data, such as image processing data streams in autonomous driving.

[0070] Figure 3 It is a schematic diagram of the system architecture of an embodiment of the present invention, including: a dual-channel data acquisition module 1, an algorithm processing module 1, a storage unit 1, a data summary generation module 1, a dual-channel data acquisition module 2, an algorithm processing module 2, a storage unit 2, a data summary generation module 2, group comparison units 1 to N, a fault detection and collection module, and a processor module.

[0071] The data summary generation module is used to input data from two or more data sources (such as dual-channel cameras or dual-channel sensor data). An efficient summary algorithm (such as a hash function or a compression algorithm) is used to generate a summary value for the input data. The summary algorithm has anti-collision characteristics, ensuring that the summary values ​​generated by different input data are unique. The algorithm processing module is a group processing module that groups the data according to fixed size or dynamic rules, and generates a corresponding summary value for each group of data. The dynamic grouping rules can be adjusted according to the data bit width, frame rate, or system real-time requirements. The comparison module includes multiple group comparison units, each group of comparison units corresponds to a group of summary values, and each group of summary values ​​of the two data is compared one by one. If a group of summary values ​​is inconsistent, it is marked as a fault group. The fault detection and collection module outputs a fault indication signal if any summary value comparison inconsistency is detected, and can optionally trigger a safety mechanism, such as entering safe mode or notifying the upper-level system.

[0072] The data summary-based group comparison fault detection method of this embodiment can efficiently handle fault detection problems in big data scenarios, meet the high security and high reliability requirements of automotive chips, and has broad application prospects.

[0073] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0074] Example 2

[0075] This embodiment also provides a fault detection device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0076] Figure 4 is a structural block diagram of a fault detection device according to an embodiment of the present invention. Figure 4 As shown, the device includes: an acquisition module 40, a calculation module 42, a comparison module 44, and an output module 46, wherein:

[0077] An acquisition module 40 is configured to acquire first source data and second source data input to the automotive chip, wherein the acquisition conditions of the first source data and the second source data are the same;

[0078] a calculation module 42, configured to calculate a first digest value of the first source data and a second digest value of the second source data;

[0079] a comparison module 44, configured to compare the first digest value and the second digest value to obtain a comparison result;

[0080] The output module 46 is configured to output a fault signal based on the comparison result.

[0081] Optionally, the calculation module includes: a filling unit, used to fill the first source data into a data block of a preset length; a splitting unit, used to split the data block according to a fixed length to obtain multiple sub-data blocks; a first calculation unit, used to determine an initial hash value group of the hash algorithm, and use the initial hash value group to perform hash calculation on the multiple sub-data blocks to obtain a first summary value, wherein the initial hash value group includes multiple initial hash values.

[0082] Optionally, the first calculation unit includes: a calculation subunit, used to use the initial hash value group to perform hash calculations on the multiple sub-data blocks respectively to obtain corresponding multiple intermediate hash values; an output subunit, used to output the intermediate hash value of the last sub-data block among the multiple intermediate hash values ​​as a first summary value.

[0083] Optionally, the comparison module includes: a judgment unit, used to judge whether the first digest value and the second digest value are consistent; a determination unit, used to determine that the source data corresponding to the first digest value and the source data corresponding to the second digest value are the same if the first digest value and the second digest value are consistent; if the first digest value and the second digest value are inconsistent, determine that the source data corresponding to the first digest value and the source data corresponding to the second digest value are different.

[0084] Optionally, the calculation module includes: a determination unit for determining the number of data groups to be grouped; a splitting unit for splitting the first source data and the second source data into a first data set and a second data set, respectively, based on the number of data groups, wherein the first data set and the second data set contain the same number of multiple data groups; a second calculation unit for calculating a first summary value set for multiple data groups in the first data set, and calculating a second summary value set for multiple data groups in the second data set, wherein each first summary value in the first summary value set corresponds to a data group in the first data set, and each second summary value in the second summary value set corresponds to a data group in the second data set.

[0085] Optionally, the determination unit includes one of the following: a first determination subunit, used to determine the number of first data groups to be grouped based on a fixed number; a second determination subunit, used to obtain first attribute information of the first source data, and obtain second attribute information of the second source data; dynamically calculate the number of second data groups to be grouped based on the first attribute information and the second attribute information.

[0086] Optionally, the output module includes: a judgment unit, used to judge whether the first source data and the second source data are the same based on the comparison result; and an output unit, used to output a fault indication signal if the first source data and the second source data are not the same.

[0087] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0088] Example 3

[0089] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0090] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0091] S1, obtaining first source data and second source data input to the automotive chip, wherein the first source data and the second source data are collected under the same collection conditions;

[0092] S2, calculating a first digest value of the first source data, and calculating a second digest value of the second source data;

[0093] S3, comparing the first digest value and the second digest value to obtain a comparison result;

[0094] S4, outputting a fault signal based on the comparison result.

[0095] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0096] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0097] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0098] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0099] S1, obtaining first source data and second source data input to the automotive chip, wherein the first source data and the second source data are collected under the same collection conditions;

[0100] S2, calculating a first digest value of the first source data, and calculating a second digest value of the second source data;

[0101] S3, comparing the first digest value and the second digest value to obtain a comparison result;

[0102] S4, outputting a fault signal based on the comparison result.

[0103] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0104] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0105] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

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

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

[0108] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0110] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A fault detection method, characterized in that: include: Acquire first source data and second source data input to the automotive chip, wherein the first source data and the second source data are collected under the same conditions; Calculating a first digest value of the first source data, and calculating a second digest value of the second source data; Comparing the first digest value and the second digest value to obtain a comparison result; A fault signal is output based on the comparison result.

2. The method according to claim 1, characterized in that Calculating a first summary value of the first source data includes: Filling the first source data into a data block of a preset length; Splitting the data block according to a fixed length to obtain a plurality of sub-data blocks; An initial hash value group of a hash algorithm is determined, and hash calculations are performed on the multiple sub-data blocks using the initial hash value group to obtain a first digest value, wherein the initial hash value group includes multiple initial hash values.

3. The method according to claim 2, characterized in that Performing hash calculation on the plurality of sub-data blocks using the initial hash value group to obtain a first digest value includes: The initial hash value group is used to perform hash calculations on the multiple sub-data blocks respectively to obtain corresponding multiple intermediate hash values: The intermediate hash value of the last sub-data block among the multiple intermediate hash values ​​is output as the first digest value.

4. The method according to claim 1, wherein Comparing the first digest value and the second digest value to obtain a comparison result includes: Determining whether the first digest value and the second digest value are consistent; If the first digest value and the second digest value are consistent, it is determined that the source data corresponding to the first digest value and the source data corresponding to the second digest value are the same; if the first digest value and the second digest value are inconsistent, it is determined that the source data corresponding to the first digest value and the source data corresponding to the second digest value are different.

5. The method according to claim 1, wherein Calculating a first digest value of the first source data and calculating a second digest value of the second source data include: Determine the number of data groups to be grouped; Splitting the first source data and the second source data into a first data set and a second data set respectively based on the number of data groups, wherein the first data set and the second data set include the same number of data groups; Calculate a first summary value set for multiple data groups in the first data set, and calculate a second summary value set for multiple data groups in the second data set, wherein each first summary value in the first summary value set corresponds to a data group in the first data set, and each second summary value in the second summary value set corresponds to a data group in the second data set.

6. The method according to claim 5, characterized in that Determining the number of data groups to be grouped includes one of the following: determining a number of first data groups to be grouped based on a fixed number; Acquire first attribute information of the first source data, and acquire second attribute information of the second source data; and dynamically calculate the number of second data groups to be grouped based on the first attribute information and the second attribute information.

7. The method according to claim 1, characterized in that Outputting a fault signal based on the comparison result includes: determining whether the first source data and the second source data are identical based on the comparison result; If the first source data and the second source data are different, a fault indication signal is output.

8. A fault detection device, characterized in that: include: An acquisition module, configured to acquire first source data and second source data input to the automotive chip, wherein the acquisition conditions of the first source data and the second source data are the same; a calculation module, configured to calculate a first digest value of the first source data and a second digest value of the second source data; a comparison module, configured to compare the first digest value and the second digest value to obtain a comparison result; An output module is used to output a fault signal based on the comparison result.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.