Data security encryption method for intelligent wearable device and intelligent wearable device

By generating unique keys through block encryption, XOR encryption, hardware features, and user identification, and combining shift encryption and symmetric encryption, the problem of low data encryption security in smart wearable devices is solved, achieving higher encryption security.

CN120979646APending Publication Date: 2025-11-18SHENZHEN ZHIMEIDE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511135078.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing data encryption methods for smart wearable devices are insecure, easily cracked, and have insufficient key management, failing to meet the high data protection requirements.

Method used

A unique key is generated using block encryption, XOR encryption, hardware features, and user identification information, combined with shift encryption and symmetric encryption to form a multi-layered encryption process.

Benefits of technology

It improves the encryption security of data in smart wearable devices, enhances the uniqueness of keys and their relevance to devices and users, and strengthens the encryption effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979646A_ABST
    Figure CN120979646A_ABST
Patent Text Reader

Abstract

The invention provides a data security encryption method for an intelligent wearable device and the intelligent wearable device, and the method comprises the steps: carrying out the blocking processing of user data in the intelligent wearable device, obtaining a plurality of data blocks, and generating a first encryption key of each data block based on the size of each data block; performing XOR encryption on each data block based on the first encryption key of each data block to obtain encrypted data blocks, and splicing the encrypted data blocks according to a preset sequence to obtain a first encrypted data sequence; generating a second encryption key based on the hardware feature information of the intelligent wearable device, and generating a device user key based on the user identity identification information; performing shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain a second encrypted data sequence; and performing symmetric encryption operation on the second encrypted data sequence based on the equipment user key to obtain final encrypted data. According to the invention, the encryption security of the data of the intelligent wearable device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data security encryption method for smart wearable devices and a smart wearable device. Background Technology

[0002] With the rapid development of information technology, data security during transmission and storage is receiving increasing attention. In many fields, especially in the field of smart wearable devices, these devices collect a large amount of users' sensitive personal data, such as health monitoring data, exercise data, and location information. If this data is leaked, tampered with, or illegally accessed, it will pose serious privacy risks and potential harm to users. Therefore, to ensure the security, integrity, and confidentiality of this sensitive data, it is essential to propose data security encryption methods, which can effectively protect data and prevent unauthorized access and malicious attacks.

[0003] However, existing data security encryption methods suffer from a major drawback: low security. These methods often employ a single encryption algorithm to process data, resulting in a fixed encryption mode that is easily exploited by attackers. Furthermore, their simple key management methods lack sufficient security guarantees for key generation, storage, and transmission, making them prone to key leakage. This significantly compromises the security of encrypted data and fails to adequately meet the high data security requirements of smart wearable devices. Summary of the Invention

[0004] This invention provides a data security encryption method and a smart wearable device for improving the encryption security of data in smart wearable devices.

[0005] In a first aspect, the present invention provides a data security encryption method for smart wearable devices, comprising:

[0006] The user data in the smart wearable device is divided into blocks to obtain multiple data blocks. A first encryption key for each data block is generated based on the size of each data block.

[0007] Each data block is XORed and encrypted using the first encryption key for each data block to obtain encrypted data blocks. Then, each encrypted data block is concatenated in a preset order to obtain the first encrypted data sequence.

[0008] A second encryption key is generated based on the hardware feature information of the smart wearable device, and a device user key is generated based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information;

[0009] Based on the second encryption key, a shift encryption operation is performed on the first encrypted data sequence to obtain the second encrypted data sequence;

[0010] The second encrypted data sequence is subjected to symmetric encryption operation based on the device user key to obtain the final encrypted data.

[0011] In a second aspect, the present invention also provides a smart wearable device, applied to the data security encryption method for smart wearable devices as described in the first aspect; the smart wearable device includes:

[0012] The first key generation module is used to divide the user data in the smart wearable device into blocks to obtain multiple data blocks, and generate a first encryption key for each data block based on the size of each data block.

[0013] The first data encryption module is used to perform XOR encryption on each data block based on the first encryption key of each data block to obtain encrypted data blocks, and to concatenate each encrypted data block in a preset order to obtain the first encrypted data sequence.

[0014] The second key generation module is used to generate a second encryption key based on the hardware feature information of the smart wearable device, and to generate a device user key based on the user identity information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identity information includes the user account and biometric information;

[0015] The second data encryption module is used to perform a shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain the second encrypted data sequence.

[0016] The third data encryption module is used to perform symmetric encryption operations on the second encrypted data sequence based on the device user key to obtain the final encrypted data.

[0017] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing computer software programs; and a processor for reading and executing the computer software programs, thereby implementing the data security encryption method for smart wearable devices as described above.

[0018] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the data security encryption method for smart wearable devices as described above.

[0019] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data security encryption method for smart wearable devices as described above.

[0020] The data security encryption method for smart wearable devices provided in this invention generates a first encryption key based on the size of each data block and performs XOR encryption on each data block. Therefore, the block encryption and XOR encryption of the encryption key increase the difficulty of data cracking. Then, a second encryption key is generated based on hardware feature information and a device user key is generated based on user identity information, making the key unique and strongly associated with the device and user, thus enhancing the key's security. Finally, a shift encryption operation is performed using the second encryption key and a symmetric encryption operation is performed using the device user key pair to complete the multiple encryption processing of the first encrypted data sequence, further strengthening the encryption effect. This solves the technical problem of low security in existing methods and improves the encryption security of data for smart wearable devices. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating a data security encryption method for smart wearable devices provided in an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of the smart wearable device provided in an embodiment of the present invention;

[0023] Figure 3 An embodiment diagram of the electronic device provided in this invention;

[0024] Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

[0028] See Figure 1 , Figure 1 This is a flowchart illustrating the data security encryption method for smart wearable devices provided by the present invention. In this embodiment, the executing subject of the data security encryption method for smart wearable devices is the smart wearable device itself. Therefore, the data security encryption method for smart wearable devices includes:

[0029] Step 10: Divide the user data in the smart wearable device into blocks to obtain multiple data blocks, and generate a first encryption key for each data block based on the size of each data block.

[0030] Optionally, the smart wearable device performs block processing on the acquired user data. Block processing involves dividing continuous user data into multiple independent data blocks according to set rules. The block division rules can be determined based on factors such as data type, storage requirements, or encryption efficiency. For example, the blocks can be divided into fixed-size blocks (e.g., each block is 1024 bytes) or blocks can be divided according to logical structure (e.g., motion data blocks divided by time period).

[0031] Furthermore, for each data block, the smart wearable device extracts its data block size (i.e., the number of bytes contained in the data block) and generates a corresponding first encryption key based on this data block size. The generation of the first encryption key needs to be implemented through a specific algorithm to ensure that the key is related to the data block size and has the randomness and security required for encryption, as described in steps 101 to 104.

[0032] In one embodiment, the user data acquired by the smart wearable device is a continuous heart rate monitoring data segment with a total size of 4096 bytes. The device divides the data into blocks of a fixed size, setting each data block to 1024 bytes, thereby dividing the 4096 bytes of user data into four data blocks, denoted as data block 1, data block 2, data block 3, and data block 4, each data block being 1024 bytes in size.

[0033] Step 20: XOR each data block with the first encryption key of each data block to obtain encrypted data blocks, and concatenate each encrypted data block in a preset order to obtain the first encrypted data sequence.

[0034] Furthermore, for each data block obtained in step 10, the smart wearable device performs an XOR encryption operation using the first encryption key corresponding to the data block. The principle of XOR encryption is to perform an XOR operation on each byte in the data block and the corresponding byte in the first encryption key. The result of the operation forms the encrypted data block corresponding to the data block, as described in steps 201 to 204.

