Message signal transmission method, device, electronic equipment and vehicle
By performing bit splitting, grouping and XOR operation on the vehicle message signal, the encrypted message signal is generated and decrypted, which solves the problems of easy cracking and high complexity of the encryption method in the existing technology, and achieves a more efficient and secure message transmission.
Patent Information
- Application Number
- CN202411050303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing encryption methods in vehicle message transmission have risks of cracking, and additional encryption and decryption modules need to be added, which increases system complexity and cost.
By bit splitting, grouping and XOR operations on each byte of the message signal, an encrypted message signal is generated and decrypted at the receiving end, which improves the complexity and unpredictability of encryption and avoids the need to add additional code. Decryption module requirements.
It effectively improves the security and efficiency of message transmission, reduces the complexity and cost of encryption and decryption, and enhances the security of vehicle communications.
Smart Images

Figure CN118573756B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a message signal transmission method, device, electronic equipment and vehicle. Background Art
[0002] At present, vehicle information is mainly transmitted through CAN, LIN, Ethernet and other buses according to certain rules. The bus signals are arranged in different data fields with binary continuous bits to realize communication between various controllers. Before transmission, the message signal can be encrypted by shifting it, and the encrypted message is sent to the decryption device for verification to improve the security of message transmission.
[0003] However, although encryption through shift operations can improve certain security, the encrypted message is still a continuous bit transmission, which can be relatively easy to parse the original message, and there is a greater risk of cracking. Secondly, this encryption method requires the addition of additional encryption and decryption modules, which increases the complexity and cost of encryption. Summary of the invention
[0004] The embodiments of the present disclosure provide a message signal transmission method, device, electronic device and vehicle to improve the accuracy and efficiency of message transmission, so as to at least partially solve the above-mentioned technical problems.
[0005] In order to achieve the above object, according to a first aspect of the present disclosure, a message signal transmission method is provided, comprising:
[0006] Splitting the bits of each byte of the message signal to obtain bit fragments corresponding to the bits of each byte;
[0007] Grouping the bit segments according to a target algorithm to obtain a plurality of bit segment groups;
[0008] Perform an XOR operation on each bit segment group to obtain a corresponding operation result;
[0009] According to the operation result, the bytes of the message signal are updated to obtain an encrypted message signal;
[0010] The encrypted message signal is sent to a receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
[0011] Optionally, splitting the bits of each byte of the message signal to obtain bit segments corresponding to the bits of each byte includes:
[0012] Get M bits of the byte;
[0013] The M bits are split into front bits consisting of N bits and rear bits consisting of MN bits in the current order; N and MN are both integers greater than zero, wherein a front bit or a rear bit is a bit segment.
[0014] Optionally, grouping the bit segments according to a target algorithm to obtain a plurality of bit segment groups includes:
[0015] Determine a second byte with a second position number according to a first position number and a length of the first byte;
[0016] The first bits of the first byte and the first bits of the second byte are added to a first bit segment group, and the last bits of the first byte and the last bits of the second byte are added to a second bit segment group.
[0017] Optionally, determining the second byte of the second position number according to the first position number and the length of the first byte includes:
[0018] Calculate the difference between the first position number and the length of the first byte to obtain a first difference;
[0019] Calculating the difference between the first difference and a preset constant to obtain a second difference, and determining the second difference as the second position number;
[0020] Get the byte of the second position number to obtain the second byte.
[0021] Optionally, the position number and length of the first byte meet a preset condition, and the preset condition includes: the position number of the byte is less than half of the length.
[0022] Optionally, performing an XOR operation on each bit segment group to obtain a corresponding operation result includes:
[0023] For each of the bit segment groups, perform an XOR operation on the bits of the first byte and the bits of the second byte in the bit segment group to obtain a first middle bit corresponding to the first byte and a second middle bit corresponding to the second byte;
[0024] An XOR operation is performed on the first intermediate bit position and the second intermediate bit position to obtain a target bit position.
[0025] Optionally, performing an XOR operation on the bits of the first byte and the bits of the second byte in the bit segment group to obtain a first middle bit corresponding to the first byte and a second middle bit corresponding to the second byte includes:
[0026] Performing an XOR operation on the bits of the first byte and the bits of the second byte in the same group to obtain a first intermediate bit corresponding to the first byte;
[0027] An XOR operation is performed on the first intermediate bit and the bit of the second byte to obtain the second intermediate bit.
[0028] Optionally, updating the bytes of the message signal to obtain an encrypted message signal includes:
[0029] Performing decimal conversion on the target bit to obtain a conversion byte;
[0030] The original byte corresponding to the target bit is updated to the converted byte to obtain the encrypted message signal.
[0031] According to a second aspect of the present disclosure, there is provided a message signal transmission device, comprising:
[0032] The byte splitting module is used to split the bits of each byte of the message signal to obtain bit fragments corresponding to the bits of each byte;
[0033] A data grouping module, used for grouping the bit segments according to a target algorithm to obtain a plurality of bit segment groups;
[0034] The message operation module is used to perform an XOR operation on each bit segment group to obtain a corresponding operation result;
[0035] A message updating module, used for updating the bytes of the message signal according to the operation result to obtain an encrypted message signal;
[0036] The message transmission module is used to send the encrypted message signal to the receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
[0037] According to a third aspect of the present disclosure, there is also provided an electronic device, including:
[0038] a memory having a computer program stored thereon;
[0039] A processor is used to execute the computer program in the memory to implement the steps of the message signal transmission method as described above.
[0040] According to a fourth aspect of the present disclosure, a vehicle is also provided, comprising the electronic device as described above.
[0041] The message signal transmission method of the embodiment of the present disclosure, through the above technical scheme, first splits the bytes of the message signal to obtain the bit segments of each byte, and then updates the original bytes of the message signal by grouping and XORing the bit segments. Compared with the simple form of shift encryption, it can effectively improve the complexity and unpredictability of encryption. Moreover, the method of the present disclosure does not need to add additional encryption and decryption modules, which can improve the convenience of encryption and decryption and the efficiency of message transmission. Therefore, the method of the present disclosure can improve the overall security and efficiency of message signal transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0043] In order to more completely understand the present disclosure and its beneficial effects, the following description will be made in conjunction with the accompanying drawings, wherein the same drawing numbers represent the same parts in the following description.
[0044] Figure 1 is a flowchart of a message signal transmission method provided in an exemplary embodiment of the present disclosure;
[0045] Figure 2 is a schematic diagram of a message signal provided in an exemplary embodiment of the present disclosure;
[0046] Figure 3 is a schematic diagram of splitting a message signal provided in an exemplary embodiment of the present disclosure;
[0047] Figure 4 is a schematic diagram of the front bit positions being interchanged provided in an exemplary embodiment of the present disclosure;
[0048] Figure 5 is a schematic diagram of the rear bit swapping provided in an exemplary embodiment of the present disclosure;
[0049] Figure 6 is a schematic diagram of an XOR operation rule provided in an exemplary embodiment of the present disclosure;
[0050] Figure 7 is a structural schematic diagram of a message signal transmission device provided in an exemplary embodiment of the present disclosure;
[0051] Figure 8 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure;
[0052] Fig. 9is a block diagram of a vehicle provided in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0054] Information transmission mainly relies on various bus systems, such as CAN (Controller Area Network), LIN (Local Interconnect Network) and Ethernet. The above bus systems transmit controller signals on the bus through certain rules to ensure effective communication between controllers. During the transmission process, the bus signal is arranged in the form of binary continuous bits in the data field of different IDs, such as Figure 2 Signals 1 to 8 are arranged in high and low bits according to the coding format of the signal. In this way, real-time data exchange and control between complex systems inside the vehicle can be achieved. However, since the message signal is transmitted in an open and standardized protocol, technicians can obtain the vehicle communication message and use the continuous bit arrangement of the signal to parse the communication protocol, so that unauthorized personnel can also obtain the vehicle development strategy, resulting in the technical solution being cracked, which brings great risks to the vehicle's information security.
[0055] In the related art, the generated CAN messages can be shifted to obtain encrypted input data, and these encrypted messages are sent to a CAN decryption device for verification, which can improve the security of CAN communication to a certain extent.
[0056] However, although encryption through message shifting operations is simple and has changed in form, the encrypted message is still transmitted in continuous bits, and the encryption strength is limited. Technicians can easily parse the original message through certain technical means to obtain the vehicle's development strategy and control information, and there is still a great risk of being cracked. Secondly, this encryption method requires additional encryption and decryption modules, which increases the complexity and cost of the system and places higher demands on the vehicle's hardware resources. Therefore, the existing vehicle message transmission still has room for improvement in ensuring data security and preventing technical solutions from being cracked. A more secure and efficient message signal transmission method is urgently needed to better protect the vehicle's communication security.
[0057] In this solution, the bytes of the message signal are first split to obtain the bit segments of each byte, and then the bit segments are grouped and XORed to update the original bytes of the message signal. Compared with the existing simple shift encryption, the security of message transmission can be enhanced. In addition, the method disclosed in the present invention does not require the additional setting of a separate encryption and decryption module, and the decryption process is the reverse operation of the encryption process, thereby improving the convenience of encryption and decryption and the efficiency of message transmission.
[0058] The present disclosure is described below in conjunction with specific embodiments.
[0059] Figure 1 is a schematic diagram of a message signal transmission method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the method may include the following steps S101 to S105:
[0060] Step S101: split the bits of each byte of the message signal to obtain bit segments corresponding to the bits of each byte.
[0061] Byte is a unit of measurement used to describe storage capacity and transmission capacity in computer information, and is the basic storage unit of computers. A byte consists of 8 adjacent binary bits, recorded as bits, each of which consists of 0 or 1. For example, byte 4E is converted to binary as "01001110". In some embodiments, the message signal may be a CAN message, a LIN message, etc., and the message signal may include one or more bytes.
[0062] In a normal communication protocol, the position of each signal data field is arranged in a continuous arrangement according to the high and low bit representation method of the encoding format and the length. Each ID can distribute different signals and is arranged in sequence according to the communication protocol. Among them, the data field is a position in a data frame for transmitting data. The CAN bus data field is 0-8 bytes, and the CANFD bus data field is 0-64 bytes. The ID is the data used to indicate the priority in the arbitration segment. The common standard ID is 11 bits and the extended ID is 29 bits. The message transmission process of the present disclosure is described below using the 8-byte CAN2.0 standard frame as an example.
[0063] like Figure 2 The figure shows the process of transmitting CAN messages between two electronic control units ECU1 and ECU2 through the CAN bus. ECU1 is the transmitter, and ECU1 sends data to the CAN bus. The ID of the data packet is ID1. ECU2 is the receiver, and ECU2 receives the data packet sent by ECU1. The ID of the data packet is also ID1. ECU2 will parse and process the received data packet according to its content.
[0064] from Figure 2It can be seen that the data packet contains 8 signals in total, each signal corresponds to one byte, and the specific value of each signal is: signal 1 is 4E, signal 2 is 20, signal 3 is 7A, signal 4 is 22, signal 5 is 03, signal 6 is 05, signal 7 is 47, and signal 8 is 24.
[0065] In some embodiments, before splitting the bits of each byte, the bits in the byte may be converted into binary values. Specifically, signal 1 is 4E, indicating that the hexadecimal data value of the byte is 4E, which can be converted into the corresponding binary value 01001110; signal 2 is 20, indicating that the hexadecimal data value of the byte is 20, which can be converted into the corresponding binary value 00100000. Similarly, the bytes of signal 1 to signal 8 can all be converted into binary bits, and then the multiple binary bits that have been fully converted can be split.
[0066] In order to better implement the embodiment of the present application, in a possible example, step S101 may include:
[0067] First, obtain M bits of the byte;
[0068] Next, the M bits are split into front bits consisting of N bits and rear bits consisting of MN bits in the current order; N and MN are both integers greater than zero, wherein a front bit or a rear bit is a bit segment.
[0069] To facilitate description and understanding of the message transmission process of the present disclosure, in some embodiments, multiple bits may be divided into two bit segments at a ratio of 50% of the number of bits.
[0070] like Figure 2 As shown, the byte of the first signal is set to byte 0, that is, byte 4E of signal 1. Byte 4E corresponds to 8 bits "01001110", so M is 8. In some embodiments, the bit division is performed at a ratio of 50% of the number of bits, and the value of N can be calculated to be 8×50%=4, so the value of MN is also 4.
[0071] like Figure 3 As shown, bit 4 is divided into two bit segments, Byte(0)α and Byte(0)β, where the 0 in the brackets is the byte order. For example, byte 4E is the 0th byte, and the symbols α and β represent the front bit and the back bit, respectively. That is, Byte(0)α is the front bit segment "0100" of the 0th byte 4E, and Byte(0)β is the back bit segment "1110" of the 0th byte 4E.
[0072] It should be noted that, in actual situations, the bit division ratio can be set according to the needs of message transmission and encryption. For example, for 8 bits, in addition to dividing the front and rear bits according to a ratio of 4:4, other ratios such as 1:7, 7:1, 2:6, 3:5, etc. can also be used, and this embodiment does not limit this. In addition, the method disclosed in the present invention can split the bytes of the message signal into any length, but the total length of the message signal is equal to the original length, and the transmission load of the bus will not be increased.
[0073] Step S102: group the bit segments according to a target algorithm to obtain a plurality of bit segment groups.
[0074] In some embodiments, multiple bit fragments can be grouped based on the target algorithm to obtain corresponding bit fragment groups. In order to facilitate the subsequent encryption and decryption of message signals based on specific rules, relevant encryption operations can be performed on each bit fragment group based on the bit fragment group, so as to facilitate the subsequent correct decryption of the encrypted message based on the target algorithm.
[0075] In order to better implement the embodiment of the present application, in a possible example, step S102 may include:
[0076] First, according to the first position number and length of the first byte, the second byte of the second position number is determined;
[0077] Next, the first bits of the first byte and the first bits of the second byte are added to a first bit segment group, and the last bits of the first byte and the last bits of the second byte are added to a second bit segment group.
[0078] The length is the length of the data field corresponding to the byte. Figure 2 Take the CAN message in as an example, assuming that the first byte is byte 4E corresponding to signal 1. Since byte 4E is set as the 0th byte, the first position corresponding to byte 4E is numbered 0, and the data field length of the CAN message is 8.
[0079] In some embodiments, after determining the first position number and length information of the first byte, a second byte corresponding thereto may be further determined, and the first bit of the first byte and the first bit of the second byte are determined as the first bit segment group, and the last bit of the first byte and the last bit of the second byte are determined as the second bit segment group. For example, assuming that the first byte is 4E and the second byte is 24, the first bit segment group may include Byte(0)α and Byte(7)α, and the second bit segment group may include Byte(0)β and Byte(7)β.
[0080] In some embodiments, the second byte of the second position number may be determined by:
[0081] First, a difference between the first position number and the length of the first byte is calculated to obtain a first difference;
[0082] Next, a difference between the first difference and a preset constant is calculated to obtain a second difference, and the second difference is determined as the second position number;
[0083] Finally, the byte numbered at the second position is obtained to obtain the second byte.
[0084] In some embodiments, the second byte corresponding to the first byte may be calculated by the following formula:
[0085] (1)
[0086] (2)
[0087] Where x is the first position number, y is the second position number, length is the length, and 1 is a preset constant. is the first difference, is the second difference.
[0088] The whole calculation process is still demonstrated with byte 4E as the first byte. Byte 4E is the 0th byte and the length is 8, so x=0. 8, Substitute the above values into formula (1):
[0089]
[0090] Therefore, it can be determined that the second position number is 7, and the 7th byte 24 is determined as the second byte.
[0091] In some embodiments, the position number and length of the first byte satisfy a preset condition, wherein the preset condition includes: the position number of the byte is less than half of the length.
[0092] The preset condition can be understood as a constraint condition for calculating the second position number. The preset condition can be expressed as: x < length (x) / 2. Figure 2 Taking the CAN message in as an example, length (x) = 8, then the preset condition must satisfy x < 4.
[0093] It should be noted that in the scenario of the present disclosure, the target algorithm can also be used to set the corresponding byte grouping between bytes. For example, according to the calculation result of the bit position of the 0th byte and the bit position segment of the 7th byte to form a bit segment group, Figure 2 Byte 4E in can be set to the same byte group as byte 24, and the corresponding Figure 2 The first byte and the sixth byte, the second byte and the fifth byte, and the third byte and the fourth byte in the same byte group are grouped together. It can be understood that setting the byte grouping can more conveniently determine the corresponding bit segment group and avoid errors in determining the bit segment group.
[0094] Step S103: perform an XOR operation on each bit segment group to obtain a corresponding operation result.
[0095] In some embodiments, the corresponding operation result can be obtained by performing an XOR operation between two bit segments in the bit segment group. Figure 6 Schematic diagram of the rules of XOR operation, for A and B are the values to be operated, P is the operation result, when the values to be operated A and B are the same values, for example, both are, the operation result P is 0; when the values to be operated A and B are different values, for example, 1 and 0 respectively, the operation result P is 1.
[0096] In some embodiments, the target bit position may be determined by:
[0097] First, for each of the bit segment groups, an XOR operation is performed on the bits of the first byte and the bits of the second byte in the bit segment group to obtain a first middle bit corresponding to the first byte and a second middle bit corresponding to the second byte;
[0098] Next, an XOR operation is performed on the first intermediate bit position and the second intermediate bit position to obtain a target bit position.
[0099] In some embodiments, the second middle bit position may be determined by:
[0100] First, perform an XOR operation on the bits of the first byte and the bits of the second byte in the same group to obtain a first intermediate bit corresponding to the first byte;
[0101] Next, an XOR operation is performed on the first intermediate bit and the bit of the second byte to obtain the second intermediate bit.
[0102] For ease of understanding, the above calculation process can be expressed as:
[0103] Byte(x) =Byte(x)α⊕Byte(y)α; (3)
[0104] Byte (y) =Byte(x) ⊕Byte(y)α;(4)
[0105] Byte(x) =Byte(x) ⊕Byte(y) ; (5)
[0106] Among them, Byte(x)α is the bit position of the first byte, ⊕Byte(y)α is the bit position of the second byte, Byte(x) is the first middle bit, Byte(y) is the second middle bit, ⊕ is the XOR operator symbol, and the above calculation process will be described below with reference to specific examples.
[0107] Assume that the first byte is the 0th byte 4E, and the second byte is the 7th byte 24. The corresponding bit position of the first byte Byte (x) α = 0100, and the bit position of the second byte Byte (y) α = 0010. Substitute the two values into formula (3) to calculate the first middle bit position Byte (0) =Byte(0)α⊕Byte(7)α=0100⊕0010=0110.
[0108] Next, you can use Byte (0) Substitute Byte(y)α into formula (4) to calculate the second middle bit Byte (7) =Byte(0) ⊕Byte(7)α=0110⊕0010=0100.
[0109] Finally, the first middle bit Byte(x) can be and the second middle bit Byte (y) Substituting into formula (5), we get the target bit Byte (0) =Byte(0) ⊕Byte (7) =0110⊕0100=0010.
[0110] In the above manner, the target bits corresponding to the first bit and the last bit of each byte can be calculated, and the target bits can be used for encryption operations of subsequent message signals.
[0111] Step S104: Update the bytes of the message signal according to the operation result to obtain an encrypted message signal.
[0112] In some embodiments, the operation result obtained in step 103 can be used to replace the original bit of the byte to update the byte to obtain the encrypted message signal. For example, in the example of step 103, after determining the target bit of the 0th byte 4E, the first bit of byte 4E Byte (x) α = 0100 can be directly replaced with the target bit Byte (0) , that is, update the 0th to 3rd bits of the 0th byte to 0010, completing the update of byte 4E. Correspondingly, the second middle bit of the 7th byte 24 obtained during the calculation process can also be recorded Byte (7) =0100, while updating byte 4E, the original front bit of byte 24 Byte (y) α = 0010 is synchronously updated to the second middle bit 0100, that is, the 56th to 59th bits of the 7th byte are updated to 0100.
[0113] Step S104 also includes:
[0114] Performing decimal conversion on the target bit to obtain a conversion byte;
[0115] The original byte corresponding to the target bit is updated to the converted byte to obtain the encrypted message signal.
[0116] Continuing with the above example, after obtaining the target bit position 0010 of byte 4E, the target bit position 0010 can be converted into decimal to obtain the corresponding value "2" as the conversion byte. Figure 4 As shown, after obtaining the conversion byte 2, the original byte "4" corresponding to the target bit can be updated to the conversion byte "2".
[0117] Correspondingly, the first bit of the 7th byte can also be updated in the same manner. For example, the second middle bit "0100" of the 7th byte 24 can be converted into decimal to obtain the corresponding value "4" as the conversion byte. Figure 4 As shown, after obtaining the conversion byte 4, the original byte "2" corresponding to the first bit of the 7th byte can be updated to the conversion byte "4" to complete the exchange update of the bit segment Byte (x) α of the first byte and the bit segment Byte (y) α of the second byte in the same bit segment group.
[0118] Through the above method, compared with the traditional shift operation encryption method, a message signal with irregular byte arrangement can be determined through specific rules such as the XOR operation between the target algorithm and the bit fragments, thereby improving the security of message encryption transmission without increasing the complexity of decryption.
[0119] It should be noted that, in addition to the above examples, the same algorithm can also be used to update the message signal, for example Figure 5 The rear bit segments of different bytes are interchanged and reorganized, or the front and rear bit segments of each byte are interchanged and reorganized at the same time, which is not limited in this embodiment.
[0120] Step S105: Send the encrypted message signal to a receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
[0121] In some embodiments, the transmitting end may send the encrypted message signal to the receiving end. After receiving the encrypted message signal, the receiving end may decrypt it using the same target algorithm to finally restore the original message signal.
[0122] In some embodiments, the receiving end splits the received encrypted message signal into bit segments, and then recombine the bit segments according to the same grouping algorithm as the sending end to obtain a restored bit sequence.
[0123] As an example only, the encrypted message signal may be: Byte0: 00101001; Byte1: 11000110; Byte2:10101101; Byte3: 01100100; Byte4: 00101000; Byte5: 10001110; Byte6: 11101010; Byte7: 01000011. Then, the target algorithm may be confirmed to the sender that the bits are grouped at a ratio of 50%, that is, 4:4, and an XOR operation is performed. Therefore, taking Byte0 as an example, the first bit 0010 of the encrypted Byte0 and the first bit 0100 of Byte7 may be swapped, and 0100 is converted to decimal to obtain the first bit of the 0th byte of the original message as "4".
[0124] In some embodiments, the receiving end parses the decrypted and restored message signal according to the communication protocol, extracts the physical value of each signal, and performs corresponding processing and control. By splitting and reorganizing the bit fragments of the message signal in the above manner, the encryption and obfuscation of the message signal can be achieved. After receiving the encrypted message signal, the receiving end uses the same target algorithm for decryption, and can restore the original message signal without adding a specific decryption module, thereby ensuring the security and integrity of data transmission.
[0125] Through the above technical solution, the bytes of the message signal are first split to obtain the bit segments of each byte, and then the bit segments are grouped and XORed to update the original bytes of the message signal. Compared with the simple shift encryption, the complexity and unpredictability of encryption can be effectively improved. In addition, the method disclosed in the present invention does not need to add additional encryption and decryption modules, which can improve the convenience of encryption and decryption and the efficiency of message transmission. Therefore, the method disclosed in the present invention can improve the overall security and efficiency of message signal transmission.
[0126] Figure 7 is a structural diagram of a message signal transmission device provided by an embodiment of the present disclosure, such as Figure 7 As shown, the message signal transmission device 200 includes a byte splitting module 201, a data grouping module 202, a message operation module 203, a message updating module 204 and a message transmission module 205.
[0127] The byte splitting module 201 is used to split the bits of each byte of the message signal to obtain bit segments corresponding to the bits of each byte;
[0128] A data grouping module 202, configured to group the bit segments according to a target algorithm to obtain a plurality of bit segment groups;
[0129] The message operation module 203 is used to perform an XOR operation on each bit segment group to obtain a corresponding operation result;
[0130] A message updating module 204, configured to update the bytes of the message signal according to the operation result to obtain an encrypted message signal;
[0131] The message transmission module 205 is used to send the encrypted message signal to the receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
[0132] Among them, the above-mentioned byte splitting module 201, data grouping module 202, message operation module 203, message update module 204 and message transmission module 205 can respectively correspond to execute steps S101-S105 in the above-mentioned method embodiment. For the detailed introduction of these modules, please refer to the introduction of the corresponding steps of the above-mentioned method, which will not be repeated here one by one.
[0133] Through the message signal transmission device provided in the embodiment of the present disclosure, the initial detection result of the message signal transmission can be determined based on the reference value and the first collected value, and then the state change of the hand-off detection only needs to be judged according to the second collected value obtained at different rates. This can not only reduce the dependence on the reference value during hand-off detection, but also effectively improve the accuracy of hand-off detection by monitoring the changing trend of the collected values at different rates.
[0134] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0135] Figure 8 FIG. 1 is a block diagram of an electronic device 300 according to an exemplary embodiment. Figure 8 As shown, the electronic device 300 may include: a processor 301 and a memory 302. The electronic device 300 may also include one or more of a multimedia component 303, an input / output (I / O) component 304, and a communication component 305.
[0136] The processor 301 is used to control the overall operation of the electronic device 300 to complete all or part of the steps in the above-mentioned message signal transmission method. The memory 302 is used to store various types of data to support the operation of the electronic device 300, and these data may include, for example, instructions for any application or method used to operate on the electronic device 300, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 303 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 302 or sent through the communication component 305. The audio component also includes at least one speaker for outputting audio signals. The I / O component 304 provides an interface between the processor 301 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 305 is used for wired or wireless communication between the electronic device 300 and other devices. Wireless communication, such as WiFi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 305 may include: WiFi module, Bluetooth module, NFC module, etc.
[0137] In an exemplary embodiment, the electronic device 300 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned message signal transmission method.
[0138] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the message signal transmission method described above are implemented. For example, the computer-readable storage medium may be the memory 302 including the program instructions described above, and the program instructions may be executed by the processor 301 of the electronic device 300 to complete the following steps:
[0139] Acquire a first collected value and a reference value for hands-off detection of the steering wheel;
[0140] Determining an initial detection result of the hand-off detection according to the reference value and the first collected value;
[0141] Acquire a plurality of second acquisition values obtained at a preset acquisition rate;
[0142] A target detection result of whether the steering wheel is in a hands-off state is determined according to the second collected value and the initial detection result.
[0143] Fig. 9 is a block diagram of a vehicle provided in an embodiment of the present disclosure, such as Fig. 9 As shown, the vehicle 400 includes the electronic device 300 described above.
[0144] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0145] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0146] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A message signal transmission method, characterized in that: include: Splitting the bits of each byte of the message signal to obtain bit fragments corresponding to the bits of each byte; Grouping the bit segments according to a target algorithm to obtain a plurality of bit segment groups; Perform an XOR operation on each bit segment group to obtain a corresponding operation result; According to the operation result, the bytes of the message signal are updated to obtain an encrypted message signal; The encrypted message signal is sent to a receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
2. The message signal transmission method according to claim 1, characterized in that: The bit positions of each byte of the message signal are split to obtain bit position fragments corresponding to the bit positions of each byte, including: Get M bits of the byte; The M bits are split into front bits consisting of N bits and rear bits consisting of MN bits in the current order; N and MN are both integers greater than zero, wherein a front bit or a rear bit is a bit segment.
3. The message signal transmission method according to claim 2, characterized in that: The step of grouping the bit segments according to the target algorithm to obtain a plurality of bit segment groups includes: Determine a second byte with a second position number according to a first position number and a length of the first byte; The first bits of the first byte and the first bits of the second byte are added to a first bit segment group, and the last bits of the first byte and the last bits of the second byte are added to a second bit segment group.
4. The message signal transmission method according to claim 3, characterized in that: The step of determining the second byte of the second position number according to the first position number and the length of the first byte includes: Calculate the difference between the first position number and the length of the first byte to obtain a first difference; Calculating the difference between the first difference and a preset constant to obtain a second difference, and determining the second difference as the second position number; Get the byte of the second position number to obtain the second byte.
5. The message signal transmission method according to claim 3, characterized in that: The position number and length of the first byte meet a preset condition, wherein the preset condition includes: the position number of the byte is less than half of the length.
6. The message signal transmission method according to claim 3, characterized in that: The performing of an XOR operation on each bit segment group to obtain a corresponding operation result includes: For each of the bit segment groups, perform an XOR operation on the bits of the first byte and the bits of the second byte in the bit segment group to obtain a first middle bit corresponding to the first byte and a second middle bit corresponding to the second byte; An XOR operation is performed on the first intermediate bit position and the second intermediate bit position to obtain a target bit position.
7. The message signal transmission method according to claim 6, characterized in that: The performing an XOR operation on the bits of the first byte and the bits of the second byte in the bit segment group to obtain a first middle bit corresponding to the first byte and a second middle bit corresponding to the second byte includes: Performing an XOR operation on the bits of the first byte and the bits of the second byte of the same group to obtain a first middle bit corresponding to the first byte; An XOR operation is performed on the first intermediate bit and the bit of the second byte to obtain the second intermediate bit.
8. The message signal transmission method according to claim 6, characterized in that: The updating of the bytes of the message signal to obtain the encrypted message signal comprises: Performing decimal conversion on the target bit to obtain a conversion byte; The original byte corresponding to the target bit is updated to the converted byte to obtain the encrypted message signal.
9. A message signal transmission device, characterized in that: include: The byte splitting module is used to split the bits of each byte of the message signal to obtain bit fragments corresponding to the bits of each byte; A data grouping module, used for grouping the bit segments according to a target algorithm to obtain a plurality of bit segment groups; The message operation module is used to perform an XOR operation on each bit segment group to obtain a corresponding operation result; A message updating module, used for updating the bytes of the message signal according to the operation result to obtain an encrypted message signal; The message transmission module is used to send the encrypted message signal to the receiving end, so that the receiving end decrypts the encrypted message signal according to the target algorithm to obtain the original message signal.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the message signal transmission method according to any one of claims 1 to 8.
11. A vehicle, characterized in that: The electronic device comprising the electronic device described in claim 10 above.
Citation Information
Patent Citations
Message transmission method and device and storage medium
CN116418533A
File transmission method and device, electronic equipment and storage medium
CN117955968A
Device For Performing Block Cipher Algorithm HIGHT
KR101617694B1
