A medical data processing method and system based on blockchain

By detecting the storage capacity of the blockchain in real time, judging the node security, and determining the data migration method, the problem of the storage capacity of the blockchain reaching the upper limit is solved, and efficient and safe medical data storage and migration are achieved.

CN118942658BActive Publication Date: 2025-01-21启康保(北京)健康科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411427410.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-21
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

As the amount of medical data management system based on existing blockchain continues to increase, the storage capacity of a single blockchain may quickly reach the upper limit, resulting in the inability to store new data in time, resulting in the problem of inefficient storage.

Method used

By detecting the total remaining storage capacity of the initial blockchain in real time and comparing it with the preset threshold, it is determined whether to send a data migration instruction. Based on the node remaining storage capacity and security judgment results of the storage node, calculate the capacity exception ratio and security exception ratio, determine the data migration method, and adjust the node remaining storage threshold according to the method to implement data migration to release storage space.

Benefits of technology

Effectively utilize storage resources in the blockchain network to avoid data loss or storage bottlenecks, improve overall storage efficiency, enhance data security, optimize migration strategies, reduce resource waste and potential risks, and ensure data continuity and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118942658B_ABST
    Figure CN118942658B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical data processing technology, and in particular to a medical data processing method and system based on blockchain, the method comprising: receiving a number of initial medical health data to be stored in an initial blockchain, comparing the total remaining storage capacity to determine whether to send a data migration instruction; receiving a data migration instruction, comparing the remaining storage capacity of a node to calculate the capacity abnormality ratio, and obtaining a first comparison result; judging the node security to determine the security abnormality ratio, and obtaining a second comparison result based on the security abnormality ratio; determining a data migration method based on the first comparison result and the second comparison result; determining a data migration amount according to the data migration method, and then determining an initial data migration speed, obtaining a historical data amount to draw a data change curve for analysis, and calibrating the initial data migration speed; performing data migration on the initial blockchain based on the data migration method and the target data migration speed. The present invention improves the efficiency of medical data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical data processing, and in particular to a medical data processing method and system based on blockchain. Background Art

[0002] With the development of medical information technology, the collection, storage and management of medical and health data have become increasingly important. At present, the medical field generally uses centralized database systems to store and process these data, but this approach has many shortcomings. First, the centralized storage model faces the risk of single point failure. Once the data center is damaged, the data will be at risk of loss. Secondly, with the explosive growth of medical data, the expansion cost of centralized storage is high and inefficient.

[0003] The patent document with Chinese patent application publication number CN111540428A discloses a medical data management system based on blockchain, including a medical data acquisition module, a data encryption module, a node allocation module, a server, a node acquisition module and a blockchain node module. The medical data acquisition module is used to collect and screen the medical data information of the hospital. The data encryption module is used to encrypt the node storage data and send the encrypted node storage data to the node allocation module. The node allocation module is used to receive the encrypted node storage data and perform on-chain allocation processing. The blockchain node module is used to receive the number and node allocation data of the selected blockchain storage node, and then send the node allocation data to the corresponding blockchain storage node of the selected blockchain storage node for storage, and record the storage time of the node allocation data at the same time. The blockchain node module includes several blockchain storage nodes, and the blockchain storage nodes are used to store medical data. The node acquisition module is used to collect node information of the blockchain storage nodes and send the node information to the node allocation module for storage.

[0004] In the existing technology, as the amount of medical data continues to increase, the storage capacity of a single blockchain may quickly reach its upper limit, resulting in the inability to store new data in a timely manner, thus causing the problem of low storage efficiency. Summary of the invention

[0005] To this end, the present invention provides a medical data processing method and system based on blockchain, which can solve the problem of low storage efficiency.

[0006] To achieve the above objectives, the present invention provides a medical data processing method based on blockchain, the method comprising:

[0007] Receive some initial medical and health data of the user, store some initial medical and health data in the initial blockchain, obtain the stored medical and health data, detect the total remaining storage capacity of the initial blockchain, compare the total remaining storage capacity with a preset total remaining storage threshold, and determine whether to send a data migration instruction according to the comparison result;

[0008] Receive the data migration instruction, respectively detect the node remaining storage capacity corresponding to several storage nodes in the initial blockchain, respectively compare the remaining storage capacity of the several nodes with a preset node remaining storage threshold, obtain a capacity comparison result, calculate the capacity abnormality ratio based on the capacity comparison result, compare the capacity abnormality ratio with a first preset ratio, and obtain a first comparison result;

[0009] Determine the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtain a security determination result, determine the security anomaly ratio based on the security determination result, compare the security anomaly ratio with a second preset ratio, and obtain a second comparison result;

[0010] Determine a data migration method based on the first comparison result and the second comparison result, and adjust the preset node remaining storage threshold according to the data migration method;

[0011] Determine a data migration amount according to the data migration method, determine an initial data migration speed according to the data migration amount, obtain a number of historical data amounts of the stored medical and health data at a preset detection frequency, draw a data change curve based on the number of historical data amounts, analyze the data change curve, and calibrate the initial data migration speed according to the curve analysis result to obtain a target data migration speed;