[0035] Furthermore, the smart wearable device concatenates these encrypted data blocks sequentially in a preset order (such as the order in which they are segmented) to form a continuous data stream, namely the first encrypted data sequence.

[0036] Step 30: Generate a second encryption key based on the hardware feature information of the smart wearable device, and generate a device user key based on the user identification information of the smart wearable device. The hardware feature information includes the device serial number and processor model. The user identification information includes the user account and biometric information.

[0037] Furthermore, the smart wearable device collects its own hardware characteristic information, including the device serial number (a unique identifier for the device) and processor model (the specific model of the processor used by the device). Further, based on the hardware characteristic information, the smart wearable device generates a second encryption key using a specific key generation algorithm, ensuring that the second encryption key is closely associated with the device hardware and possesses device uniqueness, as described in steps 301 to 304.

[0038] Furthermore, the smart wearable device collects user identification information, which includes a user account (the user's registered account in the device's associated system) and biometric information (such as the user's fingerprint data, heart rate characteristics, etc.). Further, based on the user identification information, the smart wearable device generates a device user key using the SHA-256 hash algorithm, binding the device user key to a specific user and ensuring user uniqueness. In one embodiment, the user identification information is: the user account is user123@example.com, and the biometric information is the fingerprint data "FPData001...".

[0039] The algorithm for generating the device user key is as follows: concatenate the user account and biometric information into the string "user123@example.comFPData001...", and then use the SHA-256 hash algorithm to calculate the hash value (32 bytes) of this string. This hash value is the device user key. For example, the final device user key is: A0B1C2D3E4F5A6B7C8D9E0F1A2B3C4D5E6F7A8B9C0D1E2F3....

[0040] Step 40: Perform a shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain the second encrypted data sequence.

[0041] Furthermore, the smart wearable device uses the second encryption key generated in step 30 to perform a shift encryption operation on the first encrypted data sequence obtained in step 20, as described in steps 401 to 404.

[0042] Step 50: Perform symmetric encryption on the second encrypted data sequence based on the device user key to obtain the final encrypted data.

[0043] Furthermore, the smart wearable device uses the device user key generated in step 30 to perform a symmetric encryption operation on the second encrypted data sequence obtained in step 40. The symmetric encryption operation employs a recognized symmetric encryption algorithm, which uses the same device user key for both encryption and decryption. During the encryption process, the second encrypted data sequence is grouped according to the requirements of the symmetric encryption algorithm, and each group is encrypted using the device user key. Finally, all the encrypted groups are combined to obtain the final encrypted data. This final encrypted data has high security and can only be decrypted using the corresponding device user key.

[0044] Continuing with the above embodiment, the second encrypted data sequence is a data stream (total length 4096 bytes), and the device user key is A0B1C2D3E4F5A6B7C8D9E0F1A2B3C4D5E6F7A8B9C0D1E2F3... (32 bytes, conforming to the key length requirement of the AES-256 algorithm). The second encrypted data sequence is symmetrically encrypted using the AES-256 algorithm in CBC mode, with the initialization vector (IV) being a randomly generated 16-byte data set "0123456789ABCDEF". The device divides the second encrypted data sequence into 16-byte groups (padding the last group if it is less than 16 bytes), and sequentially performs AES-256 encryption on each group using the device user key and the initialization vector. All encrypted groups are then combined sequentially to obtain the final encrypted data.

[0045] In this embodiment of the invention, a first encryption key is generated based on the size of each data block, and each data block is XORed with an encryption key. Therefore, the difficulty of cracking the data is increased by using block encryption and XORing with the encryption key. Then, a second encryption key is generated based on hardware feature information, and a device user key is generated based on user identity information. This makes the key unique and strongly associated with the device and the user, thus enhancing the security of the key. Finally, a shift encryption operation is performed using the second encryption key, and a symmetric encryption operation is performed using the device user key pair to complete the multiple encryption processing of the first encrypted data sequence, further strengthening the encryption effect and improving the encryption security of data from smart wearable devices.

[0046] In one embodiment, steps 101 to 104 include:

[0047] Step 101: For each data block, perform prime factorization based on the data block size to obtain prime factors, and construct a prime factor matrix based on the product of any two prime factors as matrix elements.

[0048] Optionally, for each data block, the smart wearable device performs prime factorization on the data block size. Prime factorization decomposes a positive integer into a product of prime numbers, which are the prime factors of the data block size. Further, the smart wearable device selects any two prime factors and performs multiplication, using the resulting product as matrix elements. A prime factor matrix is ​​constructed according to certain rules (e.g., combining prime factors in the order they are arranged). If the number of prime factors is n, the number of rows and columns of the matrix can be determined based on n. For example, when n is 4, a 2x2 matrix can be constructed.

[0049] Continuing with the above embodiment, each data block is 1024 bytes in size. Prime factorization is performed on 1024: 1024 = 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2, and its prime factors are ten 2s (i.e., 2, 2, 2, 2, 2, 2, 2, 2, 2). Any two prime factors are randomly selected for multiplication. Since all prime factors are 2, the product of any two is 2 × 2 = 4. The prime factor matrix is ​​constructed using a 5x2 matrix structure (because 10 prime factors can form 10 product pairs), with all matrix elements being 4. Therefore, the prime factor matrix is:

[0050]

[0051] Step 102: Perform a modulo 256 operation on each matrix element in the prime factor matrix to obtain the modulo operation result matrix, and extract the position indices of all matrix elements in the modulo operation result matrix in row-major order to generate an element position sequence.

[0052] Furthermore, the smart wearable device performs a modulo-256 operation on each element of the prime factor matrix. This operation calculates the remainder when each element is divided by 256. The results form a modulo operation result matrix, which has the same number of rows and columns as the prime factor matrix. Then, following row-major order (starting from the first element of the first row, iterating through all elements in the first row, then the second row, and so on), the position index of each element in the modulo operation result matrix is ​​extracted. The position index is represented in the form of (row index, column index) (both row and column indices are counted starting from 0). All position indices are arranged sequentially to form an element position sequence.

[0053] Continuing with the above example, all elements in the prime factor matrix are 4. Performing a modulo 256 operation on each element, the remainder of 4 divided by 256 is 4. Therefore, the matrix resulting from the modulo operation is the same as the prime factor matrix.

[0054]

[0055] Step 103: Based on the element position sequence and the matrix of the modulo operation result, generate a sequence mapping value array according to the matrix element corresponding to each position in the position sequence.

[0056] Furthermore, the smart wearable device generates a sequence mapping value array based on the element position sequence and the modulo operation result matrix obtained in step 102. Specifically, for each position index (row index i, column index j) in the element position sequence, the matrix element value at the corresponding position (row i, column j) is extracted from the modulo operation result matrix, and the element values ​​are arranged sequentially according to the order of the element position sequence to obtain the sequence mapping value array.

[0057] Continuing with the above embodiment, the element position sequence is [(0,0), (0,1), (1,0), (1,1), (2,0), (2,1), (3,0), (3,1), (4,0), (4,1)], and the element value of each position in the modulo operation result matrix is ​​4. For the first position index (0,0) in the sequence, the corresponding matrix element value is 4; for the second position index (0,1), the corresponding matrix element value is 4; and so on, the element value corresponding to each position index is 4, and the sequence mapping value array is [4,4,4,4,4,4,4,4,4,4].

[0058] Step 104: Based on the sequence mapping value array, perform an XOR iteration operation starting from the first element to obtain the iteration result value, and determine the first encryption key for each data block. The iteration result value at each step is the XOR result of the previous iteration result value and the current array element.

[0059] Furthermore, the smart wearable device performs an XOR iteration operation on the sequence mapping value array obtained in step 103 to generate the first encryption key for each data block. The rule for the XOR iteration operation is as follows: the initial iteration result value is set to 0. Starting from the first element of the array, the iteration result value of each step is equal to the result of the XOR operation between the previous iteration result value and the current array element. That is, the iteration result value is "0 XOR first element", "previous result XOR second element", and so on, until the operation is completed for all elements in the array. The final iteration result value is the first encryption key for the data block.

[0060] Continuing with the above embodiment, the sequence mapping value array is [4, 4, 4, 4, 4, 4, 4, 4, 4].

[0061] The XOR iteration operation process is as follows:

[0062] The initial iteration result value is 0.

[0063] Step 1: 0XOR4 = 4.

[0064] Step 2: 4XOR4 = 0.

[0065] Step 3: 0XOR4 = 4.

[0066] Step 4: 4XOR4 = 0.

[0067] Step 5: 0XOR4 = 4.

[0068] Step 6: 4XOR4 = 0.

[0069] Step 7: 0XOR4 = 4.

[0070] Step 8: 4XOR4 = 0.

[0071] Step 9: 0XOR4 = 4.

[0072] Step 10: 4XOR4 = 0.

[0073] The final iteration result is 0, therefore the first encryption key is 0 (represented as 00H in hexadecimal).

[0074] This invention utilizes the distribution of prime factors of the data block size as the source of key generation, deeply binding the first encryption key to the attributes of the data block itself, thus avoiding the irrelevance of the key to the data block. Simultaneously, XOR iteration operations enhance the key's resistance to cracking, ensuring that even with the same data block size, subtle differences in the arrangement of prime factors or matrix construction will generate different keys. This allows the final generated first encryption key to be effectively XOR-encrypted, achieving secure encryption based on the characteristics of the data block itself.

[0075] In one embodiment, steps 201 to 204 include:

[0076] Step 201: For each data block, the first encryption key and the data block are converted into binary to obtain a binary key and a binary data block sequence. The binary data block sequence is then divided based on the key length of the binary key to obtain a data block subsequence.

[0077] Optionally, for each data block, the smart wearable device converts the first encryption key generated in step 104 into binary form to obtain a binary key; at the same time, it converts the original content of the data block into binary form to obtain a binary data block sequence (a continuous sequence of 0s and 1s).

[0078] Furthermore, the smart wearable device divides the binary data block sequence into several data block subsequences based on the key length (i.e., the number of binary bits) of the binary key. The length of each data block subsequence is the same as the length of the binary key. If the total length of the binary data block sequence is not an integer multiple of the key length, the last data block subsequence is padded with zeros to make its length equal to the key length.

[0079] Continuing with the above embodiment, data block 1 is 1024 bytes in size, and its first encryption key is 0 (hexadecimal 00H), which is converted to an 8-bit binary key as "00000000" (key length is 8 bits). The original content of data block 1 is the hexadecimal sequence "A1B2C3D4" (taking only 4 bytes as an example, the actual size is 1024 bytes), which is converted to the binary data block sequence as: "A1" → "10100001", "B2" → "10110010", "C3" → "11000011", "D4" → "11010100", which, after concatenation, yields the binary data block sequence: "10100001101100101100001111010100" (total length 32 bits).

[0080] Dividing the data into 4 sub-sequences based on the 8-bit key length:

[0081] Subsequence 1: "10100001" (first 8 digits).

[0082] Subsequence 2: "10110010" (middle 8 bits).

[0083] Subsequence 3: "11000011" (middle 8 bits).

[0084] Subsequence 4: "11010100" (last 8 bits).

[0085] Since the total length is exactly a multiple of 8, there is no need to pad with zeros.

[0086] Step 202: Expand the binary key based on the sequence length of the binary data block sequence to generate a key expansion sequence, and extract the key subsequence of each data block subsequence based on the key expansion sequence.

[0087] Further, the smart wearable device expands the binary key according to the total length of the binary data block sequence obtained in step 201 to generate a key expansion sequence. Optionally, the expansion rule in this embodiment of the invention is to repeatedly concatenate the binary key until its total length is equal to the length of the binary data block sequence. Further, the smart wearable device extracts key subsequences corresponding to each data block subsequence from the key expansion sequence according to the same length (i.e., key length) of the data block subsequences divided in step 201, with the length of each key subsequence being consistent with the length of the data block subsequence.

[0088] Continuing with the above embodiment, the total length of the binary data block sequence is 32 bits, and the binary key is "00000000" (8 bits). The binary key is expanded by repeating "00000000" four times to obtain the 32-bit key expansion sequence: "000000000000000000000000000000000000".

[0089] Extract the key subsequence corresponding to each data block subsequence, using an 8-bit length:

[0090] Key subsequence 1: "00000000" (corresponding to data block subsequence 1).

[0091] Key subsequence 2: "00000000" (corresponding to data block subsequence 2).

[0092] Key subsequence 3: "00000000" (corresponding to data block subsequence 3).

[0093] Key subsequence 4: "00000000" (corresponding to data block subsequence 4).

[0094] Step 203: Perform an XOR operation on the corresponding data block subsequence based on each key subsequence to obtain an XOR subsequence, and then add all bits in each XOR subsequence and take the remainder when divided by 2 to obtain the check value.

[0095] Furthermore, the smart wearable device performs an XOR operation on each data block subsequence obtained in step 201 and the corresponding key subsequence obtained in step 202. The XOR operation rule is: if two binary bits are the same, the result is 0; if they are different, the result is 1. After the operation, an XOR subsequence (with the same length as the data block subsequence) is obtained. For each XOR subsequence, all the binary bits (0 or 1) contained in it are summed, and then the sum is modulo 2. The remainder is the check value (0 or 1) of the XOR subsequence.

[0096] Continuing with the above embodiments, let's take data block subsequence 1 and its corresponding key subsequence 1 as an example:

[0097] Data block subsequence 1: "10100001", key subsequence 1: "00000000".

[0098] XOR operation process:

[0099] 1XOR0=1, 0XOR0=0, 1XOR0=1, 0XOR0=0, 0XOR0=0, 0XOR0=0, 0XOR0=0, 1XOR0=1, resulting in the XOR subsequence 1: "10100001".

[0100] Sum all bits of the XOR subsequence 1: 1+0+1+0+0+0+0+1=3. The remainder of 3 divided by 2 is 1. Therefore, the check value 1 is 1.

[0101] Similarly, the results of other subsequence operations are as follows: The data block subsequence "10110010" is XORed with the key subsequence "00000000", resulting in the XOR subsequence "10110010". The sum is 1 + 0 + 1 + 1 + 0 + 0 + 1 + 0 = 4. Taking the remainder when divided by 2 gives 0, so the checksum 2 is 0. The data block subsequence "11000011" is XORed with the key subsequence "00000000", resulting in the XOR subsequence "11000011". The sum is 1 + 1 + 0 + 0 + 0 + 0 + 1 + 1 = 4. Taking the remainder when divided by 2 gives 0, so the checksum 3 is 0. The data block subsequence 4 "11010100" is XORed with the key subsequence 4 "00000000" to obtain the XOR subsequence 4 "11010100". The sum is 1+1+0+1+0+1+0+0 = 4. Taking the remainder when divided by 2 gives 0. The check value 4 is 0.

[0102] Step 204: Concatenate each XOR subsequence and its corresponding check value to obtain an extended XOR subsequence, and then concatenate all extended XOR subsequences in order into a binary sequence and convert it to hexadecimal to obtain an encrypted data block.

[0103] Furthermore, the smart wearable device concatenates each XOR subsequence obtained in step 203 with its corresponding check value. The concatenation rule is that the check value is added to the end of the XOR subsequence to form an extended XOR subsequence (the length of which is the length of the XOR subsequence + 1). All extended XOR subsequences are concatenated sequentially according to the division order in step 201 to form a complete binary sequence. This binary sequence is then converted into hexadecimal form (each 4 binary bits correspond to 1 hexadecimal bit) to obtain the final encrypted data block.

[0104] Continuing with the above embodiments, the extended XOR sub-sequences are as follows:

[0105] Extended XOR subsequence 1: XOR subsequence 1 "10100001" + check value 1 "1" → "101000011".

[0106] Extended XOR subsequence 2: XOR subsequence 2 "10110010" + check value 2 "0" → "101100100".

[0107] Extended XOR subsequence 3: XOR subsequence 3 "11000011" + check value 3 "0" → "110000110".

[0108] Extended XOR subsequence 4: XOR subsequence 4 "11010100" + check value 4 "0" → "110101000".

[0109] By concatenating all the extended XOR subsequences in order, we obtain the binary sequence:

[0110] Convert the binary sequence “101000011101100100110000110110101000” to hexadecimal (grouping 4 bits together, padding with 0s at the end if necessary):

[0111] Grouping: 101000011101100100110000110110101000 → After padding with zeros, it becomes 1010000111011001001100001101101010000000 (the last group is padded with 3 zeros).

[0112] Convert to hexadecimal: A1D930DA8 → After merging, the encrypted data block "0xA1D930DA8" is obtained (the actual length is adjusted according to the original data block).

[0113] This invention refines the XOR operation between the data block and the key to the subsequence level, and combines it with a key expansion mechanism to ensure the integrity of the encryption. At the same time, it achieves a simple verification capability of the encryption process through a check value (based on the sum and remainder of all bits of the XOR subsequence), which can initially verify the integrity of the encrypted subsequence. This makes the finally generated encrypted data block not only hide the characteristics of the original data, but also enhances the anti-interference capability in data transmission or storage through the check value, thereby improving the initial encryption strength and reliability of user data.

[0114] In one embodiment, steps 301 to 304 include:

[0115] Step 301: Convert each character in the device serial number and processor model into the corresponding Unicode encoding value to obtain the first encoding sequence and the second encoding sequence.

[0116] Optionally, the smart wearable device can extract the device serial number and processor model corresponding string from its own hardware feature information.

[0117] Furthermore, the smart wearable device converts each character in the string corresponding to the device serial number and processor model into its corresponding Unicode encoding value. Specifically, it iterates through each character in the device serial number, obtains the character value for each character, and arranges them in character order to form the first encoding sequence; similarly, it iterates through each character in the processor model, obtains its Unicode encoding value, and arranges it in character order to form the second encoding sequence. The Unicode encoding value is a unique numerical identifier for each character in the Unicode character set, ensuring that different characters can be accurately quantified.

[0118] In one embodiment, the smart wearable device has a device serial number of "SN12345678" and a processor model of "MTK6739".

[0119] The characters and their corresponding Unicode encoding values ​​for the device serial number “SN12345678” are: “S”→83, “N”→78, “1”→49, “2”→50, “3”→51, “4”→52, “5”→53, “6”→54, “7”→55, “8”→56. Therefore, the first encoding sequence is [83, 78, 49, 50, 51, 52, 53, 54, 55, 56] (length 10).

[0120] The characters and their corresponding Unicode encoding values ​​for the processor model "MTK6739" are: "M"→77, "T"→84, "K"→75, "6"→54, "7"→55, "3"→51, "9"→57. Therefore, the second encoding sequence is [77, 84, 75, 54, 55, 51, 57] (length 7).

[0121] Step 302: Using the sum of the sequence lengths of the first coding sequence and the second coding sequence as the length of the extended sequence, perform a weighted summation extension operation on the first coding sequence and the second coding sequence to obtain an extended sequence.

[0122] Further, the smart wearable device first calculates the length of the first coding sequence (denoted as L1) and the length of the second coding sequence (denoted as L2), and determines that the total length of the extended sequence is L1 + L2. Then, perform a weighted summation extension operation on the first coding sequence and the second coding sequence to generate an extended sequence. The rule of the weighted summation extension operation is as follows: for the element at the i-th position (i starts counting from 0) in the extended sequence, if i < L1, then this element is the sum of the i-th element of the first coding sequence and the element at the i mod L2 position of the second coding sequence; if i ≥ L1, then this element is the sum of the i mod L1 element of the first coding sequence and the element at the i mod L2 position of the second coding sequence, thereby fusing and extending the two sequences to the specified length.

[0123] Continuing with the above embodiment, the length of the first coding sequence L1 = 10, the length of the second coding sequence L2 = 7, and the total length of the extended sequence is 10 + 7 = 17.

[0124] Each element of the extended sequence is calculated as follows:

[0125] i = 0: i < 10, take the first coding sequence [0] (83) + the second coding sequence [0 mod 7 = 0] (77) = 83 + 77 = 160.

[0126] i = 1: i < 10, take the first coding sequence [1] (78) + the second coding sequence [1 mod 7 = 1] (84) = 78 + 84 = 162.

[0127] i = 2: i < 10, take the first coding sequence [2] (49) + the second coding sequence [2 mod 7 = 2] (75) = 49 + 75 = 124.

[0128] i = 3: i < 10, take the first coding sequence [3] (50) + the second coding sequence [3 mod 7 = 3] (54) = 50 + 54 = 104.

[0129] i = 4: i < 10, take the first coding sequence [4] (51) + the second coding sequence [4 mod 7 = 4] (55) = 51 + 55 = 106.

[0130] i = 5: i < 10, take the first coding sequence [5] (52) + the second coding sequence [5 mod 7 = 5] (51) = 52 + 51 = 103.

[0131] i = 6: i < 10, take the first coding sequence [6] (53) + the second coding sequence [6 mod 7 = 6] (57) = 53 + 57 = 110.

[0132] i = 7: i < 10, take the first coding sequence [7] (54) + the second coding sequence [7 mod 7 = 0] (77) = 54 + 77 = 131.

[0133] i = 8: i < 10, take the first coding sequence [8] (55) + the second coding sequence [8 mod 7 = 1] (84) = 55 + 84 = 139.

[0134] i = 9: i < 10, take the first coding sequence [9] (56) + the second coding sequence [9 mod 7 = 2] (75) = 56 + 75 = 131.

[0135] i = 10: i > 10, take the first encoding sequence [10 mod 10 = 0] (83) + the second encoding sequence [10 mod 7 = 3] (54) = 83 + 54 = 137.

[0136] i = 11: i > 10, take the first encoding sequence [11 mod 10 = 1] (78) + the second encoding sequence [11 mod 7 = 4] (55) = 78 + 55 = 133.

[0137] i = 12: i > 10, take the first encoding sequence [12 mod 10 = 2] (49) + the second encoding sequence [12 mod 7 = 5] (51) = 49 + 51 = 100.

[0138] i = 13: i > 10, take the first encoding sequence [13 mod 10 = 3] (50) + the second encoding sequence [13 mod 7 = 6] (57) = 50 + 57 = 107.

[0139] i = 14: i > 10, take the first encoding sequence [14 mod 10 = 4] (51) + the second encoding sequence [14 mod 7 = 0] (77) = 51 + 77 = 128.

[0140] i = 15: i > 10, take the first encoding sequence [15 mod 10 = 5] (52) + the second encoding sequence [15 mod 7 = 1] (84) = 52 + 84 = 136.

[0141] i = 16: i > 10, take the first encoding sequence [16 mod 10 = 6] (53) + the second encoding sequence [16 mod 7 = 2] (75) = 53 + 75 = 128.

[0142] Therefore, the extended sequence is [160, 162, 124, 104, 106, 103, 110, 131, 139, 131, 137, 133, 100, 107, 128, 136, 128].

[0143] Step 303: Divide the extended sequence into segments according to the preset segment length to obtain a segmented sequence, and perform a product operation on all elements of each segment in the segmented sequence to obtain a product result sequence.

[0144] Furthermore, the smart wearable device divides the extended sequence obtained in step 302 into several segments according to a preset segment length (e.g., 5 elements per segment), forming a segmented sequence. If the total length of the extended sequence is not an integer multiple of the preset segment length, the last segment contains all the remaining elements. For each segment, all its elements are multiplied (i.e., all elements are multiplied together), and the resulting product is arranged in segment order to form a sequence of product results.

[0145] Continuing with the above embodiments, the extended sequence length is 17, and the preset segment length is 5.

[0146] Segment the extended sequence:

[0147] Segment 1: [160, 162, 124, 104, 106] (the first 5 elements).

[0148] Segment 2: [103, 110, 131, 139, 131] (the middle 5 elements).

[0149] Segment 3: [137, 133, 100, 107, 128] (the middle 5 elements).

[0150] Segment 4: [136, 128] (2 elements remaining).

[0151] Perform element-wise multiplication on each segment:

[0152] Segment 1 product: 160×162×124×104×106=160×162=25920;25920×124=3214080;3214080×104=334264320;334264320×106=35431917920。

[0153] Segmented product of 2: 103×110×131×139×131=103×110=11330;11330×131=1484230;1484230×139=206307970;206307970×131=27026344070.

[0154] Segmented product of 3: 137×133×100×107×128=137×133=18221;18221×100=1822100;1822100×107=194964700;194964700×128=24955481600。

[0155] Segmented product of 4: 136 × 128 = 17408.

[0156] Therefore, the product result sequence is [35431917920, 27026344070, 24955481600, 17408].

[0157] Step 304: Generate a second encryption key based on the product result sequence.

[0158] Furthermore, the smart wearable device generates a second encryption key based on the product result sequence, as described in steps 3041 to 3043.

[0159] This invention utilizes Unicode encoding to quantize hardware features, achieves deep fusion of two hardware features through weighted summation expansion, and further enhances numerical randomness through segmented multiplication. This results in a second encryption key that is deeply bound to the device hardware, possessing device uniqueness and anti-predictability. Therefore, the second encryption key can be effectively used for shift encryption operations, providing mid-level encryption protection for user data based on device hardware features, and enhancing the security and device correlation of the overall encryption system.

[0160] In one embodiment, steps 3041 to 3043 include:

[0161] Step 3041: Using the quotient of the length of each product result in the product result sequence plus 1 as the index, perform traversal mapping in the constant library to obtain the mapping constant for each product result.

[0162] Optionally, the pre-set constant library is an ordered set containing a number of fixed constants, and the length of the constant library, i.e., the number of constants contained in the constant library, is K. For each product result (denoted as P) in the product result sequence obtained in step 303... n (where n is the sequence index), the smart wearable device calculates the quotient of the product result and the constant library length K, i.e., P. n / K, then add 1 to the quotient to get the index value (denoted as ). in, (This indicates rounding down). If the index value I n If it is greater than the constant library length K, then for I n Perform modulo K operation (I n =I nmod K), ensuring the index value is within the valid index range of the constant library (1 to K). Finally, based on the index value I... n The corresponding constant is obtained from the constant library and used as the mapping constant for the product result. All mapping constants are arranged in the order of the original product result sequence to form a mapping constant sequence.

[0163] Continuing with the above embodiment, the product result sequence is [35431917920, 27026344070, 24955481600, 17408]. The preset constant library is [101, 103, 107, 109, 113] (length K = 5, all constants are prime numbers).

[0164] For the first product result 35431917920:

[0165] Quotient = 35431917920 / 5 = 7086383584, Index value = 7086383584 + 1 = 7086383585.

[0166] Since 7086383585 > 5, perform a modulo 5 operation: 7086383585mod5 = 0 (the result of the modulo operation is 0, which corresponds to index 5). The mapping constant is the element with index 5 in the constant library: 113.

[0167] For the second product result 27026344070:

[0168] Quotient = 27026344070 / 5 = 5405268814, Index value = 5405268814 + 1 = 5405268815.

[0169] 5405268815mod5=0→corresponding to index 5, mapping constant=113.

[0170] For the third product result 24955481600:

[0171] Quotient = 24955481600 / 5 = 4991096320, Index value = 4991096320+1 = 4991096321.

[0172] 4991096321mod5=1→corresponding to index 1, mapping constant=101.

[0173] For the fourth product result 17408:

[0174] Quotient = 17408 / 5 = 3481.6 → round down to 3481, index value = 3481 + 1 = 3482.

[0175] 3482mod5=2→corresponding to index 2, mapping constant=103.

[0176] Therefore, the sequence of mapping constants is [113, 113, 101, 103].

[0177] Step 3042: Sum each mapping constant to obtain the integrated total value.

[0178] Furthermore, the smart wearable device performs a summation operation on all the mapping constants in the mapping constant sequence obtained in step 3041, that is, it adds each mapping constant in turn, and the sum obtained is the integrated total value.

[0179] Continuing with the above embodiment, the mapping constant sequence is [113, 113, 101, 103].

[0180] Total value = 113 + 113 + 101 + 103 = 430.

[0181] Step 3043: Convert the total value into a base-64 target string, and truncate or pad the target string according to the preset key length. If the target string is less than the preset key length, pad it with preset padding characters at the beginning. If the target string exceeds the preset key length, truncate the first preset key length characters to obtain the second encryption key.

[0182] Further, the smart wearable device converts the integrated total value obtained in step 3042 into a base-64 target string. In this embodiment, the base-64 character set is preset to "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopq...." (corresponding to 0 to 63 respectively). The conversion rule is as follows: divide the integrated total value by 64 and take the remainder; the remainder corresponds to a character in the base-64 character set and is used as the last character of the target string; repeat the above operation with the quotient until the quotient is 0; then arrange all the obtained characters in reverse order to form the base-64 target string.

[0183] Furthermore, the smart wearable device processes the target string according to a preset key length (e.g., 32 characters): if the target string length is less than the preset key length, a preset padding character (e.g., "0") is added to the front of the string until the preset length is reached; if the target string length is greater than the preset key length, the first preset key length of the string is truncated, and the resulting string is the second encryption key.

[0184] Continuing with the above embodiment, the total value is 430, the preset key length is 32 characters, and the preset padding character is "0". Therefore, 430 is converted to base-64:

[0185] 430 / 64 = 6, remainder = 430 - 6 × 64 = 430 - 384 = 46.

[0186] 6 / 64 = 0, remainder = 6.

[0187] The remainders, when reversed, are 6 and 46, corresponding to the 6th character "6" and the 46th character "u" in the character set (character set index starts from 0). Therefore, the target string in base 64 is "6u" (length 2).

[0188] Since the length of “6u” (2) is less than the preset key length (32), 30 “0”s are added to the front to get “000000000000000000000000000006u” (32 characters in total).

[0189] Therefore, the second encryption key is "000000000000000000000000000006u".

[0190] This invention utilizes a constant library mapping to consider a fixed base value, reducing key volatility caused by excessively large original product results; it achieves the condensation of multi-element information through summation and integration; and it ensures a uniform key format and fixed length through 64-base conversion and padding / truncation operations. This results in a second encryption key that retains the uniqueness of hardware feature information while possessing a standardized format, which can be directly used for shift encryption operations. This provides a stable and secure key foundation for mid-level encryption, enhancing the standardization and reliability of the encryption system.

[0191] In one embodiment, steps 401 to 404 include:

[0192] Step 401: Divide the second encryption key into segments according to a preset length to obtain multiple key segments. If the last key segment is shorter than the preset length, retain its original length.

[0193] Optionally, a preset length (e.g., 8 characters) is set, and the smart wearable device segments the second encryption key obtained in step 3043 according to this preset length. Specifically, starting from the beginning of the second encryption key, substrings of the preset length are sequentially extracted as key segments; if the total length of the second encryption key is not an integer multiple of the preset length, the last key segment is extracted, retaining all remaining characters while keeping its original length unchanged. The smart wearable device arranges all key segments in the extraction order to form a set of multiple key segments.

[0194] Continuing with the above embodiment, the second encryption key is “0000000000000000000000000000006u” (32 characters in total), and the preset segment length is 8 characters.

[0195] Divide into segments of 8 characters each:

[0196] Key segment 1: "00000000" (characters 1-8).

[0197] Key segment 2: "00000000" (characters 9-16).

[0198] Key segment 3: "00000000" (characters 17-24).

[0199] Key segment 4: "0000006u" (characters 25-32, 8 characters in total).

[0200] Therefore, four key segments are obtained, each segment being 8 characters long.

[0201] Step 402: Based on the segment length of each key segment, convert the characters of each key segment into Unicode encoded values ​​to obtain a segment encoding sequence, and accumulate each Unicode encoded value in each key segment to obtain the segment accumulation value of each key segment.

[0202] Furthermore, for each key segment obtained in step 401, the smart wearable device determines the segment length (i.e., the number of characters contained, denoted as N) of that key segment. m (where m is the segment index).

[0203] Furthermore, the smart wearable device converts each character in the key segment into its corresponding Unicode encoding value, arranging them in character order to form a segmented encoding sequence. An accumulation operation (i.e., adding all values) is performed on all the Unicode encoding values ​​in the segmented encoding sequence, and the sum is the segmented accumulation value of that key segment (denoted as S). m ).

