Smart medical information data encryption method and system, and medium

By using AES-256 encryption algorithm and dynamic expiration timestamps in medical information data, combined with the automated adjustment of smart contracts, it solves the problem that traditional encryption methods are difficult to cope with different security needs and data expiration processing, and realizes efficient and secure management of medical information data.

CN119626431AActive Publication Date: 2025-03-14HEGUANG DIGITAL (SHENZHEN) CO LTD

Patent Information

Application Number
CN202510161753.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-03-14
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

Traditional encryption methods are difficult to cope with different levels of security needs, and lack effective data expiration processing methods, resulting in an increase in the risk of data breaches.

Method used

The AES-256 encryption algorithm is used to initially encrypt medical information and each record is assigned an expiration time stamp. Dynamically adjust the encryption strength according to the access situation, and automatically perform the adjustment of the encryption strength and data processing through smart contracts.

Benefits of technology

It realizes efficient and secure management of medical information data, improves data security, reduces system burden, and enhances compliance and flexibility of medical data storage and access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626431A_ABST
    Figure CN119626431A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data encryption, in particular to an intelligent medical information data encryption method and system and a medium. The method comprises the following steps: acquiring medical information data by using an electronic health recording system; initial AES-256 encryption is conducted on the collected medical information data, the encrypted medical information data are stored in a database, a medical information encryption database is obtained, and the medical information encryption database comprises at least one medical information record; and carrying out expiration timestamp distribution on each medical information record to obtain a medical information encryption expiration timestamp. According to the method, efficient and safe management of medical information data is realized through dynamic management of encryption strength, expiration time check and intelligent contract optimization, so that the security of the data is improved, the burden of the system is reduced, the compliance and flexibility of medical data storage and access are enhanced, and the overall performance of users and the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a smart medical information data encryption method, system and medium. Background Art

[0002] The development of smart medical information data encryption methods began with the growing demand for medical data security. With the widespread application of technologies such as electronic medical records, telemedicine, and intelligent diagnosis, the digitization and Internetization of medical information have made patients' privacy information and medical data vulnerable to the risk of leakage and tampering. In order to protect these sensitive data, traditional encryption technologies such as symmetric encryption and asymmetric encryption have gradually been applied to the protection of medical data, but with the continuous upgrading of attack technologies, the limitations of traditional encryption methods have gradually emerged. In this context, encryption technologies based on higher security requirements have been developed. With the research progress of cutting-edge technologies such as quantum computing and homomorphic encryption, new encryption methods have emerged. Quantum encryption technology provides extremely high security through the non-replicability of quantum states, while homomorphic encryption technology can directly calculate on encrypted data, avoiding the risk of data leakage. These technologies are gradually applied to the protection of smart medical information. However, traditional encryption methods often use fixed encryption strengths, which are difficult to cope with different levels of security requirements. At the same time, existing technologies usually lack effective processing methods for data expiration, which can easily lead to expired information still being encrypted and stored, increasing the risk of data leakage. Summary of the invention

[0003] Based on this, it is necessary to provide a smart medical information data encryption method, system and medium to solve at least one of the above technical problems.

[0004] To achieve the above purpose, a smart medical information data encryption method is provided, the method comprising the following steps: Step S1: using an electronic health record system to collect medical information data; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; Step S2: confirming the access status of each medical information record through access log records; associating the access record with the encryption status information of the medical information record based on the access status, and dynamically refreshing the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; Step S3: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; comparing the expiration time of the expired storage record according to the medical information encryption expiration timestamp, and adjusting the encryption strength refresh data based on the comparison result to obtain encryption strength adjustment mark data; Step S4: deploy smart contracts; based on the deployed smart contracts, adjust the encryption strength of expired storage records according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

[0005] The present invention performs preliminary encryption on medical information through the AES-256 encryption algorithm to ensure that the storage of sensitive data in the database is safe and reduce the risk of data leakage. An expiration timestamp is assigned to each record, so that the validity period of each data is clearer and convenient for subsequent expiration inspection and management. The information is managed using the expiration timestamp to ensure compliance with laws and regulations related to medical data storage. The encryption strength is dynamically adjusted according to the access situation, which helps to cope with different access requirements or attack risks. For example, frequently accessed medical information can improve the encryption strength according to risk assessment to enhance security. By recording the access data and combining the information association of the encryption status, the encryption operation can be optimized to avoid over-encryption or inefficient encryption and improve system performance. The expiration status of the data is checked regularly to ensure that the expired data can be cleaned or processed in time to avoid wasting storage space. The encryption strength mark is adjusted according to the expiration timestamp to ensure that the data in the storage always maintains sufficient encryption protection and reduce the possibility of data leakage. The encryption strength adjustment is automatically performed by the smart contract to reduce manual intervention and improve processing speed and efficiency. The smart contract adjusts the mark according to the encryption strength to achieve dynamic protection of data, and more accurately and efficiently copes with different data access and storage requirements. Therefore, the present invention realizes efficient and secure management of medical information data by dynamically managing encryption strength, expiration time checking and smart contract optimization, which not only improves data security, but also reduces the burden on the system, enhances the compliance and flexibility of medical data storage and access, and improves the overall performance of users and systems.

[0006] Preferably, step S1 comprises the following steps: Step S11: using the electronic health record system to collect medical information data, wherein the collection frequency is set to once per minute, to obtain medical information data; Step S12: Fully encrypting the standard medical information data based on the AES-256 encryption algorithm to obtain the encrypted medical information data and the corresponding data encryption key, and storing the corresponding data encryption key in a preset key management system; Step S13: extracting the character string capacity of the encrypted medical information data to set the database capacity, and constructing the database according to the database capacity to obtain a storage database; Step S14: storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database contains at least one medical information record, and each medical information record includes at least a data storage timestamp and a unique data ID; Step S15: Assign an expiration timestamp to each medical information record to obtain an encrypted expiration timestamp for the medical information.

[0007] The present invention ensures that the medical information data is updated frequently by setting the data collection once every minute, which can timely reflect the health status of the patient and provide real-time support for subsequent analysis and decision-making. Regular collection reduces data lag and ensures that the most accurate and latest medical information is stored in the system. The AES-256 encryption algorithm provides strong encryption protection to ensure that the medical information is not leaked or tampered with during storage and transmission, and effectively protects the privacy of patients. The encryption key is stored in a preset key management system, which realizes the centralized management of the key and improves the security and controllability of key use. Separate key storage reduces the risk of key leakage. The character string capacity of the encrypted data is extracted to set the database capacity, ensuring that the construction of the database meets the storage requirements, avoiding excessive waste or insufficiency, and improving storage efficiency. Reasonable database configuration is performed according to the actual medical data capacity, so that the database can be flexibly expanded to cope with the increase in the amount of medical data in the future. The encrypted medical information data is stored in a special database, which ensures the security of the data and optimizes the storage structure. The traceability of the data is enhanced by record management including timestamps and unique IDs. Indexing each record by timestamps and unique IDs can effectively realize fast query, access and management of data. Assigning an expiration timestamp to each medical information record makes the data lifecycle management more systematic. The expiration timestamp provides an important basis for subsequent inspection, cleaning or processing of expired data. It ensures that the data can be processed in a timely manner after the end of the life cycle, in accordance with relevant data protection and compliance requirements, and avoids storage redundancy or illegal use.

[0008] Preferably, step S15 comprises the following steps: Classify each medical information record into medical data timeliness type, and obtain short-term medical timeliness data, medium-term medical timeliness data and long-term medical timeliness data; Confirm the start timestamp of each medical information record based on the data storage timestamp to obtain the expiration start timestamp; According to the expiration start timestamp, the expiration time interval of the short-term medical validity data is set to 1 year to obtain the short-term expiration timestamp; According to the expiration start timestamp, the expiration time interval of the mid-term medical validity data is set to 3 years, and the mid-term expiration timestamp is obtained; According to the expiration start timestamp, the expiration time interval of the long-term medical validity data is set to 5-10 years to obtain a long-term expiration timestamp; An expiration timestamp is assigned to each medical information record through a short-term expiration timestamp, a medium-term expiration timestamp and a long-term expiration timestamp to obtain an encrypted expiration timestamp of the medical information.

