Dynamic code array generator, system and method based on BCH coding
By using a dynamic code matrix generation method based on BCH encoding, the problems of complex key management, insufficient anti-interference capability, and weak security in multi-device scenarios are solved, achieving efficient and reliable multi-device collaborative authentication, which meets the needs of fields such as intelligent manufacturing and vehicle networking.
Patent Information
- Application Number
- CN202511007167.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-10-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing dynamic code technology suffers from high key management complexity, high redundancy, insufficient anti-interference capability, and weak security in multi-device scenarios. It is difficult to adapt to high-noise channels and complex security threats, resulting in a decline in real-time performance and user experience, and it cannot effectively verify the logical correlation between devices.
A dynamic code matrix generation method based on BCH encoding is adopted. A dynamic factor matrix is generated through a nonlinear mixing function. Combined with row-level and column-level BCH encoding, a synchronization header is added and hierarchical encoding is performed. Error correction and attack identification are performed by combining sparse transmission recovery and Gaussian elimination or belief propagation algorithm, so as to achieve efficient collaborative authentication among multiple devices.
It achieves efficient and reliable authentication between multiple devices in high-noise environments, reduces redundancy and latency, improves security, adapts to multiple transmission formats, and meets the stringent requirements of fields such as intelligent manufacturing and vehicle networking.
Smart Images