[0204] Continuing with the above embodiments, the four key segments and their processing are as follows:

[0205] Key segment 1: "00000000", segment length N1 = 8. The Unicode encoding value of each "0" is 48, and the segment encoding sequence is [48, 48, 48, 48, 48, 48, 48, 48].

[0206] The segmented cumulative value S1 = 48 × 8 = 384.

[0207] Key segment 2: "00000000", segment length N2 = 8.

[0208] The segmented encoding sequence is [48, 48, 48, 48, 48, 48, 48, 48].

[0209] The segmented cumulative value S2 = 48 × 8 = 384.

[0210] Key segment 3: "00000000", segment length N3 = 8.

[0211] The segmented encoding sequence is [48, 48, 48, 48, 48, 48, 48, 48].

[0212] The segmented cumulative value S3 = 48 × 8 = 384.

[0213] Key segment 4: "0000006u", segment length N4 = 8.

[0214] The Unicode encoding value for the character "0" is 48, for "6" it is 54, and for "u" it is 117.

[0215] The segmented encoding sequence is [48, 48, 48, 48, 48, 48, 54, 117].

[0216] Segmented cumulative value S4 = 48 × 6 + 54 + 117 = 288 + 54 + 117 = 459.

[0217] Therefore, the cumulative value of each segment is [384, 384, 384, 459].

