Medical data encryption transmission method, device, electronic equipment and storage medium

Through the encryption processing and format conversion of medical images and key identification information, the problem of information leakage during data interaction in the hospital information system is solved, the secure transmission and privacy protection of information are realized, and the security of patient information is ensured.

CN117439766BActive Publication Date: 2024-09-17BEIJING HUAYI JINGDIAN BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311167277.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2024-09-17
Estimated Expiration
2043-09-11

Smart Images

  • Figure CN117439766B
    Figure CN117439766B
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for encrypted transmission of medical data. The method includes: obtaining medical images and key identification information corresponding to the medical images, compressing and storing the medical images; encrypting the key identification information using a preset encryption algorithm to form encrypted information; formatting the encrypted information to form encrypted information in a first format and formatting the encrypted information in the first format to verify that the first format can be identified; reversely converting the encrypted information in the first format into encrypted information in the original format, decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information; comparing the decrypted information with the key identification information, and transmitting the encrypted information in the first format in response to the decrypted information being the same as the key identification information. Effectively protect the key identification information during the transmission of medical images and key identification information to avoid leakage of patient privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical data transmission, and in particular to a method, device, electronic device and storage medium for encrypted transmission of medical data. Background Art

[0002] Picture Archiving and Communication Systems (PACS) is a system used to store various medical images generated by hospital imaging departments, such as medical images generated by medical imaging equipment such as nuclear magnetic resonance, ultrasound, X-ray machines, infrared devices, etc., in a digital way, and can interact with other hospital information systems for data and business collaboration. It plays an important role in hospital information construction. With the rapid development of hospital information construction, more and more businesses need to be supported by information systems. In order to achieve different functions, various types of hospital information systems have emerged. In order to better realize business processes and management requirements, more and more hospital information systems interact with PACS for data and business collaboration. Take a patient undergoing an MRI examination as an example. First, he needs to register, make an initial diagnosis, issue an examination application form in the hospital information system (HIS), and make an appointment for the examination in the appointment system. Then, he needs to collect images and write reports in PACS. Finally, the outpatient doctor gives a diagnosis based on the comprehensive examination report in HIS. At the same time, the examination images and report data generated in PACS need to be saved to the hospital's archiving system, such as the hospital data platform system. It can be seen that such a common process involves the interaction between multiple different third-party systems and PACS. PACS is both a data user and a data generator. PACS uses information from other third-party systems to generate inspection images and reports, and sends relevant data to other third-party systems.

[0003] Considering the data interaction between the third-party system and PACS, directly transmitting the patient's medical images and information without any protection will cause the leakage of patient information and thus cause losses to the patients. Summary of the invention

[0004] In view of this, the purpose of the present application is to propose a medical data encryption transmission method, device, electronic device and storage medium for encrypting and protecting patient information during data interaction between PACS and a third-party system.

[0005] Based on the above purpose, the first aspect of the present application provides a method for encrypting and transmitting medical data, comprising:

[0006] Acquire a medical image and key identification information corresponding to the medical image, and compress and store the medical image;

[0007] Encrypting the key identification information using a preset encryption algorithm to form encrypted information;

[0008] Converting the encrypted information into a first format and verifying the encrypted information in the first format to determine whether the first format is recognizable;

[0009] Reversely converting the encrypted information in the first format into the encrypted information in the original format, and decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information;

[0010] The decrypted information is compared with the key identification information, and in response to the decrypted information being identical to the key identification information, the encrypted information in the first format is transmitted.

[0011] Optionally, the encryption algorithm includes a symmetric encryption algorithm;

[0012] The step of encrypting the key identification information by using a preset encryption algorithm to form encrypted information includes:

[0013] Extracting a preset original key value, and filling the original key value with a preset symmetric encryption algorithm to form an encrypted key value;

[0014] Extracting a preset original displacement vector, and filling the original displacement vector using a preset symmetric encryption algorithm to form an encrypted displacement vector;

[0015] The encryption key value and the encryption displacement vector have the same length.

[0016] Optionally, the step of encrypting the key identification information by using a preset encryption algorithm to form encrypted information further includes:

[0017] Filling the key identification information with an odd character length to obtain the key identification information with an even character length, and concatenating the key identification information into a character string using a connection key;

[0018] Determine a String array, form a data unit according to the value of every two digits of the characters in the string, perform hexadecimal conversion on the data units respectively, and store the data units in the array according to the positions of the data units in the string;

[0019] Add the encryption key value at the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit;