Figure CN120880464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and more particularly to a dynamic code array generator, system, and method based on BCH encoding. Background Technology
[0002] While existing dynamic code technologies (such as TOTP and HOTP) are widely used in single-device authentication scenarios, their core design has significant limitations in multi-device collaboration, high-noise channels, and complex security threat scenarios. Traditional single-device dynamic codes generate independent one-time passwords based on hash algorithms, leading to an exponential increase in key management complexity in multi-device scenarios (e.g., managing 100 independent keys for 100 devices). Furthermore, due to the lack of embedded error correction mechanisms, they are susceptible to channel noise (e.g., SMS error rate of 3%-5%) or user input errors during transmission, requiring repeated retransmissions or manual intervention, severely reducing real-time performance and user experience.
[0003] Existing technologies cannot verify the logical relationships between multiple devices (such as device group affiliation or spatial topology). Attackers can disrupt the overall system operation by tampering with some dynamic codes (e.g., in the Industrial Internet of Things, tampering with the dynamic code of a single sensor can cause production line shutdown). Although improved solutions for multi-device scenarios attempt to introduce error correction coding (such as BCH or CRC independent coding), the amount of verification data increases linearly with the number of devices (1500 verification bits when using BCH(31,16,3) coding for 100 devices), far exceeding the single packet capacity limit of Narrowband Internet of Things (NB-IoT). While LDPC-based group coding schemes reduce redundancy, their encoding and decoding complexity is high, making them difficult to process in real time in embedded devices.
[0004] Existing security mechanisms also have serious vulnerabilities: attackers can use replay attacks to reuse intercepted dynamic codes within a time window (accounting for 12% of OTP attacks in the financial sector), or tamper with local code elements through fragmentation attacks (such as forging a single QR code in distributed payments) to destroy transaction integrity. The system lacks non-linear binding protection for dynamic factors (such as insufficient timestamp entropy), which exacerbates the risk of predictive attacks.
[0005] Current technology is facing a bottleneck of "three highs and one low" in multi-device scenarios: high redundancy (explosion of independent encoding and verification data), high latency (surge in time consumption of serial verification across multiple devices), high vulnerability (no logical correlation verification between code elements), and low compatibility (difficulty in adapting to low-power protocols and high-noise channels), which seriously restricts the large-scale application of dynamic code technology in emerging fields such as intelligent manufacturing and vehicle networking. Summary of the Invention
[0006] Therefore, the present invention needs to provide a dynamic code array generator, system, and method based on BCH encoding, providing an efficient and reliable multi-device collaborative security solution.
[0007] This invention provides a dynamic code matrix generator based on BCH encoding, the generator comprising:
[0008] The dynamic factor matrix generation module is used to generate the timestamp T, device identifier hash value H (ID). i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ),s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits.
[0009] The original dynamic code matrix generation module is used to generate the original dynamic code matrix D through parallel hash operations. raw ;
[0010] The layered BCH encoding module is used to process the original dynamic code matrix D. raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1, k1, t1) encoding to each row of data to generate a row parity check matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length;
[0011] The code matrix formatting module is used to format the encoded matrix D. encoded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added.
[0012] Furthermore, the displacement s is dynamic, and the dynamic calculation method of s is s = (T mod 8) + 1, where T is the UTC timestamp.
[0013] Furthermore, t2 satisfies The maximum number of consecutive error columns is determined by the channel's historical packet loss rate statistics.
[0014] Furthermore, the parameters of BCH(n1,k1,t1) satisfy... Furthermore, the code length n1∈{31,63,127} is preferred.
[0015] This invention provides a dynamic code matrix generation and verification system based on BCH encoding. The system includes the generator described above, and further includes a verifier, which includes:
[0016] The code array parsing module is used to extract the synchronization header and detect the position of missing code elements;
[0017] The hierarchical BCH decoding module is used to perform error correction in column-to-row order. Row-level decoding applies BCH(n1,k1,t1) to each row of data to correct errors ≤t1 bits. Column-level decoding applies BCH(n2,k2,t2) to each column of data to correct errors ≤t2 bits.
[0018] The correlation verification module is used to verify whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to the preset value, whether the device identifier hash value matches the pre-registration library, and whether the column counter is strictly monotonically increasing.
[0019] The anti-fragmentation attack identification module is used to determine an attack when the proportion of erroneous symbols exceeds the threshold θ or the correlation verification fails.
[0020] Furthermore, during the data transmission process between the generator and the verifier, sparse transport recovery is used to restore the code array, including:
[0021] Construct a partial observation matrix D′ encoded Mark the position of the missing code element as an unknown variable;
[0022] A linear system of equations is generated based on row-column BCH encoding constraints: G1·x=b1, G2·x=b2; where G1 and G2 are BCH generation matrices, and b1 and b2 are check bit vectors.
[0023] Use Gaussian elimination or belief propagation (BP) algorithm to iteratively solve for unknown variables to recover the complete code matrix.
[0024] Furthermore, the threshold θ of the anti-fragmentation attack module needs to be dynamically adjusted. 'a' represents the safety factor.
[0025] Furthermore, during the initialization phase, the generator and the verifier exchange channel noise levels according to the formula... Calculate the error correction capability and select the matching BCH parameters.
[0026] This invention provides a dynamic code matrix generation method based on BCH encoding, the method comprising:
[0027] Dynamic factor matrix generation steps: Combine timestamp T, device identifier hash value H (ID) i ) and column counter C iAn M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits.
[0028] The original dynamic code matrix generation steps are as follows: The original dynamic code matrix D is generated through parallel hash operations. raw ;
[0029] Layered BCH encoding steps: For the original dynamic code matrix D... raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1,k1,t1) encoding to each row of data to generate a row parity matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2,k2,t2) encoding to generate a parity check matrix C, satisfying... m is the total code length;
[0030] Code matrix formatting steps: Encode the matrix D... encoded =[D raw [R,C] is converted into a digital matrix, QR code array, or binary data block, and a synchronization header with matrix dimensions and encoding parameters is added.
[0031] This invention provides a method for dynamic code matrix generation and verification based on BCH encoding, the method comprising:
[0032] Dynamic factor matrix generation steps: Combine timestamp T, device identifier hash value H (ID) i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ),s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits.
[0033] The original dynamic code matrix generation steps are as follows: The original dynamic code matrix D is generated through parallel hash operations. raw ;
[0034] Layered BCH encoding steps: For the original dynamic code matrix D... raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1,k1,t1) encoding to each row of data to generate a row parity matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length;
[0035] Code matrix formatting steps: Encode the matrix D... encoded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added;
[0036] Code array parsing steps: Extract the synchronization header and detect the position of missing code elements;
[0037] Layered BCH decoding steps: Error correction is performed in column-to-row order; row-level decoding applies BCH(n1, k1, t1) to each row of data to correct errors ≤ t1 bits; column-level decoding applies BCH(n2, k2, t2) to each column of data to correct errors ≤ t2 bits.
[0038] The correlation verification steps are as follows: verify whether the standard deviation σ of the timestamp in the dynamic factor matrix is less than or equal to the preset value, whether the device identifier hash value matches the pre-registration database, and whether the column counter is strictly monotonically increasing.
[0039] Anti-fragmentation attack identification steps: When the proportion of erroneous symbols exceeds the threshold θ or the correlation verification fails, it is determined to be an attack.
[0040] This invention addresses the challenges of dynamic code generation, transmission, and verification in multi-device collaborative authentication scenarios under high concurrency and high noise environments. It solves the problems of key management redundancy, insufficient anti-interference capability, and security fragmentation in traditional single-code systems in fields such as industrial IoT group authentication, distributed payment transactions, vehicle-to-everything (V2X) communication, and emergency communication networks. It can adapt to different transmission formats and meet the stringent requirements of short code length, low redundancy, and high real-time performance. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the generator of the present invention.
[0042] Figure 2 This is a schematic diagram of the generation and verification system of the present invention.
[0043] Figure 3 This is a flowchart of the dynamic code array generation method of the present invention.
[0044] Figure 4 This is a flowchart of the dynamic code array generation and verification method of the present invention. Detailed Implementation
[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0046] like Figure 1 As shown, the present invention provides a dynamic code matrix generator 10 based on BCH encoding. The generator 10 includes: a dynamic factor matrix generation module 11, an original dynamic code matrix generation module 12, a hierarchical BCH encoding module 13, and a code matrix formatting module 14.
[0047] Among them, the dynamic factor matrix generation module 11 is used to combine the timestamp T, the device identifier hash value H (ID) i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T. ± represents the XOR operation. Rotate(x,s) is a left-shift operation that circularly shifts x by s bits.
[0048] M×N refers to the size of the matrix, F ij =H(T±Rotate(H(ID)) i ), s)±C i In this context, H refers to hash calculation, and ID is the device or personnel identifier. In a specific implementation, s is dynamically determined by the lower three bits of T. The shift s is dynamic, and the dynamic calculation method for s is s = (T mod 8) + 1, where T is the UTC timestamp. T is a UTC timestamp accurate to milliseconds, ensuring that the shift pattern is unique every millisecond.
[0049] Among them, the original dynamic code matrix generation module 12 is used to generate the original dynamic code matrix D through parallel hash operation. raw .
[0050] D raw =Truncate(HMAC-SHA3(K,F),l)(key derivation function), where L is the length of a single code, and the result is an M×N matrix after truncation.
[0051] Among them, the layered BCH encoding module 13 is used to encode the original dynamic code matrix D. raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1, k1, t1) encoding to each row of data to generate a row parity check matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. extFor each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length.
[0052] In BCH(n, k, t), n represents the code length, k represents the information bits, and t represents the error correction capability.
[0053] Extended matrix D ext [=D raw ;R].
[0054] The parameters of BCH(n1, k1, t1) satisfy Furthermore, the code length n1∈{31, 63, 127} is preferred.
[0055] In a specific implementation, t2 satisfies The maximum number of consecutive error columns is determined by the channel's historical packet loss rate statistics.
[0056] Among them, the code matrix formatting module 14 is used to format the encoded matrix D encoded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added.
[0057] like Figure 2 As shown, the present invention provides a dynamic code matrix generation and verification system 100 based on BCH encoding. The system 100 includes the generator 10 and the verifier 20, wherein the verifier 20 includes: a code matrix parsing module 21, a layered BCH decoding module 22, an association verification module 23, and an anti-fragmentation attack identification module 24.
[0058] It should be understood that the specific implementation of the generator 10 described above can be applied to this system 20 accordingly, and the specific structure of the generator 10 will not be described in detail.
[0059] Among them, the code array parsing module 21 is used to extract the synchronization header and detect the position of missing code elements.
[0060] The hierarchical BCH decoding module 22 is used to perform error correction in column-to-row order. Row-level decoding applies BCH(n1, k1, t1) to each row of data to correct errors ≤ t1 bits. Column-level decoding applies BCH(n2, k2, t2) to each column of data to correct errors ≤ t2 bits.
[0061] During the initialization phase, the generator and the verifier exchange channel noise levels according to the formula. Calculate the error correction capability and select the matching BCH parameters.
[0062] Among them, the correlation verification module 23 is used to verify whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to the preset value, whether the device identifier hash value matches the pre-registration library, and whether the column counter is strictly monotonically increasing.
[0063] For example, time drift can be limited by verifying whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to 1 second.
[0064] The anti-fragmentation attack identification module 24 is used to determine an attack when the proportion of erroneous symbols exceeds the threshold θ or the correlation verification fails.
[0065] In a specific implementation, the threshold θ of the anti-fragmentation attack module needs to be dynamically adjusted. 'a' is a safety factor, which is adaptively calculated based on real-time channel quality, and is preferably α∈{0.5, 0.8}.
[0066] Code array loss may occur during the data transmission process between the generator and the verifier. This invention also employs sparse transmission recovery to achieve code array recovery, specifically including:
[0067] Construct a partial observation matrix D′ encoded Mark the position of the missing code element as an unknown variable;
[0068] A linear system of equations is generated based on row-column BCH encoding constraints: G1·x=b1 (row constraint), G2·x=b2 (column constraint); where G1 and G2 are BCH generation matrices, and b1 and b2 are check bit vectors.
[0069] Use Gaussian elimination or belief propagation (BP) algorithm to iteratively solve for unknown variables to recover the complete code matrix.
[0070] See Figure 3 As shown, the present invention provides a dynamic code matrix generation method based on BCH encoding, the method comprising steps S11-S14.
[0071] S11: Dynamic factor matrix generation steps.
[0072] Specifically, this involves: combining the timestamp T and the device identifier hash value H(ID) i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits.
[0073] S12: Steps for generating the original dynamic code matrix.
[0074] Specifically, the original dynamic code matrix D is generated through parallel hash operations. raw ;
[0075] S13: Layered BCH encoding steps.
[0076] Specifically, this involves: the original dynamic code matrix D raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1, k1, t1) encoding to each row of data to generate a row parity check matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length;
[0077] S14: Code array formatting steps.
[0078] Specifically, this involves encoding the matrix D... encoded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added.
[0079] It should be understood that the specific implementation of the generator 10 described above can be applied to steps S11-S14 of this method accordingly, and will not be described in detail again.
[0080] like Figure 4 As shown, the present invention provides a dynamic code matrix generation and verification method based on BCH encoding, the method comprising steps S21-S28.
[0081] S21: Steps for generating the dynamic factor matrix.
[0082] S22: Steps for generating the original dynamic code matrix.
[0083] S23: Layered BCH encoding steps.
[0084] S24: Code array formatting steps.
[0085] The specific methods of steps S21-S24 above correspond to steps S11-S14, and will not be described in detail here.
[0086] S25: Code array parsing steps.
[0087] Specifically, this involves: extracting the synchronization header and detecting the location of missing code elements;
[0088] S26: Layered BCH decoding steps.
[0089] Specifically, error correction is performed in column-to-row order; row-level decoding involves applying BCH(n1, k1, t1) to each row of data to correct errors ≤ t1 bits; column-level decoding involves applying BCH(n2, k2, t2) to each column of data to correct errors ≤ t2 bits.
[0090] S27: Correlation verification steps.
[0091] Specifically, this involves verifying whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to a preset value, whether the device identifier hash value matches the pre-registration database, and whether the column counter is strictly monotonically increasing.
[0092] S28: Anti-fragmentation attack identification steps.
[0093] Specifically, if the proportion of erroneous code elements exceeds the threshold θ or the correlation verification fails, it is determined to be an attack.
[0094] It should be understood that the specific implementation of the verifier 20 described above can be applied to steps S25-S28 of this method accordingly, and will not be described in detail again.
[0095] This invention addresses the challenges of dynamic code generation, transmission, and verification in multi-device collaborative authentication scenarios under high concurrency and high noise environments. It employs a nonlinear hybrid generation algorithm for dynamic factor matrices (integrating timestamps, device hashes, and column counters), a row-column two-level BCH encoding optimization model (row-level correction of random errors, column-level repair of burst loss), and a multi-dimensional verification mechanism. This solves the key management redundancy, insufficient anti-interference capabilities, and security fragmentation issues inherent in traditional single-code systems in industrial IoT group authentication, distributed payment transactions, V2X communication, and emergency communication networks. It is adaptable to various transmission formats, including digital matrices, QR code arrays, and binary streams, meeting stringent requirements for short code lengths (e.g., 6 digits), low redundancy (e.g., <20%, a 50%-80% reduction compared to traditional independent encoding), and high real-time performance (e.g., authentication latency ≤150ms for 100 devices). This provides an efficient and reliable multi-device collaborative security solution for smart manufacturing, fintech, smart transportation, and public safety.
[0096] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic code matrix generator based on BCH encoding, characterized in that, The generator includes: The dynamic factor matrix generation module is used to generate the timestamp T, device identifier hash value H (ID). i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits. The original dynamic code matrix generation module is used to generate the original dynamic code matrix D through parallel hash operations. raw ; The layered BCH encoding module is used to process the original dynamic code matrix D. raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1, k1, t1) encoding to each row of data to generate a row parity check matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length; The code matrix formatting module is used to format the encoded matrix D. encoded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added.
2. The dynamic code matrix generator based on BCH encoding according to claim 1, characterized in that, The displacement s is dynamic, and the dynamic calculation method of s is s=(Tmode8)+1, where T is the UTC timestamp.
3. The dynamic code matrix generator based on BCH encoding according to claim 1, characterized in that, The t2 satisfies The maximum number of consecutive error columns is determined by the channel's historical packet loss rate statistics.
4. The dynamic code matrix generator based on BCH encoding according to claim 1, characterized in that, The parameters of BCH(n1, k1, t1) satisfy Furthermore, the code length n1∈{31, 63, 127} is preferred.
5. A dynamic code matrix generation and verification system based on BCH encoding, characterized in that, The system includes a generator as described in any one of claims 1-4, and the system further includes a verifier, the verifier comprising: The code array parsing module is used to extract the synchronization header and detect the position of missing code elements; The hierarchical BCH decoding module is used to perform error correction in column-to-row order. Row-level decoding applies BCH(n1, k1, t1) to each row of data to correct errors ≤ t1 bits. Column-level decoding applies BCH(n2, k2, t2) to each column of data to correct errors ≤ t2 bits. The correlation verification module is used to verify whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to the preset value, whether the device identifier hash value matches the pre-registration library, and whether the column counter is strictly monotonically increasing. The anti-fragmentation attack identification module is used to determine an attack when the proportion of erroneous symbols exceeds the threshold θ or the correlation verification fails.
6. The dynamic code matrix generation and verification system based on BCH encoding according to claim 5, characterized in that, During the data transmission process between the generator and the verifier, sparse transport recovery is used to restore the code array, including: Construct a partial observation matrix D′ encoded Mark the position of the missing code element as an unknown variable; A linear system of equations is generated based on row-column BCH encoding constraints: G1·x=b1, G2·x=b2; where G1 and G2 are BCH generation matrices, and b1 and b2 are check bit vectors. Use Gaussian elimination or belief propagation (BP) algorithm to iteratively solve for unknown variables to recover the complete code matrix.
7. The dynamic code matrix generation and verification system based on BCH encoding according to claim 5, characterized in that, The threshold θ of the anti-fragmentation attack module needs to be dynamically adjusted. 'a' represents the safety factor.
8. The dynamic code matrix generation and verification system based on BCH encoding according to claim 5, characterized in that, During the initialization phase, the generator and the verifier exchange channel noise levels according to the formula. Calculate the error correction capability and select the matching BCH parameters.
9. A method for generating dynamic code matrices based on BCH encoding, characterized in that, The method includes: Dynamic factor matrix generation steps: Combine timestamp T, device identifier hash value H (ID) i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits. The original dynamic code matrix generation steps are as follows: The original dynamic code matrix D is generated through parallel hash operations. raw ; Layered BCH encoding steps: For the original dynamic code matrix D... raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1, k1, t1) encoding to each row of data to generate a row parity matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2, k2, t2) encoding to generate a parity check matrix C, satisfying... m is the total code length; Code matrix formatting steps: After encoding, matrix D... emcpded =[D raw [R, C] are converted into digital matrices, QR code arrays, or binary data blocks, and a synchronization header with matrix dimensions and encoding parameters is added.
10. A method for generating and verifying dynamic code matrices based on BCH encoding, characterized in that, The method includes: Dynamic factor matrix generation steps: Combine timestamp T, device identifier hash value H (ID) i ) and column counter C i An M×N dynamic factor matrix F is generated through a nonlinear mixing function, where F ij =H(T±Rotate(H(ID)) i ), s)±C i The value is dynamically determined by the timestamp T, ± represents the XOR operation, and Rotate(x,s) is a left circular shift operation of x by s bits. The original dynamic code matrix generation steps are as follows: The original dynamic code matrix D is generated through parallel hash operations. raw ; Layered BCH encoding steps: For the original dynamic code matrix D... raw Perform row-level and column-level encoding; where row-level encoding involves applying BCH(n1,k1,t1) encoding to each row of data to generate a row parity matrix R, satisfying... Column-level encoding involves appending the row parity matrix R to D. raw The extended matrix D is then formed. ext For each column of data, apply BCH(n2,k2,t2) encoding to generate a parity check matrix C, satisfying... m is the total code length; Code matrix formatting steps: After encoding, matrix D... encoded =[D raw [R,C] is converted into a digital matrix, QR code array, or binary data block, and a synchronization header with matrix dimensions and encoding parameters is added; Code array parsing steps: Extract the synchronization header and detect the position of missing code elements; Layered BCH decoding steps: Error correction is performed in column-to-row order; row-level decoding applies BCH(n1, k1, t1) to each row of data to correct errors ≤ t1 bits; column-level decoding applies BCH(n2, k2, t2) to each column of data to correct errors ≤ t2 bits. The correlation verification steps are as follows: verify whether the timestamp standard deviation σ in the dynamic factor matrix is less than or equal to the preset value, whether the device identifier hash value matches the pre-registration database, and whether the column counter is strictly monotonically increasing. Anti-fragmentation attack identification steps: When the proportion of erroneous symbols exceeds the threshold θ or the correlation verification fails, it is determined to be an attack.