[0009] The present invention divides medical data into short-term, medium-term and long-term time-effective data, formulates a reasonable time-effectiveness strategy according to the frequency of use and importance of the data, and effectively improves the flexibility and accuracy of data management. This division ensures that each type of data is processed according to its actual needs, avoids excessive storage of short-term data that does not need to be stored for a long time, and improves resource utilization. By confirming the starting timestamp of each record, it is ensured that each medical information can be accurately traced, and the traceability and auditability of the data are further enhanced. The starting timestamp provides an accurate basis for the calculation of the subsequent expiration timestamp, ensuring that the management of expired data is standardized and correct. A 1-year expiration time is set for short-term medical time-effective data to ensure that these data are deleted or processed in time after expiration, reducing storage pressure and management complexity. Regularly cleaning up short-term data not only reduces the storage burden, but also maintains the efficient operation of the system, ensuring that resources are used for more valuable long-term data. The medium-term data is set with an expiration time of 3 years, which can not only ensure the reasonable storage time of the data, but also avoid the accumulation of long-term useless data, providing more time for managers to optimize. The 3-year time setting usually meets the regular use cycle of medical data, which can not only meet the needs of clinical management, but also ensure that the data is checked and updated on time. Long-term medical time-effectiveness data (5-10 years) is the longest storage time, ensuring that important historical medical data can be stored for a long time within a reasonable range for subsequent diagnosis and treatment, disease research and other purposes. The storage period of long-term data is set reasonably, and unnecessary deletion or leakage will not occur due to excessive storage, ensuring the integrity of medical records and the traceability of historical data. By comprehensively considering short-term, medium-term and long-term expiration timestamps, it is ensured that each medical record can be accurately assigned an expiration timestamp according to its timeliness, which not only optimizes data storage management, but also ensures the efficiency of the system. Assigning a suitable expiration timestamp to each medical information record ensures that the entire life cycle of data from collection to removal is reasonably managed, in compliance with relevant regulations and the requirements of the medical industry.

[0010] Preferably, step S2 comprises the following steps: Step S21: calling the access log record of the medical information encryption database to obtain the access status of each medical information record, wherein the access log record includes the access time, access user and access content; Step S22: screening the access records of the access contents in the access log records based on a preset access time period, and obtaining screening results of the accessed medical information records and screening results of the non-accessed medical information records; Step S23: performing data interaction frequency association on the access situation of each medical information record according to the screening result of the accessed medical information records, and generating a data encryption access association result; Step S24: Dynamically refresh the encryption strength of the medical information record according to the data encryption access association result to obtain encryption strength refresh data.

[0011] The present invention can obtain detailed access information, including access time, user and access content, by calling the access log records in the medical information encryption database, so as to fully understand the use of each medical record. The records of the access log can accurately trace each access behavior to medical information, which is helpful for subsequent management and security audit. The access log records are screened according to the preset access time period, which can help the system identify which medical information records have been accessed and which have not been accessed, thereby optimizing the data processing flow. The accessed and unaccessed records obtained by screening are helpful for resource allocation, and can give priority to or protect frequently accessed data, reducing the management pressure of infrequently accessed data. According to the screening results of the accessed records, the data interaction frequency is associated, and the use frequency of each medical information record can be more accurately determined. Frequently accessed records can be encrypted with higher strength, while infrequently accessed records can have lower encryption strength. By analyzing the access frequency and associating the data interaction situation, the encryption strength can be dynamically adjusted according to actual needs, avoiding the impact of excessive encryption on performance, while ensuring data security. The encryption strength of the medical information record is dynamically adjusted according to the access behavior and the data interaction frequency. Increasing encryption strength can increase the protection of sensitive information, while reducing encryption strength can improve performance and storage efficiency and avoid unnecessary waste of resources. Dynamically refreshing encryption strength ensures that the system's operating efficiency and response speed are improved without sacrificing data security. The data encryption level can be adjusted according to actual needs, allowing the system to flexibly respond to different usage requirements.

[0012] Preferably, step S23 includes the following steps: Step S231: Calculate the number of accesses to each medical information record according to the screening result of the accessed medical information records to obtain the number of accesses to the medical information record; Step S232: setting the accessed medical information records screening results that are accessed more than 5 times per month as high-frequency access; setting the accessed medical information records screening results that are accessed 2 to 5 times per month as medium-frequency access; setting the accessed medical information records screening results that are accessed less than 2 times per month and the non-accessed medical information records screening results as low-frequency access; Step S233: Integrate high-frequency access, medium-frequency access and low-frequency access into classified access intensity data, and calculate the access mode of each medical information record through the classified access intensity data to obtain the number of accesses of each mode, wherein the access mode includes viewing, modifying and deleting; Step S234: construct an access strength and encryption strategy mapping table for the medical information encryption database based on the number of accesses in each mode, and obtain a data encryption access association result.

[0013] The present invention can accurately understand the access frequency of each record by calculating the number of accesses of each accessed medical information record, and help determine which data has a higher access demand. The statistics of the number of accesses provide a basis for the subsequent analysis of the access mode, and can clarify which records are frequently used and which are accessed infrequently, thereby providing a basis for the dynamic adjustment of the encryption strength. According to the number of accesses of each record, it is classified into high-frequency access, medium-frequency access and low-frequency access. This classification ensures that different security strategies can be adopted for records with different access frequencies, and improves the accuracy of management. High-frequency access data can obtain higher encryption protection, ensuring that sensitive data maintains high security in the case of frequent access; while low-frequency access data can appropriately reduce the encryption strength to optimize storage and performance. By classifying the access strength data, the number of accesses of the access mode (view, modify, delete) is further calculated, and the operation of each medical record can be accurately grasped. The subdivision of the access mode enables the system to identify which records are viewed, modified or deleted more frequently, helping to evaluate the sensitivity and security requirements of these records, so that the corresponding encryption strategy can be adjusted according to the risks of specific operations to improve the security of the data. According to the number of accesses in each access mode, a mapping table between access strength and encryption strategy is constructed to achieve accurate matching between data access mode and encryption strategy. Through the mapping table, encryption strategy can be adjusted dynamically in real time to ensure that data with high frequency of access and frequent modification is protected by high-intensity encryption, while data with low frequency of access is protected by appropriate encryption level, balancing data protection and system performance.

[0014] Preferably, step S3 comprises the following steps: Step S31: Perform an expired data check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generate an expired check result, wherein the following conditions are determined to be expired storage records: The data type of medical information records is short-term medical time-limited data, and the storage time exceeds 1 year and there is no access log record in the past 6 months; The data type of medical information records is mid-term medical time-limited data, and the storage time is more than 3 years and there is no access log record in the past 6 months; The data type of medical information records is long-term medical time-limited data, and the storage time exceeds 5 years and there is no access log record in the past 6 months; Step S32: calculating the expiration time sequence of the expired storage record, and setting the encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain the encryption strength reduction rule; Step S33: Use the encryption strength reduction rule to perform encryption strength adjustment marking on the encryption strength refresh data of the medical information record to obtain encryption strength adjustment marking data, wherein the encryption strength adjustment data includes encryption strength reduction marking data and decrypted storage marking data.

[0015] The present invention periodically checks the expiration of each medical information record at a preset scanning time interval, and can effectively identify data that has not been accessed for a long time and has exceeded the validity period. This mechanism helps to reduce unnecessary storage occupancy and improve the storage efficiency of the database. According to the different medical time-effectiveness data types of short-term, medium-term and long-term, combined with the storage time and access records, expired medical records can be more accurately identified. By making judgments based on different time-effectiveness data types, different strategies can be adopted for different categories of data to further refine data management. By calculating the time series of expired storage records, the expiration status of each data can be clearly grasped, and the rules for reducing the encryption strength can be formulated according to the specific expiration time period, so that different protection measures can be taken for different expired data. According to the encryption strength reduction rules set according to the expiration time series, the encryption strength can be dynamically reduced according to the storage time and access situation of the data, thereby optimizing the storage space and reducing unnecessary computing overhead. Reducing the encryption strength helps to improve the overall performance of the database, especially when processing historical data. By adjusting the encryption strength refresh data through the encryption strength reduction rules, the system can automatically identify and mark the data that needs to reduce the encryption strength. Encryption strength adjustment of marked data includes not only marking to reduce encryption strength, but also decrypting and storing marked data to ensure that data that no longer requires strong encryption protection can be decrypted, thereby improving storage and reading efficiency. Adjusting marked data according to encryption strength can reduce the protection of expired data, thereby optimizing database access performance, which can not only reduce the additional burden brought by encryption, but also ensure the rational use of resources, especially when processing large amounts of historical medical data.

[0016] Preferably, step S32 includes the following steps: Step S321: Calculate the expiration time sequence of the expired storage record, and compare the expiration time sequence of the expired storage record with its own medical information encryption expiration timestamp. When the expiration time sequence of the expired storage record is less than the medical information encryption expiration timestamp, adjust the AES-128 encryption rule for the expired storage record with a total number of historical access times greater than 30 times, and obtain a high-frequency expired data adjustment rule; Step S322: adjusting the AES-64 encryption rule for the expired storage records whose total number of historical access times is greater than 6 times and less than 30 times, to obtain the medium frequency expired data adjustment rule; Step S323: decrypt and store the expired storage records whose total number of historical access times is less than 6 times, and obtain the low-frequency expired data adjustment rules; Step S324: Integrate the high-frequency expired data adjustment rule, the medium-frequency expired data adjustment rule, and the low-frequency expired data adjustment rule to obtain the encryption strength reduction rule.

