New energy vehicle motor permanent magnet assembly data internet of things encryption method

CN122802143APending Publication Date: 2026-09-22DONGYING SHENGLI MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610982036.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0004]上述现有的新能源车辆电机永磁体装配数据物联网加密方案中,密钥的生成与装配现场的物理传感状态相互隔离,导致发送端与接收端必须依赖独立的密钥分发通道来同步会话密钥

Benefits of technology

1.本发明提取电机永磁体装配过程中的充磁瞬时电流特征、压装压力极值特征与定子温度梯度特征进行特征融合与哈希映射,生成当前装配周期的会话密钥,基于广义菲斯特尔结构利用会话密钥结合装配节点的物理标识生成轮密钥执行加密,并在接收端依据本地同步提取的物理特征恢复会话密钥执行解密。此种方式将装配现场的物理传感量直接作为密码学密钥生成的随机熵源,使得会话密钥与当前永磁体装配的物理状态形成强绑定关系。发送端与接收端可基于同一装配过程本地同步提取的物理特征分别独立生成相同的会话密钥,省去了独立密钥分发通道的建立与维护过程,消除了密钥在分发链路上被拦截或篡改的风险,提升了密钥生成的物理不可克隆性,避免了高并发装配产线中复杂的密钥协商交互,降低了物联网终端设备的通信开销。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802143A_ABST
    Figure CN122802143A_ABST
Patent Text Reader

Abstract

The application belongs to the field of new energy vehicle motor assembly Internet of Things data encryption, and relates to secret communication technology. A new energy vehicle motor permanent magnet assembly data Internet of Things encryption method is provided, the magnetizing transient current characteristics, the press-fit pressure extreme value characteristics and the stator temperature gradient characteristics in the motor permanent magnet assembly process are extracted, the above characteristics are subjected to feature fusion and hash mapping to generate a session key of the current assembly period, based on a generalized Feistel structure, the session key is combined with the physical identification of the assembly node to generate a round key, encryption operation is performed on the assembly data packet to convert plaintext into ciphertext, the ciphertext and the physical feature digest check code are transmitted in the Internet of Things channel, and the receiving end recovers the session key according to the locally synchronized physical feature and performs decryption. The application takes the assembly physical sensing quantity as a key generation entropy source, eliminates the risk of interception of an independent key distribution channel, improves the physical unclonability of the key, reduces the encryption calculation overhead, and enhances the tamper resistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of IoT data encryption for new energy vehicle motor assembly, and involves secure communication technology. It provides an IoT encryption method for permanent magnet assembly data of new energy vehicle motors. Background Technology

[0002] During the assembly of permanent magnets in new energy vehicle motors, sensor data such as magnetization current, pressing pressure, and stator temperature need to be uploaded to the control center via the Internet of Things (IoT). To ensure data security, existing technologies typically employ standard encryption algorithms to encrypt the assembly data. In the key generation stage, conventional schemes rely on pseudo-random number generators to produce the initial key. Specifically, the cryptographic chip inside the IoT terminal device generates a pseudo-random number sequence based on a clock seed or register state, using a linear congruential algorithm or hash operation. This sequence is then used as the session key for the encryption process. This key generation method is completely detached from the physical state of the assembly site, completing key construction only at the digital logic level, and requires the establishment of an independent key distribution channel to synchronize the generated session key to the receiving end.

[0003] In the encryption and data interaction stages, existing technologies generally employ standard Advanced Encryption Standards (AES) or asymmetric encryption schemes. After obtaining the session key generated by the pseudo-random number generator, the sending end divides the assembly data into blocks of fixed block length. It then uses the session key to expand fixed round keys for each round, performing multiple rounds of byte substitution, row shifting, column mixing, and round key addition operations to output ciphertext data. Subsequently, the sending end transmits the ciphertext data and independently distributed key information to the receiving end via an IoT channel. Upon receiving the ciphertext, the receiving end first receives and verifies the session key transmitted from the key distribution channel through a secure protocol, and then uses this session key to perform inverse operations on the ciphertext to recover the plaintext assembly data. During this process, the ciphertext verification mechanism relies solely on the attached message authentication code and is unrelated to the physical state of the assembly process.

[0004] In the existing IoT encryption schemes for permanent magnet assembly data in new energy vehicle motors, key generation is isolated from the physical sensing status of the assembly site. This necessitates that the sending and receiving ends rely on independent key distribution channels to synchronize session keys. In the high-concurrency and resource-constrained IoT environment of new energy vehicle motor assembly lines, independent key distribution channels are highly vulnerable to man-in-the-middle and replay attacks. Furthermore, frequent key negotiation and synchronization interactions consume significant amounts of computing and communication resources from terminal devices, causing key synchronization delays and data transmission interruptions. Therefore, existing technologies suffer from the core technical problem of relying on independent key distribution channels due to key generation being detached from the physical assembly status, leading to vulnerability to key distribution attacks and excessive resource consumption. Summary of the Invention

[0005] The purpose of this invention is to provide an IoT encryption method for the assembly data of permanent magnet motors in new energy vehicles, which can solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the technical invention adopted by this invention is as follows: The IoT encryption method for permanent magnet assembly data of new energy vehicle motors includes: extracting the characteristics of instantaneous magnetization current, extreme values ​​of pressing pressure, and stator temperature gradient during the assembly process of permanent magnets in motors; The instantaneous magnetization current characteristics, the extreme values ​​of the pressing pressure, and the stator temperature gradient characteristics are fused and hashed to generate a session key for the current assembly cycle. Based on the generalized Feistel structure, the session key is combined with the physical identifier of the assembly node to generate a round key, and the assembly data packet is encrypted for a set number of rounds to convert plaintext data blocks into ciphertext data blocks. In the IoT data upload channel, the encrypted data block and the digest check code of the physical feature are transmitted; The receiving end recovers the session key based on the physical characteristics extracted locally and performs decryption operations.