[0020] Starting from the first character of the encryption displacement vector, the characters of the encryption displacement vector are sequentially inserted into the characters of the encryption key value in the preliminary encrypted data unit in a first order to form encrypted information; wherein, there is a character of the first encryption displacement vector between adjacent characters of the encryption key value.

[0021] Optionally, the first format includes Base64 encoding;

[0022] The step of converting the format of the encrypted information to form the encrypted information in a first format and performing format verification on the encrypted information in the first format includes:

[0023] Convert the encrypted information into characters of String type;

[0024] Store the characters of the String type in the String array in sequence according to the positions of the data units in the String array;

[0025] Convert the string type characters to Base64 encoding;

[0026] Read the Base64 encoding;

[0027] In response to the Base64 encoding being recognizable, the first format verification is passed.

[0028] Optionally, reversely converting the encrypted information in the first format into the encrypted information in the original format, and decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information, includes:

[0029] Convert the Base64 code into characters of the String type;

[0030] extracting first characters in the encrypted information in sequence according to the first sequence, and reorganizing the first characters according to the extraction sequence;

[0031] calling the encryption displacement vector, comparing the encryption displacement vector with the reconstructed first character; and obtaining preliminary decryption information in response to the encryption displacement vector being the same as the reconstructed first character;

[0032] Obtaining the character length of the encryption key value, and extracting the second character from the first character of the preliminary decryption information based on the character length of the encryption key value;

[0033] The encryption key value is called, the encryption key value is compared with the second character, and in response to the encryption key value and the second character being the same, decryption information is obtained.

[0034] Optionally, the comparing the decrypted information with the key identification information and transmitting the encrypted information in the first format in response to the decrypted information being the same as the key identification information, includes:

[0035] Arrange the decrypted information according to the position of the data unit in the String array;

[0036] Segmenting the decrypted information according to the location of the connection key to form segmented information;

[0037] Performing binary conversion on the segmentation information;

[0038] The segmentation information after binary conversion is read, and in response to the segmentation information after binary conversion being the same as the key identification information, the decryption verification is successful, and the encrypted information in the first format is transmitted.

[0039] Optionally, the key identification information corresponding to the medical image includes:

[0040] Patient ID, patient name, patient gender, patient age, patient examination number, examination equipment type, examination time, patient address, contact information, past medical history and treatment process.

[0041] In a second aspect of the present application, a device for encrypted transmission of medical data is provided, comprising:

[0042] An acquisition module, used to acquire medical images and key identification information corresponding to the medical images, and compress and store the medical images;

[0043] An encryption module, used to encrypt the key identification information using a preset encryption algorithm to form encrypted information;

[0044] A conversion module, used to convert the encrypted information into a first format and store the encrypted information; perform format verification on the encrypted information in the first format to determine whether the first format is recognizable;

[0045] A decryption module, used for reversely converting the encrypted information in the first format into the encrypted information in the original format, and decrypting the encrypted information using a directional decryption corresponding to the encryption to obtain decrypted information;

[0046] A comparison module is used to compare the decrypted information with the key identification information, and in response to the decrypted information being the same as the key identification information, transmit the encrypted information in the first format.

[0047] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for encrypting and transmitting medical data as described in the first aspect is implemented.

[0048] In a fourth aspect of the present application, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the medical data encryption transmission method as described in the first aspect.

[0049] From the above, it can be seen that the medical data encryption transmission method, device, electronic device and storage medium provided in the present application can effectively prevent the key identification information corresponding to the medical image from being maliciously stolen and the patient's personal information from being obtained during the transmission and interaction process by encrypting the key identification information corresponding to the medical image, thereby effectively protecting the patient's personal information. At the same time, the encrypted information is decrypted before it is transmitted to complete self-verification, ensuring that the encrypted information will not cause tampering with the key identification information during the encryption process to make the patient's personal information inaccurate. After the verification is passed, it can be transmitted or interacted. Even if it is maliciously stolen during the transmission or interaction, it will not affect the patient's personal information security. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 This is a flow chart of the medical data encryption transmission method according to an embodiment of the present application;

[0052] Figure 2 A flowchart of encrypting key identification information according to an embodiment of the present application;

[0053] Figure 3 A flowchart of obtaining decrypted information according to an embodiment of the present application;

[0054] Figure 4 A schematic diagram of a medical data encryption transmission device according to an embodiment of the present application;

[0055] Figure 5 A schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0057] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0058] In the PACS system, medical images are transmitted over the network synchronously with key identification information, which often contains patient information and even patient privacy. At the same time, the PACS system contains a large amount of patient information. If there is no protection during the transmission of a large amount of data, it is easy to cause the leakage of patient privacy and affect the patients.