[0218] Step 403: Calculate the verification value of each key segment based on the accumulated value of each key segment and its corresponding segment length.

[0219] Furthermore, the smart wearable device accumulates the segmented value (S) of each key segment obtained in step 402. m ) and its corresponding segment length (N) m ) Perform the operation to calculate the check value (V) for each key segment. m The calculation rule is: the check value equals the quotient of the cumulative value of each segment divided by the segment length, modulo 8. (in (This indicates rounding down), ensuring that the check value is an integer between 0 and 7 (because shift encryption is usually done in bytes, with 8 bits as a basic unit).

[0220] Continuing with the above embodiments, the cumulative value and segment length for each segment are as follows:

[0221] Key segment 1: S1 = 384, N1 = 8.

[0222] The checksum V1 = 48 mod 8 = 0.

[0223] Key segment 2: S2 = 384, N2 = 8.

[0224] The checksum V2 = 48 mod 8 = 0.

[0225] Key segment 3: S3 = 384, N3 = 8.

[0226] The checksum V3 = 48 mod 8 = 0.

[0227] Key segment 4: S4 = 459, N4 = 8.

[0228] The check value V4 = 57 mod 8 = 1 (8 × 7 = 56, 57 - 56 = 1).

[0229] Therefore, the check value for each segment is [0, 0, 0, 1].

[0230] Step 404: Perform a shift encryption operation on the first encrypted data sequence based on the verification value of each key segment to obtain the second encrypted data sequence.

[0231] Furthermore, the smart wearable device performs a shift encryption operation on the first encrypted data sequence based on the verification value of each key segment to obtain the second encrypted data sequence, as described in steps 4041 to 4044.

[0232] In this embodiment of the invention, the key is segmented and the verification value is extracted as a shift parameter, so that the number of shifts is closely related to the key characteristics. The shift encryption operation changes the binary bit arrangement of the data, which increases the disorder of the data. This makes the final generated second encrypted data sequence not only inherit the basic encryption characteristics of the first encrypted data sequence, but also further improve the encryption strength through shift operations related to the device hardware. Overall, it enhances the hierarchy and anti-cracking ability of the user data encryption system.

[0233] In one embodiment, steps 4041 to 4044 include:

[0234] Step 4041: Based on the check value of each key segment and the preset shift coefficient, generate the shift parameter for each key segment.

[0235] Optionally, a fixed shift coefficient (e.g., 3) can be preset for the check value (V) of each key segment obtained in step 403. m (where m is the segment index), the smart wearable device multiplies the check value with a preset shift coefficient to obtain the shift parameter (Sh) for each key segment. m The calculation formula is: Sh m =V m × Preset shift coefficient, where the shift parameter is used to determine the number of bits to shift in subsequent directional shift operations, ensuring that the number of bits to shift is proportional to the check value.

[0236] Continuing with the above embodiment, the check value of each key segment is [0, 0, 0, 1], and the preset shift coefficient is 3.

[0237] The shift parameter Sh1 = 0 × 3 = 0 for key segment 1.

[0238] The shift parameter Sh2 = 0 × 3 = 0 for key segment 2.

[0239] The shift parameter Sh3 = 0 × 3 = 0 for key segment 3.

[0240] The shift parameter Sh4 for key segment 4 is 1 × 3 = 3.

[0241] Therefore, the shift parameters for each key segment are [0, 0, 0, 3].

[0242] Step 4042: The first encrypted data sequence is segmented based on the number of key segments to obtain multiple data segments.

[0243] Furthermore, the smart wearable device determines the total number of key segments (denoted as N), and segments the first encrypted data sequence into equal-length segments according to this number N. Specifically, it calculates the total length of the first encrypted data sequence (in bytes, denoted as L), and the length of each data segment is... ( (This represents rounding up). Starting from the beginning of the first encrypted data sequence, N data segments are extracted sequentially. If the total length of the first encrypted data sequence is not an integer multiple of N, the length of the last data segment is... Ensure that all data segments cover the entire contents of the first encrypted data sequence.

[0244] Continuing with the above embodiment, the number of key segments N = 4, and the first encrypted data sequence is the result of splicing the encrypted data blocks obtained in step 20, with a total length of 4096 bytes (1024 bytes × 4 encrypted data blocks).

[0245] The length of each data segment is 4096 / 4 = 1024 bytes, therefore the first encrypted data sequence is divided into 4 data segments:

[0246] Data segment 1: Bytes 1-1024.

[0247] Data segment 2: bytes 1025-2048.

[0248] Data segment 3: bytes 2049-3072.

[0249] Data segment 4: bytes 3073-4096.

[0250] Each data segment is 1024 bytes long.

[0251] Step 4043: Perform a directional shift operation on each data segment based on the shift parameters of each key segment to obtain the shifted data segments. The directional shift operation rule is: shift the elements in the data segment to the right by the shift parameter bits, and add any overflowing elements to the front.

[0252] Furthermore, the smart wearable device uses the shift parameter (Sh) of the corresponding key segment obtained in step 4041 for each data segment obtained in step 4042. m Perform a directed shift operation. The rule for a directed shift operation is: shift all elements (in bytes) within the data segment to the right. m The bit, that is, each element is shifted to the right by a specified number of positions, originally located at the end of the data segment. m Some elements may overflow. These overflowing elements are then added to the front of the data segment in their original order to form the shifted data segment. If the shift parameter is 0, the data segment remains unchanged.

[0253] Continuing with the above embodiment, taking data segment 4 (1024 bytes, assuming the first 6 bytes are [A0, B1, C2, D3, E4, F5], and the last 1018 bytes are omitted) as an example, the corresponding shift parameter Sh4 = 3.

[0254] Directional shift operation process: The original element sequence of data segment 4 (first 6 bytes): [A0, B1, C2, D3, E4, F5, ...] (total 1024 bytes); shift 3 bits to the right, the 3 overflowing elements at the end are [D3, E4, F5] (take the last 3 bytes); add the overflowing elements to the front end, and get the first 6 bytes of the shifted data segment 4: [D3, E4, F5, A0, B1, C2, ...].

[0255] Other data segments retain their original sequence unchanged because the shift parameter is 0:

[0256] After shifting, data segment 1 still consists of [A0, B1, C2, ...] (1024 bytes).

[0257] After the data segment 2 is shifted, it is still [G6, H7, I8, ...] (1024 bytes).

[0258] After the data is segmented and shifted 3 times, it still consists of [J9, K0, L1, ...] (1024 bytes).

[0259] Step 4044: Concatenate and integrate all the shifted data segments according to the segmentation order to obtain the second encrypted data sequence.

[0260] Furthermore, the smart wearable device concatenates and integrates all the shifted data segments obtained in step 4043 according to the segmentation order in step 4042 (i.e., the order of data segment 1 to data segment N), that is, the byte sequence of each shifted data segment is joined end to end to form a continuous byte sequence, which is the second encrypted data sequence.

[0261] Continuing with the above embodiment, the four shifted data segments are concatenated sequentially:

[0262] The data segment after shifting is divided into three parts: 1, 2, 3, and 4, specifically: [A0, B1, C2, ...] + [G6, H7, I8, ...] + [J9, K0, L1, ...] + [D3, E4, F5, A0, B1, C2, ...]. The concatenated sequence of bytes forms the second encrypted data sequence, with a total length of 4096 bytes.

[0263] In this embodiment of the invention, the verification value of the second encryption key is converted into a shift parameter through a preset coefficient, thus deeply binding the shift operation to the device hardware features. The mechanism of directional right shift and supplementing overflow elements changes the byte order of the data, enhancing the non-linear characteristics of the data. The final generated second encrypted data sequence further hides the structural features of the original data based on the first encrypted data sequence, and the shift rule is strongly correlated with the device hardware, providing intermediate data with higher obfuscation for subsequent symmetric encryption (step 50), thereby improving the overall layered security and resistance to analysis of the encryption system.

[0264] The following describes the smart wearable device provided by the present invention. The smart wearable device described below and the data security encryption method for smart wearable devices described above can be referred to and correspond to each other.

[0265] Optional, refer to Figure 2 , Figure 2 This is a structural schematic diagram of the smart wearable device provided by the present invention. The smart wearable device includes...

[0266] The first key generation module 210 is used to divide the user data in the smart wearable device into blocks to obtain multiple data blocks, and generate a first encryption key for each data block based on the size of each data block.

[0267] The first data encryption module 220 is used to perform XOR encryption on each data block based on the first encryption key of each data block to obtain encrypted data blocks, and to concatenate each encrypted data block in a preset order to obtain the first encrypted data sequence.

[0268] The second key generation module 230 is used to generate a second encryption key based on the hardware feature information of the smart wearable device, and to generate a device user key based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information;

[0269] The second data encryption module 240 is used to perform a shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain the second encrypted data sequence.

[0270] The third data encryption module 250 is used to perform symmetric encryption operations on the second encrypted data sequence based on the device user key to obtain the final encrypted data.

[0271] In this embodiment of the invention, a first encryption key is generated based on the size of each data block, and each data block is XORed with an encryption key. Therefore, the difficulty of cracking the data is increased by using block encryption and XORing with the encryption key. Then, a second encryption key is generated based on hardware feature information, and a device user key is generated based on user identity information. This makes the key unique and strongly associated with the device and the user, thus enhancing the security of the key. Finally, a shift encryption operation is performed using the second encryption key, and a symmetric encryption operation is performed using the device user key pair to complete the multiple encryption processing of the first encrypted data sequence, further strengthening the encryption effect and improving the encryption security of data from smart wearable devices.

[0272] Please see Figure 3 , Figure 3 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 3 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps:

[0273] The user data in the smart wearable device is divided into blocks to obtain multiple data blocks. A first encryption key for each data block is generated based on the size of each data block.

[0274] Each data block is XORed and encrypted using the first encryption key for each data block to obtain encrypted data blocks. Then, each encrypted data block is concatenated in a preset order to obtain the first encrypted data sequence.

[0275] A second encryption key is generated based on the hardware feature information of the smart wearable device, and a device user key is generated based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information;

[0276] The second encrypted data sequence is obtained by performing a shift encryption operation on the first encrypted data sequence based on the second encryption key.

[0277] The final encrypted data is obtained by performing a symmetric encryption operation on the second encrypted data sequence based on the device user key.

[0278] Please see Figure 4 , Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps:

[0279] The user data in the smart wearable device is divided into blocks to obtain multiple data blocks. A first encryption key for each data block is generated based on the size of each data block.

[0280] Each data block is XORed and encrypted using the first encryption key for each data block to obtain encrypted data blocks. Then, each encrypted data block is concatenated in a preset order to obtain the first encrypted data sequence.

[0281] A second encryption key is generated based on the hardware feature information of the smart wearable device, and a device user key is generated based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information;

[0282] The second encrypted data sequence is obtained by performing a shift encryption operation on the first encrypted data sequence based on the second encryption key.

[0283] The final encrypted data is obtained by performing a symmetric encryption operation on the second encrypted data sequence based on the device user key.

[0284] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the data security encryption method for smart wearable devices provided by the above methods, the method including:

[0285] The user data in the smart wearable device is divided into blocks to obtain multiple data blocks. A first encryption key for each data block is generated based on the size of each data block.

[0286] Each data block is XORed and encrypted using the first encryption key for each data block to obtain encrypted data blocks. Then, each encrypted data block is concatenated in a preset order to obtain the first encrypted data sequence.

[0287] A second encryption key is generated based on the hardware feature information of the smart wearable device, and a device user key is generated based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information;

[0288] The second encrypted data sequence is obtained by performing a shift encryption operation on the first encrypted data sequence based on the second encryption key.

[0289] The final encrypted data is obtained by performing a symmetric encryption operation on the second encrypted data sequence based on the device user key.

[0290] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0291] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0292] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data security encryption method for smart wearable devices, characterized in that, include: The user data in the smart wearable device is divided into blocks to obtain multiple data blocks. A first encryption key for each data block is generated based on the size of each data block. Each data block is XORed and encrypted using the first encryption key for each data block to obtain encrypted data blocks. Then, each encrypted data block is concatenated in a preset order to obtain the first encrypted data sequence. A second encryption key is generated based on the hardware feature information of the smart wearable device, and a device user key is generated based on the user identification information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identification information includes the user account and biometric information; Based on the second encryption key, a shift encryption operation is performed on the first encrypted data sequence to obtain the second encrypted data sequence; The second encrypted data sequence is subjected to symmetric encryption operation based on the device user key to obtain the final encrypted data.