[0017] By comparing the expiration time sequence of expired storage records with the encryption timestamp, the system can determine whether further encryption strength adjustment is required. If the expiration time sequence of the expired storage record is short and the number of historical accesses exceeds 30 times, a stronger encryption rule (AES-128) is adopted. This strategy based on access frequency and expiration time helps to protect frequently accessed and sensitive medical data. Strong encryption rule adjustment is performed on expired records with more than 30 historical accesses to ensure that the data remains highly secure even after expiration, thereby reducing the risk of data leakage. This measure helps to meet compliance requirements, especially in the long-term storage management of sensitive data. The AES-64 encryption rule is used for expired storage records with access times between 6 and 30 times. This adjustment strategy provides moderate protection for medical data with medium-frequency access. By flexibly selecting encryption strength, the system can balance security and performance according to the frequency of data access, reducing storage and computing burdens. Using weaker encryption (AES-64) to process medium-frequency data can reduce the performance loss caused by high-intensity encryption while still ensuring data security, which provides an efficient and scalable solution for the long-term preservation of medical data. Decryption storage adjustment is performed on expired storage records with a historical access count of less than 6 times, which means that the system decrypts and stores these infrequently accessed data, thereby releasing more encryption resources, which not only reduces the storage pressure of the database, but also improves the access speed of the decrypted data. For data that has not been accessed for a long time, the practice of decrypted storage helps reduce the storage and computing burden caused by excessive encryption, while improving the processing efficiency of low-frequency data, which is particularly important when storing a large amount of historical medical data, and can significantly improve the operating performance of the database. By integrating the encryption strength adjustment rules for high-frequency, medium-frequency and low-frequency expired data, the system can provide the most appropriate encryption strategy for different types of expired data. This integrated strategy provides a comprehensive and dynamic adjustment mechanism for data management. The integrated encryption strength reduction rules ensure that each piece of data in the database can be optimally protected according to the access frequency and expiration status, which not only reduces the storage cost, but also improves the security and access performance of the system, thereby effectively improving the efficiency of medical information data management.

[0018] Preferably, step S4 comprises the following steps: Step S41: Setting and deploying smart contracts using blockchain technology; Step S42: Based on the deployed smart contract, the encryption level of expired storage records is intelligently adjusted according to the encryption strength reduction mark data in the encryption strength adjustment mark data, and the expired storage records are softly deleted according to the decrypted storage mark data in the encryption strength adjustment mark data to perform data encryption optimization operations.

[0019] The present invention ensures the immutability and transparency of data through the decentralized structure in blockchain technology. The deployment of smart contracts enables the encryption strength adjustment and data processing process to be automated and have an audit record that cannot be tampered with, which provides a strong technical guarantee for the encryption management of medical information and ensures the credibility and compliance of all operations. By deploying smart contracts through blockchain, all encryption-related operations can be automatically executed to avoid human intervention and errors. This decentralized management method can reduce the security risks brought by centralized storage and management and improve the trust of data management. Smart contracts can automatically perform encryption strength adjustment and decryption storage mark processing according to set rules, improve operational efficiency and reduce the error rate of human intervention, which is of great significance for processing large amounts of medical data, especially in data encryption and protection. According to the mark in the encryption strength adjustment mark data, the smart contract can automatically adjust the encryption level of expired storage records. For example, based on the historical access frequency, the encryption strength is adjusted to ensure that the access rights of expired storage records match the encryption level. This method makes medical information storage more flexible and has higher security, reducing unnecessary computing resource consumption. Through the operation of smart contracts, the system can perform encryption strength adjustment or decryption storage soft deletion operations for different types of expired storage records. The encryption strength adjustment ensures the security of high-frequency data, and the soft deletion operation ensures that data that has not been accessed for a long time is "softly" removed from the database, reducing storage costs and the system burden during queries. Soft deletion of unaccessed data avoids excessive storage of invalid or no longer needed data in the database, improving the overall storage efficiency of the system. By adjusting the encryption level of expired data, the system can also reasonably allocate computing resources according to the importance and access frequency of data, improving data access speed and response efficiency.

[0020] In this specification, a smart medical information data encryption system is provided, which is used to execute the above-mentioned smart medical information data encryption method. The smart medical information data encryption system includes: A data encryption module is used to collect medical information data using an electronic health record system; perform initial AES-256 encryption on the collected medical information data, and store the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assign an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; The encryption association module is used to confirm the access status of each medical information record through access log records; associate the access record with the encryption status of the medical information record based on the access status, and dynamically refresh the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; An expiration check module is used to perform an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage record to obtain encryption strength adjustment mark data; The encryption adjustment module is used to deploy smart contracts; based on the deployed smart contracts, the encryption strength of expired storage records is adjusted according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

[0021] The present invention also provides a storage medium storing a computer program, which implements the above-mentioned smart medical information data encryption method when executed.

[0022] The beneficial effect of the present invention is that the data encryption module ensures that all medical information data are strongly encrypted and protected during the storage process by adopting the AES-256 encryption algorithm, effectively preventing data leakage and unauthorized access. A unified encryption standard provides consistent encryption measures for all medical information records, ensuring the integrity and consistency of medical information. The encrypted data is stored in the database and assigned an expiration timestamp to ensure that the data is effectively managed during its life cycle. By assigning an expiration timestamp to each medical information record, data life cycle management can be effectively performed to ensure that expired data no longer occupies storage space and avoid storage waste. The encryption association module analyzes the access situation of each medical information record based on the access log record, and dynamically adjusts the encryption strength according to the access frequency and mode. This dynamic refresh encryption strength method ensures that the data with high frequency access has stronger encryption protection, while the encryption strength of the data with low frequency access can be appropriately reduced, thereby protecting data security while reducing the consumption of computing resources. By associating the access record with the encryption status, the access mode of each medical information record can be more accurately understood, so that different encryption strategies are applied to data of different levels to achieve fine-grained security management. The expiration check module can identify and process expired medical information records in a timely manner by performing regular expiration checks, avoiding the storage of expired data that is no longer needed. According to the preset scanning time interval, the expiration check module can run automatically to ensure timely data updates and storage optimization. The encryption strength of expired storage records is adjusted to reduce resource usage and avoid security risks caused by storing a large amount of expired and invalid data. The system can automatically handle data expiration and encryption adjustments to improve the utilization efficiency of storage and computing resources. The encryption adjustment module ensures that the adjustment of data encryption strength can be automatically executed by deploying smart contracts, reducing manual intervention and reducing management complexity. Smart contracts process expired data according to preset rules to ensure the compliance and rationality of encryption strength, and soft delete or adjust the encryption level of expired data that is no longer needed. Through the role of smart contracts, this module can automatically optimize encryption strength and data storage strategies, which not only ensures data encryption protection, but also optimizes storage and access efficiency. Therefore, the present invention realizes efficient and secure management of medical information data by dynamically managing encryption strength, expiration time checking and smart contract optimization, which not only improves data security, but also reduces the burden on the system, enhances the compliance and flexibility of medical data storage and access, and improves the overall performance of users and systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of the steps of a smart medical information data encryption method; Figure 2 for Figure 1 Detailed implementation steps of step S2 in the flowchart; Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG. The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0024] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0026] It should be understood that although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, and the term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0027] To achieve this, please refer to Figures 1 to 3 , a smart medical information data encryption method, the method comprising the following steps: Step S1: using an electronic health record system to collect medical information data; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; Step S2: confirming the access status of each medical information record through access log records; associating the access record with the encryption status information of the medical information record based on the access status, and dynamically refreshing the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; Step S3: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; comparing the expiration time of the expired storage record according to the medical information encryption expiration timestamp, and adjusting the encryption strength refresh data based on the comparison result to obtain encryption strength adjustment mark data; Step S4: deploy smart contracts; based on the deployed smart contracts, adjust the encryption strength of expired storage records according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

[0028] The present invention performs preliminary encryption on medical information through the AES-256 encryption algorithm to ensure that the storage of sensitive data in the database is safe and reduce the risk of data leakage. An expiration timestamp is assigned to each record, so that the validity period of each data is clearer and convenient for subsequent expiration inspection and management. The information is managed using the expiration timestamp to ensure compliance with laws and regulations related to medical data storage. The encryption strength is dynamically adjusted according to the access situation, which helps to cope with different access requirements or attack risks. For example, frequently accessed medical information can improve the encryption strength according to risk assessment to enhance security. By recording the access data and combining the information association of the encryption status, the encryption operation can be optimized to avoid over-encryption or inefficient encryption and improve system performance. The expiration status of the data is checked regularly to ensure that the expired data can be cleaned or processed in time to avoid wasting storage space. The encryption strength mark is adjusted according to the expiration timestamp to ensure that the data in the storage always maintains sufficient encryption protection and reduce the possibility of data leakage. The encryption strength adjustment is automatically performed by the smart contract to reduce manual intervention and improve processing speed and efficiency. The smart contract adjusts the mark according to the encryption strength to achieve dynamic protection of data, and more accurately and efficiently copes with different data access and storage requirements. Therefore, the present invention realizes efficient and secure management of medical information data by dynamically managing encryption strength, expiration time checking and smart contract optimization, which not only improves data security, but also reduces the burden on the system, enhances the compliance and flexibility of medical data storage and access, and improves the overall performance of users and systems.

