A data encryption method and computer device suitable for resource-constrained medical equipment

By designing a lightweight data encryption method suitable for resource -limited medical equipment, the use of matrix segmentation and random keys for encryption and decryption, solve the problem of uncomfortable resource equipment in the existing technology, to realize Efficient data security transmission.

CN116346311BActive Publication Date: 2025-01-28TIANJIN UNIVERSITY OF TECHNOLOGY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310216734.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2025-01-28
Estimated Expiration
2043-03-08

AI Technical Summary

Technical Problem

The encryption method in the prior art is not applicable to resource-constrained medical devices, consumes a lot of energy and computing time, and is difficult to deploy on small, resource-constrained medical devices.

Method used

A lightweight data encryption method is designed. By dividing the bytes of the data to be encrypted into a matrix, and randomly generating the preset string as the key, the encryption and decryption operation is performed to reduce the consumption of computing resources.

Benefits of technology

Efficient data encryption and decryption on medical equipment with limited resources, reduce energy consumption and calculation time, and meet the safe transmission needs of medical data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346311B_ABST
    Figure CN116346311B_ABST
Patent Text Reader

Abstract

The present invention provides a data encryption method and computer equipment suitable for resource-constrained medical equipment, belonging to the field of medical equipment data processing technology. The encryption algorithm of the present invention obtains the byte array bytes of the data to be encrypted, divides the bytes byte array into a matrix L with a preset column width, and randomly generates a preset size bit string, and obtains its byte array bkey, sums the data of each row of L with the data at the corresponding position of bkey; then performs operations such as shift operations on the data at each position, and finally obtains the ciphertext string pwds; the proposed encryption method process uses a random number key, which solves the problem of secret key transmission relying on a secure channel, greatly reduces the number of cycles in the encryption process, and greatly reduces the required computing resources, further improving the encryption and decryption efficiency. The encryption method of the present invention is a new lightweight encryption method, which can meet the data encryption requirements in resource-constrained medical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical device data processing, and in particular relates to a data encryption method and computer equipment applicable to resource-constrained medical devices. Background Art

[0002] Medical information technology requires the support of medical Internet of Things (MIoT) devices, which need to be connected to the Internet to execute processes and services that support healthcare and become more intelligent medical devices. The emergence of MIoT enables hospitals to process medical objects (such as doctors, nurses, patients, medical equipment, medical supplies, etc.) in a more information-based and intelligent manner, and to digitally collect, store, process and transmit medical information, equipment information, medical supplies information, medical staff information and patient information within the hospital, so that hospitals can provide better medical services to the public and improve the level of medical services.

[0003] Most of the data in the medical Internet of Things is related to the patient's medical information and physical information, which is highly private, so the security and privacy of the data are very important. Medical Internet of Things devices with limited computing power have put forward strict lightweight requirements for the encryption scheme of the medical Internet of Things.

[0004] One type of encryption method in the prior art is based on building wireless sensor networks and developing complex and dynamic security policies for access control. They are attribute-based encryption based on ciphertext, simulating the effectiveness, granularity and scalability of control; the other type of encryption method is mostly based on complex cyclic encryption processing, encryption and decryption require a lot of computing resources, which makes them unsuitable for resource-constrained medical devices. The above solutions consume a lot of energy and computing time on smart medical devices. The complexity of the algorithm and the amount of computing required in encryption are very large, making it difficult to deploy them on small, resource-constrained medical devices. Therefore, a more lightweight medical device data encryption method is needed. Summary of the invention

[0005] The purpose of the present invention is to solve the above-mentioned problems in the prior art and provide a data encryption method and computer device suitable for resource-constrained medical devices. By designing a lightweight encryption method, data encryption of resource-constrained medical devices is realized to meet the end-to-end secure transmission and use of medical data.

[0006] The data encryption method and system of the present invention are implemented by the following technical solutions:

[0007] Step 1: pre-process the source data in the medical device, extract keywords and construct keyword formatted data;