2. The data security encryption method for smart wearable devices according to claim 1, characterized in that, Generate a first encryption key for each data block based on the data block size, including: For each data block, prime factorization is performed based on the data block size to obtain prime factors, and a prime factor matrix is ​​constructed based on the product of any two prime factors as matrix elements. Perform a modulo-256 operation on each matrix element in the prime factor matrix to obtain the modulo operation result matrix, and extract the position indices of all matrix elements in the modulo operation result matrix in row-major order to generate an element position sequence; Based on the element position sequence and the modulo operation result matrix, a sequence mapping value array is generated according to the matrix element corresponding to each position in the position sequence; Based on the sequence mapping value array, an XOR iteration operation is performed starting from the first element to obtain the iteration result value, and the iteration result value is determined as the first encryption key for each data block; the iteration result value of each step is the XOR result of the previous iteration result value and the current array element.

3. The data security encryption method for smart wearable devices according to claim 2, characterized in that, The step of XORing each data block with the first encryption key for each data block to obtain an encrypted data block includes: For each data block, the first encryption key and the data block are converted into binary to obtain a binary key and a binary data block sequence. The binary data block sequence is then divided based on the key length of the binary key to obtain a data block subsequence. If the sequence length of the last data block subsequence is insufficient, zeros are added. The binary key is extended based on the sequence length of the binary data block sequence to generate a key extension sequence, and the key subsequence of each data block subsequence is extracted based on the key extension sequence. The corresponding data block subsequence is XORed with each key subsequence to obtain an XOR subsequence. The bits of each XOR subsequence are added together and the remainder is taken when divided by 2 to obtain the check value. Each XOR subsequence and its corresponding check value are concatenated to obtain an extended XOR subsequence. All extended XOR subsequences are then concatenated in sequence into a binary sequence and converted to hexadecimal to obtain the encrypted data block.