[0059] Based on this, reference Figure 1 As shown, the present application provides a method for encrypting and transmitting medical data, comprising:

[0060] S101, obtaining medical images and key identification information corresponding to the medical images, and compressing and storing the medical images;

[0061] S102, encrypting the key identification information using a preset encryption algorithm to form encrypted information;

[0062] S103, converting the encrypted information into a first format and performing format verification on the encrypted information in the first format to determine whether the first format can be recognized;

[0063] S104, reversely converting the encrypted information in the first format into the encrypted information in the original format, and decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information;

[0064] S105: Compare the decrypted information with the key identification information, and in response to the decrypted information being identical to the key identification information, transmit the encrypted information in the first format.

[0065] In some exemplary embodiments, in step S101, the patient's medical images and key identification information corresponding to the medical images are stored on the PACS server. In the process of obtaining the medical images and the key identification information corresponding to the medical images, since the medical images occupy a large amount of memory, the medical images and the key identification information corresponding to the medical images can be downloaded to the front-end machine through multi-threaded downloading, which can avoid the impact of network occupancy and memory occupancy on the operation of PACS during the downloading of the medical images and the key identification information corresponding to the medical images.

[0066] When PACS transmits medical images and key identification information to a third party, the medical images have to be compressed and stored to reduce the memory usage of the medical images and increase the transmission speed in order to avoid a slow transmission process.

[0067] It should be noted that the content finally transmitted to the third party includes the encrypted information in the first format and the compressed medical images, and the two are in a corresponding relationship. Otherwise, the third party will only receive the compressed medical images and cannot correspond to the corresponding patient information; or will only receive the encrypted information in the first format and cannot correspond to the corresponding medical images for medical judgment.

[0068] In some embodiments, referring to Table 1 below, key identification information includes: patient ID, patient name, patient gender, patient age, patient examination number, examination equipment type, examination time, patient address, contact information, past medical history and treatment process, and may also include: examination time, serial number and equipment manufacturer, etc. In the process of transmitting key identification information, the key identification information is obtained, and the relevant information of the patient can be obtained or estimated accordingly, so that the privacy of the patient cannot be effectively protected.

[0069]

[0070]

[0071] Table 1

[0072] In some embodiments, step S102 includes:

[0073] S201, extracting a preset original key value, and filling the original key value with a preset symmetric encryption algorithm to form an encrypted key value;

[0074] S202: extract a preset original displacement vector, and fill the original displacement vector using a preset symmetric encryption algorithm to form an encrypted displacement vector.

[0075] In some embodiments, the preset original key value and original displacement vector can be set by customization, which can be one character, multiple characters, one number, multiple numbers, or a combination of characters and numbers, but the original key value and the original displacement vector are fixed values. Exemplarily, the original key value is: 20230717sjid, and after filling with the symmetric encryption algorithm (AES), the encrypted key value is: 588e6f989b6507662ace50102fe98075. The original displacement vector is: 01020304, and after filling with the symmetric encryption algorithm (AES), the encrypted displacement vector is: dccdff54105dce5f4bf0dc02255739ea.

[0076] In some embodiments, the encryption key value generated by the symmetric encryption algorithm is equivalent to the first key, and the encryption displacement vector generated by the symmetric encryption algorithm is equivalent to the second key. The first key and the second key are then used to encrypt the key identification information.

[0077] In some embodiments, in combination Figure 2 As shown, step S102 also includes:

[0078] S301, filling the key identification information with an odd character length into the key identification information with an even character length, and concatenating the key identification information into a character string using a connection key;

[0079] S302, determining a String array, forming a data unit for each two digits of the characters in the string, performing hexadecimal conversion on the data units respectively, and storing the data units in the array according to their positions in the string;

[0080] S303, adding an encryption key value to the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit;

[0081] S304, starting from the first character of the encryption displacement vector, sequentially insert the characters of the encryption displacement vector into the characters of the encryption key value in the preliminary encryption data unit in a first order to form encrypted information.

[0082] There is a character of the first encryption displacement vector between adjacent characters of the encryption key value.

[0083] In the specific implementation, in order to facilitate the management of key identification information, the characters of the key identification information are spliced ​​together to form a complete string, added to the String array for storage and unified management, to avoid confusion of the characters of the key information. The characters in the string are taken to form a data management unit for every two digits, and the data units are converted into hexadecimal to make the plain text type of key identification information unreadable, making the key identification information more secure, and then stored in the array according to the position of the data unit in the string, to avoid the key identification information being unable to determine the content due to the wrong order after subsequent self-verification or third-party decryption.