[0012] Based on the data migration method and the target data migration speed, data migration is performed on the plurality of stored medical and health data in the initial blockchain to obtain a target blockchain corresponding to the plurality of stored medical and health data after migration.

[0013] Furthermore, the step of calculating the capacity abnormality ratio based on the capacity comparison result includes:

[0014] Marking the storage nodes corresponding to the plurality of nodes whose remaining storage capacity is less than the preset node remaining storage threshold as first-type abnormal nodes;

[0015] The number of the first type of abnormal nodes is counted to obtain a first abnormal number, and the capacity abnormality ratio is obtained by performing calculation based on the first abnormal number and the total number corresponding to the plurality of storage nodes.

[0016] Furthermore, the step of determining the node security of a plurality of storage nodes based on the analysis result of the stored medical and health data includes:

[0017] Detecting the actual amount of medical and health data stored on any of the storage nodes to obtain a data amount detection result;

[0018] The data loss rate of the stored medical and health data is determined based on the data volume detection result, and the node security of the storage node is determined based on the data loss rate determination result.

[0019] Furthermore, the step of determining the proportion of security anomalies based on the security judgment result includes:

[0020] The storage nodes corresponding to the node security anomalies are marked as the second type of abnormal nodes;

[0021] The number of the second-type abnormal nodes is counted to obtain the second abnormal number, and the security abnormality ratio is obtained by calculating based on the second abnormal number and the total number corresponding to the plurality of storage nodes.

[0022] Furthermore, the step of determining the data migration mode based on the first comparison result and the second comparison result includes:

[0023] When the capacity abnormality ratio is greater than or equal to the first preset ratio or the security abnormality ratio is greater than or equal to the second preset ratio, determining that the data migration mode is a full migration mode;

[0024] When the capacity anomaly ratio is less than the first preset ratio and the security anomaly ratio is less than the second preset ratio, it is determined that the data migration mode is an incremental migration mode.

[0025] Furthermore, the step of adjusting the preset node remaining storage threshold according to the data migration mode includes:

[0026] When the data migration mode is a full migration mode, the preset node remaining storage threshold is not adjusted;

[0027] When the data migration mode is an incremental migration mode, the number of migration nodes is determined, the number of migration nodes is compared with a preset number, and the preset node remaining storage threshold is adjusted according to the comparison result.

[0028] Furthermore, the step of determining the initial data migration speed according to the data migration amount includes:

[0029] Set the basic data migration speed;

[0030] Calculate the ratio of the data migration amount to the total amount of medical and health data stored in the initial blockchain as the actual migration ratio;

[0031] The basic data migration speed is adjusted according to a comparison result between the actual migration ratio and the preset migration ratio to obtain the initial data migration speed.

[0032] Furthermore, the step of analyzing the data change curve includes:

[0033] Identify the change trend of the data change curve and obtain a trend identification result;

[0034] When the changing trend is an upward trend, the historical growth rate is determined.

[0035] Furthermore, the step of calibrating the initial data migration speed according to the curve analysis result includes:

[0036] When the change trend is not an upward trend, the initial data migration speed is not calibrated;

[0037] When the change trend is an upward trend, the historical growth rate is compared with the preset growth rate, a growth factor is calculated based on the comparison result, and the initial data migration speed is calibrated according to the growth factor to obtain the target data migration speed.

[0038] On the other hand, the present invention also provides a system for a medical data processing method based on blockchain, the system comprising:

[0039] An instruction sending module is used to receive a number of initial medical and health data of the user, store the initial medical and health data in the initial blockchain, obtain the stored medical and health data, detect the total remaining storage capacity of the initial blockchain, compare the total remaining storage capacity with a preset total remaining storage threshold, and determine whether to send a data migration instruction according to the comparison result;

[0040] a capacity comparison module, connected to the instruction sending module, for receiving the data migration instruction, respectively detecting the node remaining storage capacity corresponding to a plurality of storage nodes in the initial blockchain, respectively comparing the remaining storage capacity of the plurality of nodes with a preset node remaining storage threshold, obtaining a capacity comparison result, calculating a capacity abnormality ratio based on the capacity comparison result, comparing the capacity abnormality ratio with a first preset ratio, and obtaining a first comparison result;

[0041] A security comparison module, connected to the capacity comparison module, for judging the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtaining a security judgment result, determining a security anomaly ratio based on the security judgment result, comparing the security anomaly ratio with a second preset ratio, and obtaining a second comparison result;

[0042] a mode determination module, connected to the capacity comparison module and the security comparison module, for determining a data migration mode based on the first comparison result and the second comparison result, and adjusting the preset node remaining storage threshold according to the data migration mode;

[0043] a speed determination module, connected to the mode determination module, for determining a data migration amount according to the data migration mode, determining an initial data migration speed according to the data migration amount, obtaining a number of historical data growth rates of the stored medical and health data at a preset detection frequency, and calibrating the initial data migration speed based on the historical growth rate to obtain a target data migration speed;

[0044] A migration module is connected to the method determination module and the speed determination module, and is used to migrate the medical and health data stored in the initial blockchain based on the data migration method and the target data migration speed to obtain a target blockchain corresponding to the medical and health data stored after the migration.