[0007] Preferably, the extraction of the instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics during the assembly process of the permanent magnet of the motor includes: synchronously acquiring the magnetization current waveform, pressing pressure curve, and stator temperature sequence at a preset sampling frequency within the time overlap interval of the permanent magnet magnetization and pressing processes. Wavelet denoising processing is performed on the magnetizing current waveform, the pressing pressure curve, and the stator temperature sequence to eliminate high-frequency noise introduced by electromagnetic interference and mechanical vibration of the assembly line. The mean value of the peak of the magnetizing current waveform after denoising is calculated as the instantaneous magnetizing current feature. The maximum peak value of the press-fit pressure curve after denoising is extracted as the extreme value feature of the press-fit pressure. The absolute value of the slope of the stator temperature sequence after denoising is fitted as the stator temperature gradient feature.

[0008] Preferably, the feature fusion and hash mapping of the magnetization instantaneous current feature, the pressing pressure extreme value feature, and the stator temperature gradient feature to generate the session key for the current assembly cycle includes: performing floating-point scaling quantization on the magnetization instantaneous current feature, the pressing pressure extreme value feature, and the stator temperature gradient feature respectively, and converting them into equal-length integer feature sequences; Following the sequence of magnetization, pressing, and temperature measurement, the equal-length integer feature sequences are concatenated into a fused feature vector. The fused feature vector is input into a cryptographic hash function, the high-order bits of the output digest are extracted as the session key for the current assembly cycle, and the low-order bits of the output digest are truncated as the initial vector for subsequent encryption operations.

[0009] Preferably, the step of generating a round key based on the generalized Feistel structure, using the session key in combination with the physical identifier of the assembly node, and performing a set number of encryption operations on the assembly data packet to convert the plaintext data block into a ciphertext data block includes: dividing the assembly data packet into a first data sub-block and a second data sub-block of equal length on the left and right sides. Perform a bitwise XOR operation between the session key and the physical identifier of the assembly node to generate the basic round key seed; For each encryption round, a cyclic left shift and nonlinear permutation operation are performed on the basic round key seed to generate the round key for the current round; In the current round, the second data sub-block and the round key of the current round are input into the lightweight round function for operation. The operation result is XORed with the first data sub-block to obtain the updated second data sub-block. The original second data sub-block is updated to the first data sub-block. After iteratively executing the set number of rounds, the ciphertext data block is output.

[0010] Preferably, in the IoT data upload channel, the encrypted data block and the digest check code of the physical feature are transmitted; The receiving end recovers the session key based on the physical features extracted locally and performs decryption operations, including: calculating a cyclic redundancy check code based on the magnetization instantaneous current features, the pressing pressure extreme value features and the stator temperature gradient features, and appending the check code as the digest check code to the end of the ciphertext data block for transmission; After the receiving end obtains data from the IoT data upload channel, it calculates the receiving end check code based on the receiving end physical characteristics extracted locally, compares the receiving end check code with the digest check code, and if they match, it replays the hash mapping based on the receiving end physical characteristics extracted locally to recover the session cyclic redundancy check key, and performs reverse decryption operation on the ciphertext data block.

[0011] Preferably, before calculating the mean peak value of the denoised magnetizing current waveform as the feature of the instantaneous magnetizing current, the method further includes: for the denoised magnetizing current waveform, searching for the current pulse interval with the largest amplitude, and extracting the rise time width and fall time width of the current pulse interval. When the absolute value of the difference between the rising edge time width and the falling edge time width exceeds the preset time tolerance, it is determined that there is a transient abnormality in the magnetization process, and the current pulse interval is removed. A moving average calculation is performed on the peak of the residual current pulse interval, and the result of the moving average calculation is used as the characteristic of the magnetization instantaneous current to eliminate the influence of assembly transient abnormal disturbances on the stability of the characteristic quantity.

[0012] Preferably, after inputting the fused feature vector into a cryptographic hash function and extracting the high-order bit segment of the output digest as the session key for the current assembly cycle, the method further includes: recording the time sequence number of the current assembly cycle, and concatenating the time sequence number with the high-order bit segment to form an intermediate key sequence; The intermediate key sequence is input into the key expansion function to generate a session key set consisting of multiple subkeys; As the time sequence number increases, the feature fusion and hash mapping are re-executed based on the newly acquired physical characteristics to update the session key set, thereby realizing a one-time dynamic update of the session key within a single assembly cycle.

[0013] Preferably, inputting the second data sub-block and the round key of the current round into a lightweight round function for computation includes: performing a bitwise XOR operation on the second data sub-block and the round key of the current round to obtain an intermediate state vector; The intermediate state vector is divided into multiple 4-bit S-box input vectors; The S-box input vector is input into a 4-bit lightweight S-box for nonlinear substitution, and the S-box output vector is output. The S-box output vector is input to the bit-level permutation layer, and bit position swapping is performed according to the preset sparse permutation matrix to obtain the diffused state vector. The diffused state vector is used as the operation result of the lightweight round function.

[0014] Preferably, during the process of performing a set number of encryption operations on the assembled data packet, the method further includes: inserting a random mask operation when performing the bitwise XOR operation and nonlinear substitution operation in each encryption round; Generate a random mask sequence corresponding to the current round, and XOR the random mask sequence with the intermediate data variable to be encrypted to cover the mask; After performing the nonlinear substitution operation, the random mask sequence is reverse-eliminated based on the mask compensation logic to restore the intermediate operation result without mask. The generation frequency of the random mask sequence is synchronized with the clock cycle of the encryption operation, eliminating the correlation between power consumption trajectory and key bits during the operation.