[0084] After determining the data unit, add the encryption key value to the first position of the data unit to form a preliminary encrypted data unit. It is understandable that there are many data units in the String array, and the encryption key value is added to the first position of each data unit. Even if the corresponding preliminary encrypted data unit is obtained, the complete content of the key identification information cannot be accurately read during the reading process of the preliminary encrypted data unit. For example, the first data unit is: 3230323373663965, and the preliminary encrypted data unit formed after adding the encryption key value is:

[0085] 588e6f989b6507662ace50102fe980753230323373663965.

[0086] After the preliminary encrypted data unit is determined, the characters of the encryption displacement vector are sequentially inserted into the characters of the encryption key value in the preliminary encrypted data unit from the first character of the encryption displacement vector in the first order. Exemplarily, the encryption displacement vector is:

[0087] dccdff54105dce5f4bf0dc02255739ea, the first character d of the encryption displacement vector is inserted first, and then c, c, d, f, f... are used in sequence to insert them between the characters of the encryption key value in the preliminary encrypted data unit. The characters of the encryption key value are interspersed with the characters of the encryption displacement vector, which is equivalent to using the encryption key value as the first key and the encryption displacement vector as the second key to encrypt the data unit twice, that is, to encrypt the key identification information twice, making the key identification information more secure. Even if it is intercepted during transmission, the corresponding content cannot be obtained.

[0088] In some embodiments, the first order is a custom order, which may be started from between the first character and the second character of the encryption key value in the encrypted data unit, and inserted backwards between the characters of the encryption key value in the preliminary encrypted data unit. Exemplarily, the preliminary encrypted data unit is:

[0089] 588e6f989b6507662ace50102fe980753230323373663965, the process of inserting the encryption displacement vector into the preliminary encryption unit is to first use the first character d of the encryption displacement vector to insert between "5" and "8", and then use the second character c of the encryption displacement vector to insert between "8" and "8", until the insertion is completed, the encrypted information formed is:

[0090] 5d8c8ced6fff958491b0655d0c7e656f24abcfe05d0c100222f5e59783097e5a3230323373663965.

[0091] In some embodiments, the first order can start from between the last character of the encryption key value of the encrypted data unit and the data unit, and be inserted forward in sequence between the characters of the encryption key value in the preliminary encrypted data unit. Similarly, the characters of the encryption displacement vector can also be inserted forward and backward from the middle of the encryption key value of the encrypted data unit. As long as the characters of the encryption displacement vector are extracted in the decryption process according to the same first order, no specific limitation is made here.

[0092] It is understandable that if each bit of the string is taken as a value to form a data unit, in the process of encrypting the key identification information, since each data unit needs to be encrypted, the workload of the encryption process will increase accordingly, reducing the encryption efficiency. Therefore, in order to improve the encryption efficiency, it is selected to form a data unit with every two bits of value. The characters of the key identification information may have an odd length, so there is also a situation where there is one bit left at the end. If no padding is performed, then it will appear that one key identification information and another key identification information form a data unit. For example: one key identification information is the patient's name, and the other key identification information is the patient's age. Assuming that the patient's name includes 9 characters and the patient's age also includes 9 characters, then the last character of the patient's name will form a data unit with the first character of the patient's age, which may cause errors in the recognition of the key identification information content. Based on this, the key identification information with an odd character length is padded to become the key identification information with an even character length, with every two bits as a unit, and any even number is a multiple of 2, which can be rounded to improve the encryption efficiency. Similarly, in the subsequent decryption self-verification process, after the characters of the encrypted displacement vector are extracted, the length of the encryption key value is determined during the process of extracting the characters of the encryption key value. According to the length of the encryption key value, the encryption key value is extracted from the first bit of the preliminary decryption information. When the remaining data units are verified, if the data units do not belong to the same key identification information, content recognition errors may occur.

[0093] In some optional embodiments, a 0 is added to the front of the key identification information whose character length is an odd number to make it the key identification information whose character length is an even number.

[0094] In some optional embodiments, the key identification information is concatenated into a string using an underscore as a connection key.

[0095] In some optional embodiments, encrypting the key identification information using a preset encryption algorithm to form encrypted information may also include:

[0096] The key identification information with an odd character length is supplemented to become the key identification information with an even character length, and each key identification information forms a character string;

[0097] The characters in the key identification information are respectively taken as two digits to form a data unit, the data units are respectively converted into hexadecimal and the data units belonging to the same key identification information are stored in the same String array; wherein the position of the data unit in the String array is the same as the position of the data unit in the string;