[0029] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a flow chart of a method for encrypting medical information data in a smart manner according to the present invention. In this example, the method for encrypting medical information data in a smart manner includes the following steps: Step S1: using an electronic health record system to collect medical information data; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; In an embodiment of the present invention, the medical information data of the patient is extracted from the electronic health record system (EHR). Such data includes but is not limited to the patient's basic information (such as name, age, gender), diagnosis records, treatment records, medication, allergy history, etc. The data can be obtained by connecting to the EHR system through an interface or by manual entry. The collected medical information data is encrypted with AES-256 to ensure its data security. The encryption key is generated using the AES-256 encryption algorithm. Each collected medical information record is encrypted with the key. AES-256 is the 256-bit version of the Advanced Encryption Standard, which is currently recognized as a strong encryption algorithm. The generated encrypted data should be irreversible, that is, the plaintext data cannot be recovered from the encrypted data unless the correct key is available. The encrypted medical information data is stored in a database to form a "medical information encryption database". The database should have sufficient security measures, such as data access control, encryption key management, etc. Each encrypted record should include the patient's unique identifier (such as patient ID), the encrypted medical information content and other necessary metadata. An "expiration timestamp" is assigned to each medical information record. This timestamp indicates that the record will expire after a certain period of time. The rules for assigning expiration timestamps can be based on the following factors: For example, a patient's diagnosis record can be set to expire in one year, and a treatment record can be set to expire in three years. The expiration timestamp of each record can be embedded in the encrypted data record and stored as additional metadata. The structure of the medical information encryption database should include at least the following fields: Patient ID: used to uniquely identify the patient. Encrypted medical information data: stores medical information encrypted by AES-256. Expiration timestamp: used to identify the expiration time of the record to ensure that the data is automatically eliminated or updated after expiration. Storage timestamp: records the time when the data is encrypted and stored for subsequent tracing. Use a multi-level access control strategy to protect the medical information database to ensure that only authorized personnel can decrypt and access medical information data. Security can be enhanced through technical means such as role permission management, encryption key management, and access log monitoring.

[0030] Step S2: confirming the access status of each medical information record through access log records; associating the access record with the encryption status information of the medical information record based on the access status, and dynamically refreshing the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; In an embodiment of the present invention, an access log function is configured for each record in the storage system of medical information records. When a medical information record is read, updated or deleted, the system automatically records the access log. The log content should include the access time, the identity of the visitor, the access type (read / modify / delete) and the medical information identifier accessed. Using the access log data, the system can analyze the access frequency, the visitor role and the access time pattern of each record. The analysis of the access pattern will help determine the importance of a certain record and its sensitivity to access. For example, records frequently accessed by medical personnel require higher encryption strength. A rule association mechanism is established based on the data in the access log. For example: records with high access frequency (such as multiple visits per week) can be associated with high encryption strength. Records involving medical history, diagnosis, surgical information, etc., even if the access frequency is low, can also be associated with high encryption strength. For example, when only specific doctors or nursing staff have the authority to access certain records, these records should also be associated with stronger encryption policies. The system will dynamically assign encryption strength to each record based on the access situation and the defined association rules. For example, if the access frequency of a record reaches a certain threshold or the sensitivity of the record content is high, the system will automatically adjust the encryption algorithm and key length of the record. Once it is found that the access pattern of the medical record meets the standards for high encryption requirements, the system will do the following: Update the encryption algorithm of the record to a higher strength encryption algorithm (for example, from AES-128 to AES-256). Change the key periodically or when necessary (such as when illegal access or abnormal login occurs). The system will re-encrypt the record to ensure that the new encryption policy is in effect. This process can be completed through background tasks without affecting normal access. In the system management interface or access log, the encryption status of each record is displayed in real time, including the encryption algorithm type and the current encryption strength. Administrators can monitor the implementation of encryption policies in real time based on this information.

[0031] Step S3: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; comparing the expiration time of the expired storage record according to the medical information encryption expiration timestamp, and adjusting the encryption strength refresh data based on the comparison result to obtain encryption strength adjustment mark data; In the embodiment of the present invention, a fixed scanning time interval is preset by the system administrator, which is usually set according to the life cycle or compliance requirements of the medical record, such as scanning once a month, quarterly or annually. This time interval determines the frequency of expiration inspection. Each medical information record will be marked with an encryption expiration timestamp when it is encrypted. This timestamp indicates when the encrypted information of the record expires. It is set according to different factors, such as the end time of the patient's treatment, the statutory preservation period, etc. Within the preset time interval, the system will scan all medical information records in the encryption database and check the encryption expiration timestamp of each record. If the current time exceeds the timestamp, the system considers that the record has expired. During the scanning process, the system will filter out expired records and generate a list of "expired storage records". These records will be marked as objects that need to be processed and enter the subsequent expiration time comparison and encryption strength adjustment process. The system will compare the encryption expiration timestamp of each expired record with the current time to calculate the expiration time interval. This is achieved by the following steps: Calculate the expiration time difference of each record (for example: current time - expiration timestamp). Based on the time difference, the system can determine whether the record is completely expired or only partially expired. Partial expiration means that the record needs to be further evaluated for its importance and whether the encryption strength needs to be adjusted. The expiration time difference can be used to manage records in a hierarchical manner: the encryption of these records has completely expired and needs to be further processed immediately, such as updating the encryption strength, re-encrypting or deleting; the encryption of these records has not completely expired, but its encryption strength needs to be re-evaluated within a certain period of time, and the encryption strategy needs to be adjusted or the encryption needs to be strengthened. The larger the expiration time difference, the more the system needs to adjust the encryption strength. If the expired record has exceeded the statutory retention period or has not been accessed for a long time, it is necessary to downgrade the encryption or remove the encryption protection that is no longer needed. For highly sensitive medical information records, even if the expiration time is long, a higher encryption strength is still required. Conversely, for records with lower sensitivity, the encryption strength can be appropriately reduced according to the expiration time difference. The system will generate an "encryption strength adjustment mark" based on the expiration time difference and sensitivity of each record. The mark will indicate whether the encryption strength needs to be adjusted, the adjusted strength level, and whether the record needs to be re-encrypted. The encryption strength adjustment tag data will be updated to the system's record database. Administrators can review the tag data or directly trigger the automated adjustment process. If the tag shows that the encryption strength needs to be increased, the system will automatically perform an encryption algorithm upgrade or use a stronger key if necessary. If the tag shows that the encryption strength can be reduced, the system can lower the encryption level or delete expired records when they are no longer needed for storage. The tag content includes the encryption strength adjustment result of each record, the basis for the adjustment (such as expiration time difference, record sensitivity, etc.), and the operation that the system needs to perform in the next step (such as re-encryption, deletion, reducing encryption strength, etc.).

[0032] Step S4: deploy smart contracts; based on the deployed smart contracts, adjust the encryption strength of expired storage records according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

[0033] In the embodiment of the present invention, a smart contract is designed, and its core function is to automatically perform encryption strength adjustment and storage optimization according to preset rules. The basic structure of the smart contract should include: defining how the encryption strength of the record is adjusted according to the encryption strength adjustment mark (such as expiration time difference, record sensitivity, etc.). Implementing specific operations in the smart contract, such as re-encryption, downgrade encryption or deletion of records, etc. Triggering different operations according to the encryption strength adjustment mark data of expired records, such as re-encryption operations, record deletion, etc. Select a suitable blockchain platform (such as Ethereum, Hyperledger, etc.) and deploy the smart contract to the chain or distributed ledger system. After deployment, the smart contract will be automatically executed in a decentralized manner on the chain without human intervention. Set a permission control mechanism in the smart contract to ensure that only authorized users or systems can trigger contract execution. For example, only administrators or specific modules in the system can call encryption strength adjustment and optimization operations. The system generates encryption strength adjustment mark data for each medical information record based on regular expired record scanning tasks. When the smart contract is executed, these mark data will be read from the database or storage system. The tag data contains information such as expiration time, sensitivity of the record, recommended encryption strength, whether re-encryption or deletion is required, etc. Based on the tag data, the smart contract triggers the re-encryption operation of the expired record. At this time, the smart contract can call the corresponding encryption algorithm (such as AES-256) and update the encryption key to ensure that the data is still secure. If the record has a long expiration time and the encryption strength can be moderately reduced according to the rules, the smart contract will perform an encryption level reduction operation, which can be achieved by downgrading the encryption algorithm or changing to a lower-strength key. For records that have completely expired and no longer need to be stored, the smart contract can perform a deletion operation to remove these expired records to ensure that the data in the database always remains valid and meets compliance requirements. To ensure the correct execution of encryption operations, smart contracts can have built-in verification mechanisms. For example, after performing an encryption operation, the smart contract can verify that the data has been successfully encrypted and ensure data integrity through hash value verification. Whenever the smart contract triggers an encryption strength adjustment operation, the relevant records will be stored optimized according to the adjustment tag. For example, re-encryption can improve storage efficiency or reduce storage costs while ensuring information security. Through the automatic execution of smart contracts, the encryption storage optimization of medical information can be carried out continuously without human intervention, ensuring that the encryption strength and storage status of each record are kept optimal. In addition to adjusting the encryption strength, smart contracts can also be optimized based on storage usage. For example: for some records that have not been accessed for a long time, smart contracts can trigger compression operations to reduce storage space usage. Based on the importance and access frequency of the records, smart contracts can automatically classify data into different storage levels (such as hot and cold data stratification) to improve storage efficiency.

