A smart medical information data encryption method, system and medium
By using the AES-256 encryption algorithm in medical information data, assigning expiration timestamps, and dynamically adjusting the encryption strength with access logs and smart contracts, the problem that traditional encryption methods cannot cope with different security needs is solved, and efficient and secure medical data management is achieved.
Patent Information
- Application Number
- CN202510161753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-02-14
AI Technical Summary
Traditional encryption methods are difficult to cope with different levels of security needs, and lack effective ways to process expired data, resulting in an increase in the risk of medical data breaches.
The AES-256 encryption algorithm is used to initially encrypt medical information, and each record is assigned an expiration time stamp. The encryption strength is dynamically adjusted by accessing the log record, and combined with the smart contract to automatically perform encryption strength adjustment and expiration checks to optimize data storage.
It realizes efficient and secure management of medical information data, reduces the risk of data leakage, improves system performance and compliance, and enhances the flexibility of data storage and access.
Smart Images

Figure CN119626431B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data encryption technology, and in particular to a method, system and medium for encrypting smart medical information data. Background Art
[0002] The development of encryption methods for smart medical information data began with the growing demand for medical data security. With the widespread adoption of technologies such as electronic medical records, telemedicine, and intelligent diagnosis, the digitization and internet-based nature of medical information has made patients' private information and medical data vulnerable to leakage and tampering. To protect this sensitive data, traditional encryption technologies such as symmetric and asymmetric encryption have been gradually applied to medical data protection. However, with the continuous advancement of attack techniques, the limitations of traditional encryption methods have become increasingly apparent. In this context, encryption technologies with higher security requirements have been developed. Advances in cutting-edge technologies such as quantum computing and homomorphic encryption have led to the emergence of new encryption methods. Quantum encryption provides extremely high security through the irreproducibility of quantum states, while homomorphic encryption allows computations to be performed directly on encrypted data, eliminating the risk of data leakage. These technologies are gradually being applied to the protection of smart medical information. However, traditional encryption methods often use fixed encryption strengths, making them difficult to meet varying security requirements. Furthermore, existing technologies often lack effective methods for handling data expiration, which can easily result in expired information remaining in encrypted storage, 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-mentioned purpose, a method for encrypting smart medical information data is provided, the method comprising the following steps:
[0005] 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;
[0006] Step S2: confirming the access status of each medical information record through access log records; correlating the access records 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 correlation result to obtain encryption strength refresh data;
[0007] 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 with 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;
[0008] Step S4: deploy the smart contract; based on the deployed smart contract, adjust the encryption strength of the expired storage records according to the encryption strength adjustment mark data to perform the medical information encryption storage optimization operation.
[0009] This invention uses the AES-256 encryption algorithm to initially encrypt medical information, ensuring the secure storage of sensitive data in the database and reducing the risk of data leakage. Each record is assigned an expiration timestamp, making the validity period of each data item more clear and facilitating subsequent expiration checks and management. Information management using expiration timestamps ensures compliance with laws and regulations related to medical data storage. Dynamic adjustment of encryption strength based on access conditions helps address varying access requirements or attack risks. For example, encryption strength can be increased for frequently accessed medical information based on risk assessments, enhancing security. By recording access data and correlating it with encryption status information, encryption operations can be optimized, avoiding over-encryption or inefficient encryption, and improving system performance. Regularly checking data expiration status ensures that expired data is promptly cleared or processed, avoiding wasted storage space. Adjusting the encryption strength flag based on the expiration timestamp ensures that stored data always maintains adequate encryption protection, reducing the possibility of data leakage. Smart contracts automatically adjust encryption strength, reducing manual intervention and improving processing speed and efficiency. Smart contracts dynamically protect data by adjusting the encryption strength flag based on the data access and storage requirements, more accurately and efficiently addressing varying data access and storage requirements. Therefore, the present invention achieves efficient and secure management of medical information data through dynamic management of 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 the system.
[0010] Preferably, step S1 includes the following steps:
[0011] 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;
[0012] 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;
[0013] 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;
[0014] 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;
[0015] Step S15: Assign an expiration timestamp to each medical information record to obtain an encrypted expiration timestamp for the medical information.
[0016] By setting a collection rate of once every minute, this system ensures a high frequency of medical information updates, providing timely insights into the patient's health status and real-time support for subsequent analysis and decision-making. Regular collection reduces data lag and ensures the most accurate and up-to-date medical information is stored in the system. The AES-256 encryption algorithm provides strong encryption protection, preventing medical information from being leaked or tampered with during storage and transmission, effectively safeguarding patient privacy. Storing encryption keys in a pre-set key management system enables centralized key management, improving the security and controllability of key usage. Separate key storage reduces the risk of key leakage. Database capacity is set based on the string capacity of the encrypted data, ensuring that database construction meets storage requirements, avoiding excessive or insufficient storage, and improving storage efficiency. Rational database configuration based on actual medical data capacity allows for flexible database expansion to accommodate future increases in medical data volumes. Encrypted medical information data is stored in a dedicated database, ensuring data security and optimizing the storage structure. Record management with timestamps and unique IDs enhances data traceability. Indexing each record using timestamps and unique IDs enables rapid data query, access, and management. Assigning an expiration timestamp to each medical information record makes data lifecycle management more systematic. This expiration timestamp provides an important basis for subsequent review, cleanup, or processing of expired data. This ensures that data is promptly processed after its lifecycle ends, meeting relevant data protection and compliance requirements and preventing redundant storage or illegal use.
[0017] Preferably, step S15 includes the following steps:
[0018] 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;
[0019] Confirm the start timestamp of each medical information record based on the data storage timestamp to obtain the expiration start timestamp;
[0020] According to the expiration start timestamp, the expiration time interval of the short-term medical aging data is set to 1 year to obtain the short-term expiration timestamp;
[0021] According to the expiration start timestamp, the expiration time interval of the mid-term medical aging data is set to 3 years, and the mid-term expiration timestamp is obtained;
[0022] According to the expiration start timestamp, the expiration time interval of the long-term medical aging data is set to 5-10 years to obtain the long-term expiration timestamp;
[0023] 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.
[0024] This invention categorizes medical data into short-term, medium-term, and long-term time-sensitive data, and formulates appropriate time-sensitive policies based on the frequency and importance of data usage, effectively improving the flexibility and accuracy of data management. This categorization ensures that each data type is processed according to its actual needs, avoids excessive storage of short-term data that does not require long-term storage, and improves resource utilization. By confirming the starting timestamp of each record, each piece of medical information can be accurately traced, further enhancing data traceability and auditability. The starting timestamp provides an accurate basis for calculating subsequent expiration timestamps, ensuring standardized and accurate management of expired data. Setting a one-year expiration time for short-term medical time-sensitive data ensures that this data is promptly deleted or processed upon expiration, reducing storage pressure and management complexity. Regularly clearing short-term data not only reduces storage burden but also maintains efficient system operation, ensuring that resources are used for more valuable long-term data. Setting a three-year expiration time for medium-term data ensures appropriate data storage time while preventing the accumulation of long-term, unused data, providing more time for management personnel to optimize. The 3-year time setting is usually in line with the regular use cycle of medical data, which can not only meet clinical management needs, but also ensure that the data is checked and updated on time. Long-term medical time-sensitive data (5-10 years) is the maximum storage period, ensuring that important historical medical data can be preserved for a long time within a reasonable range for subsequent diagnosis and treatment, disease research, and other purposes. The reasonable storage period of long-term data will not lead to unnecessary deletion or leakage due to excessive storage, thus ensuring the integrity of medical records and the traceability of historical data. By comprehensively considering short-term, medium-term and long-term expiration timestamps, each medical record can be accurately assigned an expiration timestamp based on 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 clearance, is reasonably managed, in compliance with relevant regulations and the requirements of the medical industry.
[0025] Preferably, step S2 includes the following steps:
[0026] 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;
[0027] Step S22: screening the access content in the access log record based on a preset access time period, and obtaining screening results of accessed medical information records and screening results of unaccessed medical information records;
[0028] Step S23: performing data interaction frequency correlation on the access situation of each medical information record based on the accessed medical information record screening result, and generating a data encryption access correlation result;
[0029] 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.
[0030] By accessing access log records from an encrypted medical information database, the present invention can obtain detailed access information, including access time, user, and access content, thereby comprehensively understanding the usage of each medical record. Access log records can accurately trace each access to medical information, facilitating subsequent management and security audits. Filtering access log records based on preset access time periods helps the system identify which medical information records have been accessed and which have not, optimizing data processing. The accessed and unaccessed records obtained by filtering facilitate resource allocation, prioritizing or protecting frequently accessed data and reducing the management burden of infrequently accessed data. Correlating the accessed records with data interaction frequency based on the filtered results allows for more accurate determination of the frequency of use of each medical information record. Frequently accessed records can be protected with higher encryption strength, while infrequently accessed records can be protected with lower encryption strength. By analyzing access frequency and correlating it with data interaction, encryption strength can be dynamically adjusted based on actual needs, avoiding the performance impact of over-encryption while ensuring data security. The encryption strength of medical information records is dynamically adjusted based on access behavior and data interaction frequency. Increasing encryption strength increases the protection of sensitive information, while reducing it improves performance and storage efficiency, avoiding unnecessary resource waste. Dynamically refreshing encryption strength ensures improved system efficiency and responsiveness without sacrificing data security. The ability to adjust data encryption levels based on actual needs allows the system to flexibly adapt to varying usage requirements.
[0031] Preferably, step S23 includes the following steps:
[0032] Step S231: Calculating the number of accesses to each medical information record based on the accessed medical information record screening result to obtain the number of medical information record accesses;
[0033] 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;
[0034] 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 based on the classified access intensity data to obtain the number of accesses for each mode, where the access mode includes viewing, modifying, and deleting;
[0035] 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.
[0036] By calculating the number of accesses for each accessed medical information record, this invention accurately understands the access frequency of each record, helping to identify data with the highest access demand. This access count provides a foundation for subsequent analysis of access patterns, clarifying which records are frequently used and which are less frequently accessed, thereby providing a basis for dynamic adjustment of encryption strength. Each record is categorized according to its access count into high-frequency, medium-frequency, and low-frequency access. This classification ensures that records with different access frequencies can adopt different security policies, improving management accuracy. Highly accessed data receives higher encryption protection, ensuring that sensitive data remains highly secure despite frequent access; while low-frequency data can have its encryption strength appropriately reduced to optimize storage and performance. By categorizing access strength data and further calculating the number of accesses by access mode (view, modify, delete), the system can accurately understand the operation status of each medical record. This granular access pattern allows the system to identify which records are viewed, modified, or deleted most frequently, helping to assess their sensitivity and security requirements. This allows encryption policies to be adjusted accordingly based on the risk of specific operations, improving data security. Based on the number of accesses per access pattern, a mapping table is constructed between access strength and encryption policy, enabling precise matching of data access patterns with encryption policies. This mapping table enables dynamic real-time adjustment of encryption policies, ensuring that frequently accessed and frequently modified data receives high-strength encryption protection, while infrequently accessed data receives an appropriate encryption level, balancing data protection with system performance.
[0037] Preferably, step S3 includes the following steps:
[0038] Step S31: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generating an expiration check result. A record is determined to be an expired storage record if any of the following conditions occur:
[0039] The data type of medical information records is short-term medical time-sensitive data, and the storage time exceeds 1 year and there is no access log record in the past 6 months;
[0040] 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;
[0041] The data type of medical information records is long-term medical time-sensitive data, and the storage time exceeds 5 years and there is no access log record in the past 6 months;
[0042] Step S32: calculating the expiration time sequence of the expired storage record, and setting an encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain an encryption strength reduction rule;
[0043] 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.
[0044] The present invention regularly checks the expiration status of each medical information record at preset scanning intervals, effectively identifying data that has not been accessed for a long time and has exceeded its expiration date. This mechanism helps reduce unnecessary storage usage and improve database storage efficiency. Based on the different short-term, medium-term, and long-term medical time-sensitive data types, combined with storage time and access history, expired medical records can be more accurately identified. By determining different time-sensitive data types, different strategies can be adopted for different data categories, further refining data management. By calculating the time series of expired storage records, the expiration status of each data item can be clearly understood, and encryption strength reduction rules can be formulated based on the specific expiration time period. This allows for different protection measures to be taken for different expired data. Encryption strength reduction rules set based on the expiration time series can dynamically reduce encryption strength based on the data's storage duration and access status, thereby optimizing storage space and reducing unnecessary computing overhead. Reducing encryption strength helps improve overall database performance, especially when processing historical data. By adjusting encryption strength refresh data using encryption strength reduction rules, the system can automatically identify and mark data that requires encryption strength reduction. Encryption strength adjustment marks data not only by reducing encryption strength, but also by decrypting stored data. This ensures that data no longer requiring strong encryption can be decrypted, improving storage and access efficiency. Adjusting data based on encryption strength reduces the protection of expired data, thereby optimizing database access performance. This not only reduces the additional burden of encryption but also ensures the optimal use of resources, especially when processing large amounts of historical medical data.
[0045] Preferably, step S32 includes the following steps:
[0046] 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 to obtain a high-frequency expiration data adjustment rule.
[0047] Step S322: Adjust the AES-64 encryption rule for expired storage records with a total number of historical access times greater than 6 and less than 30, to obtain an intermediate frequency expired data adjustment rule;
[0048] Step S323: decrypting and storing expired storage records with a total number of historical access times less than 6 times to obtain low-frequency expired data adjustment rules;
[0049] 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 an encryption strength reduction rule.
[0050] By comparing the expiration time series of expired storage records with the encryption timestamp, the system can determine whether further encryption strength adjustment is necessary. If the expiration time series of an expired storage record is short and the number of historical accesses exceeds 30, a stronger encryption rule (AES-128) is adopted. This strategy, based on access frequency and expiration time, helps protect frequently accessed and sensitive medical data. Adjusting the encryption rules to strong for expired records with more than 30 historical accesses ensures that data remains highly secure even after expiration, thereby reducing the risk of data leakage. This measure helps meet regulatory compliance requirements, particularly in the long-term storage and management of sensitive data. For expired storage records with between 6 and 30 accesses, the AES-64 encryption rule is adopted. This adjustment strategy provides appropriate protection for medical data with moderate access frequency. By flexibly selecting encryption strength, the system can balance security and performance based on the frequency of data access, reducing storage and computing burdens. Using weaker encryption (AES-64) for medium-frequency data mitigates the performance penalty associated with high-strength encryption while still ensuring data security, providing an efficient and scalable solution for the long-term preservation of medical data. Decrypted storage adjustments are implemented for expired records with fewer than six accesses. This means the system decrypts and stores infrequently accessed data, freeing up encryption resources. This not only reduces database storage pressure but also improves access speed for decrypted data. Decrypting data that has not been accessed for a long time reduces the storage and computational burden of over-encryption while improving the processing efficiency of infrequent data. This is particularly important when storing large amounts of historical medical data and can significantly improve database performance. By integrating encryption strength adjustment rules for high-, medium-, 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 every record in the database receives optimal protection based on access frequency and expiration status. This not only reduces storage costs but also improves system security and access performance, effectively enhancing the efficiency of medical information data management.
[0051] Preferably, step S4 includes the following steps:
[0052] Step S41: Setting up and deploying smart contracts using blockchain technology;
[0053] 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 soft-deleted according to the decrypted storage mark data in the encryption strength adjustment mark data to perform data encryption optimization operations.
[0054] This invention leverages the decentralized structure of blockchain technology to ensure data immutability and transparency. The deployment of smart contracts automates encryption strength adjustment and data processing, creating an unalterable audit trail. This provides strong technical support for the encryption management of medical information, ensuring the credibility and compliance of all operations. By deploying smart contracts on a blockchain, all encryption-related operations can be automated, avoiding human intervention and errors. This decentralized management approach reduces the security risks associated with centralized storage and management, enhancing the trustworthiness of data management. Smart contracts can automatically adjust encryption strength and decryption storage tags according to predefined rules, improving operational efficiency and reducing the error rate associated with manual intervention. This is of great significance for processing large amounts of medical data, particularly in data encryption and protection. Based on the tags in the encryption strength adjustment tag data, smart contracts can automatically adjust the encryption level of expired stored records. For example, encryption strength can be adjusted based on historical access frequency to ensure that the access rights of expired stored records match the encryption level. This approach makes medical information storage more flexible and secure, reducing unnecessary computing resource consumption. Through smart contract operations, the system can perform encryption strength adjustment or soft-delete operations on decrypted storage for different types of expired stored records. Encryption strength adjustment ensures the security of high-frequency data, while soft deletion 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 prevents the database from storing excessive amounts of invalid or no longer needed data, improving overall system storage efficiency. By adjusting the encryption level of expired data, the system can also rationally allocate computing resources based on data importance and access frequency, improving data access speed and response efficiency.
[0055] In this specification, a smart medical information data encryption system is provided for executing the above-mentioned smart medical information data encryption method. The smart medical information data encryption system includes:
[0056] a data encryption module for collecting medical information data using an electronic health record system; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain an encrypted medical information expiration timestamp;
[0057] An 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;
[0058] 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 expired storage records; and to perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage records to obtain encryption strength adjustment mark data;
[0059] 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 tag data to perform medical information encryption storage optimization operations.
[0060] 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.
[0061] The present invention provides a beneficial effect in that the data encryption module, by employing the AES-256 encryption algorithm, ensures that all medical information data is strongly encrypted during storage, effectively preventing data leakage and unauthorized access. A unified encryption standard provides consistent encryption for all medical information records, ensuring the integrity and consistency of medical information. Encrypted data is stored in a database and assigned an expiration timestamp, ensuring effective data management throughout its lifecycle. Assigning an expiration timestamp to each medical information record enables effective data lifecycle management, ensuring that expired data no longer takes up storage space and avoiding storage waste. The encryption association module analyzes access to each medical information record based on access log records and dynamically adjusts the encryption strength based on access frequency and access patterns. This dynamic encryption strength refresh ensures that frequently accessed data retains stronger encryption protection, while the encryption strength of less frequently accessed data can be appropriately reduced, thereby protecting data security while reducing computing resource consumption. By associating access records with encryption status, the access patterns of each medical information record can be more accurately understood, allowing for the application of different encryption strategies to different levels of data, achieving fine-grained security management. The expiration check module regularly performs expiration checks, enabling the system to promptly identify and process expired medical records, avoiding the storage of no longer needed data. The expiration check module automatically runs at preset scan intervals to ensure timely data updates and optimized storage. It adjusts the encryption strength of expired stored records, reducing resource usage and avoiding the security risks associated with storing large amounts of expired and invalid data. The system automates data expiration and encryption adjustments, improving the efficiency of storage and computing resources. The encryption adjustment module deploys smart contracts to automatically adjust encryption strength, reducing manual intervention and management complexity. Smart contracts process expired data according to pre-set rules, ensuring compliance and appropriateness of encryption strength. They also soft-delete or adjust the encryption level of no longer needed expired data. Through the power of smart contracts, this module automatically optimizes encryption strength and data storage strategies, ensuring both data encryption protection and optimized storage and access efficiency. Therefore, the present invention achieves efficient and secure management of medical information data through dynamic management of 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 the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A flowchart of a smart medical information data encryption method;
[0063] Figure 2 for Figure 1Detailed implementation steps of step S2 in FIG.
[0064] Figure 3 for Figure 1 Detailed implementation steps of step S3 in FIG.
[0065] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0066] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.
[0067] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.
[0068] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.
[0069] To achieve this, please refer to Figures 1 to 3 , a smart medical information data encryption method, the method comprising the following steps:
[0070] 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;
[0071] Step S2: confirming the access status of each medical information record through access log records; correlating the access records 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 correlation result to obtain encryption strength refresh data;
[0072] 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 with 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;
[0073] Step S4: deploy the smart contract; based on the deployed smart contract, adjust the encryption strength of the expired storage records according to the encryption strength adjustment mark data to perform the medical information encryption storage optimization operation.
[0074] This invention uses the AES-256 encryption algorithm to initially encrypt medical information, ensuring the secure storage of sensitive data in the database and reducing the risk of data leakage. Each record is assigned an expiration timestamp, making the validity period of each data item more clear and facilitating subsequent expiration checks and management. Information management using expiration timestamps ensures compliance with laws and regulations related to medical data storage. Dynamic adjustment of encryption strength based on access conditions helps address varying access requirements or attack risks. For example, encryption strength can be increased for frequently accessed medical information based on risk assessments, enhancing security. By recording access data and correlating it with encryption status information, encryption operations can be optimized, avoiding over-encryption or inefficient encryption, and improving system performance. Regularly checking data expiration status ensures that expired data is promptly cleared or processed, avoiding wasted storage space. Adjusting the encryption strength flag based on the expiration timestamp ensures that stored data always maintains adequate encryption protection, reducing the possibility of data leakage. Smart contracts automatically adjust encryption strength, reducing manual intervention and improving processing speed and efficiency. Smart contracts dynamically protect data by adjusting the encryption strength flag based on the data access and storage requirements, more accurately and efficiently addressing varying data access and storage requirements. Therefore, the present invention achieves efficient and secure management of medical information data through dynamic management of 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 the system.
[0075] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a flow chart of a method for encrypting medical information data according to the present invention. In this example, the method for encrypting medical information data according to the present invention includes the following steps:
[0076] 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;
[0077] In this embodiment of the present invention, patient medical information data is extracted from an electronic health record (EHR). This data includes, but is not limited to, basic patient information (e.g., name, age, gender), diagnosis records, treatment history, medication usage, and allergy history. Data can be obtained through an interface with the EHR system or manually entered. The collected medical information data is encrypted using AES-256 to ensure data security. An encryption key is generated using the AES-256 encryption algorithm. Each collected medical information record is encrypted using this key. AES-256 is the 256-bit version of the Advanced Encryption Standard (AES), a recognized strong encryption algorithm. The generated encrypted data should be irreversible, meaning that the plaintext data cannot be recovered from the encrypted data without the correct key. The encrypted medical information data is stored in a database, forming an "encrypted medical information database." This database should have adequate security measures, such as data access control and encryption key management. Each encrypted record should include a unique patient identifier (e.g., patient ID), the encrypted medical information content, and other necessary metadata. Each medical information record is assigned an expiration timestamp. 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 treatment records 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 with AES-256. Expiration timestamp: used to identify the expiration time of the record, ensuring that the data is automatically eliminated or updated after expiration. Storage timestamp: records the time when the data is encrypted and stored, facilitating 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.
[0078] Step S2: confirming the access status of each medical information record through access log records; correlating the access records 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 correlation result to obtain encryption strength refresh data;
[0079] In an embodiment of the present invention, an access log function is configured for each record in the medical information record storage system. Whenever a medical information record is read, updated, or deleted, the system automatically records the access log. The log content should include the access time, accessor identity, access type (read / modify / delete), and the identifier of the accessed medical information. Using access log data, the system can analyze the access frequency, accessor role, and access time patterns of each record. This access pattern analysis helps determine the importance of a record and its sensitivity to access. For example, records frequently accessed by medical personnel require higher encryption strength. Based on the data in the access log, a rule-based association mechanism is established. For example, records with high access frequency (e.g., multiple accesses per week) can be associated with higher encryption strength. Records containing medical history, diagnosis, and surgical information, even if accessed less frequently, can also be associated with higher encryption strength. For example, if only specific doctors or nursing staff have access to certain records, these records should also be associated with a stronger encryption policy. The system dynamically assigns an encryption strength to each record based on access patterns and defined association rules. For example, if the frequency of record access reaches a certain threshold or the sensitivity of the record's content is high, the system will automatically adjust the record's encryption algorithm and key length. Once it detects that the access pattern of a medical record meets the criteria for high encryption requirements, the system will perform the following actions: Update the record's encryption algorithm to a higher-strength algorithm (for example, from AES-128 to AES-256). Change the key periodically or when necessary (such as when unauthorized access or abnormal logins occur). The system will re-encrypt the record to ensure the new encryption policy is in effect. This process can be completed as a background task without affecting normal access. The encryption status of each record, including the encryption algorithm type and current encryption strength, is displayed in real time in the system management interface or access log. Administrators can use this information to monitor the implementation of encryption policies in real time.
[0080] 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 with 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;
[0081] In an embodiment of the present invention, a system administrator presets a fixed scanning interval, typically based on the medical record lifecycle or compliance requirements, such as monthly, quarterly, or annual scans. This interval determines the frequency of expiration checks. Each medical information record is marked with an encryption expiration timestamp when it is encrypted. This timestamp indicates when the encrypted information in the record expires, and is set based on various factors, such as the patient's treatment completion date and statutory retention periods. Within the preset interval, the system scans all medical information records in the encrypted database and checks the encryption expiration timestamp for each record. If the current time exceeds the timestamp, the system considers the record expired. During the scanning process, the system filters out expired records and generates a list of "expired stored records." These records are marked as requiring processing and enter the subsequent expiration time comparison and encryption strength adjustment process. The system compares the encryption expiration timestamp of each expired record with the current time to calculate the expiration time interval. This is achieved by calculating the expiration time difference for each record (e.g., current time minus expiration timestamp). Based on this time difference, the system can determine whether a record is completely or partially expired. Partial expiration indicates that the record's importance requires further evaluation and whether the encryption strength needs to be adjusted. The expiration time difference can be used to manage records in a hierarchical manner: records whose encryption has completely expired require immediate further processing, such as updating the encryption strength, re-encrypting, or deleting; records whose encryption has not completely expired, but whose encryption strength needs to be re-evaluated within a certain period of time, require adjustment to the encryption policy or strengthening. The larger the expiration time difference, the more the system needs to adjust the encryption strength. Expired records that have exceeded the statutory retention period or have not been accessed for a long time require encryption downgrade or removal of no longer needed encryption protection. Highly sensitive medical information records still require a higher encryption strength even with a long expiration time. Conversely, for less sensitive records, the encryption strength can be appropriately reduced based on the expiration time difference. The system generates an "encryption strength adjustment flag" for each record based on its expiration time difference and sensitivity. This flag indicates 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 in the system's record database. Administrators can review the tag data or directly trigger the automated adjustment process. If the tag indicates 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 indicates that the encryption strength can be reduced, the system can lower the encryption level or delete expired records when they no longer need to be stored. 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 action that the system needs to perform next (such as re-encryption, deletion, reducing encryption strength, etc.).
[0082] Step S4: deploy the smart contract; based on the deployed smart contract, adjust the encryption strength of the expired storage records according to the encryption strength adjustment mark data to perform the medical information encryption storage optimization operation.
[0083] In one embodiment of the present invention, a smart contract is designed whose 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 a record is adjusted based on encryption strength adjustment flags (such as expiration time difference, record sensitivity, etc.); implementing specific operations within the smart contract, such as re-encryption, downgrade, or record deletion. The encryption strength adjustment flag data of expired records triggers different actions, such as re-encryption and record deletion. A suitable blockchain platform (such as Ethereum or Hyperledger) is selected and deployed on the chain or distributed ledger system. Once deployed, the smart contract will automatically execute in a decentralized manner on the chain without human intervention. A permission control mechanism is established within 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 invoke encryption strength adjustment and optimization operations. The system generates encryption strength adjustment flag data for each medical information record based on periodic scans for expired records. During execution, the smart contract reads this flag data from a database or storage system. Tag data contains information such as expiration date, record sensitivity, recommended encryption strength, and whether re-encryption or deletion is required. Based on this tag data, the smart contract triggers re-encryption of expired records. At this point, the smart contract can invoke the appropriate encryption algorithm (such as AES-256) and update the encryption key to ensure data security. If the record's expiration date is long and the rules allow for a moderate reduction in encryption strength, the smart contract will downgrade the encryption level by downgrading the encryption algorithm or switching to a lower-strength key. For records that have completely expired and are no longer needed, the smart contract can perform a deletion operation to remove these expired records, ensuring that the data in the database 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 was successfully encrypted and ensure data integrity through hash value verification. Whenever the smart contract triggers an encryption strength adjustment, the storage of the relevant records is optimized based on the adjustment tag. For example, re-encryption can improve storage efficiency or reduce storage costs while ensuring information security. Through the automated execution of smart contracts, encrypted storage optimization of medical information can be performed continuously without human intervention, ensuring optimal encryption strength and storage status for each record. In addition to adjusting encryption strength, smart contracts can also optimize based on storage usage. For example, for 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 records, smart contracts can automatically classify data into different storage tiers (such as hot and cold data tiers) to improve storage efficiency.
[0084] Preferably, step S1 includes the following steps:
[0085] 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;
[0086] 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;
[0087] 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;
[0088] 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;
[0089] Step S15: Assign an expiration timestamp to each medical information record to obtain an encrypted expiration timestamp for the medical information.
[0090] In this embodiment of the present invention, a data collection module is integrated into the electronic health record (EHR) system. This module regularly collects medical information from multiple sources, including various medical devices, physician input, and patient history records. This data can include patient diagnostic information, prescriptions, surgical records, laboratory results, and imaging data. The collection frequency is set to once a minute, meaning the system automatically collects the latest medical information from the EHR system every 60 seconds. This ensures the real-time and continuity of medical information. The collected medical information is standardized and converted into a data format suitable for encryption. Common data formats include JSON, XML, or other structured data formats to facilitate subsequent encryption and storage. The collected medical information is encrypted using the AES-256 symmetric encryption algorithm. AES-256 is a highly secure encryption standard that ensures data security and prevents the leakage of sensitive medical information during transmission and storage. The medical information data is encrypted using the AES-256 algorithm to generate encrypted data. Each piece of data is independently encrypted to ensure confidentiality. For each encrypted data entry, the system automatically generates a unique encryption key. To ensure key security, the key is stored separately in a pre-defined key management system. The key management system requires high security, typically using a hardware security module (HSM) or key management service (KMS). Encrypted medical information data cannot be directly read unless decrypted using a valid key. The encryption key corresponding to each encrypted data entry is stored in the key management system, and the key storage system should be separate from the database storage system to ensure key security. For each encrypted medical information entry, the system extracts its string capacity. String capacity refers to the size of the encrypted data and can be used to calculate the required storage space. Encrypted data is larger than the original data, so calculating the string capacity of the encrypted data helps understand database capacity requirements. For example, by calculating the byte length (e.g., in megabytes or gigabytes) of each encrypted data entry, the total storage system capacity required can be estimated. Based on the data capacity requirements, the system presets the database storage capacity. This process accounts for future expansion needs and encrypted data growth to ensure that the database does not fail due to insufficient capacity. Based on the database capacity settings, the database can select appropriate hardware, cloud services, or distributed storage systems to effectively store large amounts of encrypted medical information. Based on the set capacity, the system constructs an encrypted medical information database. The database must support efficient data access, encryption and decryption, query, and update operations, while ensuring data security. Encrypted medical information will be stored in a pre-built database. Each record will be stored as an independent data unit, ensuring data separation and security. Each medical information record will be assigned a unique ID to ensure uniqueness. Additionally, each record will include a data storage timestamp, indicating when the data was stored.The storage system must provide features such as encrypted access, data backup, and redundant storage 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 record's validity period. In the healthcare industry, medical information is time-sensitive. For example, diagnostic data is no longer valid after a period of time, or records need to be deleted or archived after a certain period of time due 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 along with the data storage timestamp for subsequent expiration checks and data cleanup operations. The system will periodically scan the database to check whether the expiration timestamp has expired. If it has expired, subsequent data cleanup, encryption strength adjustment, or deletion operations can be triggered.
[0091] Preferably, step S15 includes the following steps:
[0092] 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;
[0093] Confirm the start timestamp of each medical information record based on the data storage timestamp to obtain the expiration start timestamp;
[0094] According to the expiration start timestamp, the expiration time interval of the short-term medical aging data is set to 1 year to obtain the short-term expiration timestamp;
[0095] According to the expiration start timestamp, the expiration time interval of the mid-term medical aging data is set to 3 years, and the mid-term expiration timestamp is obtained;
[0096] According to the expiration start timestamp, the expiration time interval of the long-term medical aging data is set to 5-10 years to obtain the long-term expiration timestamp;
[0097] 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.
[0098] In this embodiment of the present invention, medical information records are categorized according to their timeliness, ensuring that each type of data is managed according to its lifecycle. Medical information records are divided into the following three categories of time-sensitive data based on their importance and business needs: Short-term medical time-sensitive data primarily refers to data with a shorter timeliness, such as diagnostic data and clinical records, and is typically valid for less than one year. Medium-term medical time-sensitive data, including treatment plans and medication records, applies to data that will continue to be used within three years. Long-term medical time-sensitive data primarily includes medical records, imaging data, genetic information, and the like, and is typically retained for five to ten years to comply with laws, regulations, and medical history archive management requirements. The data's starting validity period is determined by the storage timestamp of each medical information record, which is typically the time the data was stored in the database. For each record, the system reads the storage timestamp as the starting point of its validity period. For example, if a record's storage timestamp is January 1, 2023, its starting timestamp is January 1, 2023. This starting timestamp provides a benchmark for subsequent expiration timestamp calculations, ensuring that all record expiration times are consistent with their actual storage time. For short-term medical data, set the expiration interval to 1 year. This means the data will expire one year from the storage timestamp. Add 1 year to the storage timestamp to obtain the short-term expiration timestamp. For example, if a piece of short-term data has a storage timestamp of January 1, 2023, its short-term expiration timestamp is January 1, 2024. For medium-term medical data, set the expiration interval to 3 years. This means the data will expire three years from the storage timestamp. Add 3 years to the storage timestamp to obtain the medium-term expiration timestamp. For example, if a piece of medium-term data has a storage timestamp of January 1, 2023, its medium-term expiration timestamp is January 1, 2026. For long-term medical data, set the expiration interval to 5 to 10 years. The specific number of years can be adjusted based on business needs. The long-term expiration timestamp is calculated by adding 5 to 10 years to the storage timestamp. Typically, the system provides configuration options, allowing administrators to set a specific range of years or to differentiate data processing based on its importance. For example, if a piece of long-term data has a storage timestamp of January 1, 2023, and an expiration time of 10 years is set, its long-term expiration timestamp will be January 1, 2033. Based on the timeliness type (short-term, medium-term, long-term) and storage timestamp of each medical information record, the system assigns a corresponding expiration timestamp to each record according to the aforementioned rules. Each medical information record will have a corresponding expiration timestamp, with different expiration times depending on the data's timeliness type (short-term, medium-term, long-term). The system stores each record's expiration timestamp in the database along with other metadata (such as the unique ID, storage timestamp, and data content). The system can periodically scan expiration timestamps to perform subsequent actions, such as data expiration checks, deletion, or archiving.
[0099] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes:
[0100] 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;
[0101] Step S22: screening the access content in the access log record based on a preset access time period, and obtaining screening results of accessed medical information records and screening results of unaccessed medical information records;
[0102] Step S23: performing data interaction frequency correlation on the access situation of each medical information record based on the accessed medical information record screening result, and generating a data encryption access correlation result;
[0103] 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.
[0104] In one embodiment of the present invention, a connection is made to an encrypted medical information database to extract all access log data stored in the database. Each access record contains the following information: the date and time of the access log, the identity of the user accessing the medical information (e.g., doctor, administrator, patient), and the specific medical information or document accessed (e.g., medical records, test reports, imaging data, etc.). This step typically extracts data through an API or database query to ensure the integrity and real-time nature of the access log data. Access logs are then filtered based on a preset access time period (e.g., daily, weekly, monthly, etc.). This can be done in the following steps: Users can set an access period based on actual needs, such as access records from the past week or the past month. Based on the filtered access period, the system categorizes the records in the access log as "accessed medical information" or "unaccessed medical information." Records marked "unaccessed" indicate that no user has accessed or viewed them within the predetermined time period. This step can use date filters or time functions in the database to accurately filter the access logs. For accessed medical information records, the system calculates the access frequency of each piece of medical information based on the accessing user and access time. Specific methods include counting the number of times each user accesses a piece of medical information. The access intervals for medical information are analyzed, such as frequent access within a short period of time or access intervals occurring only once in a long period of time, to infer the sensitivity and importance of the information. This frequency data is then correlated with the encryption database to generate "data encryption access correlation results." These results are used to determine which medical information requires enhanced encryption protection. Records with high data interaction frequency require higher encryption strength to ensure information security. Based on the data encryption access correlation results (e.g., frequently accessed medical information records), the system automatically adjusts the encryption strength of that information. Refresh strategies include: using a stronger encryption algorithm (such as AES-256) for frequently accessed medical information and regularly updating the encryption key. For less frequently accessed medical information, the encryption strength can be appropriately reduced to a standard encryption method (such as AES-128) to reduce system resource consumption. Dynamic adjustment of encryption strength can be achieved through automatic configuration of the encryption module. This process involves the key management system (KMS) to ensure that new encryption keys are securely generated and applied during each encryption refresh. The encryption database's encryption strength monitoring function continuously tracks data access and automatically adjusts encryption policies. It is necessary to ensure that updates to data access logs and encryption strength are reflected in the database in real time.
[0105] Preferably, step S23 includes the following steps:
[0106] Step S231: Calculating the number of accesses to each medical information record based on the accessed medical information record screening result to obtain the number of medical information record accesses;
[0107] 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;
[0108] 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 based on the classified access intensity data to obtain the number of accesses for each mode, where the access mode includes viewing, modifying, and deleting;
[0109] 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.
[0110] In an embodiment of the present invention, the system calculates the number of accesses for each accessed medical information record based on the user's access history in the access log. The specific steps are as follows: traverse the accessed medical information records and count the number of accesses for each record based on information such as the access timestamp and user ID in the log. Based on the access log for each medical information record, the system calculates the number of accesses to that record within each month (or a set time period). This step is typically implemented using SQL queries or batch processing of data using a big data processing framework (such as Apache Spark or Hadoop). Based on the access counts, the accessed medical information records are categorized: Records accessed more than five times per month indicate frequent access, typically important or urgent medical information, and should be classified as high-frequency access. Records accessed two to five times per month indicate regular review or updates, and are classified as medium-frequency access. Records accessed less than two times per month or records not accessed indicate infrequent or no access, and are classified as low-frequency access. This step can be accomplished using SQL CASE statements or conditional statements, performing classification directly in the database and labeling each medical information record with the classification results. Records with high, medium, and low frequency access are categorized as different access intensities, and new "categorized access intensity data" is generated based on these categorizations. For each medical information record, its access patterns are analyzed, including: viewing, editing or updating, and deleting operations. The number of accesses for each pattern is calculated. This refers to the number of times each record is "viewed," "modified," or "deleted" within a certain period (e.g., one month). This step can be performed using action type identifiers (e.g., view, edit, delete) in access logs to identify patterns and conduct statistics. Log analysis tools (e.g., Elasticsearch, Logstash) are typically used to extract and aggregate data. Based on the number of accesses for different access patterns, a mapping between access intensity and encryption policy is constructed. The specific mapping rules can be customized based on the priority of the access patterns. For medical information that is frequently accessed and modified, a stronger encryption policy (e.g., AES-256) can be used to ensure data security. For medical information that is accessed moderately frequently, a medium-strength encryption policy (e.g., 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. Dynamically map encryption strategies based on access pattern frequency data. The mapping table should include encryption strategies for different access strength categories under each access pattern.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.
[0111] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes:
[0112] Step S31: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generating an expiration check result. A record is determined to be an expired storage record if any of the following conditions occur:
[0113] The data type of medical information records is short-term medical time-sensitive data, and the storage time exceeds 1 year and there is no access log record in the past 6 months;
[0114] 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;
[0115] The data type of medical information records is long-term medical time-sensitive data, and the storage time exceeds 5 years and there is no access log record in the past 6 months;
[0116] Step S32: calculating the expiration time sequence of the expired storage record, and setting an encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain an encryption strength reduction rule;
[0117] 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.
[0118] In an embodiment of the present invention, a predetermined scanning interval (e.g., daily, weekly, or monthly) is set to periodically check each record in the encrypted medical information database. This operation is implemented through a scheduled task or periodic trigger. Expiration checks are performed based on the storage time and access log records of the medical information record. For each medical information record, the system determines whether it meets the expiration criteria based on its data type and access log. If the record is short-term medical time-limited data, has been stored for more than one year, and has no access log records in the past six months, it is considered an expired storage record. If the record is medium-term medical time-limited data, has been stored for more than three years, and has no access log records in the past six months, it is considered an expired storage record. If the record is long-term medical time-limited data, has been stored for more than five years, and has no access log records in the past six months, it is considered an expired storage record. Medical information records that meet any of the above criteria are marked as expired storage records, 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 medical record identified as expired, the system calculates its expiration time series. This expiration time series can be calculated based on several factors: the difference between the record's actual storage time and the current time. Depending on the data type (short-term, medium-term, or long-term), the system determines expiration based on different expiration intervals (1 year, 3 years, or 5-10 years). Based on the expiration check results, the system calculates the expiration time for each record. For example, if a medium-term medical record has been stored for more than 3 years and has not been accessed for 6 months, the system sets the record's expiration time to the current time minus the expiration condition corresponding to its storage time and access history. Based on this calculation, an expiration time series is generated for each expired record, including the record's expiration status and actual expiration time. The expiration time series data is stored in the database and used 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. A specific rule might be as follows: For short-term data, once it expires, the system can gradually reduce the encryption strength based on 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 downgraded 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 downgraded to AES-128 or lower, or a simpler encryption method can be used. For long-term data, records that have been stored for more than 5 years and have not been accessed can be considered downgraded 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 based on the record's timeliness type and expiration status. This rule is a dynamic rule that continuously adjusts the encryption strength over time.Based on the generated encryption strength reduction rules, the system automatically marks each record with a corresponding encryption strength adjustment mark. 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 certain 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.
[0119] Preferably, step S32 includes the following steps:
[0120] 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 to obtain a high-frequency expiration data adjustment rule.
[0121] Step S322: Adjust the AES-64 encryption rule for expired storage records with a total number of historical access times greater than 6 and less than 30, to obtain an intermediate frequency expired data adjustment rule;
[0122] Step S323: decrypting and storing expired storage records with a total number of historical access times less than 6 times to obtain low-frequency expired data adjustment rules;
[0123] 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 an encryption strength reduction rule.
[0124] In this embodiment of the present invention, for each medical information record, the system calculates an expiration time series based on its storage time, access logs, and expiration type (short-term, medium-term, long-term). This time series reflects whether the record has reached a preset expiration point (e.g., 1 year, 3 years, 5-10 years). Each record is assigned an expiration timestamp (e.g., short-term, medium-term, long-term) when the record is stored. This timestamp indicates when the encrypted data for that record should expire. The expiration time series of an expired stored 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 during storage), the record has effectively expired, and further reduction of the encryption strength should be considered. For expired stored records with a total historical access count exceeding 30, the system implements a more relaxed encryption policy based on the high frequency of access, adjusting the encryption strength to AES-128. This reduces storage and computational overhead while maintaining adequate encryption. The system filters out expired storage records with a total historical access count greater than 6 and less than 30. These records are accessed less frequently, but still with some frequency. For these expired records with moderate access, the system adjusts the encryption strength to AES-64. This encryption strength provides a certain level of security but is less computationally expensive than AES-128, making it suitable for less frequently accessed data. These expired records with moderate access are marked as data with adjusted AES-64 encryption rules. This adjustment ensures high storage efficiency even when the data does not require the highest level of encryption. The system filters out expired storage records with a total historical access count of less than 6. For these records, the system determines that access demand is extremely low and no longer requires strict encryption protection. For these infrequently accessed expired records, the system can mark them for decrypted storage or reduce their encryption strength to eliminate complex encryption mechanisms and retain only basic protection measures (such as access control). Based on this adjustment, infrequently accessed records are marked as not requiring further encryption protection or are set to decrypted storage, thereby reducing storage and computing pressure. The system integrates the high-frequency expiration data adjustment rules (AES-128), medium-frequency expiration data adjustment rules (AES-64), and low-frequency expiration data adjustment rules (decrypted storage) into a complete encryption strength reduction rule. The final encryption strength reduction rule will be specifically adjusted based on the access frequency and expiration status of the medical information record. Each record will be encrypted according to its access count and expiration status, ensuring that the data is stored as resource-efficiently as possible while maintaining reasonable security during long-term storage. The integrated encryption strength reduction rule is stored in the system for subsequent encryption strength adjustment applications. The encryption strength of each medical information record will be dynamically adjusted as access and timeliness change, ensuring continuous optimization of the system's storage and encryption mechanisms.
[0125] Preferably, step S4 includes the following steps:
[0126] Step S41: Setting up and deploying smart contracts using blockchain technology;
[0127] 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 soft-deleted according to the decrypted storage mark data in the encryption strength adjustment mark data to perform data encryption optimization operations.
[0128] 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 of expired storage records is adjusted to a lower value based on the encryption strength reduction marker data in the encryption strength adjustment marker data; Step S422: Soft-deleting the expired storage records based on the decrypted storage marker data in the strength adjustment marker data to obtain soft-deletion control data; Step S423: Performing an access control audit on the expired storage records based on the soft-deletion control data to generate soft-deletion access control audit data; Step S424: Determining the pending elimination status of the soft-deletion access control audit data. If the soft-deletion has lasted for more than 24 months and has not been accessed during this period, the data is deemed eligible for elimination and multiple elimination operations are performed on the eligible data. The eligible data is pre-verified by the smart contract and a final access record check is performed before cleaning to obtain multiple elimination operation verification data to execute data encryption optimization operations. Specifically, blockchain technology is used to create a smart contract that defines data soft-deletion and elimination rules. The smart contract is set with the following trigger conditions: data storage time, access history, and encryption status. When data meets the soft deletion criteria, the smart contract decrypts it, removes the encryption tag, and marks it as "pending decommissioning." Smart contracts are deployed using blockchain platforms such as Ethereum or Hyperledger to ensure transparency and immutability of data access and operations. A unique identifier is generated for each data record and stored on the blockchain, ensuring traceability of data processing at all stages. Data records are marked as "encryption strength reduced" based on encryption strength and storage age. The smart contract automatically performs operations such as data decryption, soft deletion, access auditing, and decommissioning verification based on predefined conditions. Based on the conditions set in the smart contract, the encryption strength of stored records is gradually reduced. The specific rules are as follows: AES-256 is downgraded to AES-128 when data has been stored for more than 12 months and has not been accessed. AES-128 is downgraded to AES-64 when data has been stored for more than 18 months and has not been accessed. When data has been stored for more than 24 months and has been accessed less than five times, consideration can be given to converting the data to plaintext. Smart contracts automatically trigger data encryption algorithm transitions. For example, from AES-256 to AES-128, and then from AES-128 to AES-64, this ensures that data encryption strength decreases over time. Specific encryption strength adjustment rules are configured through smart contracts on the blockchain. When data meets soft deletion criteria (for example, exceeding a storage time threshold and not being accessed), the smart contract performs the following actions: decrypts the data and removes the encryption tag. It also marks the data as "soft deleted" and adds a "pending deleting" flag. All soft delete operations are recorded in the audit log, and the smart contract generates soft delete control data to ensure that every soft delete record is traceable.For example, if data has been stored for more than 24 months and has not been accessed during that time, the smart contract automatically soft-deletes the data. Access control mechanisms remain in place even after soft deletion. The smart contract records who has access to the decrypted data and monitors access frequency. An access audit log is recorded for each soft-deleted data entry, detailing the accessor, access time, access content, and operation type (view, modify, etc.). The audit log includes the data ID, accessor information, access time, access type, and whether the data is decrypted. The system automatically checks the access control log for soft-deleted data every 30 days to ensure 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, it is automatically marked as "can be retired." Multiple elimination verifications are performed on "can be retired" data. Specifically, the smart contract verifies all data marked as can be retired to ensure that all elimination criteria have been met. The system performs a final check of access records for this data before cleanup to ensure that no valid data has been accidentally deleted. Verified "can be retired" data is physically deleted, and a deletion log is generated. After each data elimination operation, the smart contract generates a detailed operation log, documenting the entire data deletion process. The system performs data elimination operations every six months to ensure timely removal of unused data. Each data elimination operation records the operation data, verification status, operator, and elimination time to ensure the accuracy of the data elimination process.
[0129] In this specification, a smart medical information data encryption system is provided for executing the above-mentioned smart medical information data encryption method. The smart medical information data encryption system includes:
[0130] a data encryption module for collecting medical information data using an electronic health record system; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain an encrypted medical information expiration timestamp;
[0131] An 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;
[0132] 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 expired storage records; and to perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage records to obtain encryption strength adjustment mark data;
[0133] 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 tag data to perform medical information encryption storage optimization operations.
[0134] 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.
[0135] The present invention provides a beneficial effect in that the data encryption module, by employing the AES-256 encryption algorithm, ensures that all medical information data is strongly encrypted during storage, effectively preventing data leakage and unauthorized access. A unified encryption standard provides consistent encryption for all medical information records, ensuring the integrity and consistency of medical information. Encrypted data is stored in a database and assigned an expiration timestamp, ensuring effective data management throughout its lifecycle. Assigning an expiration timestamp to each medical information record enables effective data lifecycle management, ensuring that expired data no longer takes up storage space and avoiding storage waste. The encryption association module analyzes access to each medical information record based on access log records and dynamically adjusts the encryption strength based on access frequency and access patterns. This dynamic encryption strength refresh ensures that frequently accessed data retains stronger encryption protection, while the encryption strength of less frequently accessed data can be appropriately reduced, thereby protecting data security while reducing computing resource consumption. By associating access records with encryption status, the access patterns of each medical information record can be more accurately understood, allowing for the application of different encryption strategies to different levels of data, achieving fine-grained security management. The expiration check module regularly performs expiration checks, enabling the system to promptly identify and process expired medical records, avoiding the storage of no longer needed data. The expiration check module automatically runs at preset scan intervals to ensure timely data updates and optimized storage. It adjusts the encryption strength of expired stored records, reducing resource usage and avoiding the security risks associated with storing large amounts of expired and invalid data. The system automates data expiration and encryption adjustments, improving the efficiency of storage and computing resources. The encryption adjustment module deploys smart contracts to automatically adjust encryption strength, reducing manual intervention and management complexity. Smart contracts process expired data according to pre-set rules, ensuring compliance and appropriateness of encryption strength. They also soft-delete or adjust the encryption level of no longer needed expired data. Through the power of smart contracts, this module automatically optimizes encryption strength and data storage strategies, ensuring both data encryption protection and optimized storage and access efficiency. Therefore, the present invention achieves efficient and secure management of medical information data through dynamic management of 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 the system.
[0136] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0137] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily 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 is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed 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 correlation result to obtain encryption strength refresh data; wherein, 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 content in the access log record based on a preset access time period, and obtaining screening results of accessed medical information records and screening results of unaccessed medical information records; Step S23: Correlating the access situation of each medical information record with the data interaction frequency based on the accessed medical information record screening result to generate a data encryption access correlation result; wherein step S23 includes the following steps: Step S231: Calculating the number of accesses to each medical information record based on the accessed medical information record screening result to obtain the number of medical information record accesses; 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 based on the classified access intensity data to obtain the number of accesses for each mode, where the access mode includes viewing, modifying, and deleting; Step S234: constructing an access strength and encryption strategy mapping table for the medical information encryption database based on the number of accesses in each mode, and obtaining a data encryption access association result; Step S24: dynamically updating the encryption strength of the medical information record according to the data encryption access association result to obtain encryption strength update 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 with 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: deploying a smart contract; adjusting the encryption strength of expired storage records according to the encryption strength adjustment tag data based on the deployed smart contract to perform an encryption storage optimization operation for medical information; wherein step S4 includes the following steps: Step S41: Setting up 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 soft-deleted according to the decrypted storage mark data in the encryption strength adjustment mark data, so as to perform data encryption optimization operations; wherein, step S42 further includes the following steps: Step S421: Based on the deployed smart contract, the encryption strength of the expired storage record is adjusted to be lowered according to the encryption strength reduction mark data in the encryption strength adjustment mark data; Step S422: soft-deleting expired storage records according to the decrypted storage mark data in the strength adjustment mark data to obtain soft-deletion control data; Step S423: performing access control audit on expired storage records based on the soft deletion control data to generate soft deletion access control audit data; Step S424: The soft-deleted access control audit data is identified as being ready for elimination. If the data has been soft-deleted for more than 24 months and has not been accessed during this period, it is considered eligible for elimination and multiple elimination operation verifications are performed on the eligible data. The eligible data is pre-verified through smart contracts and the access record is checked for the last time before cleaning to obtain multiple elimination operation verification data to perform data encryption 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 aging 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 aging 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 aging data is set to 5-10 years to obtain the 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, wherein: Step S3 includes the following steps: Step S31: performing an expiration check on each medical information record in the medical information encryption database based on a preset scanning time interval, and generating an expiration check result. A record is determined to be an expired storage record if any of the following conditions occur: The data type of medical information records is short-term medical time-sensitive 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-sensitive 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 an encryption strength reduction rule for the encryption strength refresh data of the medical information record according to the expiration time sequence to obtain an 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.
5. The method for encrypting smart medical information data according to claim 4, 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 to obtain a high-frequency expiration data adjustment rule. Step S322: Adjust the AES-64 encryption rule for expired storage records with a total number of historical access times greater than 6 and less than 30, to obtain an intermediate frequency expired data adjustment rule; Step S323: decrypting and storing expired storage records with a total number of historical access times less than 6 times to obtain 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 an encryption strength reduction rule.
6. A smart medical information data encryption system, characterized in that: For executing the smart medical information data encryption method according to claim 1, the smart medical information data encryption system comprises: a data encryption module for collecting medical information data using an electronic health record system; performing initial AES-256 encryption on the collected medical information data, and storing the encrypted medical information data in a database to obtain an encrypted medical information database, wherein the encrypted medical information database includes at least one medical information record; assigning an expiration timestamp to each medical information record to obtain an encrypted medical information expiration timestamp; An 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 expired storage records; and to perform an encryption strength adjustment mark on the encryption strength refresh data of the expired storage records 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 tag data to perform medical information encryption storage optimization operations.
7. A storage medium storing a computer program, characterized in that: When the computer program is executed, the smart medical information data encryption method as described in any one of claims 1 to 5 is implemented.