[0015] Preferably, the receiving end recovers the session key based on the locally synchronously extracted physical features and performs decryption operations, further comprising: when the receiving end checksum calculated based on the locally synchronously extracted physical features is inconsistent with the digest checksum, the receiving end requests the sending end to retransmit the secure hash digest of the physical features; After obtaining the secure hash digest, the receiving end parses the secure hash digest in a trusted execution environment to restore the original physical characteristics; Based on the original physical characteristics, a fault-tolerant session key is regenerated. The fault-tolerant session key is used to attempt to decrypt the ciphertext data block. If the decrypted plaintext data passes the verification, it is accepted. If the verification fails, the ciphertext data block is discarded and an exception log is recorded.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention extracts the instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics during the assembly process of permanent magnets in motors. These features are then fused and hashed to generate a session key for the current assembly cycle. Based on a generalized Fiestal structure, a round key is generated using the session key combined with the physical identifier of the assembly node for encryption. At the receiving end, the session key is recovered based on locally extracted physical features for decryption. This method directly uses the physical sensing quantities at the assembly site as the random entropy source for cryptographic key generation, creating a strong binding relationship between the session key and the current physical state of the permanent magnet assembly. The sending and receiving ends can independently generate the same session key based on the locally extracted physical features from the same assembly process, eliminating the need for establishing and maintaining independent key distribution channels, removing the risk of key interception or tampering on the distribution link, improving the physical non-cloning property of key generation, avoiding complex key negotiation interactions in high-concurrency assembly lines, and reducing the communication overhead of IoT terminal devices.

[0017] 2. When extracting physical features, this invention searches for the maximum current pulse interval based on the magnetizing current waveform. When the difference between the rising and falling edge time widths exceeds the tolerance, the abnormal pulse interval is discarded and a moving average calculation is performed, eliminating the impact of assembly transient abnormal disturbances on the stability of the feature quantity. After generating the session key, the timing number of the assembly cycle is recorded and concatenated with the high-order bit segment to input the key expansion function, realizing one-time dynamic update of the session key within a single assembly cycle. When performing lightweight round function operations, the data sub-blocks are XORed with the round key and then subjected to four-bit to four-bit nonlinear substitution and bit-level permutation, reducing the computational overhead and power consumption of the encryption operation. A random mask operation synchronized with the clock cycle is inserted during the encryption process, eliminating the correlation between the computational power consumption trajectory and the key bits. When the verification at the receiving end is inconsistent, a secure hash digest of the physical features is requested and parsed and retried in a trusted execution environment, improving the fault tolerance capability and system robustness of data recovery. Attached Figure Description

[0018] Figure 1 Data acquisition and preprocessing process for permanent magnet assembly in new energy vehicle motors; Figure 2 This is the process for physical feature extraction and anomaly removal; Figure 3 For feature fusion and session key generation process; Figure 4 An assembly data encryption process based on a generalized Feistel structure; Figure 5 For IoT data transmission and cloud verification / decryption processes; Figure 6 To verify the fault tolerance handling and data recovery process. Detailed Implementation

[0019] In a preferred embodiment, the IoT encryption method for permanent magnet assembly data of new energy vehicle motors is applied to an assembly line system comprising a magnetization station, a pressing station, a stator temperature sensing node, an edge computing terminal, and a cloud control center. The magnetization station is equipped with a current sensor to collect the instantaneous current waveform during the magnetization process of the permanent magnet; the pressing station is equipped with a pressure sensor to collect the pressure change curve during the pressing of the permanent magnet into the stator slot; the stator temperature sensing node is equipped with a multi-point thermocouple array to collect the temperature distribution sequence of the stator core during assembly. The edge computing terminal is connected to each sensor via an industrial fieldbus to achieve synchronous data acquisition and preprocessing; the cloud control center establishes a data transmission channel with the edge computing terminal through an IoT communication network, receives the encrypted assembly data, and performs decryption and storage operations.

[0020] In this embodiment, the edge computing terminal first extracts the instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics during the assembly process of the motor permanent magnet. The magnetization and pressing processes have a fixed time overlap interval within the permanent magnet assembly cycle. This interval corresponds to the process where the permanent magnet is immediately pressed into the stator slot after magnetization, typically lasting 200ms to 500ms. Within this time overlap interval, the edge computing terminal synchronously triggers data acquisition from three sensors at a preset sampling frequency, ensuring that the acquired magnetization current waveform, pressing pressure curve, and stator temperature sequence are strictly aligned on the time axis. The acquired raw sensor data is first preprocessed to eliminate noise components introduced by electromagnetic interference and mechanical vibration in the production line environment, and then the corresponding physical characteristic quantities are calculated.

[0021] Furthermore, the edge computing terminal performs feature fusion and hash mapping on the extracted instantaneous magnetization current features, pressing pressure extreme value features, and stator temperature gradient features to generate the session key for the current assembly cycle. All three physical feature quantities are floating-point values, which are first converted to fixed-length integer data through floating-point scaling quantization to ensure that features of different dimensions can be uniformly concatenated and processed. Following the execution order of magnetization, pressing, and temperature measurement, the three equal-length integer feature sequences are concatenated into a continuous fused feature vector. This fused feature vector is input into a pre-selected cryptographic hash function, which outputs a fixed-length digest value. The high-order bits of this digest value are extracted as the session key for the current assembly cycle, while the low-order bits are truncated as the initial vector for subsequent encryption operations. The length of the session key is determined according to the security requirements of the encryption algorithm, typically 128 bits or 256 bits.