[0034] Preferably, step S1 comprises the following steps: Step S11: using the electronic health record system to collect medical information data, wherein the collection frequency is set to once per minute, to obtain medical information data; Step S12: Fully encrypting the standard medical information data based on the AES-256 encryption algorithm to obtain the encrypted medical information data and the corresponding data encryption key, and storing the corresponding data encryption key in a preset key management system; Step S13: extracting the character string capacity of the encrypted medical information data to set the database capacity, and constructing the database according to the database capacity to obtain a storage database; Step S14: storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database contains at least one medical information record, and each medical information record includes at least a data storage timestamp and a unique data ID; Step S15: Assign an expiration timestamp to each medical information record to obtain an encrypted expiration timestamp for the medical information.

[0035] In an embodiment of the present invention, a data collection module is integrated into an electronic health record (EHR) system, and the module regularly collects medical information from multiple sources such as various medical devices, doctor input, and patient history records. The data may include the patient's diagnostic information, prescriptions, surgical records, laboratory results, imaging data, etc. The collection frequency is set to once a minute, that is, the system automatically collects the latest medical information data from the EHR system every 60 seconds, which ensures the real-time and continuity of medical information. The collected medical information will be standardized and converted into a data format suitable for encryption. Common data formats include JSON, XML or other structured data formats for subsequent encryption and storage processing. The AES-256 symmetric encryption algorithm is applied to the collected medical information data. AES-256 is a highly secure encryption standard that can ensure the security of data and prevent sensitive medical information from being leaked during transmission and storage. The AES-256 algorithm is used to encrypt the medical information data to generate encrypted data. Each piece of data will be encrypted independently to ensure the confidentiality of the information. For each encrypted data generated, the system will automatically generate a unique encryption key. In order to ensure the security of the key, the key will be stored separately in a preset key management system. The key management system needs to have high security, usually using a hardware security module (HSM) or key management service (KMS). The encrypted medical information data cannot be read directly unless it is decrypted by a legitimate key. The encryption key corresponding to each encrypted data will be stored in the key management system, and the key storage system should be separated from the database storage system to ensure the security of the key. For each encrypted medical information data, the system will extract its string capacity. String capacity refers to the size of the encrypted data, which can be used to calculate the required storage space. The encrypted data will be larger than the original data, so calculating the string capacity of the encrypted data helps to understand the database capacity requirements. For example, by calculating the byte length (such as MB, GB level) of each encrypted data, the total capacity required by the storage system can be estimated. Based on the data capacity requirements, the system will preset the storage capacity of the database. This process will take into account future expansion requirements and the growth of encrypted data to ensure that the database will not fail to store due to insufficient capacity. According to the database capacity setting, the database can select appropriate hardware, cloud services or distributed storage systems to ensure that large-scale encrypted medical information can be effectively stored. According to the set capacity, the system will build a medical information encryption database. The database needs to support efficient data access, encryption and decryption, query, update and other operations, and ensure data security. The encrypted medical information data will be stored in a pre-built database. Each record will be stored as an independent data unit to ensure the separation and security of the data. Each medical information record will be assigned a unique ID to ensure the uniqueness of the record. In addition, each record will also include a data storage timestamp to indicate the time when the data was stored.The storage system must provide encrypted access, data backup, redundant storage and other functions to ensure that data can be securely stored and restored even if the database fails or is attacked. Each medical information record requires an expiration timestamp to identify the validity period of the record. In the medical industry, medical information is time-sensitive, such as diagnostic data that is no longer valid after a period of time, or records need to be deleted or archived after a certain period of time according to regulatory requirements. The system automatically assigns an expiration timestamp to each record based on preset rules or regulatory requirements. For example, some medical records expire after 2 years, or some clinical data expires after 1 year. The expiration timestamp is recorded in the database together with the data storage timestamp for subsequent expiration checks and data cleanup operations. The system will scan the database regularly to check whether the expiration timestamp has expired. If it has expired, it can trigger subsequent data cleanup, encryption strength adjustment or deletion operations.

[0036] Preferably, step S15 comprises the following steps: Classify each medical information record into medical data timeliness type, and obtain short-term medical timeliness data, medium-term medical timeliness data and long-term medical timeliness data; Confirm the start timestamp of each medical information record based on the data storage timestamp to obtain the expiration start timestamp; According to the expiration start timestamp, the expiration time interval of the short-term medical validity data is set to 1 year to obtain the short-term expiration timestamp; According to the expiration start timestamp, the expiration time interval of the mid-term medical validity data is set to 3 years, and the mid-term expiration timestamp is obtained; According to the expiration start timestamp, the expiration time interval of the long-term medical validity data is set to 5-10 years to obtain a long-term expiration timestamp; An expiration timestamp is assigned to each medical information record through a short-term expiration timestamp, a medium-term expiration timestamp and a long-term expiration timestamp to obtain an encrypted expiration timestamp of the medical information.

[0037] In an embodiment of the present invention, by classifying medical information records according to their timeliness, it is ensured that each type of data is managed according to different life cycles. Medical information records are divided into the following three types of timeliness data according to their importance and business needs: Short-term medical timeliness data mainly refers to diagnostic data, clinical records and other data with shorter timeliness, which usually have higher validity within 1 year. Medium-term medical timeliness data includes treatment plans, medication records, etc., which are applicable to data that need to continue to be used within 3 years. Long-term medical timeliness data mainly includes medical records, imaging data, genetic information, etc., which usually need to be retained for 5 to 10 years to meet the requirements of laws and regulations or medical history archive management. The starting effective time of the data is confirmed by the storage timestamp of each medical information record, which is usually the time when the data is stored in the database. For each record, the system reads the storage timestamp of the record as the starting point of its validity period. If the storage timestamp of a record is January 1, 2023, its starting timestamp is January 1, 2023. This starting timestamp provides a benchmark for subsequent expiration timestamp calculations, ensuring that the expiration times of all records are associated with their actual storage times. For short-term medical time-limited data, set its expiration time interval to 1 year, which means that the data will expire 1 year from the storage timestamp. Add 1 year to the storage timestamp to get the short-term expiration timestamp. For example, if the storage timestamp of a short-term data is January 1, 2023, its short-term expiration timestamp is January 1, 2024. For medium-term medical time-limited data, set its expiration time interval to 3 years, which means that the data will expire 3 years from the storage timestamp. Add 3 years to the storage timestamp to get the medium-term expiration timestamp. For example, if the storage timestamp of a medium-term data is January 1, 2023, its medium-term expiration timestamp is January 1, 2026. For long-term medical time-limited data, set its expiration time interval to 5 to 10 years. The specific years can be adjusted according to business needs. Add 5 to 10 years to the storage timestamp to get the long-term expiration timestamp. Usually, the system provides configuration options that allow administrators to set a specific range of years or to perform differentiated processing based on the importance of the data. For example, if the storage timestamp of a long-term data is January 1, 2023, and the expiration time is set to 10 years, then its long-term expiration timestamp is January 1, 2033. Based on the timeliness type (short-term, medium-term, long-term) and storage timestamp of each medical information record, the system will assign a corresponding expiration timestamp to each record according to the above rules. Each medical information record will have a corresponding expiration timestamp, and different expiration times will be generated according to the timeliness type of the data (short-term, medium-term, long-term). The system stores the expiration timestamp of each record in the database together with other metadata (such as unique ID, storage timestamp, data content, etc.). The system can perform subsequent operations such as data expiration check, deletion or archiving by regularly scanning the expiration timestamp.

[0038] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes: Step S21: calling the access log record of the medical information encryption database to obtain the access status of each medical information record, wherein the access log record includes the access time, access user and access content; Step S22: screening the access records of the access contents in the access log records based on a preset access time period, and obtaining screening results of the accessed medical information records and screening results of the non-accessed medical information records; Step S23: performing data interaction frequency association on the access situation of each medical information record according to the screening result of the accessed medical information records, and generating a data encryption access association result; Step S24: Dynamically refresh the encryption strength of the medical information record according to the data encryption access association result to obtain encryption strength refresh data.