[0098] Add the encryption key value at the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit;

[0099] Starting from the first character of the encryption displacement vector, the characters of the encryption displacement vector are sequentially inserted into the characters of the encryption key value in the preliminary encrypted data unit in a first order to form encrypted information; wherein there is a character of the first encryption displacement vector between adjacent characters of the encryption key value.

[0100] Different from the above embodiment, in this embodiment, there is no need to concatenate all the key identification information into a whole string. Instead, the string of the key identification information itself is used. Each key identification information corresponds to a String array, and then the encryption key value and encryption displacement vector are added to each key identification information for encryption.

[0101] At this point, the encryption of the key identification information is completed. The encrypted information formed by the corresponding encryption may not be recognized by the relevant equipment in its format. Therefore, the encrypted information needs to be formatted so that the third party can recognize the encrypted information after it is sent to the third party.

[0102] In some embodiments, step S103 includes:

[0103] Convert the encrypted information into characters of String type;

[0104] Store the characters of the String type in the String array in sequence according to the positions of the data units in the String array;

[0105] Convert the string type characters to Base64 encoding;

[0106] Read the Base64 encoding;

[0107] In response to the Base64 encoding being recognizable, the first format verification is passed.

[0108] It is understandable that, due to different systems' different recognition of information, and any data in the computer is stored in ASCII code, and the values ​​between 128-255 of ASCII code are invisible characters, and when data is transmitted on the network, it often passes through multiple routing devices. Due to different devices' different processing methods for characters, invisible characters will be processed incorrectly, which is not conducive to data transmission. In the embodiment of the present application, by converting String type characters into Base64 encoding, all characters are turned into visible characters, and they will not be processed incorrectly due to invisibility during the transmission process, ensuring that medical images and corresponding key identification information can be accurately transmitted, avoiding the encrypted information from being recognized in the subsequent self-verification process, and causing processing errors during the transmission process, resulting in the inability to recognize the content of the key identification information. In this embodiment, the converted Base64 encoding is recognized, and it can be recognized, which means that the first format verification is passed, that is, the Base64 encoding can also be recognized after being sent to a third party.

[0109] At the same time, Base64 encoding is suitable for fast data transmission under various network protocols, ensuring the fast transmission of key identification information.

[0110] After encryption is completed and format conversion is performed, if the content of the key identification information is changed or lost during the encryption process or the format conversion process, then after it is transmitted to a third party, the third party will not be able to obtain the content of the key identification information after decryption. Therefore, in order to avoid damage to the key representation content during the encryption process or the format conversion process, the encrypted information in the first format is self-verified to ensure that the key identification information is normal.

[0111] In some embodiments, reference Figure 3 As shown, step S104 includes:

[0112] S401, converting Base64 encoding into a character of String type;

[0113] S402, extracting first characters in the encrypted information in a first order, and reorganizing the first characters in the extraction order;

[0114] S403, calling the encryption displacement vector, comparing the encryption displacement vector and the reconstructed first character; in response to the encryption displacement vector and the reconstructed first character being the same, obtaining preliminary decryption information;

[0115] S404, obtaining the character length of the encryption key value, and extracting the second character from the first character of the preliminary decrypted information based on the length of the encryption key value;

[0116] S405, calling the encryption key value, comparing the encryption key value with the second character, and obtaining decryption information in response to the encryption key value being the same as the second character.

[0117] In a specific implementation, the encrypted information in the first format is firstly converted in reverse format, that is, the encrypted information in the Base format is converted into characters of the String type, and then the first character in the encrypted information is extracted in sequence according to the first order. That is, in this process, the characters are extracted according to the order of the characters originally inserted into the encrypted displacement vector and the positions of the characters inserted into the encrypted displacement vector to obtain the first character, and the characters are reassembled according to the extraction order to obtain the reassembled first character.

[0118] The generated encryption displacement vector is called and compared with the reconstructed first character. If the reconstructed first character is the same as the encryption displacement vector, it proves that the decryption process has preliminarily decrypted the encrypted information, extracted the encryption displacement vector from the encrypted information, and obtained the preliminary decrypted information.

[0119] Then call the length of the generated encryption key value. It can be understood that the character length of the encryption key value is fixed. Based on the character length of the encryption key value, the second character is extracted from the first character of the preliminary decrypted information. Since the encryption key value is added to the data unit as a whole during the encryption process, when extracting the second character, the character length of the encryption key value can be used as a unit to directly extract the second character without reorganization.