[0045] Compared with the prior art, the beneficial effect of the present invention lies in that, by real-time detection of the total remaining storage capacity of the initial blockchain and comparison with a preset threshold, it is ensured that the data migration instruction is triggered in time when the storage capacity is close to saturation, thereby avoiding data loss or storage bottlenecks. Through data migration decisions, the storage resources in the blockchain network are effectively utilized to improve the overall storage efficiency. By detecting the remaining storage capacity of each storage node and comparing it with a preset threshold, the nodes with insufficient capacity are accurately identified to provide an accurate basis for subsequent data migration. Based on the calculation of the capacity anomaly ratio, the load balancing of the entire blockchain network is evaluated to provide data support for the selection of data migration methods. By judging the security of the storage nodes, it is ensured that sensitive data will not be stored on nodes with lower security during the data migration process, thereby enhancing the security of the data. The calculation of the security anomaly ratio helps to discover in advance Potential security risks provide early warning for taking corresponding security measures. Based on the capacity and security assessment results, flexibly select the data migration method that best suits the current situation to ensure the efficiency and security of data migration, optimize the migration strategy, reduce resource waste and potential risks during the migration process, accurately predict the growth of future data volume by drawing data change curves and analyzing their trends, and calibrate the initial data migration speed accordingly to ensure that data migration is completed within a reasonable time. Based on the dynamic changes in historical data volume, adjust the data migration speed in real time to adapt to the data growth needs of different time periods. Based on the determined data migration method and the calibrated target data migration speed, smoothly migrate data from the initial blockchain to the target blockchain to ensure data continuity and integrity. Through data migration, release the storage space in the initial blockchain and improve the performance and scalability of the entire blockchain network.

[0046] In particular, by detecting the actual amount of medical and health data on any storage node, accurate data volume information can be obtained, laying an accurate foundation for subsequent judgment of data security. Calculating the data loss rate based on the data volume detection results can more accurately evaluate the loss of data during storage or transmission. The data loss rate is an important indicator for measuring data integrity and stability, which directly affects the reliability and use value of the data. Combined with the data loss rate judgment results, the security of the storage node is effectively evaluated. Through accurate data volume detection and data loss rate evaluation, an effective node security judgment method is provided for blockchain-based medical data processing methods, thereby improving the accuracy of data processing and risk prevention capabilities, and ensuring the security and credibility of medical and health data.

[0047] In particular, when the capacity anomaly ratio or security anomaly ratio reaches the preset threshold, it indicates that the storage node has serious capacity shortage or security risks. At this time, full migration is selected to quickly migrate data from the problem node to the healthy node, so as to quickly solve the problem of insufficient capacity or security vulnerabilities and avoid the risk of data loss or leakage. Full migration ensures that all relevant data are completely migrated to the new node, avoiding data omissions or inconsistencies that may be caused by incremental migration, and ensuring the integrity and accuracy of medical data. When the capacity and security conditions are relatively good, incremental migration is selected to utilize storage resources more efficiently. Incremental migration only migrates data that has changed since the last migration, reducing the waste of data transmission and processing, improving resource utilization, helping to reduce the complexity of migration operations, and improving the flexibility and scalability of the system. Determining the data migration method based on the capacity anomaly ratio and the security anomaly ratio ensures the integrity of medical data and improves resource utilization during the data migration process.

[0048] In particular, by setting a basic data migration speed as a starting point, a clear benchmark is provided for subsequent adjustments, which helps to maintain consistency in migration speed under different circumstances and facilitates management and optimization. By calculating the actual migration ratio, the scale of the current migration task relative to the entire blockchain data volume is quantified, which helps to more accurately evaluate the complexity of the migration task and the required resources, so that the system can adjust the migration strategy according to actual conditions to optimize the migration process. By comparing the actual migration ratio with the preset migration ratio, the basic data migration speed is intelligently adjusted. When the actual migration ratio is greater than the preset migration ratio, the migration speed is increased to speed up the migration process. Otherwise, the migration speed is appropriately reduced to save resources, which helps to optimize the utilization of system resources.

[0049] In particular, when the change trend is not an upward trend, it is judged that the current migration speed is stable or decreasing, and the initial data migration speed is not calibrated, thereby avoiding unnecessary adjustments, reducing the waste of system resources, and maintaining the stability of the migration process. When the change trend of the data migration speed is an upward trend, it indicates that the migration task is accelerating. By comparing the historical growth rate with the preset growth rate, the growth demand of the migration speed can be discovered in time and calibrated accordingly. The growth factor is calculated based on the comparison result, and the initial data migration speed is calibrated according to the growth factor to achieve precise adjustment of the migration speed. Through the calibrated target data migration speed, system resources can be used more effectively to improve migration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flowchart of a blockchain-based medical data processing method provided by an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of a process for determining node security in a blockchain-based medical data processing method provided in an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of a process for determining the initial data migration speed in a blockchain-based medical data processing method provided in an embodiment of the present invention;

[0053] Figure 4 A structural block diagram of a blockchain-based medical data processing system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0055] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0056] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0057] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0058] See also Figure 1 As shown, an embodiment of the present invention provides a medical data processing method based on blockchain, the method comprising:

[0059] Step S100, receiving some initial medical and health data of the user, storing some initial medical and health data in the initial blockchain, obtaining the stored medical and health data, detecting the total remaining storage capacity of the initial blockchain, comparing the total remaining storage capacity with a preset total remaining storage threshold, and determining whether to send a data migration instruction according to the comparison result;

[0060] Step S200, receiving the data migration instruction, respectively detecting the node remaining storage capacity corresponding to several storage nodes in the initial blockchain, respectively comparing the remaining storage capacity of the several nodes with a preset node remaining storage threshold, obtaining a capacity comparison result, calculating a capacity abnormality ratio based on the capacity comparison result, comparing the capacity abnormality ratio with a first preset ratio, and obtaining a first comparison result;

[0061] Step S300, judging the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtaining a security judgment result, determining a security anomaly ratio based on the security judgment result, comparing the security anomaly ratio with a second preset ratio, and obtaining a second comparison result;

[0062] Step S400, determining a data migration method based on the first comparison result and the second comparison result, and adjusting the preset node remaining storage threshold according to the data migration method;

[0063] Step S500, determining a data migration amount according to the data migration method, determining an initial data migration speed according to the data migration amount, obtaining a number of historical data amounts of the stored medical and health data at a preset detection frequency, drawing a data change curve based on the number of historical data amounts, analyzing the data change curve, and calibrating the initial data migration speed according to the curve analysis result to obtain a target data migration speed;

[0064] Step S600: Migrate the medical and health data stored in the initial blockchain based on the data migration method and the target data migration speed to obtain a target blockchain corresponding to the medical and health data stored after the migration.

[0065] Specifically, the preset total remaining storage threshold in the embodiment of the present invention is 20% of the total storage capacity of the initial blockchain;

[0066] The preset node remaining storage threshold is 20% of the average of a sum of a number of storage capacities corresponding to a number of storage nodes.

[0067] Specifically, an embodiment of the present invention includes sending a data migration instruction when the total remaining storage capacity is less than a preset total remaining storage threshold.

[0068] Specifically, the initial medical health data described in the embodiment of the present invention includes the medical record data and report data of the user's electronic medical treatment. In one embodiment, when the user visits various hospitals for treatment, his electronic medical record and report data are collected and recorded, and these data are sent to and stored in the storage nodes of the corresponding hospitals to form an initial blockchain. The total remaining storage capacity of the entire blockchain network is detected, and the detected total remaining storage capacity is compared with the preset total remaining storage threshold to determine whether data migration needs to be performed, so as to effectively manage the patient's medical data in different hospitals, ensure the security, integrity and timely updating of the data, and optimize the configuration and use of storage resources to improve the efficiency and quality of medical services.

[0069] Specifically, the embodiments of the present invention detect the total remaining storage capacity of the initial blockchain in real time and compare it with a preset threshold to ensure that the data migration instruction is triggered in time when the storage capacity is close to saturation, thereby avoiding data loss or storage bottlenecks. Through data migration decisions, the storage resources in the blockchain network are effectively utilized to improve the overall storage efficiency. By detecting the remaining storage capacity of each storage node and comparing it with a preset threshold, the nodes with insufficient capacity are accurately identified to provide an accurate basis for subsequent data migration. Based on the calculation of the capacity anomaly ratio, the load balancing of the entire blockchain network is evaluated to provide data support for the selection of data migration methods. By judging the security of the storage nodes, it is ensured that sensitive data will not be stored on nodes with lower security during the data migration process, thereby enhancing the security of the data. The calculation of the security anomaly ratio helps to discover potential security risks in advance. Full risk, provide early warning for taking corresponding security measures, flexibly select the data migration method that best suits the current situation based on the capacity and security assessment results, ensure the efficiency and security of data migration, optimize the migration strategy, reduce resource waste and potential risks during the migration process, accurately predict the growth of future data volume by drawing data change curves and analyzing their trends, and calibrate the initial data migration speed accordingly to ensure that data migration is completed within a reasonable time, based on the dynamic changes in historical data volume, adjust the data migration speed in real time to adapt to the data growth needs of different time periods, based on the determined data migration method and the calibrated target data migration speed, smoothly migrate data from the initial blockchain to the target blockchain, ensure data continuity and integrity, and release storage space in the initial blockchain through data migration to improve the performance and scalability of the entire blockchain network.

[0070] Specifically, the step of calculating the capacity abnormality ratio based on the capacity comparison result includes:

[0071] Marking the storage nodes corresponding to the plurality of nodes whose remaining storage capacity is less than the preset node remaining storage threshold as first-type abnormal nodes;

[0072] The number of the first type of abnormal nodes is counted to obtain a first abnormal number, and the capacity abnormality ratio is obtained by performing calculation based on the first abnormal number and the total number corresponding to the plurality of storage nodes.

[0073] Specifically, the capacity anomaly ratio described in the embodiment of the present invention=the number of first anomalies / the total number.