[0039] In an embodiment of the present invention, by connecting to an encrypted medical information database, all access log data stored in the database is extracted. Each access record contains the following information: the date and time of the access log, the identity of the user who accesses the medical information (such as a doctor, administrator, patient, etc.), and the specific medical information or document accessed (such as medical records, test reports, imaging materials, etc.). This step usually extracts data through an API interface or a database query statement to ensure the integrity and real-time nature of the access log data. According to a preset access time period (such as day, week, month, etc.), the access log is time-filtered. The following steps can be followed: The user can set the access period according to actual needs, such as the access records of the past week or the access records of the past month. According to the filtered access period, the system classifies the records in the access log and marks them as "accessed medical information" and "unaccessed medical information". For "unaccessed" records, it means that they have not been accessed or viewed by any user within a predetermined time. This step can use the date filter or time function in the database to accurately filter the access log. For the accessed medical information records, the system counts the frequency of access of each medical information according to the access user and access time. Specific methods include: counting the number of times each user accesses a piece of medical information. Analyzing the time intervals between medical information accesses, such as frequent accesses in a short period of time, or accesses only once in a long period of time, to infer the sensitivity and importance of the information. The above frequency data is associated with the encryption database to generate "data encryption access association results", which will be used to determine which medical information needs to be encrypted. Records with a higher frequency of data interaction require higher encryption strength to ensure information security. According to the data encryption access association results (such as frequently accessed medical information records), the system will automatically adjust the encryption strength of the information. Refresh strategies include: for frequently accessed medical information, a stronger encryption algorithm (such as AES-256) is used, and the encryption key is updated regularly. For medical information with a lower access frequency, the encryption strength can be appropriately reduced, and a standard encryption method (such as AES-128) can be used to reduce system resource consumption. Dynamic adjustment of encryption strength can be completed through automatic configuration of the encryption module. This process involves the key management system (KMS) to ensure that new encryption keys can be securely generated and applied each time the encryption is refreshed. Through the encryption strength monitoring function of the encryption database, data access is continuously tracked and encryption strategies are automatically adjusted. It is necessary to ensure that updates to data access logs and encryption strength are reflected in the database in real time.

[0040] Preferably, step S23 includes the following steps: Step S231: Calculate the number of accesses to each medical information record according to the screening result of the accessed medical information records to obtain the number of accesses to the medical information record; Step S232: setting the accessed medical information records screening results that are accessed more than 5 times per month as high-frequency access; setting the accessed medical information records screening results that are accessed 2 to 5 times per month as medium-frequency access; setting the accessed medical information records screening results that are accessed less than 2 times per month and the non-accessed medical information records screening results as low-frequency access; Step S233: Integrate high-frequency access, medium-frequency access and low-frequency access into classified access intensity data, and calculate the access mode of each medical information record through the classified access intensity data to obtain the number of accesses of each mode, wherein the access mode includes viewing, modifying and deleting; Step S234: construct an access strength and encryption strategy mapping table for the medical information encryption database based on the number of accesses in each mode, and obtain a data encryption access association result.

[0041] In an embodiment of the present invention, for each accessed medical information record, the system calculates the number of accesses according to the user's access record in the access log. The specific steps are as follows: traverse the accessed medical information records, and count the number of accesses of each record according to the access timestamp, user ID and other information in the log. According to the access log of each medical information record, calculate the number of accesses to the record in each month (or set time period). This step is usually implemented by SQL query statements or batch processing of data using a big data processing framework (such as Apache Spark, Hadoop, etc.). According to the number of accesses obtained by statistics, the accessed medical information records are classified: records accessed more than 5 times a month indicate that the medical information is frequently accessed, usually important or urgent medical information, and should be set as high-frequency access. Records accessed 2 to 5 times a month indicate that the medical information is regularly viewed or updated, which belongs to medium-frequency access. Records accessed less than 2 times a month or unaccessed records are rarely or not accessed, and belong to low-frequency access. This step can be completed by SQL CASE statements or conditional judgment statements, directly classifying in the database, and marking the classification results to each medical information record. Records with high-frequency access, medium-frequency access, and low-frequency access are classified as different access intensities, and new "classified access intensity data" are generated based on these classifications. For each medical information record, its access mode is analyzed, including: medical information viewing operations, medical information editing or updating operations, and medical information deletion operations. The number of accesses for each mode is calculated. That is, the number of times each record is "viewed", "modified", or "deleted" in a certain period of time (such as one month). This step can be performed through pattern recognition and statistics through the action type identifiers (such as viewing, editing, deleting, etc.) in the access log, usually with the help of log analysis tools (such as Elasticsearch, Logstash, etc.) to extract and summarize data. According to the number of accesses in different access modes, a mapping relationship between access intensity and encryption strategy is constructed. The specific mapping rules can be customized based on the priority of the access mode: if a piece of medical information is frequently accessed and frequently modified, a stronger encryption strategy (such as AES-256) can be used to ensure data security. For medical information with medium frequency access, a medium-strength encryption strategy (such as AES-192) can be used. For medical information that is infrequently accessed or not accessed, standard encryption strategies (such as AES-128) are used to optimize system performance. Dynamic mapping of encryption strategies is performed based on the frequency data of access patterns. The mapping table should contain encryption strategies for different access strength categories under each access mode.This step can use an encryption policy database table to store the mapping relationship between access strength and encryption policy. The mapping table should contain the following fields: Access strength category (such as high-frequency access, medium-frequency access, low-frequency access) Access mode (view, modify, delete) Encryption algorithm (such as AES-256, AES-192, AES-128) Finally, based on the access status of each medical information record, generate data encryption access association results, and dynamically adjust the encryption policy based on these results.

[0042] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes: Step S31: Perform an expired data check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generate an expired check result, wherein the following conditions are determined to be expired storage records: The data type of medical information records is short-term medical time-limited data, and the storage time exceeds 1 year and there is no access log record in the past 6 months; The data type of medical information records is mid-term medical time-limited data, and the storage time is more than 3 years and there is no access log record in the past 6 months; The data type of medical information records is long-term medical time-limited data, and the storage time exceeds 5 years and there is no access log record in the past 6 months; Step S32: calculating the expiration time sequence of the expired storage record, and setting the encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain the encryption strength reduction rule; Step S33: Use the encryption strength reduction rule to perform encryption strength adjustment marking on the encryption strength refresh data of the medical information record to obtain encryption strength adjustment marking data, wherein the encryption strength adjustment data includes encryption strength reduction marking data and decrypted storage marking data.

[0043] In an embodiment of the present invention, by setting a predetermined scanning time interval (for example, daily, weekly or monthly), each record in the medical information encryption database is regularly checked, and this operation is implemented by a scheduled task or a regular trigger. An expiration check is performed according to the storage time of the medical information record and the access log record. For each medical information record, the system determines whether it meets the expiration condition based on its data type and access log. If the data type of the record is short-term medical time-limited data, and the storage time exceeds 1 year and there is no access log record in the past 6 months, it is determined to be an expired storage record. If the data type of the record is medium-term medical time-limited data, and the storage time exceeds 3 years and there is no access log record in the past 6 months, it is determined to be an expired storage record. If the data type of the record is long-term medical time-limited data, and the storage time exceeds 5 years and there is no access log record in the past 6 months, it is determined to be an expired storage record. The medical information record that meets any of the above conditions is marked as an expired storage record, and an expiration check result is generated. The expiration check result will include the expiration status of each medical information record and be associated with the record. For each piece of medical information that is determined to be an expired storage record, the system needs to calculate the expiration time series of the record. The expiration time series can be calculated based on the following factors: Calculate the difference between the actual storage time of the record and the current time. According to the data type (short-term, medium-term, long-term), the system determines whether it is expired according to different expiration time intervals (1 year, 3 years, 5-10 years). The system calculates the expiration time point of each record based on the expiration check results. For example, if a medium-term medical data is stored for more than 3 years and has not been accessed for 6 months, the system sets the expiration time point of the record to the current time minus the expiration condition corresponding to its storage time and access situation. Based on the above calculations, the expiration time series of each expired record is generated, which includes the expiration status and actual expiration time of the record. The expiration time series data will be stored in the database for subsequent calculation and adjustment of encryption strength reduction rules. The system needs to formulate encryption strength reduction rules based on the expiration time series. The specific rules can be as follows: For short-term data, once expired, the system can gradually reduce the encryption strength according to the length of the expiration time. For example, records that have been stored for more than 1 year and have not been accessed can be reduced from AES-256 to AES-128, or even to a lower encryption level. For medium-term data, records that have expired for more than 3 years and have not been accessed can be reduced to AES-128 or lower, or enter a simpler encryption method. For long-term data, records that have been stored for more than 5 years and have not been accessed can be considered to be reduced to a lower encryption level, or not encrypted at all, but only accessible to users with specific permissions. Based on the expiration time series, the system generates encryption strength reduction rules according to the timeliness type and expiration status of the record. This rule is a dynamic rule that continuously adjusts the encryption strength over time.The system automatically adds a corresponding encryption strength adjustment mark to each record based on the generated encryption strength reduction rules. The mark includes: Encryption strength reduction mark: Indicates that the encryption strength of the record has been reduced. For example, AES-256 is reduced to AES-128. Decrypted storage mark: For some long-term expired records, the system will mark them as "decrypted storage", indicating that these records no longer need to remain encrypted after expiration, or require special access to specific users. The encryption strength adjustment mark data is stored in the medical information encryption database. Each medical information record will carry the corresponding encryption strength adjustment mark data to ensure that subsequent encryption processing complies with the latest encryption policy.