[0022] In this embodiment, based on the generalized Feistel structure, a round key is generated by combining the generated session key with the physical identifier of the assembly node. This round of encryption operations is then performed on the assembly data packet to convert plaintext data blocks into ciphertext data blocks. The assembly data packet contains raw sensor data such as magnetization current, pressing pressure, and stator temperature, as well as metadata such as assembly station number, product serial number, and assembly timestamp. Its total length is typically 1024 bits to 4096 bits. First, the assembly data packet is divided into multiple plaintext data blocks of a fixed length, with each plaintext data block having the same length as the session key. For each plaintext data block, it is further divided into a first data sub-block and a second data sub-block of equal length. The assembly node physical identifier, pre-stored in the edge computing terminal, is XORed with the session key to generate the basic round key seed. For each encryption round, a cyclic left shift and nonlinear permutation operation are performed on the basic round key seed to generate the round key for the current round. In the current round, the second data sub-block and the round key of the current round are input into a lightweight round function for computation. The computation result is XORed with the first data sub-block to obtain the updated second data sub-block, and the original second data sub-block is updated to the first data sub-block. After iterating through the above encryption rounds a set number of times, the final first data sub-block and the second data sub-block are concatenated to obtain the corresponding ciphertext data block.

[0023] Furthermore, in the IoT data upload channel, encrypted data blocks and digest check codes of physical features are transmitted. The edge computing terminal calculates a cyclic redundancy check (CRC) code based on the extracted instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics. This CRC code is used as the digest check code of the physical features and appended to the end of all encrypted data blocks to form a complete transmission data frame. The transmission data frame is uploaded to the cloud control center via IoT communication protocols such as MQTT or CoAP. The cloud control center, acting as the receiving end, first separates the encrypted data blocks and digest check codes from the data frame upon receiving it. Simultaneously, the cloud control center determines the current assembly cycle using a clock signal synchronized with the edge computing terminal and calculates the receiving end check code based on the pre-stored physical feature data of that assembly cycle. The receiving end check code is compared with the received digest check code. If they match, the hash mapping process is replayed based on the locally extracted physical features to recover the decryption key, which is the same as the session key. Then, the encrypted data blocks are decrypted in reverse order of encryption to obtain the plaintext assembly data.

[0024] In a preferred embodiment, Table 1 shows the key parameter configuration for physical feature extraction of the permanent magnet assembly of the motor. This parameter configuration is applicable to the assembly production line of permanent magnet synchronous motors for mainstream new energy vehicles and can control the computational overhead of data acquisition and processing while ensuring the accuracy of feature extraction.

[0025] Table 1. Parameters for Extracting Physical Features of Motor Permanent Magnet Assembly

[0026] In this embodiment, by directly using the physical sensing quantities at the assembly site as the random entropy source for key generation, a strong binding relationship is formed between the session key and the current physical state of the permanent magnet assembly. The edge computing terminal and the cloud control center can independently generate the same session key based on the physical features extracted locally and synchronously during the same assembly process, without the need to establish an independent key distribution channel.

[0027] In a preferred embodiment, the specific process for extracting the instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics during the assembly of the motor permanent magnet is as follows: First, the time overlap interval between the magnetization process and the pressing process is determined. The start time of this interval is when the magnetization current rises to 90% of its rated value, and the end time is when the pressing pressure drops to 10% of its peak value. Within this time overlap interval, the magnetization current waveform, pressing pressure curve, and stator temperature sequence are synchronously acquired at the sampling frequency shown in Table 1. The magnetization current sensor is a Hall effect current sensor, installed in the output circuit of the magnetizer; the pressing pressure sensor is a piezoelectric pressure sensor, installed at the end of the pressing head; the stator temperature sensing nodes are an 8-point thermocouple array, evenly distributed on the inner circumferential surface of the stator core.

[0028] Wavelet denoising was performed on the acquired magnetizing current waveform, pressing pressure curve, and stator temperature sequence to eliminate high-frequency noise introduced by electromagnetic interference and mechanical vibration from the assembly line. The wavelet denoising process employed discrete wavelet transform to decompose the original signal into approximation coefficients and detail coefficients at different scales. Approximation coefficients correspond to the low-frequency components of the signal and contain its main characteristic information; detail coefficients correspond to the high-frequency components and are mainly composed of noise. For each level of detail coefficients obtained from the decomposition, a soft-thresholding method was used for threshold quantization. Detail coefficients with absolute values ​​less than the threshold were set to zero, while those with absolute values ​​greater than the threshold were retained and shrunk. Finally, the processed approximation coefficients and detail coefficients were reconstructed using inverse discrete wavelet transform to obtain the denoised signal.

[0029] The mathematical expression for the discrete wavelet transform is:

[0030] in, Let J be the wavelet coefficients at scale j and translation k. The original sensing signal, For the mother wavelet function.

[0031] The mathematical expression for soft thresholding is:

[0032] in, These are the wavelet coefficients after thresholding. For the threshold, It is a symbolic function.

[0033] The mean peak value of the denoised magnetizing current waveform is calculated as the instantaneous magnetizing current feature. The maximum peak value of the denoised pressing pressure curve is extracted as the pressing pressure extreme value feature. The absolute value of the slope of the fitted denoised stator temperature sequence is used as the stator temperature gradient feature. For the magnetizing current waveform, the peak value refers to the local maximum value where the current value is greater than the current values ​​of two adjacent sampling points. For the pressing pressure curve, the maximum peak value refers to the maximum pressure value during the entire pressing process. For the stator temperature sequence, the least squares method is used to fit a linear function of temperature change over time, and the absolute value of the slope of this linear function is the stator temperature gradient feature.

