Method and device for enhancing cyclic redundancy check, electronic equipment and medium
By generating CRC failure code to change CRC verification messages, the problem that traditional CRC verification cannot detect data transmission errors in autonomous driving systems is solved, achieving higher safety and reliability.
Patent Information
- Application Number
- CN202410065691.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional CRC verification has the problem of CRC failure in autonomous driving systems, resulting in safety hazards and inability to effectively detect errors during data transmission.
Generate a CRC failure code that can cause CRC verification failure. By changing the original message or verification code, the CRC verification result fails, thereby evaluating and avoiding CRC failure.
It enhances the safety and reliability of CRC verification, can effectively detect and evaluate CRC failures, and improves the data transmission reliability of autonomous driving systems.
Smart Images

Figure CN120336072A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to computer technology, and more particularly, to methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for enhancing Cyclic Redundancy Check (CRC). Background Art
[0002] Cyclic Redundancy Check (CRC) is a hash function that generates a short fixed-length check code based on data such as network data packets or computer files, mainly used to detect or verify possible errors in data transmission or storage. The generated number is calculated before transmission or storage and appended to the data, and then the receiving party verifies the data integrity to determine whether the data has changed.
[0003] There is a possibility of CRC check failure or incorrect check results. CRC check failure means that some errors or changes occur in the message after CRC encoding during transmission, but the result of CRC decoding still indicates that the data has not changed, that is, the CRC check fails to detect the errors or changes.
[0004] In the era of autonomous driving, the safety requirements of vehicles are becoming increasingly strict. Traditional CRC checks cannot handle the above-mentioned CRC failures, which poses a challenge to the widely used CRC checks. Due to the existence of CRC failures, products using the CRC check algorithm always have potential safety hazards. Therefore, it is necessary to further analyze and study the problem of CRC check failure to enhance the reliability of CRC. Summary of the Invention
[0005] In view of this, embodiments of the present disclosure provide a technical solution for generating CRC failure codes that can cause CRC check failures to avoid or evaluate potential CRC failure check results, thereby enhancing the security and reliability of CRC checks.
[0006] According to a first aspect of the present disclosure, there is provided a method for enhancing Cyclic Redundancy Check (CRC). The method includes: obtaining an original message to be protected using the CRC algorithm; and determining at least one CRC failure code based on the original message and a generating polynomial of the CRC algorithm, where the at least one CRC failure code is used to change a protected message including the original message and a corresponding CRC check code such that a CRC check for the changed protected message results in a failed check result.
[0007] According to a second aspect of the present disclosure, there is provided an apparatus for enhancing CRC. The apparatus includes: an acquisition unit configured to acquire an original message to be protected using a CRC algorithm; and a determination unit configured to determine at least one CRC failure code based on the original message and a generation polynomial of the CRC algorithm, the at least one CRC failure code being used to change a protected message including the original message and a corresponding CRC check code such that a CRC check for the changed protected message results in a failure check result.
[0008] According to a third aspect of the present disclosure, there is provided an electronic device, including: a processing unit; and a memory coupled to the processing unit and storing instructions for execution by the processing unit, the instructions when executed by the processing unit cause the electronic device to execute the method according to the first aspect.
[0009] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium including machine-executable instructions that, when executed by a device, cause the device to execute the method according to the first aspect.
[0010] According to a fifth aspect of the present disclosure, there is provided a computer program product including machine-executable instructions that, when executed by a device, cause the device to execute the method according to the first aspect.
[0011] This content is provided in part to introduce a selection of concepts in a simplified form, which will be further described in the detailed implementation below. This content is not intended to identify the key features or essential features of the present disclosure, nor is it intended to limit the scope of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] By describing the exemplary embodiments of the present disclosure in more detail in conjunction with the drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent, where in the exemplary embodiments of the present disclosure, the same reference numerals generally represent the same components.
[0013] Figure 1 A schematic block diagram showing an example environment in which some embodiments of the present disclosure can be implemented;
[0014] Figure 2 A schematic diagram showing a protected message schematically including an original message and a check code;
[0015] Figure 3 A schematic flowchart showing a method for enhancing CRC according to some embodiments of the present disclosure;
[0016] Figures 4A to 4C A schematic diagram showing CRC-based encoding and decoding according to some embodiments of the present disclosure
[0017] Figure 5A and 5B shows an example of a failed CRC check result according to some embodiments of the present disclosure;
[0018] Figure 6 shows a schematic block diagram of a device for enhanced CRC according to some embodiments of the present disclosure; and
[0019] Figure 7 shows a schematic block diagram of an example device that can be used to implement embodiments of the present disclosure. Detailed Description of Specific Embodiments
[0020] It can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws, regulations and related provisions.
[0021] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0022] As used herein, the term "comprising" and its variations mean open-ended inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.
[0023] It should be noted that the numbers or numerical values used herein are for the convenience of understanding the technology of the present disclosure, rather than limiting the scope of the present disclosure.
[0024] CRC failure means that there are some errors or changes during the transmission of CRC encoding, but the result of CRC decoding is still that the data has no errors or changes. All previous products using CRC directly use the CRC check algorithm. However, few people pay attention to the scenario of CRC failure, which is crucial for functional safety. In some scenarios with high security requirements, such as automotive-grade chips, it is necessary to find the data that causes CRC failure to evaluate the result of CRC failure or further avoid CRC failure in certain scenarios. In the case of CRC failure, such as the failure caused by multiple burst errors due to electromagnetic interference, this common failure situation should be studied and evaluated to further improve the reliability of the product, especially in scenarios beyond the theoretical failure rate of CRC check.
[0025] In view of this, embodiments of the present disclosure provide a method for generating a CRC failure code, which can help conduct targeted research on CRC failures caused by some special failures and further improve the security and reliability of CRC. The generated CRC failure code can be applied to the CRC-protected message, changing the CRC-protected message, but the changed CRC message can still successfully pass the CRC check. Therefore, these failure codes can be used to evaluate the specific impact of CRC failure on the product, avoid CRC failure problems, and further improve the security and reliability of the product.
[0026] Figure 1 A schematic block diagram showing an example environment in which some embodiments of the present disclosure can be implemented is shown. The example environment includes a computing device 110, an original message 101 input to the computing device 110, and a failure code 105 output by the computing device 110. The computing device 110 can be any suitable centralized or distributed computing device, including but not limited to a personal computer, a server, a client, a handheld or laptop device, a multiprocessor, a microprocessor, a set-top box, a programmable consumer electronic product, a network PC, a minicomputer, a mainframe computer system, and a distributed cloud and combinations thereof, etc. The original message 101 can be a message or data to be protected using the CRC algorithm.
[0027] As shown in the figure, the computing device 110 can include a CRC algorithm 115 and a failure code generator 112 implemented by software or hardware or a combination of both. In some implementations, the computing device 110 can have one or more CRC algorithms 115, for example, CRC-16 (multiple variants), CRC-CCITT (multiple variants), CRC-32, etc.
[0028] Each CRC algorithm 115 has a corresponding generating polynomial. Using the generating polynomial, a CRC check code corresponding to the original message 101 can be generated. Usually, the original message 101 and the CRC check code can be transmitted together, and the receiving party can determine whether an error has occurred during the transmission process and whether the message has changed through CRC checking. As mentioned above, in some scenarios, although the transmitted message has changed, the CRC check result may still indicate that no error or message change has occurred, that is, there is a problem of CRC failure.
[0029] According to an embodiment of the present disclosure, the failure code generator 112 can generate a failure code 105 that causes CRC failure for a given original message 101 and CRC algorithm 115. The embodiments of the present disclosure can analyze the cause of CRC failure by cracking CRC checking, evaluate the result of CRC failure, and further avoid CRC failure.
[0030] Figure 2 A schematic diagram of a protected message including an original message and a check code is shown. Generally, using the CRC algorithm 115, the sender calculates the CRC check code 102 from the original message 101 using a certain formula, combines the original message 101 and the check code 102 together to form a protected message 103 and sends it to the receiving party. The receiving party performs a check operation on the received data, and the result that should be obtained is 0. If the calculation result is not 0 during CRC checking, it means that an error has occurred during the transmission process, and the receiving party can request the sender to resend the original message 101. The following is the basic process of CRC checking, including CRC encoding and CRC decoding.
[0031] The input of CRC encoding can include: the original message 101, which can be represented as M(x), that is, the message that needs to be protected using the CRC algorithm. The input of CRC encoding also includes the generating polynomial G(x), and different CRC algorithms have different generating polynomials. The generating polynomial can be represented in the form of a binary number, where "1" represents that the coefficient corresponding to the polynomial term is 1, and "0" represents that the coefficient corresponding to the polynomial term is 0. The binary number is used to divide the original message, and the generated remainder is the CRC check code. The output of CRC encoding can be represented as T(x), which is the actual transmission message with the CRC check code added. Table 1 below shows exemplary CRC algorithms and their generating polynomials
[0032] Table 1
[0033]
[0034]
[0035] Generally, the CRC encoding process can be implemented through the following formula:
[0036] M(x) × x r ÷ G(x) = Q(x) ……R(x) Equation (1)
[0037] where the dividend is M(x)×x r , by shifting the original message M(x) left by r bits, where r is the number of bits of the binary number of the generating polynomial minus 1. The divisor is G(x), the quotient is Q(x), and the remainder is R(x). It should be noted that the division used here is modulo-2 division, that is, the addition and subtraction without carry or borrow are used, which is equivalent to exclusive-or operation. The remainder R(x) is the check code added to the original message 101. Therefore, the transmitted message T(x) = M(x) and R(x), expressed as is the exclusive-or operator.
[0038] According to the above Equation (1), we can get
[0039] In addition, there is
[0040] That is, T(x) = Q(x)×G(x). We can get
[0041] T(x) mod G(x) = 0 Equation (2)
[0042] Therefore, the receiving party can determine whether the message T(x) has changed during transmission by detecting whether the received message 103 can be divided by G(x) (the corresponding binary number). If the remainder is 0, it means that there is no error during transmission and the message has not changed. Although the CRC algorithm has become very reliable, there is still a certain chance of failure. For CRC16, the error rate is 0.0015% (1 / 65536). This means that some errors have occurred in the transmitted message, but the CRC decoder did not detect them. Next, the process of generating a failure code according to an embodiment of the present disclosure is described. The failure code changes a given transmitted message in a specific manner, but the CRC decoder cannot detect this change.
[0043] Figure 3 FIG. shows a schematic flowchart of a method 300 for enhancing CRC according to some embodiments of the present disclosure. Generally, the method 300 is used to generate the failure code mentioned above. The method 300 can be implemented by any computing-capable electronic device (for example, a desktop computer, a laptop computer, a server, a vehicle-mounted device, a vehicle-mounted computing unit, etc.), for example Figure 1 the computing device 110 shown. For ease of understanding, the method 300 is described in combination with Figure 1 and Figure 2 to describe the method 300.
[0044] At block 310, obtain the original message to be protected using the CRC algorithm. Computing device 110 may obtain the original message 101 to be protected using the CRC algorithm. In some embodiments, the original message 101 may be, for example, one or more messages received or generated in a vehicle system, such as sensor data. In some embodiments, computing device 110 may generate a CRC check code for the original message 101 based on the selected CRC algorithm, and combine the original message 101 and the CRC check code 102 to form a protected message 103. The CRC algorithm may be a CRC algorithm applied or to be applied to a vehicle system, for example, one CRC algorithm selected from algorithms such as CRC-16, CRC-CCITT, CRC-DNP, CRC-32, etc.
[0045] At block 320, determine at least one CRC failure code based on the original message and the generating polynomial of the CRC algorithm. The CRC failure code 105 may be used to change the protected message 103, but the calculated result after decoding by the CRC decoder is still 0, that is, a failed check result is generated for the CRC check of the changed protected message 103. In some embodiments, a binary number corresponding to the generating polynomial of the CRC algorithm (i.e., G(x)) may be used as the divisor, and the protected message 103 (i.e., T(x)) may be used as the dividend to calculate the remainder. A remainder of 0 indicates that the changed protected message is divisible by this binary number. In other words, the CRC failure code destroys the correctness of the protected message 103, but is not detected by the decoding party, which cracks the current CRC algorithm.
[0046] The process of generating the failure code 105 with cracking ability is illustrated by the following example. If the protected message T(x) is damaged during transmission, some of its bits are changed. For example, the 10-bit long protected message T(x) is "1001100011", but due to external interference, errors occur in the most significant bit and the least significant bit, so the received data changes to " 0 00110001 0 ", which is denoted as W(x). In fact, W(x) can be expressed as the superposition of the protected message and the error information, that is, where the error information E(x) is = "1000000001", is the exclusive OR operation.
[0047] In some embodiments, the error E(x) and the protected message T(x) have the same length. For the bits in T(x) where an error occurs, the corresponding bits in E(x) are set to "1", and for the bits in T(x) where no error occurs, the corresponding bits in E(x) are set to "0". This is because an error in a bit of T(x) means the value of that bit is inverted, e.g., from 1 to 0, or from 0 to 1. An important property of the exclusive-or operation (XOR) is that the result of XORing any binary bit with 1 is the opposite value. Thus, we can obtain
[0048]
[0049] where W(x) is the received modified message and E(x) is the failure code carrying error information.
[0050] According to the above formula (2), T(x) mod G(x) = 0, we can obtain
[0051] Thus, we obtain:
[0052]
[0053] As can be seen from formula (4), if the error information E(x) is not equal to 0 and is divisible by the binary number corresponding to the generating polynomial, the CRC check will produce a failed check result. Therefore, such error information E(x) can be determined as the failure code 105.
[0054] In some embodiments, to determine the failure code 105, the binary number corresponding to the generating polynomial can be determined, and an integer multiple of this binary number can be determined as the CRC failure code. For example, integers can be traversed starting from 1 as multiples, multiplied by the binary number of the generating polynomial, and the resulting non-zero calculation result can be extended to a binary number of the same length as the protected message as the CRC failure code.
[0055] Some of the failure codes that comply with formula (4) may only change the original message part 101 in the protected message, or some failure codes may only change the CRC check code part 102 in the protected message, or some failure codes may change both the original message part 101 and the check code part 102. In some embodiments, the computing device 110 may select a portion of the computed CRC failure codes as the output 105. For example, the computing device 110 may select the CRC failure codes that only change the original message part 101 for subsequent analysis and evaluation. Alternatively, the computing device 110 may select the CRC failure codes that only change the check code part 102 for subsequent analysis and evaluation. It can be understood that the computing device 110 may not make such a selection and analyze and evaluate all these types of failure codes.
[0056] It is also possible to filter out the CRC failure codes that may occur in specific application scenarios for analysis and evaluation, without the need to analyze all the failure codes, that is, all E(x) that comply with formula (4), thereby significantly reducing the workload of analysis and evaluation. In some embodiments, multiple original messages including in-vehicle system service data may be obtained, and the corresponding protected message T(x) to be transmitted may be generated. Then, based on the generated protected message, the CRC failure code E(x) may be determined. In some implementations, a portion or all of the protected message may be changed through electromagnetic interference or simulation based on electromagnetic interference to obtain the changed message W(x). Based on the comparison between W(x) and T(x), a set of codes E(x) may be determined, for example, referring to formula (3). It can be understood that the obtained code E(x) may or may not be divisible by the CRC algorithm ad generation polynomial G(x), where the E(x) that can be divisible by G(x) may be determined as the CRC failure code.
[0057] In some embodiments, for a vehicle-mounted system that applies CRC check, the computing device 110 may determine whether the error check result affects the vehicle-mounted system based on the changed protected message. The failure code may be considered relevant to the environment of the vehicle-mounted system. For example, electromagnetic interference may change some specific bits of the transmitted message (invert or set). If the failed check result affects the vehicle-mounted system, compensate for the CRC check. For example, when the CRC check gives a correct check result (in fact, the message has been changed), the computing device inputs the payload of the message into the downstream task to check whether subsequent errors or alarms occur. If there are no errors or alarms, it can be considered that the corresponding failure code and the associated environment do not affect the operation of the vehicle-mounted system. If there are errors or alarms, further integrity protection measures may be taken. In some embodiments, another data protection mechanism different from CRC check (such as Hamming code) may be used to protect the integrity of the protected message. For example, the CRC-protected message may be encapsulated and protected as the payload of another data protection mechanism to achieve more stringent data integrity protection and avoid the adverse effects of CRC failure on the system. It should be noted that the solution proposed in this article is applicable not only to vehicle-mounted systems but also to any other system that uses CRC to detect data integrity.
[0058] Figures 4A to 4C FIG. shows a schematic diagram of CRC-based encoding and decoding according to some embodiments of the present disclosure. For the sake of understanding, Figures 4A to 4C An example of a failed CRC is given, where the transmitted message is changed, but the CRC decoder gives a check result indicating no CRC error.
[0059] As Figure 4A shown, at the CRC encoder, assuming the original message to be transmitted is 0x5EF3D6 (24 bits), and the selected CRC algorithm is CRC-CCITT, the corresponding binary number of the generating polynomial of this algorithm is "0x1021". Accordingly, the CRC encoder can calculate the CRC checksum (i.e., the remainder) as "0xA8E6" based on the original message "0x5EF3D6", so as to obtain the protected message to be transmitted as "0x5EF3D6A8E6" (40 bits).
[0060] As Figure 4B shown, at the CRC decoder, perform the CRC check, check the check result, and the remainder is "0x0000", that is, the CRC check result indicates that no data change has occurred.
[0061] Figure 4CShows the result of CRC failure: During the transmission process, the above message "0x5EF3D6A8E6" was somehow corrupted, but the CRC decoder considered that no data change occurred. The correct received message should be "0x5EF3D6A8E6", and the corrupted message is "0x5EF2C689E6". It can be seen that the transmitted message T(x) has been corrupted, and the CRC result is still "0x0000". Note that in this example, both the original message part and the checksum part of the transmitted message are corrupted, that is, the corresponding failure code E(x) has bits with a value of "1" in both parts.
[0062] Figure 5A and 5B Shows an example of a failed CRC check result according to some embodiments of the present disclosure. For the sake of understanding, Figure 5A and Figure 5B Gives an example where only the original message part is corrupted, where the correct received message should be "0x5EF3D6A8E6".
[0063] As Figure 5A shown, the corrupted received message is "0x4FF1C6A8E6", and the corresponding failure code only changes the original message part, and the checksum remains unchanged. The check result of the CRC is "0x0000", and it fails to detect that the data has changed.
[0064] Figure 5B shown, the corrupted received message is "0x5FE3F7A8E6", and the checksum remains unchanged. The check result of the CRC is also "0x0000", and it fails to detect that the data has changed.
[0065] The above references Figures 1 to 5B describe the embodiments of the present disclosure. According to these embodiments, it is possible to obtain the failure codes that can cause CRC check failures, avoid or evaluate the failed CRC check results, thereby enhancing the security and reliability of the CRC check. In some embodiments, in order to meet the increasingly stringent automotive driving safety requirements, the embodiments of the present disclosure can help evaluate data errors caused by the vehicle working environment (such as electromagnetic interference) and the resulting CRC check failures, and optimize them to improve data reliability, thereby improving the security and reliability of in-vehicle systems.
[0066] Figure 6FIG. 0 shows a schematic block diagram of a device 600 for enhancing CRC according to some embodiments of the present disclosure. The device 600 includes an acquisition unit 610 and a determination unit 620. In the device 600, the acquisition unit 610 is configured to acquire an original message to be protected using the CRC algorithm. The determination unit 620 is configured to determine at least one CRC failure code based on the original message and a generation polynomial of the CRC algorithm, the at least one CRC failure code changing a protected message including the original message and a corresponding CRC check code such that a CRC check for the changed protected message produces a failure check result.
[0067] In some embodiments, the original message may include a plurality of original messages, wherein the determination unit 620 may further be configured to generate, based on the CRC algorithm, a plurality of protected messages corresponding to the plurality of original messages, each protected message including an original message and a corresponding CRC check code; determine a set of codes for causing at least some of the plurality of protected messages to be changed; and determine the at least one CRC failure code from the set of codes based on the generation polynomial of the CRC algorithm.
[0068] In some embodiments, the determination unit 620 may further be configured to: change at least some of the plurality of protected messages through electromagnetic interference or simulation based on electromagnetic interference; and determine the set of codes based on a comparison between the changed protected messages and the corresponding original messages.
[0069] In some embodiments, the determination unit 620 may be configured to: determine a binary number corresponding to the generation polynomial; and determine an integer multiple of the binary number as the at least one CRC failure code.
[0070] In some embodiments, the at least one CRC failure code may be a non - zero binary number and have the same length as the protected message.
[0071] In some embodiments, the CRC check for the changed protected message producing a failure check result may include: performing an exclusive - or operation on the protected message and the at least one CRC failure code to obtain a changed protected message; and performing a CRC check on the changed protected message to obtain the failure check result.
[0072] In some embodiments, the at least one CRC failure code may change the original message part in the protected message. Optionally, the at least one CRC failure code may change the CRC check code part in the protected message. Optionally, the at least one CRC failure code may change both the original message part and the CRC check code part.
[0073] In some embodiments, the failure check result may indicate that the changed protected message is divisible by the binary number corresponding to the generating polynomial.
[0074] In some embodiments, the apparatus may further include an evaluation unit and a compensation unit. The evaluation unit may be configured to determine, based on the changed protected message, whether the failure check result has an impact on the vehicle-mounted system. The compensation unit may be configured to, in response to determining that the failure check result has an impact on the vehicle-mounted system, compensate for the CRC check.
[0075] In some embodiments, the compensation unit may further be configured to use another data protection mechanism different from the CRC check to protect the integrity of the protected message.
[0076] In some embodiments, at least one CRC failure code is related to the environment of the vehicle-mounted system.
[0077] Figure 7 FIG. shows a schematic block diagram of an exemplary device 700 that may be used to implement embodiments of the present disclosure. For example, the method 300 according to an embodiment of the present disclosure may be implemented by the device 700. As shown, the device 700 includes a central processing unit (CPU) 701, which may execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0078] A plurality of components in the device 700 are connected to the I / O interface 705. The types of I / O interfaces include, but are not limited to, high-speed peripheral component interconnect (PCIe), universal serial bus (USB), high-definition multimedia interface (HDMI), serial attached SCSI (SAS), etc. Components based on the I / O interface 705 may include, but are not limited to: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disc, etc.; and a communication unit 709, such as a network adapter, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0079] The various processes and treatments described above, such as method 300, may be executed by a processing unit in device 700, such as processing unit 701 and / or other processing units (e.g., the microprocessor on the main board of device 700). For example, in some embodiments, method process 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed onto device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed, one or more actions of process 300 described above may be performed.
[0080] The present disclosure may be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions thereon for performing various aspects of the present disclosure.
[0081] A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example -- but not limited to -- an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed to be a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0082] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0083] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via an Internet service provider through the Internet). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.
[0084] Aspects of the present disclosure are described herein with reference to the flowchart and / or block diagram of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, can be implemented by computer - readable program instructions.
[0085] These computer - readable program instructions can be provided to a processing unit of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that, when the instructions are executed by the processing unit of the computer or other programmable data - processing apparatus, a device is produced that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner. Thus, the computer - readable medium storing the instructions includes a manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0086] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0087] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by special-purpose hardware-based systems that perform the specified functions or acts, or by combinations of special-purpose hardware and computer instructions.
[0088] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable other ordinary skilled artisans in the art to understand the embodiments disclosed herein.
Claims
1. A method for enhancing cyclic redundancy check (CRC), comprising: Obtaining an original message to be protected using a CRC algorithm; And Determining at least one CRC failure code based on the original message and a generating polynomial of the CRC algorithm, Wherein the at least one CRC failure code is used to change a protected message including the original message and a corresponding CRC check code such that a CRC check for the changed protected message results in a failed check result.
2. The method according to claim 1, wherein the original message includes a plurality of original messages, and determining the CRC failure code includes: Generating, based on the CRC algorithm, a plurality of protected messages corresponding to the plurality of original messages, each protected message including an original message and a corresponding CRC check code; Determining a set of codes for causing at least some of the plurality of protected messages to be changed; And Determining the at least one CRC failure code from the set of codes based on the generating polynomial of the CRC algorithm.
3. The method according to claim 2, wherein determining the at least one code includes: Causing at least some of the plurality of protected messages to be changed by electromagnetic interference or simulation based on electromagnetic interference; And Determining the set of codes based on a comparison between the changed protected messages and the corresponding original messages.
4. The method according to claim 1, wherein determining at least one CRC failure code includes: Determining a binary number corresponding to the generating polynomial; And Determining an integer multiple of the binary number as the at least one CRC failure code.
5. The method according to claim 1, wherein The at least one CRC failure code is a non-zero binary number and has the same length as the protected message.
6. The method according to claim 1, wherein, Generating a failed check result for the CRC check of the changed protected message includes: Performing an exclusive OR operation on the protected message and the at least one CRC failure code to obtain a changed protected message; and Performing a CRC check on the changed protected message to obtain the failed check result.
7. The method according to claim 6, wherein The at least one CRC failure code changes one or more of the following: The original message part in the protected message; The CRC check code part in the protected message; or Both of the above.
8. The method according to claim 7, wherein the failed check result indicates that the changed protected message is divisible by a binary number corresponding to the generating polynomial.
9. The method according to claim 1, wherein Based on the CRC check of the CRC algorithm being applied to a vehicle system, the method further includes: Determining whether the changed protected message via the CRC failure code has an impact on the vehicle system; and In response to determining that there is an impact on the vehicle system, compensating for the CRC check.
10. The method according to claim 9, wherein compensating for the CRC check includes: Using another data protection mechanism different from the CRC check to protect the integrity of the protected message.
11. An apparatus for enhancing cyclic redundancy check (CRC), comprising: An obtaining unit configured to obtain an original message to be protected using a CRC algorithm; And A determination unit, configured to determine at least one CRC failure code based on the original message and a generation polynomial of the CRC algorithm, where the at least one CRC failure code is used to change a protected message including the original message and a corresponding CRC check code, so that a CRC check for the changed protected message generates a failed check result.
12. An electronic device, comprising: a processing unit; and a memory coupled to the processing unit and storing instructions for execution by the processing unit, the instructions, when executed by the processing unit, cause the electronic device to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, comprising machine-executable instructions that, when executed by a device, cause the device to execute the method according to any one of claims 1 to 10.
14. A computer program product, comprising machine-executable instructions that, when executed by a device, cause the device to execute the method according to any one of claims 1 to 10.