[0044] Preferably, step S32 includes the following steps: Step S321: Calculate the expiration time sequence of the expired storage record, and compare the expiration time sequence of the expired storage record with its own medical information encryption expiration timestamp. When the expiration time sequence of the expired storage record is less than the medical information encryption expiration timestamp, adjust the AES-128 encryption rule for the expired storage record with a total number of historical access times greater than 30 times, and obtain a high-frequency expired data adjustment rule; Step S322: adjusting the AES-64 encryption rule for the expired storage records whose total number of historical access times is greater than 6 times and less than 30 times, to obtain the medium frequency expired data adjustment rule; Step S323: decrypt and store the expired storage records whose total number of historical access times is less than 6 times, and obtain the low-frequency expired data adjustment rules; Step S324: Integrate the high-frequency expired data adjustment rule, the medium-frequency expired data adjustment rule, and the low-frequency expired data adjustment rule to obtain the encryption strength reduction rule.

[0045] In an embodiment of the present invention, for each medical information record, the system needs to calculate the expiration time series based on its storage time, access log and time type (short-term, medium-term, long-term). The time series reflects whether the record has reached the preset expiration time point (for example, 1 year, 3 years, 5-10 years). The expiration timestamp (such as short-term, medium-term, long-term) of each record has been assigned when the record is stored, and this timestamp indicates when the encrypted data of the record should reach the expiration state. The expiration time series of the expired storage record is compared with its own medical information encryption expiration timestamp. If the expiration time series (i.e., the calculated actual expiration time) is less than the encryption expiration timestamp (i.e., the expiration time set when stored), it means that the record has actually expired, and further reduction of the encryption strength should be considered. For those expired storage records whose total number of historical access times is greater than 30 times, the system will implement a more relaxed encryption strategy based on the high-frequency access situation, that is, the encryption strength is adjusted to AES-128, so that the storage and calculation burden can be reduced while maintaining appropriate encryption. The system selects expired storage records with a total of more than 6 historical access times and less than 30 times. These records are records with low access frequency but still have a certain frequency. For these expired records with medium-frequency access, the system adjusts the encryption strength to AES-64, which provides a certain degree of security, but consumes less computing power than AES-128 and is suitable for data with low frequency. These expired records with medium-frequency access are marked as data adjusted by the AES-64 encryption rule. This adjustment rule ensures that the data maintains high storage efficiency without requiring the highest level of encryption. The system selects expired storage records with a total of less than 6 historical access times. For these records, the system determines that their access requirements are extremely low and no longer require strict encryption protection. For these low-frequency expired records, the system can mark them as decrypted storage status, or reduce their encryption strength to no longer use complex encryption mechanisms, and only retain basic protection measures (for example, only based on access permission control). According to this adjustment, low-frequency access records will be marked as not requiring further encryption protection, or set to decrypted storage status, thereby reducing storage and computing pressure. The system integrates the high-frequency expired data adjustment rules (AES-128), medium-frequency expired data adjustment rules (AES-64), and low-frequency expired data adjustment rules (decrypted storage) into a complete encryption strength reduction rule. The final encryption strength reduction rule will be specifically adjusted according to the access frequency and expiration status of the medical information record. Each record will apply the corresponding encryption strategy based on its access times and expiration status to ensure that the data saves as much resources as possible in long-term storage while ensuring reasonable security. The integrated encryption strength reduction rules are stored in the system for subsequent encryption strength adjustment applications. The encryption strength of each medical information record will be dynamically adjusted when access and timeliness change to ensure continuous optimization of the system's storage and encryption mechanisms.

[0046] Preferably, step S4 comprises the following steps: Step S41: Setting and deploying smart contracts using blockchain technology; Step S42: Based on the deployed smart contract, the encryption level of expired storage records is intelligently adjusted according to the encryption strength reduction mark data in the encryption strength adjustment mark data, and the expired storage records are softly deleted according to the decrypted storage mark data in the encryption strength adjustment mark data to perform data encryption optimization operations.

[0047] In an embodiment of the present invention, step S42 further includes the following steps: step S421: based on the deployed smart contract, the encryption strength reduction mark data in the encryption strength adjustment mark data is used to reduce the encryption strength of the expired storage record; step S422: the expired storage record is soft-deleted according to the decrypted storage mark data in the strength adjustment mark data, and soft deletion control data is obtained; step S423: based on the soft deletion control data, the expired storage record is audited for access control, and soft deletion access control audit data is generated; step S424: the soft deletion access control audit data is judged for the state to be eliminated, when the soft deletion exceeds 24 months and is not accessed during this period, it is regarded as obsolete data, and multiple elimination operation verifications are performed on the obsolete data, and the obsolete data is pre-verified by the smart contract, and the access record is checked for the last time before cleaning, and multiple elimination operation verification data is obtained to perform data encryption optimization operations. Specifically, blockchain technology is used to create a smart contract and define the soft deletion and elimination rules of data. In the smart contract, the following conditions are set to trigger: storage time, access record and encryption status of the data. When the data meets the soft deletion conditions, the smart contract will perform decryption, remove the encryption mark and mark it as "to be eliminated". Use blockchain platforms such as Ethereum or Hyperledger to deploy smart contracts to ensure transparency and immutability of data access and operations. Generate a unique identifier for each data record and store it on the blockchain to ensure that the processing of data at each stage can be traced. Mark the data record with the corresponding "reduced encryption strength" mark according to the encryption strength and storage time. Smart contracts automatically perform operations such as data decryption, soft deletion, access audit, and elimination verification according to the set conditions. Based on the conditions set in the smart contract, the encryption strength of the stored records is gradually reduced. The specific rules are as follows: AES-256 is downgraded to AES-128 when the data is stored for more than 12 months and has not been accessed. AES-128 is downgraded to AES-64 when the data is stored for more than 18 months and is still not accessed. When the data is stored for more than 24 months and the access frequency is less than 5 times, you can consider converting the data to plaintext storage. Use smart contracts to automatically trigger the conversion of data encryption algorithms. For example, from AES-256 to AES-128, and from AES-128 to AES-64, ensure that the encryption strength of the data decreases over time. Specific encryption strength adjustment rules are configured through smart contracts on the blockchain. When the data meets the soft deletion conditions (for example, the storage time threshold has been exceeded and it has not been accessed), the smart contract will perform the following operations: decrypt the data and remove the encryption mark. Mark the data as "soft deleted" and add a "to be eliminated" mark. All soft deletion operations are recorded in the audit log, and the smart contract will generate soft deletion control data to ensure that each soft deletion record is traceable.For example, if data is stored for more than 24 months and has not been accessed during this period, the smart contract automatically performs a soft deletion operation on the data. After the data is soft deleted, the access control mechanism is still retained. The smart contract will record who has the right to access the decrypted data and monitor the access frequency. The access audit log is recorded for each soft deleted data, which records the visitor, access time, access content and operation type (view, modify, etc.) in detail. The audit log includes: data ID, visitor information, access time, access type, and whether it is in decrypted state. The system automatically checks the access control log of soft deleted data every 30 days to ensure that there is no unauthorized access. All soft deleted data is checked. If it has been stored for more than 24 months and has not been accessed, the system automatically marks it as "eliminable" data. Multiple elimination verifications are performed on "eliminable" data. Specifically, the smart contract will verify all data marked as eliminable to ensure that the data has met all elimination conditions. The system will check the access records of the data for the last time before cleaning to ensure that valid data is not deleted by mistake. The verified "eliminable" data will be physically deleted and a deletion log will be generated. After each elimination operation, the smart contract will generate a detailed operation log to record the entire process of data deletion. The system will perform a data elimination operation every 6 months to ensure timely removal of useless data. Each data elimination operation will record the operation data, verification status, operator and cleaning time to ensure that the data elimination process is correct.

[0048] In this specification, a smart medical information data encryption system is provided, which is used to execute the above-mentioned smart medical information data encryption method. The smart medical information data encryption system includes: A data encryption module is used to collect medical information data using an electronic health record system; perform initial AES-256 encryption on the collected medical information data, and store the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assign an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; The encryption association module is used to confirm the access status of each medical information record through access log records; associate the access record with the encryption status of the medical information record based on the access status, and dynamically refresh the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; An expiration check module is used to perform an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage record to obtain encryption strength adjustment mark data; The encryption adjustment module is used to deploy smart contracts; based on the deployed smart contracts, the encryption strength of expired storage records is adjusted according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

[0049] The present invention also provides a storage medium storing a computer program, which implements the above-mentioned smart medical information data encryption method when executed.