[0034] The mathematical expression for fitting a temperature sequence using the least squares method is:

[0035] Where k is the slope of the temperature sequence, and n is the number of sampling points in the temperature sequence. Let i be the time of the i-th sampling point. Let be the temperature value of the i-th sampling point.

[0036] Furthermore, before calculating the peak mean of the denoised magnetizing current waveform as the instantaneous magnetizing current feature, the current pulse interval with the largest amplitude is searched for the denoised magnetizing current waveform. The current pulse interval is defined as the time interval during which the current value rises from 10% of the rated value to the peak value and then falls back to 10% of the rated value. The rise edge time width and fall edge time width of this current pulse interval are extracted. The rise edge time width is the time it takes for the current to rise from 10% to 90% of the rated value, and the fall edge time width is the time it takes for the current to fall from the peak value to 10% of the rated value. When the absolute value of the difference between the rise edge time width and the fall edge time width exceeds the preset time tolerance, it is determined that there is a transient abnormality in the magnetizing process. This abnormality may be caused by voltage fluctuations of the magnetizer, permanent magnet position displacement, or poor sensor contact, etc., and the current pulse interval is then removed. A moving average calculation is performed on the peaks of the remaining current pulse intervals, with a sliding window length of 5 peaks. The result of the moving average calculation is used as the instantaneous magnetizing current feature to eliminate the influence of assembly transient abnormal disturbances on the stability of the feature quantity.

[0037] The mathematical expression for calculating the moving average is:

[0038] in, The characteristic of the instantaneous magnetization current after moving average is given, where m is the number of peaks within the moving window. Let be the current value of the i-th peak.

[0039] In this embodiment, Table 2 shows the parameter configuration for wavelet denoising processing. This parameter configuration is optimized for the noise characteristics of the new energy vehicle motor assembly line, which can effectively remove high-frequency noise introduced by electromagnetic interference and mechanical vibration, while retaining the key feature information of the signal.

[0040] Table 2 Wavelet Denoising Parameter Configuration Table

[0041] In this embodiment, wavelet denoising eliminates high-frequency noise components in the sensing signal, improving the accuracy of physical feature extraction. By detecting and eliminating abnormal pulse intervals and calculating moving averages, the impact of transient abnormal disturbances during assembly on the stability of feature quantities is eliminated, ensuring that the edge computing terminal and the cloud control center can extract consistent physical features and generate the same session key.

[0042] In a preferred embodiment, the specific process of generating the session key for the current assembly cycle by performing feature fusion and hash mapping on the magnetization instantaneous current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics is as follows: First, the three floating-point physical characteristics are respectively subjected to floating-point scaling quantization processing and converted into a fixed-length integer feature sequence. The floating-point scaling quantization processing method is to multiply the floating-point feature value by a preset quantization coefficient and then round it to obtain the integer value. The selection of the quantization coefficient is determined according to the effective value range and quantization precision of the feature, ensuring that the quantized integer value can cover the entire effective value range of the feature, while meeting the quantization precision requirements.

[0043] The mathematical expression for floating-point scaling quantization is:

[0044] in, These are the quantized integer eigenvalues. These are the original floating-point eigenvalues. Let be the quantization coefficient of the i-th feature. This is the rounding function.

[0045] For the characteristics of the instantaneous magnetization current, the quantization coefficient Setting it to 10 quantizes current values ​​from 0A to 500A into integer values ​​from 0 to 5000, occupying 13 bits; for extreme pressure characteristics during press fitting, the quantization coefficient... Setting it to 100 quantizes pressure values ​​from 0kN to 20kN into integer values ​​from 0 to 2000, occupying 11 bits; for stator temperature gradient characteristics, the quantization coefficient... Setting it to 100 quantizes the temperature gradient value from -5℃ / s to 10℃ / s into an integer value from 0 to 1500, occupying 11 bits. To make the three feature sequences equal in length, zeros are padded to the high bits of each integer feature value, expanding it into a 16-bit equal-length integer feature sequence.

[0046] Following the sequence of magnetization, pressing, and temperature measurement, three 16-bit equal-length integer feature sequences are concatenated into a 48-bit fused feature vector. This fused feature vector is then input into a cryptographic hash function; in this embodiment, the SHA-256 hash function is used, which outputs a 256-bit digest value. The first 128 bits of this 256-bit digest value are extracted as the session key for the current assembly cycle, while the last 128 bits are truncated and used as the initial vector for subsequent encryption operations.

[0047] The mathematical expression for splitting the hash map output is:

[0048]

[0049] in, For session key, As the initial vector, The SHA-256 hash function is used. To fuse feature vectors, This indicates that the bit segment from bit a to bit b is extracted.

[0050] Furthermore, after generating the session key for the current assembly cycle, the timing number of the current assembly cycle is recorded. This timing number is a 32-bit unsigned integer value, incrementing from 0, with each assembly cycle corresponding to a unique timing number. The timing number is concatenated with the 128-bit session key to form a 160-bit intermediate key sequence. The intermediate key sequence is input into the key expansion function to generate a session key set consisting of multiple subkeys. The key expansion function uses an expansion algorithm based on a linear feedback shift register to expand the 160-bit intermediate key sequence into N 128-bit subkeys, where N is equal to the number of rounds of encryption operations. When the timing number increments, indicating the start of the next assembly cycle, feature fusion and hash mapping are re-executed based on newly acquired physical characteristics to update the session key set, achieving one-time dynamic updates of the session key within a single assembly cycle.

[0051] The mathematical expression for the key expansion function is:

[0052] in, Let T be the subkey for the i-th round, and T be the time sequence number. This is a bit concatenation operation. This is the linear feedback shift register operation for the i-th iteration.

[0053] In this embodiment, based on the generalized Feistel structure, the process of generating round keys using the session key combined with the physical identifier of the assembly node, and performing a set number of encryption operations on the assembly data packets is as follows: The physical identifier of the assembly node is a 128-bit unique identifier, pre-programmed into the non-volatile memory of the edge computing terminal, set at the factory and unchangeable. A bitwise XOR operation is performed between the 128-bit session key and the 128-bit physical identifier of the assembly node to generate a 128-bit basic round key seed.

[0054] For each encryption round i (i ranges from 1 to R, where R is the total number of encryption rounds; in this embodiment, R = 16), a circular left shift and nonlinear permutation operation are performed on the base round key seed to generate the round key for the current round. The number of bits for the circular left shift is... That is, the left shift is 1 bit in the first round, 2 bits in the second round, ..., 8 bits in the eighth round, 1 bit in the ninth round, and so on. The nonlinear permutation operation uses the same 4-bit S-box as in the lightweight round function. The 128 bits of data after the circular left shift are divided into 32 4-bit groups. Each group is input into the S-box for nonlinear substitution. The results of the substitution are concatenated to obtain the round key for the current round.

[0055] The mathematical expression for generating the round key is:

[0056] in, Let be the round key for the i-th round. The basic round key seed, This is a circular left shift operation of n bits. This is a nonlinear substitution operation for the S-box.

[0057] The plaintext data block is divided into two 64-bit data sub-blocks of equal length, denoted as follows: and ,in This is the first data sub-block. This is the second data sub-block. For the i-th round of encryption, perform the following operations: in, It is a lightweight round function. This is a bitwise XOR operation.

[0058] After iterating through the above operations 16 times, the final result will be... and By concatenating the data, a 128-bit ciphertext data block is obtained.

[0059] The specific operation process of the lightweight round function is as follows. The second data block of 64 bits... With the 64-bit current round key A bitwise XOR operation is performed to obtain a 64-bit intermediate state vector. This intermediate state vector is divided into 16 4-bit S-box input vectors. Each S-box input vector is fed into a 4-bit lightweight S-box for nonlinear substitution, resulting in 16 4-bit S-box output vectors. These 16 S-box output vectors are concatenated into a 64-bit vector, which is then input to a bit-level permutation layer. Bit positions are swapped according to a predefined sparse permutation matrix to obtain the diffused state vector. This diffused state vector is used as the result of the lightweight round function.

[0060] The mathematical expression for the lightweight round function is:

[0061] in, This is a bit-level permutation operation.

[0062] In this embodiment, Table 3 shows the mapping relationship of the 4-bit lightweight S-box. This S-box has good nonlinear characteristics and differential uniformity, and can effectively resist linear cryptanalysis and differential cryptanalysis attacks.

[0063] Table 34-bit Lightweight S-Box Mapping Table

[0064] The sparse permutation matrix used in the bit-level permutation layer is defined as follows: for a 64-bit input vector, the j-th bit (j from 0 to 63) is permuted to the bit-th bit. The position of the bit. This permutation matrix has low hardware implementation complexity while providing sufficient diffusion effect.

[0065] In this embodiment, floating-point scaling quantization and feature concatenation are used to fuse physical features of different dimensions, and a highly random session key is generated through hash mapping. A key expansion function enables dynamic one-time pad updates of the session key within a single assembly cycle, improving the security of the encryption system. A lightweight encryption algorithm based on a generalized Feistel structure is employed, combined with a 4-bit S-box and sparse bit-level permutation, reducing the computational overhead and power consumption of encryption operations, making it suitable for IoT terminal devices with limited computing resources.

[0066] In a preferred embodiment, the specific process of transmitting encrypted data blocks and digest check codes of physical features in the IoT data upload channel, and the receiving end recovering the session key based on the locally extracted physical features and performing decryption operations, is as follows: The edge computing terminal calculates a cyclic redundancy check code based on the extracted instantaneous magnetization current features, press-fit pressure extreme value features, and stator temperature gradient features, and uses this cyclic redundancy check code as the digest check code of the physical features. In this embodiment, the CRC-32 check algorithm is used to generate a 32-bit cyclic redundancy check code.

[0067] The mathematical expression for generating the CRC-32 checksum is:

[0068] in, To fuse the polynomial representation of the feature vectors, In this embodiment, a CRC-32 generator polynomial is generated. .

[0069] The generated 32-bit digest checksum is appended to the end of all ciphertext data blocks to form a complete transmission data frame. The format of the transmission data frame is: [ciphertext data block 1][ciphertext data block 2]...[ciphertext data block N][digest checksum], where N is the number of ciphertext data blocks into which the plaintext assembled data is divided. The transmission data frame is uploaded to the cloud control center via the MQTT protocol. The MQTT protocol uses TLS 1.3 encryption for transmission, further improving the security of data transmission.

[0070] As the receiving end, the cloud control center, upon receiving the transmitted data frame, first extracts a 32-bit digest checksum from the end of the data frame, and then separates all the encrypted data blocks. Simultaneously, the cloud control center determines the current assembly cycle using the PTP precise time protocol synchronized with the edge computing terminal, and retrieves the magnetizing current waveform, pressing pressure curve, and stator temperature sequence synchronously acquired within that assembly cycle from its local database. Following the same physical feature extraction method as the edge computing terminal, the cloud control center calculates the instantaneous magnetizing current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics of the receiving end, and then calculates the receiving end checksum using the same CRC-32 algorithm.