[0074] Specifically, the embodiment of the present invention more intuitively identifies nodes with insufficient storage capacity by marking the first type of abnormal nodes, thereby providing a clear reference basis for data migration, and evaluates the load balancing of the entire blockchain network by calculating the capacity abnormality ratio, providing data support for the selection of data migration methods.

[0075] See also Figure 2 As shown, the step of determining the node security of a plurality of storage nodes based on the analysis result of the stored medical health data includes:

[0076] Step S310, detecting the actual data volume of the medical and health data stored on any of the storage nodes to obtain a data volume detection result;

[0077] Step S320, judging the data loss rate of the stored medical and health data based on the data volume detection result, and determining the node security of the storage node based on the data loss rate judgment result.

[0078] Specifically, the embodiments of the present invention detect the actual amount of medical and health data on any storage node to obtain accurate data volume information, laying an accurate foundation for subsequent judgment of data security. The data loss rate is calculated based on the data volume detection result, which can more accurately evaluate the loss of data during storage or transmission. The data loss rate is an important indicator for measuring data integrity and stability, and directly affects the reliability and use value of the data. Combined with the data loss rate judgment result, the security of the storage node is effectively evaluated. Through accurate data volume detection and data loss rate evaluation, an effective node security judgment method is provided for the blockchain-based medical data processing method, thereby improving the accuracy of data processing and risk prevention capabilities, and ensuring the security and credibility of medical and health data.

[0079] Specifically, the step of determining the data loss rate of the stored medical and health data based on the data volume detection result includes:

[0080] Comparing the difference between the actual data volume of any stored medical and health data and the initial data volume of the corresponding initial medical and health data, and determining the data loss rate based on the difference;

[0081] The data loss rate = (actual data volume - initial data volume) / initial data volume.

[0082] Specifically, the embodiment of the present invention determines the node security of the storage node based on the data loss rate judgment result, including:

[0083] When the data loss rate is greater than a data loss rate threshold, determining that the storage node has security abnormality;

[0084] When the data loss rate is less than or equal to the data loss rate threshold, it is determined that the storage node has high security.

[0085] Specifically, the preset data loss rate threshold in the embodiment of the present invention is 5%.

[0086] Specifically, the step of determining the security anomaly ratio based on the security judgment result includes:

[0087] The storage nodes corresponding to the node security anomalies are marked as the second type of abnormal nodes;

[0088] The number of the second-type abnormal nodes is counted to obtain the second abnormal number, and the security abnormality ratio is obtained by calculating based on the second abnormal number and the total number corresponding to the plurality of storage nodes.

[0089] Specifically, the security anomaly ratio described in the embodiment of the present invention=the number of second anomalies / the total number.

[0090] Specifically, the step of determining the data migration mode based on the first comparison result and the second comparison result includes:

[0091] When the capacity abnormality ratio is greater than or equal to the first preset ratio or the security abnormality ratio is greater than or equal to the second preset ratio, determining that the data migration mode is a full migration mode;

[0092] When the capacity anomaly ratio is less than the first preset ratio and the security anomaly ratio is less than the second preset ratio, it is determined that the data migration mode is an incremental migration mode.

[0093] Specifically, in the embodiment of the present invention, the first preset proportion is 75%;

[0094] The second preset ratio is 50%.

[0095] Specifically, the full migration method in the embodiment of the present invention is to migrate all the medical and health data stored in the initial blockchain to the target blockchain to ensure the integrity and consistency of the data;

[0096] The incremental migration method is to migrate only the stored medical and health data that has been newly added or updated since the last data migration to the target blockchain, so as to reduce the load and time of data migration.

[0097] Specifically, the embodiment of the present invention determines the data migration amount according to the data migration mode, including:

[0098] When the data migration mode is a full migration mode, the data migration amount is the sum of the actual data amounts corresponding to all the stored medical and health data in the initial blockchain;

[0099] When the data migration mode is an incremental migration mode, the data migration amount is the actual data amount corresponding to the stored medical and health data that is newly added or updated since the last data migration.

[0100] Specifically, the embodiment of the present invention indicates that the storage node has serious capacity shortage or security risk when the capacity anomaly ratio or security anomaly ratio reaches a preset threshold. At this time, the full migration method is selected to quickly migrate the data from the problem node to the healthy node, thereby quickly solving the problem of insufficient capacity or security loopholes and avoiding the risk of data loss or leakage. The full migration ensures that all relevant data is completely migrated to the new node, avoiding data omissions or inconsistencies that may be caused by incremental migration, and ensuring the integrity and accuracy of medical data. When the capacity and security conditions are relatively good, the incremental migration method is selected to more efficiently utilize storage resources. Incremental migration only migrates data that has changed since the last migration, reducing the waste of data transmission and processing, improving resource utilization, helping to reduce the complexity of migration operations, and improving the flexibility and scalability of the system. Determining the data migration method based on the capacity anomaly ratio and the security anomaly ratio ensures the integrity of medical data and improves resource utilization during the data migration process.

[0101] Specifically, the step of adjusting the preset node remaining storage threshold according to the data migration method includes:

[0102] When the data migration mode is a full migration mode, the preset node remaining storage threshold is not adjusted;

[0103] When the data migration mode is an incremental migration mode, the number of migration nodes is determined, the number of migration nodes is compared with a preset number, and the preset node remaining storage threshold is adjusted according to the comparison result.