[0120] The generated encryption key value is called and compared with the extracted second character. If the extracted second character is the same as the encryption key value, it proves that the encryption key value has been extracted from the preliminary decryption information during this decryption process, and the remaining is the decryption information.

[0121] In some embodiments, comparing the decrypted information with the key identification information, and in response to the decrypted information being the same as the key identification information, transmitting the encrypted information in the first format includes:

[0122] Performing binary conversion on the decrypted information;

[0123] Arrange the decrypted information after binary conversion according to the position of the data unit in the String array;

[0124] Segmenting the decrypted information according to the location of the connection key to form segmented information;

[0125] The segmentation information is read, and in response to the segmentation information being identical to the key identification information, the decryption verification is successful, and the encrypted information in the first format is transmitted.

[0126] It can be understood that the decrypted information is arranged according to the position of the data unit in the String array so that the arrangement order of the decrypted information is the same as the order of the key identification information in the String array before encryption, so as to avoid confusion in the order of the decrypted information. Then, the information is segmented according to the position of the connection key. The segmented information before the connection key corresponds to one key identification information, and the segmented information after the connection key corresponds to another key identification information. The decrypted information obtained through the decryption process is still a character of the String type, and the content therein cannot be read directly. Similarly, the segmented information cannot be read directly. The segmented information is converted into binary and the content of the segmented information after the binary conversion is read. If the segmented content is the same as the corresponding key identification information, it means that the key identification information content is not affected during the encryption and decryption process, and the encrypted information in the first format can be directly sent to the third party.

[0127] In some embodiments, the encrypted information in the first format is transmitted to a third party, and the third party decrypts the encrypted information in the first format to obtain the content of the key identification information.

[0128] It should be noted that, in the process of sending the encrypted information in the first format and the compressed medical image to a third party, the original key value and the original displacement vector will be sent together.

[0129] The process of a third party decrypting the encrypted information in the first format includes the following steps:

[0130] Obtaining an original key value and an original displacement vector, and using a preset symmetric encryption algorithm to fill the original key value and the original displacement vector respectively to form an encrypted key value and an encrypted displacement vector;

[0131] Convert Base64 encoding to String type characters;

[0132] Using the encrypted displacement vector as a second key, extracting the first character in the encrypted information in the first sequence in order to obtain preliminary decrypted information;

[0133] The encryption key value is used as the first key, the character length of the encryption key value is obtained, and based on the character length of the encryption key value, the second character is extracted from the first character of the preliminary decryption information to obtain the decrypted information.

[0134] In some optional embodiments, the reorganization is performed according to the order in which the first characters are extracted;

[0135] calling the encryption displacement vector, comparing the encryption displacement vector and the reconstructed first character, and obtaining preliminary decrypted information in response to the encryption displacement vector and the reconstructed first character being the same;

[0136] The encryption key value is called, the encryption key value is compared with the second character, and in response to the encryption key value and the second character being the same, decryption information is obtained.

[0137] and reorganizing the first characters according to the extraction order;

[0138] calling the encryption displacement vector, comparing the encryption displacement vector with the reconstructed first character; and obtaining preliminary decryption information in response to the encryption displacement vector being the same as the reconstructed first character;

[0139] Obtaining the character length of the encryption key value, and extracting the second character from the first character of the preliminary decryption information based on the length of the encryption key value;

[0140] The encryption key value is called, the encryption key value is compared with the second character, and in response to the encryption key value and the second character being the same, decryption information is obtained.

[0141] It can be seen that the third-party decryption process, compared with the self-verification process, requires first encrypting the original key value and the original displacement vector to form an encrypted key value and an encrypted displacement vector. Here, the encrypted key value and the encrypted displacement vector are not sent together with the encrypted information in the first format and the compressed medical image to avoid loss or interception during the sending process, so that malicious interceptors can directly use the encrypted key value and the encrypted displacement vector to crack the encrypted information in the first format.

[0142] Of course, it should be noted that, since the encrypted information in the first format has been verified before being sent, the third party can directly obtain the decryption information determined by using the encryption key value and the encryption displacement vector to read the content without the need for verification process.

[0143] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0144] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0145] Based on the same technical concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a medical data encryption transmission device.

[0146] refer to Figure 4 , the medical data encryption transmission device comprises:

[0147] An acquisition module 501 is used to acquire medical images and key identification information corresponding to the medical images, and compress and store the medical images;

[0148] Encryption module 502, used to encrypt key identification information using a preset encryption algorithm to form encrypted information;

[0149] The conversion module 503 is used to convert the encrypted information into a first format and store the encrypted information; perform format verification on the encrypted information in the first format to determine whether the first format is recognizable;