[0050] The beneficial effect of the present invention is that the data encryption module ensures that all medical information data are strongly encrypted and protected during the storage process by adopting the AES-256 encryption algorithm, effectively preventing data leakage and unauthorized access. A unified encryption standard provides consistent encryption measures for all medical information records, ensuring the integrity and consistency of medical information. The encrypted data is stored in the database and assigned an expiration timestamp to ensure that the data is effectively managed during its life cycle. By assigning an expiration timestamp to each medical information record, data life cycle management can be effectively performed to ensure that expired data no longer occupies storage space and avoid storage waste. The encryption association module analyzes the access situation of each medical information record based on the access log record, and dynamically adjusts the encryption strength according to the access frequency and mode. This dynamic refresh encryption strength method ensures that the data with high frequency access has stronger encryption protection, while the encryption strength of the data with low frequency access can be appropriately reduced, thereby protecting data security while reducing the consumption of computing resources. By associating the access record with the encryption status, the access mode of each medical information record can be more accurately understood, so that different encryption strategies are applied to data of different levels to achieve fine-grained security management. The expiration check module can identify and process expired medical information records in a timely manner by performing regular expiration checks, avoiding the storage of expired data that is no longer needed. According to the preset scanning time interval, the expiration check module can run automatically to ensure timely data updates and storage optimization. The encryption strength of expired storage records is adjusted to reduce resource usage and avoid security risks caused by storing a large amount of expired and invalid data. The system can automatically handle data expiration and encryption adjustments to improve the utilization efficiency of storage and computing resources. The encryption adjustment module ensures that the adjustment of data encryption strength can be automatically executed by deploying smart contracts, reducing manual intervention and reducing management complexity. Smart contracts process expired data according to preset rules to ensure the compliance and rationality of encryption strength, and soft delete or adjust the encryption level of expired data that is no longer needed. Through the role of smart contracts, this module can automatically optimize encryption strength and data storage strategies, which not only ensures data encryption protection, but also optimizes storage and access efficiency. Therefore, the present invention realizes efficient and secure management of medical information data by dynamically managing encryption strength, expiration time checking and smart contract optimization, which not only improves data security, but also reduces the burden on the system, enhances the compliance and flexibility of medical data storage and access, and improves the overall performance of users and systems.

[0051] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0052] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A smart medical information data encryption method, characterized in that: The following steps are involved: Step S1: using an electronic health record system to collect medical information data; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; Step S2: confirming the access status of each medical information record through access log records; associating the access record with the encryption status information of the medical information record based on the access status, and dynamically refreshing the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; Step S3: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; comparing the expiration time of the expired storage record according to the medical information encryption expiration timestamp, and adjusting the encryption strength refresh data based on the comparison result to obtain encryption strength adjustment mark data; Step S4: deploy smart contracts; based on the deployed smart contracts, adjust the encryption strength of expired storage records according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

2. The method for encrypting smart medical information data according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: using the electronic health record system to collect medical information data, wherein the collection frequency is set to once per minute, to obtain medical information data; Step S12: Fully encrypting the standard medical information data based on the AES-256 encryption algorithm to obtain the encrypted medical information data and the corresponding data encryption key, and storing the corresponding data encryption key in a preset key management system; Step S13: extracting the character string capacity of the encrypted medical information data to set the database capacity, and constructing the database according to the database capacity to obtain a storage database; Step S14: storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database contains at least one medical information record, and each medical information record includes at least a data storage timestamp and a unique data ID; Step S15: Assign an expiration timestamp to each medical information record to obtain an encrypted expiration timestamp for the medical information.

3. The method for encrypting smart medical information data according to claim 2, characterized in that: Step S15 includes the following steps: Classify each medical information record into medical data timeliness type, and obtain short-term medical timeliness data, medium-term medical timeliness data and long-term medical timeliness data; Confirm the start timestamp of each medical information record based on the data storage timestamp to obtain the expiration start timestamp; According to the expiration start timestamp, the expiration time interval of the short-term medical validity data is set to 1 year to obtain the short-term expiration timestamp; According to the expiration start timestamp, the expiration time interval of the mid-term medical validity data is set to 3 years, and the mid-term expiration timestamp is obtained; According to the expiration start timestamp, the expiration time interval of the long-term medical validity data is set to 5-10 years to obtain a long-term expiration timestamp; An expiration timestamp is assigned to each medical information record through a short-term expiration timestamp, a medium-term expiration timestamp, and a long-term expiration timestamp to obtain an encrypted expiration timestamp of the medical information.

4. The method for encrypting smart medical information data according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: calling the access log record of the medical information encryption database to obtain the access status of each medical information record, wherein the access log record includes the access time, access user and access content; Step S22: screening the access records of the access contents in the access log records based on a preset access time period, and obtaining screening results of the accessed medical information records and screening results of the non-accessed medical information records; Step S23: performing data interaction frequency association on the access situation of each medical information record according to the screening result of the accessed medical information records, and generating a data encryption access association result; Step S24: Dynamically refresh the encryption strength of the medical information record according to the data encryption access association result to obtain encryption strength refresh data.

5. The method for encrypting smart medical information data according to claim 4, characterized in that: Step S23 includes the following steps: Step S231: Calculate the number of accesses to each medical information record according to the screening result of the accessed medical information records to obtain the number of accesses to the medical information record; Step S232: setting the accessed medical information records screening results that are accessed more than 5 times per month as high-frequency access; setting the accessed medical information records screening results that are accessed 2 to 5 times per month as medium-frequency access; setting the accessed medical information records screening results that are accessed less than 2 times per month and the non-accessed medical information records screening results as low-frequency access; Step S233: Integrate high-frequency access, medium-frequency access and low-frequency access into classified access intensity data, and calculate the access mode of each medical information record through the classified access intensity data to obtain the number of accesses of each mode, wherein the access mode includes viewing, modifying and deleting; Step S234: construct an access strength and encryption strategy mapping table for the medical information encryption database based on the number of accesses in each mode, and obtain a data encryption access association result.

6. The method for encrypting smart medical information data according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: Perform an expired data check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generate an expired check result, wherein the following conditions are determined to be expired storage records: The data type of medical information records is short-term medical time-limited data, and the storage time exceeds 1 year and there is no access log record in the past 6 months; The data type of medical information records is mid-term medical time-limited data, and the storage time is more than 3 years and there is no access log record in the past 6 months; The data type of medical information records is long-term medical time-limited data, and the storage time exceeds 5 years and there is no access log record in the past 6 months; Step S32: calculating the expiration time sequence of the expired storage record, and setting the encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain the encryption strength reduction rule; Step S33: Use the encryption strength reduction rule to perform encryption strength adjustment marking on the encryption strength refresh data of the medical information record to obtain encryption strength adjustment marking data, wherein the encryption strength adjustment data includes encryption strength reduction marking data and decrypted storage marking data.

7. The method for encrypting smart medical information data according to claim 6, characterized in that: Step S32 includes the following steps: Step S321: Calculate the expiration time sequence of the expired storage record, and compare the expiration time sequence of the expired storage record with its own medical information encryption expiration timestamp. When the expiration time sequence of the expired storage record is less than the medical information encryption expiration timestamp, adjust the AES-128 encryption rule for the expired storage record with a total number of historical access times greater than 30 times, and obtain a high-frequency expired data adjustment rule; Step S322: adjusting the AES-64 encryption rule for the expired storage records whose total number of historical access times is greater than 6 times and less than 30 times, to obtain the medium frequency expired data adjustment rule; Step S323: decrypt and store the expired storage records whose total number of historical access times is less than 6 times, and obtain the low-frequency expired data adjustment rules; Step S324: Integrate the high-frequency expired data adjustment rule, the medium-frequency expired data adjustment rule, and the low-frequency expired data adjustment rule to obtain the encryption strength reduction rule.

8. The method for encrypting smart medical information data according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: Setting and deploying smart contracts using blockchain technology; Step S42: Based on the deployed smart contract, the encryption level of expired storage records is intelligently adjusted according to the encryption strength reduction mark data in the encryption strength adjustment mark data, and the expired storage records are softly deleted according to the decrypted storage mark data in the encryption strength adjustment mark data to perform data encryption optimization operations.

9. A smart medical information data encryption system, characterized in that: For executing the smart medical information data encryption method as claimed in claim 1, the smart medical information data encryption system comprises: A data encryption module is used to collect medical information data using an electronic health record system; perform initial AES-256 encryption on the collected medical information data, and store the encrypted medical information data in a database to obtain a medical information encryption database, wherein the medical information encryption database includes at least one medical information record; assign an expiration timestamp to each medical information record to obtain a medical information encryption expiration timestamp; The encryption association module is used to confirm the access status of each medical information record through access log records; associate the access record with the encryption status of the medical information record based on the access status, and dynamically refresh the encryption strength of the medical information record according to the association result to obtain encryption strength refresh data; An expiration check module is used to perform an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval to obtain an expired storage record; perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage record to obtain encryption strength adjustment mark data; The encryption adjustment module is used to deploy smart contracts; based on the deployed smart contracts, the encryption strength of expired storage records is adjusted according to the encryption strength adjustment mark data to perform medical information encryption storage optimization operations.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed, the intelligent medical information data encryption method as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Medical electronic medical record distributed management system based on blockchain and preparation method thereof

    CN112863629A

  • Intelligent medical service management system based on big data

    CN117936011A

  • General surgery department medical information sharing method and system based on medical big data

    CN119380917A

Cited By

  • Hospital information integration platform management method and system based on big data

    CN121144325A

  • A hospital information integration platform management method and system based on big data

    CN121144325B