[0104] Specifically, the preset number described in the embodiment of the present invention is 1 / 3 of the total number of storage nodes in the initial blockchain.

[0105] Specifically, the migration node described in the embodiment of the present invention is a storage node in the initial blockchain corresponding to when the data migration method is an incremental migration method, when the capacity anomaly ratio is less than the first preset ratio and the security anomaly ratio is less than the second preset ratio.

[0106] Specifically, the embodiment of the present invention adjusts the preset node remaining storage threshold according to the comparison result, including:

[0107] When the number of the migration nodes is less than or equal to the preset number, the preset node remaining storage threshold is not adjusted;

[0108] When the number of the migrated nodes is greater than the preset number, a ratio of the number of the migrated nodes to the preset number is calculated as an adjustment parameter, and the preset node remaining storage threshold is adjusted based on the adjustment parameter.

[0109] Specifically, the embodiment of the present invention reduces the number of unnecessary migrations through a reasonable threshold adjustment strategy, thereby reducing the migration cost and risk.

[0110] See also Figure 3 As shown, the step of determining the initial data migration speed according to the data migration amount includes:

[0111] Step S510, setting the basic data migration speed;

[0112] Step S520, calculating a ratio of the data migration amount to the total amount of medical and health data stored in the initial blockchain as an actual migration ratio;

[0113] Step S530: adjusting the basic data migration speed according to the comparison result between the actual migration ratio and the preset migration ratio to obtain the initial data migration speed.

[0114] Specifically, the embodiment of the present invention sets the basic data migration speed according to the performance and bandwidth of the blockchain network, and can be set to transmit 25MB of data per second.

[0115] Specifically, the preset migration ratio in the embodiment of the present invention is 7 / 10.

[0116] Specifically, in the embodiment of the present invention, when the actual migration ratio is greater than or equal to the preset migration ratio, the difference between the actual migration ratio and the preset migration ratio is used as an increase coefficient, and the basic data migration speed is increased according to the increase coefficient to obtain the initial data migration speed;

[0117] When the actual migration ratio is less than the preset migration ratio, the basic data migration speed is not adjusted, and the basic data migration speed is used as the initial data migration speed.

[0118] Specifically, in the embodiment of the present invention, when the actual migration ratio is greater than or equal to the preset migration ratio, the initial data migration speed=(1+actual migration ratio-preset migration ratio)×basic data migration speed.

[0119] Specifically, the embodiments of the present invention provide a clear benchmark for subsequent adjustments by setting a basic data migration speed as a starting point, which helps to maintain consistency in migration speed under different circumstances and facilitates management and optimization. By calculating the actual migration ratio, the scale of the current migration task relative to the entire blockchain data volume is quantified, which helps to more accurately evaluate the complexity of the migration task and the required resources, so that the system can adjust the migration strategy according to actual conditions to optimize the migration process. By comparing the actual migration ratio with the preset migration ratio, the basic data migration speed is intelligently adjusted. When the actual migration ratio is greater than the preset migration ratio, the migration speed is increased to speed up the migration process. Otherwise, the migration speed is appropriately reduced to save resources, which helps to optimize the utilization of system resources.

[0120] Specifically, the step of analyzing the data change curve includes:

[0121] Identify the change trend of the data change curve and obtain a trend identification result;

[0122] When the changing trend is an upward trend, the historical growth rate is determined.

[0123] Specifically, the embodiment of the present invention identifies the change trend of the data change curve including:

[0124] Calculating the data change rates corresponding to consecutive time points on the data change curve, determining the positive value proportions of a number of data change rates, and determining the trend recognition result based on a comparison result of the positive value proportions and a preset proportion;

[0125] Specifically, in the embodiment of the present invention, the preset proportion is 70%. When the positive value proportion is greater than 70%, it is determined that the data change curve is on an upward trend.

[0126] When the positive value ratio is less than or equal to 70%, it is determined that the data change curve does not show an upward trend.

[0127] Specifically, the embodiment of the present invention calculates the data change rate corresponding to the continuous time points on the data change curve, including: assuming that the historical data volume y1, y2, ...yn of the continuous time points on the data change curve, where yi represents the historical data volume corresponding to the i-th time point, and the growth rate ri corresponding to the i-th time point can be obtained by the formula Calculation shows that the historical growth rate is the average of several growth rates.

[0128] Specifically, the step of calibrating the initial data migration speed according to the curve analysis result includes:

[0129] When the change trend is not an upward trend, the initial data migration speed is not calibrated;

[0130] When the change trend is an upward trend, the historical growth rate is compared with the preset growth rate, a growth factor is calculated based on the comparison result, and the initial data migration speed is calibrated according to the growth factor to obtain the target data migration speed.

[0131] Specifically, the preset growth rate described in the embodiment of the present invention is to increase the storage capacity of the storage node by 1 / 10 per second.

[0132] Specifically, in the embodiment of the present invention, when the historical growth rate is greater than the preset growth rate, the growth factor is calculated, and the growth factor = (historical growth rate - preset growth rate) / preset growth rate;