[0071] The receiving end's checksum is compared with the received digest checksum. If they match, it indicates that the physical characteristics stored locally in the cloud control center are consistent with the physical characteristics extracted by the edge computing terminal. At this point, the cloud control center recovers the decryption key, which is identical to the session key, using the same feature fusion and hash mapping method as the edge computing terminal. Then, a decryption operation is performed on each ciphertext data block in reverse order of encryption. The decryption process involves dividing the ciphertext data block into two equal-length 64-bit sub-blocks. and Then, the decryption rounds are executed in reverse order from round 16 to round 1. The decryption operation for each round is as follows: After 16 rounds of iteration, and Plaintext data blocks are obtained by splicing together all plaintext data blocks, and the complete plaintext assembly data is obtained by splicing together all plaintext data blocks.

[0072] Furthermore, during the encryption operation of the assembled data packet in a set number of rounds, a random mask operation is inserted during the bitwise XOR operation and nonlinear substitution operation of each encryption round. A random mask sequence corresponding to the current round is generated, and the length of the random mask sequence is the same as the length of the intermediate data variable to be encrypted, which is 64 bits in this embodiment. The random mask sequence is XORed with the intermediate data variable to be encrypted to cover the mask, and then the nonlinear substitution operation is performed. After the nonlinear substitution operation is completed, the random mask sequence is reverse-eliminated based on the mask compensation logic to restore the unmasked intermediate operation result. The generation frequency of the random mask sequence is synchronized with the clock cycle of the encryption operation, that is, a new random mask sequence is generated for each encryption clock cycle, eliminating the correlation between the power consumption trajectory and the key bits during the operation and resisting side-channel attacks.

[0073] The mathematical expression for random masking is:

[0074] Where X is the original intermediate data variable, and M is a random mask sequence. These are intermediate data variables after the mask is applied.

[0075] The mathematical expression for mask compensation is:

[0076] Where Y is the result of the maskless nonlinear substitution. This is a nonlinear substitution operation for the S-box.

[0077] In this embodiment, Table 4 shows the parameter configuration for random mask generation, which can control the computational overhead of mask generation and compensation while ensuring resistance to side-channel attacks.

[0078] Table 4 Random Mask Generation Parameter Table

[0079] When the receiver's checksum calculated based on the locally extracted physical features does not match the digest checksum, it indicates a discrepancy between the physical features stored locally in the cloud control center and those extracted by the edge computing terminal. This discrepancy may be caused by sensor data transmission errors, damaged storage media, or network latency. In this case, the receiver requests the sender to retransmit the secure hash digest of the physical features. This secure hash digest is a 256-bit digest value obtained by performing a SHA-256 hash operation on the fused feature vector. Upon receiving the retransmission request, the sender transmits the locally stored secure hash digest to the receiver via an encrypted channel.

[0080] After obtaining the secure hash digest, the receiving end parses the secure hash digest in the Trusted Execution Environment (TEE) to restore the original physical characteristics. The TEE is an isolated execution area within the cloud control center, completely isolated from the ordinary operating system environment, preventing malicious programs from attacking the decryption process. In the TEE, a fault-tolerant session key is regenerated based on the restored original physical characteristics, and this key is used to attempt to decrypt the ciphertext data block. After decryption, the decrypted plaintext data undergoes integrity verification using the same CRC-32 algorithm as the hash checksum. If the verification passes, the plaintext data is accepted; if it fails, the ciphertext data block is discarded and an anomaly log is recorded, containing information such as the assembly cycle number, sensor node number, anomaly type, and occurrence time.

[0081] In this embodiment, the integrity of physical features is verified using a cyclic redundancy check (CRC) code, ensuring that the receiver can verify the consistency of the physical features. By inserting a random mask operation synchronized with the clock cycle, the correlation between computational power consumption and key bits is eliminated, improving the encryption system's resistance to side-channel attacks. By requesting a retransmission of the secure hash digest of the physical features when the receiver fails to verify the inconsistency and retrying the retransmission in a trusted execution environment, the fault tolerance of data recovery and the system's robustness are enhanced.

Claims

1. A method for encrypting IoT data of permanent magnet assembly in new energy vehicle motors, characterized in that, include: Extract the characteristics of the instantaneous magnetization current, the extreme value of the pressing pressure, and the stator temperature gradient during the assembly process of the permanent magnet of the motor; The instantaneous magnetization current characteristics, the extreme values ​​of the pressing pressure, and the stator temperature gradient characteristics are fused and hashed to generate a session key for the current assembly cycle. Based on the generalized Feistel structure, the session key is combined with the physical identifier of the assembly node to generate a round key, and the assembly data packet is encrypted for a set number of rounds to convert plaintext data blocks into ciphertext data blocks. In the IoT data upload channel, the encrypted data block and the digest check code of the physical feature are transmitted; The receiving end recovers the session key based on the physical characteristics extracted locally and performs decryption operations.

2. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, The extraction of the instantaneous magnetization current characteristics, pressing pressure extreme value characteristics, and stator temperature gradient characteristics during the assembly process of the permanent magnet of the motor includes: synchronously acquiring the magnetization current waveform, pressing pressure curve, and stator temperature sequence at a preset sampling frequency within the time overlap interval of the permanent magnet magnetization and pressing processes. Wavelet denoising processing is performed on the magnetizing current waveform, the pressing pressure curve, and the stator temperature sequence to eliminate high-frequency noise introduced by electromagnetic interference and mechanical vibration of the assembly line. The mean value of the peak of the magnetizing current waveform after denoising is calculated as the instantaneous magnetizing current feature. The maximum peak value of the press-fit pressure curve after denoising is extracted as the extreme value feature of the press-fit pressure. The absolute value of the slope of the stator temperature sequence after denoising is fitted as the stator temperature gradient feature.

3. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, The process of performing feature fusion and hash mapping on the instantaneous magnetization current feature, the extreme value feature of the pressing pressure, and the stator temperature gradient feature to generate a session key for the current assembly cycle includes: performing floating-point scaling quantization on the instantaneous magnetization current feature, the extreme value feature of the pressing pressure, and the stator temperature gradient feature respectively, and converting them into equal-length integer feature sequences; Following the sequence of magnetization, pressing, and temperature measurement, the equal-length integer feature sequences are concatenated into a fused feature vector. The fused feature vector is input into a cryptographic hash function, the high-order bits of the output digest are extracted as the session key for the current assembly cycle, and the low-order bits of the output digest are truncated as the initial vector for subsequent encryption operations.

4. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, The method based on the generalized Feistel structure, which uses the session key combined with the physical identifier of the assembly node to generate a round key, performs a set number of encryption operations on the assembly data packet to convert plaintext data blocks into ciphertext data blocks, includes: dividing the assembly data packet into a first data sub-block and a second data sub-block of equal length on the left and right sides; Perform a bitwise XOR operation between the session key and the physical identifier of the assembly node to generate the basic round key seed; For each encryption round, a cyclic left shift and nonlinear permutation operation are performed on the basic round key seed to generate the round key for the current round; In the current round, the second data sub-block and the round key of the current round are input into the lightweight round function for operation. The operation result is XORed with the first data sub-block to obtain the updated second data sub-block. The original second data sub-block is updated to the first data sub-block. After iteratively executing the set number of rounds, the ciphertext data block is output.

5. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, In the IoT data upload channel, the encrypted data block and the digest check code of the physical feature are transmitted. The receiving end recovers the session key based on the physical features extracted locally and performs decryption operations, including: calculating a cyclic redundancy check code based on the magnetization instantaneous current features, the pressing pressure extreme value features and the stator temperature gradient features, and appending the check code as the digest check code to the end of the ciphertext data block for transmission; After the receiving end obtains data from the IoT data upload channel, it calculates the receiving end check code based on the receiving end physical characteristics extracted locally, compares the receiving end check code with the digest check code, and if they match, it replays the hash mapping based on the receiving end physical characteristics extracted locally to recover the session cyclic redundancy check key, and performs reverse decryption operation on the ciphertext data block.

6. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 2, characterized in that, Before calculating the mean peak value of the denoised magnetizing current waveform as the feature of the instantaneous magnetizing current, the method further includes: for the denoised magnetizing current waveform, searching for the current pulse interval with the largest amplitude, and extracting the rise time width and fall time width of the current pulse interval. When the absolute value of the difference between the rising edge time width and the falling edge time width exceeds the preset time tolerance, it is determined that there is a transient abnormality in the magnetization process, and the current pulse interval is removed. A moving average calculation is performed on the peak of the residual current pulse interval, and the result of the moving average calculation is used as the characteristic of the magnetization instantaneous current to eliminate the influence of assembly transient abnormal disturbances on the stability of the characteristic quantity.

7. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 3, characterized in that, After inputting the fused feature vector into the cryptographic hash function and extracting the high-order bit segment of the output digest as the session key for the current assembly cycle, the method further includes: recording the time sequence number of the current assembly cycle, and concatenating the time sequence number with the high-order bit segment to form an intermediate key sequence. The intermediate key sequence is input into the key expansion function to generate a session key set consisting of multiple subkeys; As the time sequence number increases, the feature fusion and hash mapping are re-executed based on the newly acquired physical characteristics to update the session key set, thereby realizing a one-time dynamic update of the session key within a single assembly cycle.

8. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 4, characterized in that, The second data sub-block and the round key of the current round are input into a lightweight round function for computation, including: performing a bitwise XOR operation on the second data sub-block and the round key of the current round to obtain an intermediate state vector; The intermediate state vector is divided into multiple 4-bit S-box input vectors; The S-box input vector is input into a 4-bit lightweight S-box for nonlinear substitution, and the S-box output vector is output. The S-box output vector is input to the bit-level permutation layer, and bit position swapping is performed according to the preset sparse permutation matrix to obtain the diffused state vector. The diffused state vector is used as the operation result of the lightweight round function.

9. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, The process of performing a set number of encryption operations on the assembled data packet also includes: inserting a random mask operation when performing the bitwise XOR operation and nonlinear substitution operation in each encryption round; Generate a random mask sequence corresponding to the current round, and XOR the random mask sequence with the intermediate data variable to be encrypted to cover the mask; After performing the nonlinear substitution operation, the random mask sequence is reverse-eliminated based on the mask compensation logic to restore the intermediate operation result without mask. The generation frequency of the random mask sequence is synchronized with the clock cycle of the encryption operation, eliminating the correlation between power consumption trajectory and key bits during the operation.

10. The IoT encryption method for permanent magnet assembly data of new energy vehicle motors according to claim 1, characterized in that, The receiving end recovers the session key based on the locally synchronously extracted physical features and performs decryption operations. It also includes: when the receiving end checksum calculated by the receiving end based on the locally synchronously extracted physical features does not match the digest checksum, the receiving end requests the sending end to retransmit the secure hash digest of the physical features. After obtaining the secure hash digest, the receiving end parses the secure hash digest in a trusted execution environment to restore the original physical characteristics; Based on the original physical characteristics, a fault-tolerant session key is regenerated. The fault-tolerant session key is used to attempt to decrypt the ciphertext data block. If the decrypted plaintext data passes the verification, it is accepted. If the verification fails, the ciphertext data block is discarded and an exception log is recorded.