[0008] Specific steps 1. Source data at least includes user identification data, usage data and collection data; user identification data is data related to the patient's identity; usage data is data related to the use of equipment during the process of collecting patient parameters; collection data is medical parameters that can be collected by medical equipment;

[0009] Since the data types of the above source data are different, identify the data format attributes, perform data processing according to the attribute categories, extract key information, and generate a formatted data format containing key information for further encryption based on the extracted key information; this application preferably generates an XML data format;

[0010] Step 2, generate the string str to be encrypted based on the data structure using the formatted data generated in step 1;

[0011] Step 3: Get the byte array of str to be encrypted as bytes;

[0012] Step 4: Randomly generate an M-bit string of a preset size and obtain its byte array bkey;

[0013] Step 5: Divide the bytes array into a matrix L with a preset size of N columns. Use -1 to fill the columns that are less than N, where the size of N is the same as M.

[0014] Step 6: Add the data of each row of matrix L to the data of the corresponding position of bkey to obtain the new matrix L1;

[0015] Step 7: Perform right shift operation on the data at each position of the matrix L1 obtained in step 6, and fill the newly generated positions with 0 to obtain the matrix L2;

[0016] Step 8: Add the data of each row of the matrix L2 obtained in step 7 to the data at the corresponding position of bkey again and then subtract the preset constant to obtain the matrix L3;

[0017] Step 9: Convert the matrix L3 into a byte array and then into a string pwds, which is the ciphertext; preferably, the encoding algorithm used in converting into a string in this step is UTF-8.

[0018] Further, the present invention further provides a decryption process step 10 corresponding to the encrypted data, and the specific decryption process step 10 includes:

[0019] Step 10.1 Get the ciphertext pwds byte array bytes;

[0020] Step 10.2, read the string key preset during encryption, and obtain its byte array bkey;

[0021] Step 10.3, convert bytes into a matrix K with preset columns, add a preset constant to each value of the matrix and then subtract the key at the corresponding position to get a new matrix K1;

[0022] Step 10.4: Shift each value of the matrix K1 obtained in step 3 to the left by 2 bits, and fill the new bits with 0 to obtain the shifted matrix K2;

[0023] Step 10.5, subtract the matrix K2 in step 4 from the corresponding position data of bkey again to obtain the weighted matrix K3;

[0024] Step 10.6: Convert the values ​​in the matrix K3 in step 5 except the -1 value into an array, and then convert them into a string to obtain the corresponding plaintext str.

[0025] In addition, the present application also provides a computing device and a computer-readable storage medium suitable for a data encryption method for resource-constrained medical devices, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-mentioned data encryption method.

[0026] Compared with the prior art, the beneficial effects of the present invention are as follows: the present application proposes a new lightweight data encryption method for resource-constrained medical devices. The encryption algorithm obtains the byte array bytes of the data to be encrypted, divides the bytes byte array into a matrix L with a preset column width, and randomly generates a preset size bit string, and obtains its byte array bkey, and sums the data of each row of L with the data at the corresponding position of bkey; then, the data at each position is subjected to shift operations, further weighted summation and other operations, and finally a ciphertext string pwds is obtained; the proposed encryption method process uses a random number key, which solves the problem that the secret key transmission depends on a secure channel, and only one calculation process is required during the encryption process, and the number of encryption cycles is greatly reduced, which further improves the encryption and decryption efficiency and reduces the required computing resources. The encryption method of the present invention is a new lightweight encryption method, which can meet the data encryption requirements in resource-constrained medical devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of the data encryption method of the present invention;

[0028] Figure 2 This is a flow chart of data encryption and data decryption of the present invention. DETAILED DESCRIPTION

[0029] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0030] In this embodiment, combined with the attached Figure 1Taking cardiopulmonary resuscitation equipment data encryption as an example, the data encryption process of resource-constrained medical equipment is introduced in detail:

[0031] Step 1, preprocessing the source data obtained from the cardiopulmonary resuscitation device and constructing keyword formatted data; the source data at least includes user identification data, usage data and collection data; the user identification data is data related to the patient's identity; the usage data is data related to the use of the device during the collection of patient parameters; the collection data is the medical parameters that can be collected by the medical device;

[0032] User identification data "XXX Hospital"; usage data includes the following items: a. Compression frequency (times / minute); b. Compression depth (mm); c. Compression to breathing ratio; d. Compression to relaxation time ratio; e. Single breathing (times / minute); f. Oxygen delivery: (ml / time); g. Maximum safe pressure of mask airway (kPa); Working pressure (MPa); The collected data includes multiple vital indicators of the patient including: heart rate, blood pressure, body temperature, blood oxygen content, end-tidal carbon dioxide volume fraction value;

[0033] Since the data types of the above source data are different, identify the data format attributes, perform data processing according to the attribute categories, extract key information, and generate a formatted data format containing key information for further encryption based on the extracted key information; this application preferably generates an XML data format;

[0034] Step 2, generate the string str to be encrypted based on the data structure of the formatted data generated in step 1; assuming that the obtained str is: "Tianjin XX Hospital, compression frequency: 100 times / minute; compression depth: 30 mm, ..., end-tidal carbon dioxide volume fraction value: 30mmhg",

[0035] Step 3, get the byte array bytes as [229,164,169,230,180,165,88,88,229,140,187,233,153,162,239,188,140,230,140,137,229,142,139,233,162,145,231,142,135,239,188,154,49,48,48,230,172,161,47,229,136,134,233,146,159,239,188,155,230,140,137,229,142,139,230,183,177,229, 186,166,239,188,154,51,48,230,175,171,231,177,179,......,229,145,188,230,176,148,230,156,171,228,186,140,230,176,167,229,140,150,231,162,179,228,189,147,231,167,175,229,136,134,230,149,176,229,128,188,239,188,154,51,48,109,109,104,103], length 560;

[0036] Step 4: Randomly generate a 16-bit string "abcdefg123456qws", whose byte array is bkey[97,98,99,100,101,102,103,49,50,51,52,53,54,113,119,115];

[0037] Step 5: Divide the bytes array into columns into a matrix L with a preset size of 16 columns. Use -1 to fill in columns less than 16.

[0038] Step 6: Add the data of each row of matrix L to the data of the corresponding position of bkey to obtain the new matrix L1;

[0039] Step 7: Shift the data at each position of the matrix L1 obtained in step 6 right by 2 bits, and fill the newly generated positions with 0 to obtain the matrix L2;

[0040] Step 8: Add the data of each row of the matrix L2 obtained in step 7 to the data at the corresponding position of bkey again and then subtract a constant. In this embodiment, the constant is 100 to obtain the matrix L3;

[0041] Step 9: Convert the matrix L3 into a byte array and then into a string pwds, which is the ciphertext.

[0042] After obtaining the ciphertext, further combine the attached Figure 2 The present invention further provides a decryption process step 10 corresponding to the encrypted data, and the specific decryption process step 10 includes:

[0043] Step 10.1 Get the ciphertext pwds byte array bytes;

[0044] Step 10.2, read the string key preset during encryption, and obtain its byte array bkey;

[0045] Step 10.3, convert bytes into a matrix K with preset columns, add a preset constant to each value of the matrix and then subtract the key at the corresponding position to get a new matrix K1;

[0046] Step 10.4: Shift each value of the matrix K1 obtained in step 3 to the left by 2 bits, and fill the new bits with 0 to obtain the shifted matrix K2;

[0047] Step 10.5, subtract the matrix K2 in step 4 from the corresponding position data of bkey again to obtain the weighted matrix K3;

[0048] Step 10.6: Convert the values ​​in the matrix K3 in step 5 except the -1 value into an array, and then convert them into a string to obtain the corresponding plaintext str.

[0049] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0050] In the description of the present invention, unless otherwise specified, the terms "upper", "lower", "left", "right", "inside", "outside", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they cannot be understood as limitations on the present invention.