[0150] The decryption module 504 is used to reversely convert the encrypted information in the first format into the encrypted information in the original format, and decode the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information;

[0151] The comparison module 505 is used to compare the decrypted information with the key identification information, and in response to the decrypted information being the same as the key identification information, transmit the encrypted information in the first format.

[0152] In some embodiments, the encryption module 502 is preset with a symmetric encryption algorithm, and is also used to extract a preset original key value, fill the original key value with the preset symmetric encryption algorithm, and form an encrypted key value;

[0153] Extracting a preset original displacement vector, and filling the original displacement vector using a preset symmetric encryption algorithm to form an encrypted displacement vector;

[0154] The encryption key value and the encryption displacement vector have the same length.

[0155] In some embodiments, the encryption module 5022 is further used to fill the key identification information with an odd character length into the key identification information with an even character length, and splice the key identification information into a string;

[0156] Determine a String array, take the values ​​of every two digits of the characters in the string to form a data unit, convert the data units into hexadecimal and store them in the array according to the position of the data unit in the string;

[0157] Add an encryption key value to the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit;

[0158] The characters of the encryption displacement vector are sequentially inserted into the encryption key value characters in the preliminary encryption data unit according to the first order from the first character of the encryption displacement vector to form encrypted information; wherein, there is a character of the first encryption displacement vector between adjacent encryption key value characters.

[0159] In some embodiments, the conversion module 503 is further configured to:

[0160] Convert the encrypted information into String type characters;

[0161] Store the characters of the String type in the String array in sequence according to the position of the data unit in the String array;

[0162] Convert String type characters to Base64 encoding;

[0163] Read Base64 encoding;

[0164] In response to the Base64 encoding being recognizable, the first format verification is successful.

[0165] In some embodiments, the decryption module 504 is further configured to:

[0166] Convert Base64 encoding to String type characters;

[0167] Extracting first characters in the encrypted information in sequence according to the first order, and reorganizing the first characters according to the extraction order;

[0168] calling the encryption displacement vector, comparing the encryption displacement vector and the reconstructed first character; in response to the encryption displacement vector and the reconstructed first character being the same, obtaining preliminary decryption information;

[0169] Get the character length of the data unit, based on the length of the data unit since the last character of the initial decrypted information.

[0170] Extracting the second character from the last character of the preliminary decrypted information;

[0171] The encryption key value is called, the encryption key value is compared with the second character, and in response to the encryption key value and the second character being the same, decryption information is obtained.

[0172] In some embodiments, the comparison module 505 is further used to arrange the decrypted information according to the position of the data unit in the String array;

[0173] The decrypted information is divided according to the position of the connection key to form divided information;

[0174] Perform binary conversion on the segmentation information;

[0175] The binary-converted segmented information is read, and in response to the fact that the binary-converted segmented information is identical to the key identification information, the decryption verification is successful, and the encrypted information in the first format is transmitted.

[0176] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0177] The device of the above embodiment is used to implement the corresponding medical data encryption transmission method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0178] Based on the same technical concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the medical data encryption transmission method described in any of the above embodiments is implemented.

[0179] Figure 5 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0180] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0181] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0182] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0183] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0184] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0185] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0186] The electronic device of the above-mentioned embodiment is used to implement the corresponding medical data encryption transmission method in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0187] Based on the same technical concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the medical data encryption transmission method described in any of the above embodiments.

[0188] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0189] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the medical data encryption transmission method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0190] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0191] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0192] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0193] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A method for encrypting and transmitting medical data, characterized in that: include: Acquire a medical image and key identification information corresponding to the medical image, and compress and store the medical image; Encrypting the key identification information using a preset encryption algorithm to form encrypted information; Converting the encrypted information into a first format and verifying the encrypted information in the first format to determine whether the first format is recognizable; Reversely converting the encrypted information in the first format into the encrypted information in the original format, and decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information; comparing the decrypted information with the key identification information, and in response to the decrypted information being identical to the key identification information, transmitting the encrypted information in the first format; The encryption algorithm includes a symmetric encryption algorithm; The step of encrypting the key identification information by using a preset encryption algorithm to form encrypted information includes: Extracting a preset original key value, and filling the original key value with a preset symmetric encryption algorithm to form an encrypted key value; Extracting a preset original displacement vector, and filling the original displacement vector using a preset symmetric encryption algorithm to form an encrypted displacement vector; wherein the encryption key value and the encryption displacement vector have the same length; Filling the key identification information with an odd character length to obtain the key identification information with an even character length, and concatenating the key identification information into a character string using a connection key; Determine a String array, form a data unit according to the value of each two digits of the characters in the string, perform hexadecimal conversion on the data units respectively, and store the data units in the String array according to the positions of the data units in the string; Add the encryption key value at the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit; Starting from the first character of the encryption displacement vector, the characters of the encryption displacement vector are sequentially inserted into the characters of the encryption key value in the preliminary encrypted data unit in a first order to form encrypted information; wherein, there is a character of the encryption displacement vector between adjacent characters of the encryption key value.