[0133] The target data migration speed = (1 + growth factor) × initial data migration speed.

[0134] Specifically, the steps of performing data migration in the embodiment of the present invention include:

[0135] Determine a starting node and a corresponding ending node of data migration based on the data migration method;

[0136] Determine a target migration object based on the data migration method;

[0137] The priority of data migration is set based on the time sequence relationship, and the target migration object is migrated according to the target data migration speed based on the priority.

[0138] Specifically, the embodiments of the present invention determine that the current migration speed is stable or decreasing when the change trend is not an upward trend, and do not calibrate the initial data migration speed, so as to avoid unnecessary adjustments, reduce the waste of system resources, and maintain the stability of the migration process. When the change trend of the data migration speed is an upward trend, it indicates that the migration task is accelerating. By comparing the historical growth rate with the preset growth rate, the growth demand of the migration speed is timely discovered and calibrated accordingly. The growth factor is calculated based on the comparison result, and the initial data migration speed is calibrated according to the growth factor, so as to achieve accurate adjustment of the migration speed. Through the calibrated target data migration speed, the system resources are more effectively utilized and the migration efficiency is improved.

[0139] See also Figure 4 As shown, the embodiment of the present invention also provides a system for a medical data processing method based on blockchain, the system comprising:

[0140] The instruction sending module 10 is used to receive a number of initial medical and health data of the user, store the initial medical and health data in the initial blockchain, obtain the stored medical and health data, detect the total remaining storage capacity of the initial blockchain, compare the total remaining storage capacity with a preset total remaining storage threshold, and determine whether to send a data migration instruction according to the comparison result;

[0141] A capacity comparison module 20 is connected to the instruction sending module 10, and is used to receive the data migration instruction, respectively detect the node remaining storage capacity corresponding to a number of storage nodes in the initial blockchain, respectively compare the remaining storage capacity of the several nodes with a preset node remaining storage threshold, obtain a capacity comparison result, calculate a capacity abnormality ratio based on the capacity comparison result, and compare the capacity abnormality ratio with a first preset ratio to obtain a first comparison result;

[0142] A security comparison module 30, connected to the capacity comparison module 20, is used to determine the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtain a security determination result, determine a security anomaly ratio based on the security determination result, compare the security anomaly ratio with a second preset ratio, and obtain a second comparison result;

[0143] a mode determination module 40, connected to the capacity comparison module 20 and the security comparison module 30, for determining a data migration mode based on the first comparison result and the second comparison result, and adjusting the preset node remaining storage threshold according to the data migration mode;

[0144] a speed determination module 50, connected to the mode determination module 40, for determining a data migration amount according to the data migration mode, determining an initial data migration speed according to the data migration amount, obtaining a number of historical data growth rates of the stored medical and health data at a preset detection frequency, and calibrating the initial data migration speed based on the historical growth rate to obtain a target data migration speed;

[0145] The migration module 60 is connected to the method determination module 40 and the speed determination module 50, and is used to migrate the medical and health data stored in the initial blockchain based on the data migration method and the target data migration speed to obtain the target blockchain corresponding to the medical and health data stored after the migration.

[0146] Specifically, the system of the blockchain-based medical data processing method provided in the embodiment of the present invention can execute the above-mentioned blockchain-based medical data processing method to achieve the same technical effect, which will not be repeated here.

[0147] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0148] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A medical data processing method based on blockchain, characterized in that: include: Receive some initial medical and health data of the user, store some initial medical and health data in the initial blockchain, obtain the stored medical and health data, detect the total remaining storage capacity of the initial blockchain, compare the total remaining storage capacity with a preset total remaining storage threshold, and determine whether to send a data migration instruction according to the comparison result; Receive the data migration instruction, respectively detect the node remaining storage capacity corresponding to several storage nodes in the initial blockchain, respectively compare the remaining storage capacity of the several nodes with a preset node remaining storage threshold, obtain a capacity comparison result, calculate the capacity abnormality ratio based on the capacity comparison result, compare the capacity abnormality ratio with a first preset ratio, and obtain a first comparison result; Determine the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtain a security determination result, determine the security anomaly ratio based on the security determination result, compare the security anomaly ratio with a second preset ratio, and obtain a second comparison result; Determine a data migration method based on the first comparison result and the second comparison result, and adjust the preset node remaining storage threshold according to the data migration method; Determine a data migration amount according to the data migration method, determine an initial data migration speed according to the data migration amount, obtain a number of historical data amounts of the stored medical and health data at a preset detection frequency, draw a data change curve based on the number of historical data amounts, analyze the data change curve, and calibrate the initial data migration speed according to the curve analysis result to obtain a target data migration speed; Based on the data migration method and the target data migration speed, data migration is performed on the plurality of stored medical and health data in the initial blockchain to obtain a target blockchain corresponding to the plurality of stored medical and health data after migration.

2. The blockchain-based medical data processing method according to claim 1, characterized in that: The step of calculating the capacity abnormality ratio based on the capacity comparison result includes: Marking the storage nodes corresponding to the plurality of nodes whose remaining storage capacity is less than the preset node remaining storage threshold as first-type abnormal nodes; The number of the first type of abnormal nodes is counted to obtain a first abnormal number, and the capacity abnormality ratio is obtained by performing calculation based on the first abnormal number and the total number corresponding to the plurality of storage nodes.