[0051] Finally, it should be explained that the above technical solution is only one implementation method of the present invention. For those skilled in the art, it is easy to make various types of improvements or modifications based on the application methods and principles disclosed in the present invention, and it is not limited to the method described in the above specific implementation method of the present invention. Therefore, the method described above is only preferred and does not have a restrictive meaning.

Claims

1. A data encryption method suitable for resource-constrained medical devices, characterized in that The following steps are included: Step 1: pre-process the source data in the medical device, extract keywords and construct keyword formatted data; The source data at least includes user identification data, usage data and collection data; the user identification data is data related to the patient's identity; Usage data refers to data related to the use of equipment during the process of collecting patient parameters; collection data refers to medical parameters that can be collected by medical equipment; identifying data format attributes, processing data according to attribute categories, extracting key information, and generating formatted data containing key information for further encryption based on the extracted key information; Step 2, generate the string str to be encrypted based on the data structure using the formatted data generated in step 1; Step 3: Mark the string to be encrypted as str, get the str byte array and mark it as bytes; Step 4: Randomly generate an M-bit string of a preset size and obtain its byte array bkey; Step 5: Divide the bytes array into a matrix L with a preset size of N columns. Use -1 to fill the columns that are less than N, where the size of N is the same as M. Step 6: Add the data of each row of matrix L to the data of the corresponding position of bkey to obtain the new matrix L1; Step 7: Perform right shift operation on the data at each position of the matrix L1 obtained in step 6, and fill the newly generated positions with 0 to obtain the matrix L2; Step 8: Add the data of each row of the matrix L2 obtained in step 7 to the data at the corresponding position of bkey again and then subtract the preset constant to obtain the matrix L3; Step 9: Convert the matrix L3 into a byte array and then into a string pwds to get the ciphertext.

2. The data encryption method applicable to resource-constrained medical devices according to claim 1, characterized in that The encryption method is applied to data encryption in cardiopulmonary resuscitation equipment.

3. The data encryption method applicable to resource-constrained medical devices according to claim 2, characterized in that The encryption method is applied to data encryption in cardiopulmonary resuscitation equipment, wherein the used data include the following items: compression frequency, compression depth, compression to breathing ratio, compression to relaxation time ratio, single-use breathing, oxygen delivery, maximum safe pressure of mask air circuit, and working pressure.

4. The data encryption method applicable to resource-constrained medical devices according to claim 3, characterized in that The encryption method is applied to data encryption in cardiopulmonary resuscitation equipment; wherein the collected data includes multiple vital indicators of the patient including: heart rate, blood pressure, body temperature, blood oxygen content, and end-tidal carbon dioxide volume fraction value.

5. The data encryption method applicable to resource-constrained medical devices according to claim 1, characterized in that It also includes decrypting the encrypted data. The specific decryption process step 10 includes: Step 10.1 Get the ciphertext pwds byte array bytes; Step 10.2, read the string key preset during encryption, and obtain its byte array bkey; Step 10.3, convert bytes into a matrix K with preset columns, add a preset constant to each value of the matrix and then subtract the key at the corresponding position to get a new matrix K1; Step 10.4: Shift each value of the matrix K1 obtained in step 10.3 to the left by 2 bits, and fill the new bits with 0 to obtain the shifted matrix K2; Step 10.5, subtract the matrix K2 of step 10.4 from the corresponding position data of bkey again to obtain the weighted matrix K3; Step 10.6: Convert the values ​​in the matrix K3 in step 10.5 except the -1 value into an array, and then convert them into a string to obtain the corresponding plaintext str.

6. The data encryption method applicable to resource-constrained medical devices according to claim 1, characterized in that The encoding algorithm used in converting to a string in step 9 is UTF-8.

7. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Encryption method based on AES encryption algorithm

    CN113206736A

  • Public key cipher system, ciphering device, and deciphering device

    JP1999161164A