2. The method according to claim 1, characterized in that The first format includes Base64 encoding; The step of converting the format of the encrypted information to form the encrypted information in a first format and performing format verification on the encrypted information in the first format includes: Convert the encrypted information into characters of String type; Store the characters of the String type in the String array in sequence according to the positions of the data units in the String array; Convert the string type characters to Base64 encoding; Read the Base64 encoding; In response to the Base64 encoding being recognizable, the first format verification is passed.

3. The method according to claim 2, characterized in that Reversely converting the encrypted information in the first format into the encrypted information in the original format, and decoding the encrypted information using a decryption algorithm corresponding to the encryption algorithm to obtain decrypted information, including: Convert the Base64 code into characters of the String type; extracting the first characters in the encrypted information in sequence according to the first sequence and the positions of the characters inserted into the encrypted displacement vector, and reorganizing the first characters in the extraction sequence; calling the encryption displacement vector, comparing the encryption displacement vector with the reconstructed first character; and obtaining preliminary decryption information in response to the encryption displacement vector being the same as the reconstructed first character; Obtaining the character length of the encryption key value, and extracting the second character from the first character of the preliminary decryption information based on the character length of the encryption key value; The encryption key value is called, the encryption key value is compared with the second character, and in response to the encryption key value and the second character being the same, decryption information is obtained.

4. The method according to claim 3, characterized in that The comparing the decrypted information with the key identification information and transmitting the encrypted information in the first format in response to the decrypted information being the same as the key identification information includes: Arrange the decrypted information according to the position of the data unit in the String array; Segmenting the decrypted information according to the location of the connection key to form segmented information; Performing binary conversion on the segmentation information; The segmentation information after binary conversion is read, and in response to the segmentation information after binary conversion being the same as the key identification information, the decryption verification is successful, and the encrypted information in the first format is transmitted.

5. The method according to claim 1, characterized in that The key identification information corresponding to the medical image includes: Patient ID, patient name, patient gender, patient age, patient examination number, examination equipment type, examination time, patient address, contact information, past medical history and treatment process.

6. A device for encrypted transmission of medical data, characterized in that: include: An acquisition module, used to acquire medical images and key identification information corresponding to the medical images, and compress and store the medical images; An encryption module, used to encrypt the key identification information using a preset encryption algorithm to form encrypted information; A conversion module, used to convert the encrypted information into a first format and store the encrypted information; perform format verification on the encrypted information in the first format to determine whether the first format is recognizable; A decryption module, used for reversely converting the encrypted information in the first format into the encrypted information in the original format, and decrypting the encrypted information using a directional decryption corresponding to the encryption to obtain decrypted information; a comparison module, configured to compare the decrypted information with the key identification information, and in response to the decrypted information being identical to the key identification information, transmit the encrypted information in the first format; The encryption algorithm includes a symmetric encryption algorithm; The step of encrypting the key identification information by using a preset encryption algorithm to form encrypted information includes: Extracting a preset original key value, and filling the original key value with a preset symmetric encryption algorithm to form an encrypted key value; Extracting a preset original displacement vector, and filling the original displacement vector using a preset symmetric encryption algorithm to form an encrypted displacement vector; wherein the encryption key value and the encryption displacement vector have the same length; Filling the key identification information with an odd character length to obtain the key identification information with an even character length, and concatenating the key identification information into a character string using a connection key; Determine a String array, form a data unit according to the value of each two digits of the characters in the string, perform hexadecimal conversion on the data units respectively, and store the data units in the String array according to the positions of the data units in the string; Add the encryption key value at the first position of each data unit to encrypt the data unit to form a preliminary encrypted data unit; Starting from the first character of the encryption displacement vector, the characters of the encryption displacement vector are sequentially inserted into the characters of the encryption key value in the preliminary encrypted data unit in a first order to form encrypted information; wherein, there is a character of the encryption displacement vector between adjacent characters of the encryption key value.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the medical data encryption transmission method as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the medical data encryption transmission method as described in any one of claims 1 to 5.