3. The blockchain-based medical data processing method according to claim 2, characterized in that: The step of determining the node security of the plurality of storage nodes based on the analysis result of the stored medical health data comprises: Detecting the actual amount of medical and health data stored on any of the storage nodes to obtain a data amount detection result; The data loss rate of the stored medical and health data is determined based on the data volume detection result, and the node security of the storage node is determined based on the data loss rate determination result.

4. The blockchain-based medical data processing method according to claim 3 is characterized in that: The step of determining the proportion of security anomalies based on the security judgment result includes: The storage nodes corresponding to the node security anomalies are marked as the second type of abnormal nodes; The number of the second-type abnormal nodes is counted to obtain the second abnormal number, and the security abnormality ratio is obtained by calculating based on the second abnormal number and the total number corresponding to the plurality of storage nodes.

5. The blockchain-based medical data processing method according to claim 4 is characterized in that: The step of determining the data migration method based on the first comparison result and the second comparison result includes: When the capacity abnormality ratio is greater than or equal to the first preset ratio or the security abnormality ratio is greater than or equal to the second preset ratio, determining that the data migration mode is a full migration mode; When the capacity anomaly ratio is less than the first preset ratio and the security anomaly ratio is less than the second preset ratio, it is determined that the data migration mode is an incremental migration mode.

6. The blockchain-based medical data processing method according to claim 5, characterized in that: The step of adjusting the preset node remaining storage threshold according to the data migration method includes: When the data migration mode is a full migration mode, the preset node remaining storage threshold is not adjusted; When the data migration mode is an incremental migration mode, the number of migration nodes is determined, the number of migration nodes is compared with a preset number, and the preset node remaining storage threshold is adjusted according to the comparison result.

7. The blockchain-based medical data processing method according to claim 6, characterized in that: The step of determining the initial data migration speed according to the data migration amount includes: Set the basic data migration speed; Calculate the ratio of the data migration amount to the total amount of medical and health data stored in the initial blockchain as the actual migration ratio; The basic data migration speed is adjusted according to a comparison result between the actual migration ratio and the preset migration ratio to obtain the initial data migration speed.

8. The blockchain-based medical data processing method according to claim 7, characterized in that: The step of analyzing the data change curve comprises: Identify the change trend of the data change curve and obtain a trend identification result; When the changing trend is an upward trend, the historical growth rate is determined.

9. The blockchain-based medical data processing method according to claim 8, characterized in that: The step of calibrating the initial data migration speed according to the curve analysis result comprises: When the change trend is not an upward trend, the initial data migration speed is not calibrated; When the change trend is an upward trend, the historical growth rate is compared with the preset growth rate, a growth factor is calculated based on the comparison result, and the initial data migration speed is calibrated according to the growth factor to obtain the target data migration speed.

10. A system using the blockchain-based medical data processing method according to any one of claims 1 to 9, characterized in that: include: An instruction sending module is used to receive a number of initial medical and health data of the user, store the initial medical and health data in the initial blockchain, obtain the stored medical and health data, detect the total remaining storage capacity of the initial blockchain, compare the total remaining storage capacity with a preset total remaining storage threshold, and determine whether to send a data migration instruction according to the comparison result; a capacity comparison module, connected to the instruction sending module, for receiving the data migration instruction, respectively detecting the node remaining storage capacity corresponding to a plurality of storage nodes in the initial blockchain, respectively comparing the remaining storage capacity of the plurality of nodes with a preset node remaining storage threshold, obtaining a capacity comparison result, calculating a capacity abnormality ratio based on the capacity comparison result, comparing the capacity abnormality ratio with a first preset ratio, and obtaining a first comparison result; A security comparison module, connected to the capacity comparison module, for judging the node security of the plurality of storage nodes based on the analysis result of the stored medical and health data, obtaining a security judgment result, determining a security anomaly ratio based on the security judgment result, comparing the security anomaly ratio with a second preset ratio, and obtaining a second comparison result; a mode determination module, connected to the capacity comparison module and the security comparison module, for determining a data migration mode based on the first comparison result and the second comparison result, and adjusting the preset node remaining storage threshold according to the data migration mode; a speed determination module, connected to the mode determination module, for determining a data migration amount according to the data migration mode, determining an initial data migration speed according to the data migration amount, acquiring a number of historical data amounts of the stored medical and health data at a preset detection frequency, drawing a data change curve based on the number of historical data amounts, analyzing the data change curve, and calibrating the initial data migration speed according to the curve analysis result to obtain a target data migration speed; A migration module is connected to the method determination module and the speed determination module, and is used to migrate the medical and health data stored in the initial blockchain based on the data migration method and the target data migration speed to obtain a target blockchain corresponding to the medical and health data stored after the migration.

Citation Information

Patent Citations

  • Medical data management system based on block chain

    CN111540428A

  • Database cluster data migration method and device and electronic equipment

    CN111324596A

  • Task state detection method and device, computer equipment and storage medium

    CN112131179A