4. The data security encryption method for smart wearable devices according to claim 1, characterized in that, A second encryption key is generated based on the hardware feature information of the smart wearable device, including: Each character in the device serial number and the processor model is converted into its corresponding Unicode encoding value to obtain a first encoding sequence and a second encoding sequence. The length of the extended sequence is obtained by performing a weighted summation expansion operation on the first and second encoded sequences, using the sum of the sequence lengths of the first and second encoded sequences as the length of the extended sequence. The extended sequence is segmented according to a preset segment length to obtain a segmented sequence, and all elements of each segment in the segmented sequence are multiplied to obtain a product result sequence. The second encryption key is generated based on the product result sequence.

5. The data security encryption method for smart wearable devices according to claim 4, characterized in that, The step of generating the second encryption key based on the product result sequence includes: Using the quotient of each product result in the sequence of product results plus 1 as an index, the constant library is traversed and mapped to obtain the mapping constant for each product result; Sum the values ​​of each mapping constant to obtain the total integrated value; The total value is converted into a base-64 target string, and the target string is truncated or padded according to the preset key length. If it is less than the preset key length, a preset padding character is added to the front. If it exceeds the preset key length, the first preset key length characters are truncated to obtain the second encryption key.

6. The data security encryption method for smart wearable devices according to claim 5, characterized in that, The step of performing a shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain the second encrypted data sequence includes: The second encryption key is segmented according to a preset length to obtain multiple key segments; if the last key segment is less than the preset length, the original length is maintained. Based on the segment length of each key segment, the characters of each key segment are converted into Unicode encoded values ​​to obtain a segment encoding sequence. Then, each Unicode encoded value in each key segment is accumulated to obtain the segment accumulation value of each key segment. The check value of each key segment is obtained by calculating the accumulated value of each key segment and its corresponding segment length. The first encrypted data sequence is shifted and encrypted based on the check value of each key segment to obtain the second encrypted data sequence.

7. The data security encryption method for smart wearable devices according to claim 6, characterized in that, The step of performing a shift encryption operation on the first encrypted data sequence based on the check value of each key segment to obtain the second encrypted data sequence includes: Based on the check value of each key segment and a preset shift coefficient, the shift parameters of each key segment are generated. The first encrypted data sequence is segmented based on the number of key segments to obtain multiple data segments; Based on the shift parameters of each key segment, a directional shift operation is performed on each data segment to obtain the shifted data segment. The directional shift operation rule is: shift the elements in the data segment to the right by the shift parameter bits, and add the overflowing elements at the end to the beginning. All the shifted data segments are concatenated and integrated according to the segmentation order to obtain the second encrypted data sequence.

8. A smart wearable device, characterized in that, The data security encryption method for smart wearable devices as described in any one of claims 1 to 7; the smart wearable device includes: The first key generation module is used to divide the user data in the smart wearable device into blocks to obtain multiple data blocks, and generate a first encryption key for each data block based on the size of each data block. The first data encryption module is used to perform XOR encryption on each data block based on the first encryption key of each data block to obtain encrypted data blocks, and to concatenate each encrypted data block in a preset order to obtain the first encrypted data sequence. The second key generation module is used to generate a second encryption key based on the hardware feature information of the smart wearable device, and to generate a device user key based on the user identity information of the smart wearable device; the hardware feature information includes the device serial number and processor model; the user identity information includes the user account and biometric information; The second data encryption module is used to perform a shift encryption operation on the first encrypted data sequence based on the second encryption key to obtain the second encrypted data sequence. The third data encryption module is used to perform symmetric encryption operations on the second encrypted data sequence based on the device user key to obtain the final encrypted data.

9. An electronic device, comprising: Memory, used to store computer software programs; A processor for reading and executing the computer software program, characterized in that, when the processor executes the computer software program, it implements the data security encryption method for smart wearable devices as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, wherein a computer software program is stored therein, characterized in that, When the computer software program is executed by the processor, it implements the data security encryption method for smart wearable devices as described in any one of claims 1 to 7.