Blockchain-based medical data processing method, device and equipment, and storage medium

By combining blockchain and target particle swarm optimization strategies in medical data processing, the security and computational cost issues in medical data processing are solved, and efficient and secure data sharing and processing are achieved.

CN117527806BActive Publication Date: 2025-11-04CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311537820.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-11-04
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

Current medical data processing suffers from security issues, personal data privacy is difficult to protect, traditional optimization algorithms cannot effectively reduce computing costs and energy consumption, and traditional edge computing suffers from data leakage and server maintenance pressure.

Method used

A blockchain-based medical data processing approach is adopted, combining edge computing and target particle swarm optimization strategy. By making task migration and caching decisions between edge servers and medical devices, the decentralized nature of blockchain is used to ensure data security, and the particle swarm optimization algorithm is used to optimize task latency and energy consumption.

Benefits of technology

It enables safer and more efficient data sharing and processing in medical data processing, reduces the total system cost, protects personal data privacy, and optimizes the allocation and use of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117527806B_ABST
    Figure CN117527806B_ABST
Patent Text Reader

Abstract

The application discloses a kind of medical data processing method, device and equipment based on blockchain, equipment and storage medium, belong to data processing technical field.The present application is triggered by the task calculation request of medical data in response to medical equipment, and the migration strategy is triggered by the task calculation request;Total time delay and total energy consumption of task are calculated based on migration strategy;Optimization result is obtained by using target particle swarm optimization strategy to optimize total time delay and total energy consumption of task;Based on the optimization result, the processing of medical data is carried out, the migration decision and resource allocation are combined, the total cost of system is more comprehensively reduced by multidimensional consideration optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a blockchain-based medical data processing method, apparatus, device, and storage medium. Background Technology

[0002] With the development of the Internet of Things (IoT), the demand for resource-intensive and latency-sensitive applications has increased dramatically, overloading local devices and making it difficult to meet user needs and experience. To address the problems brought about by the explosive growth of data, compute migration technology has emerged. This technology effectively alleviates the computing pressure on local devices and improves data processing efficiency by migrating terminal tasks to other servers. However, the choice of servers for migration is crucial. The first consideration is migrating to cloud servers with powerful computing capabilities. The cloud refers to a cluster of remote computers connected via the internet, providing various computing, storage, and application services. Compared to traditional local computers, the cloud offers greater flexibility, scalability, and reliability, meeting the needs of users of different sizes and requirements, and has become one of the core infrastructures of modern information technology. In the cloud, users can easily create, deploy, and manage applications and data through interfaces and tools provided by cloud service providers. However, because cloud services require a connection to a remote data center via the internet, problems such as high latency and bandwidth congestion may occur in certain scenarios. To solve these problems, edge computing has rapidly emerged as a new computing paradigm. This computing model is a technology that moves computing and storage resources to edge devices closer to the data source, aiming to reduce data transmission latency and network load, and improve data processing efficiency and real-time performance. Compared to the cloud, edge computing focuses more on local data processing and analysis, performing simple computing tasks on different devices, thereby reducing data transmission and storage. The emergence of edge computing fills the gaps in cloud computing in certain scenarios, providing faster, more efficient, and more secure computing and storage services for various industries. For example, in the medical field, edge computing can enable real-time monitoring and diagnosis of vital signs and medical data, thereby improving the efficiency and quality of medical services.

[0003] Blockchain is a distributed public ledger that records transaction information between any nodes in a peer-to-peer network without requiring any trusted third party. Due to its immutability and traceability, blockchain has attracted widespread attention from academia and industry. Integrating blockchain data storage into edge computing can provide stronger guarantees for data security and trustworthiness, bringing more opportunities and challenges to the digital transformation and development of various industries.

[0004] Existing medical data and processing methods pose security risks, making it difficult to guarantee the privacy of personal data. At the same time, frequent data caching can significantly consume server resources and create enormous server maintenance pressure. Summary of the Invention

[0005] The main objective of this invention is to provide a blockchain-based medical data processing method, apparatus, device, and storage medium, aiming to solve the technical problem of high cost in existing medical data processing technologies.

[0006] To achieve the above objectives, this invention provides a blockchain-based medical data processing method. The system model for medical data storage includes an edge layer, a base station, and a medical sensing layer. The edge layer includes an edge server surrounded by multiple blockchain nodes. The medical sensing layer includes multiple medical devices. The blockchain-based medical data processing method is applied to the base station. The method includes:

[0007] In response to a task calculation request for medical data triggered by the medical device, a migration strategy is triggered through the task calculation request;

[0008] Calculate the total task latency and total task energy consumption based on the migration strategy;

[0009] The total latency and total energy consumption of the task are optimized using a target particle swarm optimization strategy to obtain the optimization results.

[0010] The medical data is processed based on the optimization results.

[0011] Optionally, calculating the total task latency and total task energy consumption based on the migration strategy includes:

[0012] When the migration strategy is to migrate computing tasks to the edge server, a caching strategy for acquiring medical data is employed.

[0013] When the caching strategy is to cache medical data to the edge server, the latency of the first task and the energy consumption of the first task are calculated.

[0014] When the migration strategy performs local caching of medical data, the latency of the second task and the energy consumption of the second task are calculated.

[0015] The total task delay is obtained by combining the delay of the first task and the delay of the second task.

[0016] The total energy consumption of the task is obtained by combining the energy consumption of the first task and the energy consumption of the second task.

[0017] Optionally, when the caching strategy is to cache medical data to the edge server, calculating the latency and energy consumption of the first task includes:

[0018] When the caching strategy is to cache medical data to the edge server, the migration value of the medical data, the transmit power of the edge server, the distance from the device to the edge server, the channel gain of the channel, the bandwidth of the sub-channel, and the loss coefficient of the wireless channel are obtained.

[0019] The interference variable is calculated based on the migration value, the transmit power, and the channel gain;

[0020] The uplink transmission rate between the device and the edge server is calculated using the bandwidth, the transmit power, the distance, the migration value, the interference variable, and the loss coefficient.

[0021] The number of transmission tasks, the computing power of the edge server, the number of first uplink sub-channels of the edge server, and the computing speed of the edge server are obtained.

[0022] The transmission task latency is calculated using the number of tasks, the uplink transmission rate, and the migration value.

[0023] The task computation latency is calculated using the number of the first uplink sub-channels, the migration value, the number of tasks, and the computing speed of the edge server.

[0024] The first task delay is obtained by the transmission task delay and the task calculation delay;

[0025] The energy consumption of the first task is calculated based on the computing power of the edge server and the task computing latency.

[0026] Optionally, acquiring the computing power of the edge server includes:

[0027] Obtain the switching rate between the network and the edge server, the load capacitance value of the edge server, and the operating voltage;

[0028] The computing power of the edge server is calculated using the switching rate, the load capacitance value, the computing speed of the edge server, and the operating voltage.

[0029] Optionally, when the migration strategy performs local caching of medical data, calculating the latency of the second task and the energy consumption of the second task includes:

[0030] When the migration strategy performs local caching of medical data, the number of second uplink sub-channels of the local device, the migration value of the medical data, the computing speed of the local device, and the number of transmission tasks are obtained.

[0031] The second task latency is calculated using the number of second uplink sub-channels, the migration value, the computing speed of the local device, and the number of tasks.

[0032] Obtain the computing power of the local device;

[0033] The energy consumption of the second task is calculated based on the computing power of the local device and the latency of the second task.

[0034] Optionally, the optimization of the total task latency and total task energy consumption using a target particle swarm optimization strategy to obtain the optimization result includes:

[0035] Obtain the delay weighting coefficient and the energy consumption weighting coefficient;

[0036] By constraining the total task latency and total task energy consumption using the delay weighting coefficient and the energy consumption weighting coefficient, a first optimization objective is obtained;

[0037] A penalty mechanism is set up using a target particle swarm optimization strategy to transform the first target to be optimized into a second target to be optimized.

[0038] The second target to be optimized is optimized using the target particle swarm optimization strategy to obtain the optimization result.

[0039] Optionally, optimizing the second target using the target particle swarm optimization strategy to obtain the optimization result includes:

[0040] The target particle swarm optimization strategy is used to set inertia weights, random values, local optimal positions of particles, and global optimal positions in the particle swarm.

[0041] The initial velocity of the particle is updated by the inertia weight, the random value, the local optimal position of the particle, and the global optimal position in the particle swarm to obtain the target velocity of the particle.

[0042] Calculate the target fitness value based on the target velocity;

[0043] The second target to be optimized is optimized using the target fitness value to obtain the optimization result.

[0044] Furthermore, to achieve the above objectives, the present invention also proposes a blockchain-based medical data processing device, which includes:

[0045] The response module is used to respond to task calculation requests for medical data triggered by medical devices, and to trigger migration strategies through task calculation requests;

[0046] The computing module is used to calculate the total latency and total energy consumption of the computing task when the migration strategy is to migrate the computing task to the edge server.

[0047] The module is used to optimize the total latency and total energy consumption of the task using a target particle swarm optimization strategy, and obtain the optimization results.

[0048] The processing module is used to process medical data based on the optimization results.

[0049] Furthermore, to achieve the above objectives, the present invention also proposes a blockchain-based medical data processing device, which includes: a memory, a processor, and a blockchain-based medical data processing program stored in the memory and executable on the processor. The blockchain-based medical data processing program is configured to implement the steps of the blockchain-based medical data processing method described above.

[0050] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a blockchain-based medical data processing program, wherein when the blockchain-based medical data processing program is executed by a processor, it implements the steps of the blockchain-based medical data processing method described above.

[0051] This invention responds to a task computation request for medical data triggered by a medical device and triggers a migration strategy based on the task computation request; calculates the total task latency and total task energy consumption based on the migration strategy; optimizes the total task latency and total task energy consumption using a target particle swarm optimization strategy to obtain an optimization result; processes the medical data based on the optimization result, and combines migration decisions and resource allocation. Through multi-dimensional optimization considerations, it more comprehensively reduces the total cost of the system. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the structure of a blockchain-based medical data processing device in the hardware operating environment of the embodiment of the present invention;

[0053] Figure 2 This is a flowchart illustrating the first embodiment of the blockchain-based medical data processing method of the present invention.

[0054] Figure 3 This is a schematic diagram of the system model architecture for medical data storage in one embodiment of the blockchain-based medical data processing method of the present invention;

[0055] Figure 4 This is a flowchart illustrating the second embodiment of the blockchain-based medical data processing method of the present invention.

[0056] Figure 5 This is a flowchart illustrating the third embodiment of the blockchain-based medical data processing method of the present invention.

[0057] Figure 6This is a flowchart illustrating the fourth embodiment of the blockchain-based medical data processing method of the present invention.

[0058] Figure 7 This is a flowchart illustrating the fifth embodiment of the blockchain-based medical data processing method of the present invention.

[0059] Figure 8 This is a flowchart illustrating the use of a target particle swarm optimization strategy in one embodiment of the blockchain-based medical data processing method of the present invention.

[0060] Figure 9 This is a structural block diagram of the first embodiment of the blockchain-based medical data processing device of the present invention.

[0061] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0062] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0063] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of a blockchain-based medical data processing device involved in an embodiment of the present invention.

[0064] like Figure 1 As shown, the blockchain-based medical data processing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0065] Those skilled in the art will understand that Figure 1The structure shown does not constitute a limitation on blockchain-based medical data processing devices and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0066] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a blockchain-based medical data processing program.

[0067] exist Figure 1 In the blockchain-based medical data processing device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the blockchain-based medical data processing device of the present invention can be set in the blockchain-based medical data processing device, and the blockchain-based medical data processing device calls the blockchain-based medical data processing program stored in the memory 1005 through the processor 1001 and executes the blockchain-based medical data processing method provided in the embodiment of the present invention.

[0068] This invention provides a blockchain-based medical data processing method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the blockchain-based medical data processing method of the present invention.

[0069] Current medical data processing suffers from security issues, limited application scope, and insufficient optimization variables. For example, patients in hospitals are distributed across multiple consultation rooms, and data is transmitted at various stages, such as registration at the reception desk and consultation in the treatment room. This means that data and applications may be transmitted in different network environments, significantly increasing the risk of data leakage and security threats. Medical data contains sensitive personal information, such as medical records, diagnoses, and treatment plans. This information is vulnerable to hacking attacks, internal leaks, and human tampering during transmission, making it difficult to ensure data security and integrity. Edge servers are also typically distributed across multiple locations, making them susceptible to attacks and data leakage. Therefore, current data migration for edge computing struggles to guarantee patient privacy. When migrating computing data, it is necessary to consider how to protect the security of sensitive data and applications. Current research uses traditional mathematical optimization methods to optimize energy consumption and latency during data transmission. However, when faced with complex, high-dimensional optimization problems with constraints or noise and uncertainty, these methods often only find local optima, not global optima. This is because these algorithms typically use gradient information for optimization. If the initialization point is inappropriate or multiple local optima exist, the algorithm may get stuck in one of them and be unable to escape. Furthermore, there are difficulties in handling constraints. If the problem has constraints, additional techniques are needed to incorporate them. This can make the algorithm more complex and increase its runtime. Meanwhile, traditional mathematical optimization algorithms often face the problem of computational complexity explosion when dealing with high-dimensional problems; that is, the runtime of the algorithm increases exponentially with the increase of the problem's dimensionality. Current optimization problems in this field fail to achieve joint optimization from multiple dimensions. For example, they only focus on single aspects such as communication resources, computing resources, migration strategies, and caching strategies, and only use minimizing latency or energy consumption as the optimization objective. This failure to integrate multi-dimensional considerations results in a singular optimization objective and poor performance. There are also security issues with caching. Existing research focuses on reducing data transmission latency and energy consumption by using server-built-in caching, but it ignores the fact that storing data in the server's cache can expose data to the public environment, making it difficult to guarantee the privacy of personal data. At the same time, frequent data caching can also consume a lot of server energy and space, bringing huge server operation and maintenance pressure.

[0070] This embodiment designs a blockchain-enabled medical data storage system model. By overlaying blockchain nodes on top of a two-layer model consisting of an edge layer and a medical perception layer, it utilizes its storage fusion technology to form data protection for each stage of patient visits and doctor diagnoses, preventing data leakage. Furthermore, it employs a target particle swarm optimization algorithm, which retains the ability of particle swarm optimization to handle high-dimensional optimization problems while improving it to be applicable to complex optimization problems of both continuous and discrete types. This solves the problem that traditional algorithms can only handle continuous / discrete optimization problems in isolation.

[0071] In this embodiment, the system model for medical data storage includes an edge layer, a base station, and a medical sensing layer. The edge layer includes an edge server, and multiple blockchain nodes are set up around the edge server. The medical sensing layer includes multiple medical devices.

[0072] Integrating blockchain data storage into edge computing in the medical field enables real-time authentication, secure encryption, and audit traceability of data generated by edge devices, ensuring that data is not tampered with or stolen during transmission and processing. Simultaneously, the decentralized and distributed nature of blockchain allows for trusted verification and control of data interactions between multiple edge devices, preventing malicious attacks and data leaks. Figure 3 As shown, Figure 3 This is a schematic diagram of the system model architecture for medical data storage in this embodiment, which is mainly divided into two layers: the edge layer and the medical perception layer. The edge layer is located at the top and mainly includes edge servers covering medical terminals. At the same time, multiple blockchain nodes are set up around the edge servers for data storage. The medical perception layer is located at the bottom and mainly includes multiple intelligent medical devices, such as intelligent triage systems, intelligent diagnostic devices, and other intelligent terminal devices.

[0073] Medical case information is a crucial component of personal medical data. To facilitate the sharing of medical case data, this method utilizes blockchain to construct a distributed model. The perception layer of this model involves hospitals, medical institutions, and third-party data users, who deploy blockchain nodes at the bottom. This method combines traditional databases with blockchain technology, deploying patient personal data and individual case records on edge computing nodes for localized storage. Simultaneously, this model innovatively integrates caching decisions during computational migration, ensuring that patient information feature values ​​and summaries are stored on the chain, guaranteeing data integrity and immutability. Furthermore, this method assigns different levels of sharing permissions, divided into three tiers: the highest tier is the super administrator, i.e., the hospital's internal staff, with full CRUD (Create, Read, Update, Delete) permissions; the next tier is the ordinary administrator, i.e., the medical institution, with view and delete permissions; and the lowest tier is the third-party data user, whose permissions are limited to view. Each administrator and user submits an application, such as to view case records, which is then approved and permissions are assigned by the super administrator. This ensures that users with different permissions can only access the specified data types and volumes. Data users can search for patient characteristic information on the blockchain and share patient medical record data, recording the sharing process and information, such as data source, destination, and purpose, to improve the security of medical data storage and sharing. Finally, personal evidence data (including personal medical records, examination data, etc.) can be uploaded to the nearest edge cloud and synchronized to all nodes through the blockchain network, enabling convenient data sharing and efficient management.

[0074] The blockchain-based medical data processing method is applied to the base station, and the method includes the following steps:

[0075] Step S10: Respond to the task calculation request for medical data triggered by the medical device, and trigger the migration strategy through the task calculation request.

[0076] It should be noted that the execution subject in this embodiment is the base station in the system model of medical data storage. However, when medical data processing is required, the terminal's medical device triggers a task calculation request for medical data to the base station. The base station responds to this task calculation request and triggers a migration strategy through this task calculation request.

[0077] In this layer, medical devices send task computation requests to edge servers (ES) via base stations (BS). Due to the limited resources of local medical devices and their high sensitivity to latency and energy consumption, we migrate some tasks to ES for processing through computation migration.

[0078] Step S20: Calculate the total task latency and total task energy consumption based on the migration strategy.

[0079] It should be noted that the migration strategy can be to migrate the computing task to the edge server or not. If it is not migrated to the edge server, it is processed directly on the local machine and output to the optimal set of variables to obtain the minimum latency and energy consumption weighted sum.

[0080] If the migration strategy is to migrate computing tasks to edge servers, then it is necessary to calculate the total latency and total energy consumption of the tasks.

[0081] In practical implementation, if the migration value a = 1, the migration strategy is to migrate the computing task to the edge server. Before transmission, the device should determine whether the Elasticsearch (ES) is currently processing other tasks. If the ES is processing a task (i.e., is busy), a task will be stored in queue Q. W Waiting in the middle. We model this as an M / M / 1 queue.

[0082] Due to the unique nature of the medical environment, patients have high requirements for the protection of their personal data during task transmission. Furthermore, unpredictable factors during transmission could lead to data tampering. Therefore, it's possible to first check if the data is stored on the blockchain nodes. If the patient's personal data is already stored on the blockchain nodes, the cache value b = 1, and the patient's medical records can be directly shared through the blockchain. The sharing process and information are recorded on the chain, including the data source, destination, and purpose, ensuring the security of patient data privacy. If no data is stored on the chain, the cache value b = 0, and the personal data can be uploaded to the nearest edge server for calculation. Finally, it is synchronized to all nodes through the blockchain network and the task request is returned. This effectively avoids some security threats associated with traditional caching and reduces server maintenance costs.

[0083] For example, when migrating a computing task to an edge server, there are two cases. The first case is that the cache value b is 1, which means that the data has been stored in the blockchain, so it is returned directly. The second case is that the cache value b is 0, which means that the data has not been stored, so computing processing is required to calculate the total latency and total energy consumption of the task.

[0084] Step S30: Use the target particle swarm optimization strategy to optimize the total task latency and total task energy consumption, and obtain the optimization results.

[0085] In its implementation, the target particle swarm optimization strategy is an improved particle swarm optimization algorithm, which improves upon the traditional particle swarm optimization algorithm. First, inequality constraints are transformed into equality constraints using optimization methods and added to the problem, thereby using a penalty function to transform the constrained problem into an unconstrained problem. Next, dynamic inertia weights are added to achieve fast convergence and avoid getting trapped in local optima. Simultaneously, the input strategy of the algorithm is improved, making it suitable for both discrete and continuous optimization problems.

[0086] Therefore, the total latency and total energy consumption of the task can be optimized through the target particle swarm optimization strategy to obtain the optimization results.

[0087] Step S40: Process the medical data based on the optimization results.

[0088] It should be noted that after obtaining the optimization results, the optimal latency and energy consumption can be obtained based on the optimization results. In this way, medical data can be migrated and calculated using the optimal latency and energy consumption, thereby improving processing security and efficiency.

[0089] This embodiment responds to a task computation request for medical data triggered by a medical device, and triggers a migration strategy through the task computation request; calculates the total task latency and total task energy consumption based on the migration strategy; optimizes the total task latency and total task energy consumption using a target particle swarm optimization strategy to obtain the optimization result; processes the medical data based on the optimization result, and combines migration decision-making and resource allocation. Through multi-dimensional optimization considerations, the total cost of the system is reduced more comprehensively.

[0090] refer to Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the blockchain-based medical data processing method of the present invention.

[0091] Based on the first embodiment described above, step S20 of the blockchain-based medical data processing method in this embodiment specifically includes:

[0092] Step S201: When the migration strategy is to migrate computing tasks to the edge server, obtain the caching strategy for medical data.

[0093] It should be noted that when the migration value a = 1, the migration strategy is to migrate the computing task to the edge server, but there are two caching strategies, so the caching strategy for this medical data can be obtained.

[0094] Step S202: When the caching strategy is to cache medical data to the edge server, calculate the latency of the first task and the energy consumption of the first task.

[0095] It should be noted that when there is no cache at the edge server, i.e., the cache value b=0, the patient's personal medical data can be uploaded to the nearest edge server for calculation, and finally synchronized to all nodes through the blockchain network.

[0096] In practical implementation, the latency and energy consumption required to cache medical data to the edge server can be calculated, including task computation latency and transmission task latency. The task computation latency and transmission task latency are taken as the first task latency, and the first task energy consumption is the energy consumption when caching medical data to the edge server.

[0097] Step S203: When the migration strategy performs local caching of medical data, calculate the latency of the second task and the energy consumption of the second task.

[0098] It should be noted that when the task decides to perform the calculation locally, b=0, which can calculate the latency of medical data being calculated locally and the local energy consumption, i.e., the latency of the second task and the energy consumption of the second task.

[0099] Step S204: Obtain the total task delay by using the delay of the first task and the delay of the second task.

[0100] In practice, the latency of the first task and the latency of the second task can be added together to obtain the total latency of the task. The total latency of the task includes the latency of medical data being cached locally and the latency of migrating to the edge server.

[0101] Step S205: Obtain the total energy consumption of the task through the energy consumption of the first task and the energy consumption of the second task.

[0102] In practice, the energy consumption of the first task and the energy consumption of the second task can be added together to obtain the total energy consumption of the task. The total energy consumption of the task includes the energy consumed by caching medical data locally and migrating it to the edge server.

[0103] In this embodiment, when the migration strategy is to migrate the computing task to the edge server, a caching strategy for medical data is obtained; when the caching strategy is to cache medical data on the edge server, a first task latency and a first task energy consumption are calculated; when the caching strategy is to cache medical data locally, a second task latency and a second task energy consumption are calculated; the total task latency is obtained through the first task latency and the second task latency; the total task energy consumption is obtained through the first task energy consumption and the second task energy consumption. Corresponding task latency and task energy consumption calculations are performed according to different migration strategies to optimize resource allocation and migration decisions.

[0104] refer to Figure 5 , Figure 5 This is a flowchart illustrating the third embodiment of the blockchain-based medical data processing method of the present invention.

[0105] Based on the first and second embodiments described above, step S202 of the blockchain-based medical data processing method in this embodiment specifically includes:

[0106] Step S2021: When the caching strategy is to cache medical data to the edge server, obtain the migration value of the medical data, the transmit power of the edge server, the distance from the device to the edge server, the channel gain of the channel, the bandwidth of the sub-channel, and the loss coefficient of the wireless channel.

[0107] It should be noted that, based on Shannon's theory, this embodiment defines the uplink transmission rate of task i between device i and edge server ES as follows: Equation 1:

[0108]

[0109] In Equation 1 above, R1 is the uplink transmission rate. Let P be the channel gain of channel i. i tra For the transmit power of the edge server, a i Here, d represents the migration value of medical data, d is the distance from the device to the edge server, and B is the bandwidth of the sub-channel. This represents the loss coefficient of the wireless channel.

[0110] Therefore, by obtaining the migration value of medical data, the transmit power of the edge server, the distance from the device to the edge server, the channel gain of the channel, the bandwidth of the sub-channel, and the loss coefficient of the wireless channel, it is easy to calculate the uplink transmission rate between the device and the edge server. Since the cost of the uplink is much higher than that of the downlink, the latency and energy consumption during data downlink are not considered for the time being.

[0111] Step S2022: Calculate the interference variable based on the migration value, the transmit power, and the channel gain.

[0112] It should be noted that, due to interference from other channels, an interference variable is added to the uplink transmission rate R1 in this embodiment. The interference variable is calculated as follows:

[0113]

[0114] In Equation 2 above, I is the interference variable, and a z For the migration value of medical data, For the transmit power of the edge server, The channel gain is the interference variable, which can be calculated using Equation 2 above.

[0115] Step S2023: Calculate the uplink transmission rate between the device and the edge server using the bandwidth, the transmission power, the distance, the migration value, the interference variable, and the loss coefficient.

[0116] In practical implementation, the uplink transmission rate of the task can be derived as Equation 3:

[0117]

[0118] As shown in Equation 3 above, the uplink transmission rate varies with interference, and the interference varies with transmission power. By optimizing transmission power, energy consumption and communication resources can be optimized. Therefore, the uplink transmission rate between the device and the edge server can be calculated using bandwidth, transmission power, distance, migration value, interference variables, and loss coefficient.

[0119] Step S2024: Obtain the number of transmission tasks, the computing power of the edge server, the number of first uplink sub-channels of the edge server, and the computing speed of the edge server.

[0120] It should be noted that when there is no cache at the edge server, i.e. b=0, medical data can be uploaded to the nearest edge server for calculation, and finally synchronized to all nodes through the blockchain network. The transmission task latency is related to the number of transmission tasks, the computing power of the edge server, the number of first uplink sub-channels on the edge server, and the computing speed of the edge server.

[0121] Therefore, the number of transmission tasks D and the computing power P of the edge server can be obtained. i com The number of first uplink sub-channels C of the edge server es And the computing speed f of edge servers es .

[0122] It should be noted that the computing speed f of the edge server es The CPU computing speed of the edge server is the CPU clock frequency (cycles / second) of task i's ES.

[0123] In practical implementation, the computing power of the edge server can be adjusted by changing the voltage. Therefore, obtaining the computing power of the edge server includes: obtaining the switching rate between the network and the edge server, the load capacitance value of the edge server, and the operating voltage; and calculating the computing power of the edge server using the switching rate, the load capacitance value, the computing speed of the edge server, and the operating voltage.

[0124] In the specific implementation, Dynamic Voltage Frequency Regulation (DVFS) technology is adopted. It is a real-time voltage frequency regulation technology that can adjust the computing power of the edge server by changing the voltage within a certain range. In CMOS integrated circuits, the computing power of the edge server is the sum of dynamic power and static power. Compared with dynamic power, static power is very low. Therefore, if the static power is 0, then the computing power of the edge server = dynamic power.

[0125] It is understandable that dynamic power is related to the switching rate of the network or logic element compared to its ES input, the load capacitance of the edge server, and the operating voltage; therefore, the switching rate ε between the network and the edge server can be obtained. es The load capacitance value C of the edge server load And the operating voltage V.

[0126] Because the CPU clock frequency of ES is usually linearly related to the operating voltage, the computing power of the edge server is as follows: Equation 4:

[0127] P i com =ε es C load f es V 2 (Equation 4)

[0128] In equation 4 above, P i com For the computing power of edge servers, ε es f is the switching speed between the network and edge servers. es To improve the computing speed of edge servers, dynamic voltage regulation technology is used to dynamically adjust the computing power of edge servers, avoiding detachment from real-world scenarios, effectively simulating the uncertainties of real-world scenarios, and ensuring the effectiveness of the method.

[0129] Step S2025: Calculate the transmission task delay using the number of tasks, the uplink transmission rate, and the migration value.

[0130] It should be noted that the process of calculating the transmission task delay is as follows: Equation 5:

[0131]

[0132] In Equation 5 above, t1 is the transmission task delay, D is the number of tasks, and R1 is the uplink transmission rate.

[0133] Step S2026: Calculate the task computation latency using the number of the first uplink sub-channels, the migration value, the number of tasks, and the computation speed of the edge server.

[0134] In practical implementation, the task computation delay is calculated as follows: Equation 6:

[0135]

[0136] In Equation 6 above, t2 is the task computation delay, and f es For the computing speed of edge servers, C es This represents the number of the first uplink sub-channels.

[0137] Step S2027: Obtain the first task delay by using the transmission task delay and the task calculation delay.

[0138] In practice, the delay of the first task = the delay of the transmission task t1 + the delay of the task calculation t2.

[0139] Step S2028: Calculate the energy consumption of the first task based on the computing power of the edge server and the task computing latency.

[0140] In practical implementation, the energy consumption of task i is calculated as shown in Equation 7:

[0141]

[0142] In Equation 7 above, e1 represents the energy consumption of the first task, and P... i com t2 represents the computing power of the edge server, and t2 represents the task computation latency. When the result is cached in Elasticsearch (ES), b = 1. At this point, the patient's personal data has been stored in the blockchain node, and the cached value b = 1. The patient's medical record data can be directly shared through the blockchain, and the sharing process and information are recorded on the chain, including the data source, destination, and purpose, ensuring the security of patient data privacy. This mechanism forms a sharing platform where data users can locate the patient's module information on the chain, and personal data is shared through the blockchain. Simultaneously, the sharing process and information are recorded on the chain, including the data source, destination, and purpose. The computation result will then be directly returned to the device.

[0143] In this embodiment, when the caching strategy is to cache medical data to the edge server, the migration value of the medical data, the transmit power of the edge server, the distance from the device to the edge server, the channel gain, the bandwidth of the sub-channel, and the loss coefficient of the wireless channel are obtained; an interference variable is calculated based on the migration value, the transmit power, and the channel gain; the uplink transmission rate between the device and the edge server is calculated using the bandwidth, the transmit power, the distance, the migration value, the interference variable, and the loss coefficient; and the number of transmission tasks, the computing power of the edge server, the number of the first uplink sub-channels of the edge server, and the edge server's... The system calculates the computation speed; it calculates the transmission task latency using the number of tasks, the uplink transmission rate, and the migration value; it calculates the task computation latency using the number of first uplink sub-channels, the migration value, the number of tasks, and the computation speed of the edge server; it obtains the first task latency using the transmission task latency and the task computation latency; and it calculates the first task energy consumption using the computation capability of the edge server and the task computation latency. This allows for the rapid calculation of the first task latency and energy consumption required to migrate medical data to the edge server, enabling data transmission. The system records the sharing process and information on the blockchain, recording the data source, destination, and purpose, thus ensuring the security of patient data privacy.

[0144] refer to Figure 6 , Figure 6 This is a flowchart illustrating the fourth embodiment of the blockchain-based medical data processing method of the present invention.

[0145] Based on the first and second embodiments described above, step S203 of the blockchain-based medical data processing method in this embodiment specifically includes:

[0146] Step S2031: When the migration strategy performs local caching of medical data, obtain the number of second uplink sub-channels of the local device, the migration value of the medical data, the calculation speed of the local device, and the number of transmission tasks.

[0147] In specific implementation, if the migration strategy is to cache medical data locally, then the migration value a = 0. The task latency of caching tasks locally is related to the number of second uplink sub-channels of the local device, the migration value of medical data, the computing speed of the local device, and the number of transmission tasks. Therefore, the number of second uplink sub-channels of the local device, the migration value of medical data, the computing speed of the local device, and the number of transmission tasks can be obtained.

[0148] Step S2032: Calculate the second task delay using the number of the second uplink sub-channels, the migration value, the computing speed of the local device, and the number of tasks.

[0149] Understandably, the process of calculating the delay of the second task is as follows: Equation 8:

[0150]

[0151] In Equation 8 above, t3 is the delay of the second task, and a i C is the transition value. loc Where f is the number of second uplink sub-channels, D is the number of tasks, and f loc This refers to the computing speed of the local device.

[0152] Step S2033: Obtain the computing power of the local device.

[0153] In practice, the computing power of the local device can be obtained, thereby allowing the calculation of the energy consumption of the second task.

[0154] It should be noted that the calculation process for the computing power of the local device is as follows: Equation 9:

[0155] P i loc =ε loc C load 'f loc V' (Equation 9)

[0156] In equation 9 above, P i loc For the computing power of local devices, ε loc f represents the switching rate of the local device. loc This refers to the computing speed of the local device. load V' represents the load capacitance of the local device, and V' represents the operating voltage of the local device.

[0157] Step S2034: Calculate the energy consumption of the second task based on the computing power of the local device and the latency of the second task.

[0158] It should be noted that the energy consumption of the second task can be calculated based on the computing power of the local device and the latency of the second task, as shown in Equation 9 below:

[0159] e2=ε loc C load '(f loc ) 2 (1-a i C loc D (Equation 10)

[0160] In Equation 10 above, e2 represents the energy consumption of the second task, and C loc denoted as the number of second uplink sub-channels, and D as the number of tasks.

[0161] In this embodiment, when the migration strategy is to locally cache medical data, the number of second uplink sub-channels of the local device, the migration value of the medical data, the computing speed of the local device, and the number of transmission tasks are obtained; the second task latency is calculated using the number of second uplink sub-channels, the migration value, the computing speed of the local device, and the number of tasks; the computing power of the local device is obtained; and the energy consumption of the second task is calculated using the computing power of the local device and the second task latency. This allows for the rapid calculation of the task latency and energy consumption required for local caching of medical data based on relevant data from the local device.

[0162] refer to Figure 7 , Figure 7 This is a flowchart illustrating the fifth embodiment of the blockchain-based medical data processing method of the present invention.

[0163] Based on the first embodiment described above, step S30 of the blockchain-based medical data processing method in this embodiment specifically includes:

[0164] Step S301: Obtain the delay weighting coefficient and energy consumption weighting coefficient.

[0165] It should be noted that in this embodiment, the total latency and total energy consumption of task i are defined as T, respectively. i and E i , represented by the following equations 11 and 12:

[0166]

[0167]

[0168] This embodiment constructs an optimization problem that minimizes the weighted sum of latency and energy consumption in medical data transmission. For task i, the migration value a, cache value b, local processor computing speed (clock frequency) f, and edge server transmission power P are used as optimization variables for joint optimization. The total cost of task set K is calculated as follows: Equation 13:

[0169]

[0170] In Equation 13, T represents the total latency of the task, E represents the total energy consumption of the task, and ξ1 and ξ2 are the latency weighting coefficient and the energy consumption weighting coefficient, respectively. Equation 13 shows that the total latency and energy consumption of the task are related to the weighting coefficients; therefore, the latency weighting coefficient and the energy consumption weighting coefficient can be obtained respectively.

[0171] Step S302: Constrain the total task latency and total task energy consumption by using the delay weight coefficient and the energy consumption weight coefficient to obtain the first optimization target.

[0172] To increase the robustness of the system and enhance the dynamic adaptability of the model, constraints can be placed on the total task latency and total task energy consumption, both within [0,1]. The total task latency is defined as T = max(T1,T2,...,T...). N The total energy consumption for the task is set to...

[0173] The specific optimization problem is as follows: Equation 14:

[0174]

[0175] Transforming Equation 14, we obtain the first target P1 to be optimized, as shown in Equation 15:

[0176]

[0177] Step S303: Use the target particle swarm optimization strategy to set a penalty mechanism to transform the first target to be optimized into a second target to be optimized.

[0178] In practical implementation, analysis of the first optimization objective P1 reveals that this optimization problem is a mixed-integer nonlinear unconstrained programming problem, making it difficult to effectively solve the discrete solution space using traditional methods such as gradient descent. Furthermore, some classic heuristic algorithms, such as genetic algorithms, are only suitable for discrete problems. Traditional particle swarm optimization (PSO) is only applicable to continuous optimization problems. Therefore, this embodiment improves upon the traditional PSO algorithm. First, inequality constraints are transformed into equality constraints using optimization methods and added to the problem, thereby using a penalty function to transform the constrained problem into an unconstrained one. Then, dynamic inertia weights are added to achieve rapid convergence and avoid getting trapped in local optima. Simultaneously, the algorithm's input strategy is improved, making it suitable for both discrete and continuous optimization problems.

[0179] like Figure 8 As shown, Figure 8 The flowchart illustrates the process of using the target particle swarm optimization strategy. First, the particle swarm and parameters are initialized, and the time is initialized. Set t=1, calculate the objective function value (fitness), and update the local optimum and global optimum. Determine whether it is the optimum or the maximum number of iterations has been reached. If yes, output the optimal objective function value (fitness) and complete the optimization. If not, set the time t to t+1 and continue the optimization.

[0180] In practice, a penalty mechanism can be set up to convert the first target to be optimized into the second target to be optimized.

[0181] According to the constraint max(T1,T2,...,T) N )≤T max It can be known that: T max ≥t3, therefore Therefore, it can be deduced that... From the energy consumption calculation formula, we can see that e2 and f loc They are positively correlated; therefore, the optimal computing speed of the local device can be obtained as Equation 16:

[0182]

[0183] The optimal energy consumption of a local device can be expressed as Equation 17:

[0184]

[0185] Accordingly, the energy consumption will be updated to E. i The optimization problem can be represented as the second objective to be optimized:

[0186]

[0187] Step S304: Optimize the second target to be optimized using the target particle swarm optimization strategy to obtain the optimization result.

[0188] In practice, for the second objective to be optimized, a penalty function can be used to transform the constrained problem into an unconstrained problem, thereby achieving the optimization of the second objective and obtaining the optimization result.

[0189] Optionally, step S304 specifically includes: setting inertia weights, random values, local optimal positions of particles, and global optimal positions in the particle swarm through the target particle swarm optimization strategy; updating the initial velocity of particles through the inertia weights, random values, local optimal positions of particles, and global optimal positions in the particle swarm to obtain the target velocity of particles; calculating the target fitness value based on the target velocity; and optimizing the second target to be optimized through the target fitness value to obtain the optimization result.

[0190] Suppose there are 3N dimensions, and M particles form a group. The initial vector of particle i is represented by a 3N-dimensional vector as follows:

[0191]

[0192] Combining the four optimization variables, it can be expressed as follows: Equation 20:

[0193]

[0194] The initial velocity vector of particle i is: The initial velocity is set to a random number from 0 to J. In the m-th dimension (m∈{1,2,...,3N}) and the n-th iteration, the velocity is updated as follows:

[0195]

[0196] In Equation 21 above, ω is the inertia weight. When ω increases, the global optimization ability is stronger, but the convergence speed is slower; conversely, the local optimization ability is stronger, and the convergence speed is faster. c1 and c2 are the factors for individual and group learning, respectively. r1 and r2 are random (r1, r2 ∈ (0, 1)). This represents the local optimal position of particle i in the m-th dimension and the n-th iteration; It is the globally optimal position in the particle swarm. The formula for updating the m-dimensional position of particle i is:

[0197] The fitness function of the particle swarm can be expressed as an optimization problem:

[0198]

[0199] P1-P6 represent the penalty function. In the PSO algorithm, the inertia weight ω is the most important factor in adjusting the global and local search. Adaptive inertia weight is applied to the particle swarm algorithm to avoid getting trapped in local optima. The expression for the inertia weight is:

[0200]

[0201] ω max ,ω min Wherein represents the upper and lower limits of the inertia weight. It is the minimum fitness of all particles in n iterations; It represents the average fitness of all particles over n iterations. The smaller the fitness, the closer it is to the optimal solution, and the more local search is needed; the larger the fitness, the further it is from the optimal solution, and the more global search is needed.

[0202] At the same time, this method sets a speed limit, as shown in Equation 24:

[0203]

[0204] Where v max This represents the upper limit of particle velocity. Local and global optima are updated in the following way:

[0205]

[0206]

[0207] The initial velocity of the particle can be updated using Equations 19-26 above, thereby obtaining the target velocity of the particle. The optimal fitness value can then be calculated based on the target velocity, thereby optimizing the second target core to be optimized, and obtaining the optimal total task latency and total task energy consumption. The optimization result is the optimal total task latency and total task energy consumption. The optimization result can then be used to optimize the processing of medical data.

[0208] This embodiment obtains latency weighting coefficients and energy consumption weighting coefficients; constrains the total latency and total energy consumption of the task using these coefficients to obtain a first optimization target; uses a target particle swarm optimization strategy to set a penalty mechanism, transforming the first optimization target into a second optimization target; optimizes the second optimization target using the target particle swarm optimization strategy to obtain the optimization result. It optimizes data processing costs from multiple dimensions, jointly optimizing migration strategies, caching strategies, and resource allocation, with the goal of optimizing the weighted sum of latency and energy consumption, thus constructing a more comprehensive problem.

[0209] Reference Figure 9 , Figure 9 This is a structural block diagram of the first embodiment of the blockchain-based medical data processing device of the present invention.

[0210] like Figure 9 As shown, the blockchain-based medical data processing device proposed in this embodiment of the invention includes:

[0211] The response module 10 is used to respond to the task calculation request for medical data triggered by the medical device, and to trigger the migration strategy through the task calculation request.

[0212] The computing module 20 is used to calculate the total latency and total energy consumption of the computing task when the migration strategy is to migrate the computing task to the edge server.

[0213] Module 30 is used to optimize the total latency and total energy consumption of the task using a target particle swarm optimization strategy, and obtain the optimization results.

[0214] Processing module 40 is used to process medical data based on the optimization results.

[0215] This embodiment responds to a task computation request for medical data triggered by a medical device and triggers a migration strategy based on the task computation request; calculates the total task latency and total task energy consumption based on the migration strategy; optimizes the total task latency and total task energy consumption using a target particle swarm optimization strategy to obtain the optimization result; processes the medical data based on the optimization result, and combines migration decision-making and resource allocation. Through multi-dimensional optimization considerations, the total cost of the system is reduced more comprehensively.

[0216] In one embodiment, the computing module 20 is further configured to: obtain a caching strategy for medical data when the migration strategy is to migrate the computing task to the edge server; calculate a first task latency and a first task energy consumption when the caching strategy is to cache medical data to the edge server; calculate a second task latency and a second task energy consumption when the migration strategy is to cache medical data locally; obtain the total task latency using the first task latency and the second task latency; and obtain the total task energy consumption using the first task energy consumption and the second task energy consumption.

[0217] In one embodiment, the computing module 20 is further configured to, when the caching strategy is to cache medical data to the edge server, acquire the migration value of the medical data, the transmit power of the edge server, the distance from the device to the edge server, the channel gain of the channel, the bandwidth of the sub-channel, and the loss coefficient of the wireless channel; calculate the interference variable based on the migration value, the transmit power, and the channel gain; calculate the uplink transmission rate between the device and the edge server using the bandwidth, the transmit power, the distance, the migration value, the interference variable, and the loss coefficient; acquire the number of transmission tasks, the computing power of the edge server, the number of first uplink sub-channels of the edge server, and the computing speed of the edge server; calculate the transmission task latency using the number of tasks, the uplink transmission rate, and the migration value; calculate the task computing latency using the number of first uplink sub-channels, the migration value, the number of tasks, and the computing speed of the edge server; obtain the first task latency using the transmission task latency and the task computing latency; and calculate the first task energy consumption using the computing power of the edge server and the task computing latency.

[0218] In one embodiment, the computing module 20 is further configured to obtain the switching rate between the network and the edge server, the load capacitance value of the edge server, and the operating voltage; and to calculate the computing power of the edge server using the switching rate, the load capacitance value, the computing speed of the edge server, and the operating voltage.

[0219] In one embodiment, the computing module 20 is further configured to, when the migration strategy is to locally cache medical data, obtain the number of second uplink sub-channels of the local device, the migration value of the medical data, the computing speed of the local device, and the number of transmission tasks; calculate the second task latency using the number of second uplink sub-channels, the migration value, the computing speed of the local device, and the number of tasks; obtain the computing power of the local device; and calculate the second task energy consumption using the computing power of the local device and the second task latency.

[0220] In one embodiment, the module 30 is further configured to obtain a latency weighting coefficient and an energy consumption weighting coefficient; constrain the total task latency and the total task energy consumption using the latency weighting coefficient and the energy consumption weighting coefficient to obtain a first target to be optimized; set a penalty mechanism using a target particle swarm optimization strategy to convert the first target to be optimized into a second target to be optimized; and optimize the second target to be optimized using the target particle swarm optimization strategy to obtain an optimization result.

[0221] In one embodiment, the module 30 is further configured to set inertia weights, random values, local optimal positions of particles, and global optimal positions in the particle swarm through the target particle swarm optimization strategy; update the initial velocity of the particles through the inertia weights, random values, local optimal positions of particles, and global optimal positions in the particle swarm to obtain the target velocity of the particles; calculate the target fitness value based on the target velocity; and optimize the second target to be optimized through the target fitness value to obtain the optimization result.

[0222] Furthermore, this embodiment of the invention also proposes a storage medium storing a blockchain-based medical data processing program, which, when executed by a processor, implements the steps of the blockchain-based medical data processing method described above.

[0223] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0224] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0225] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0226] In addition, for technical details not described in detail in this embodiment, please refer to the blockchain-based medical data processing method provided in any embodiment of the present invention, which will not be repeated here.

[0227] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0228] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0229] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0230] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A blockchain-based medical data processing method, characterized in that, The system model of medical data storage includes an edge layer, a base station and a medical perception layer, the edge layer includes an edge server, a plurality of blockchain nodes are arranged around the edge server, the medical perception layer includes a plurality of medical devices, the blockchain-based medical data processing method is applied to the base station, and the method comprises: In response to the task calculation request of the medical data triggered by the medical device, a migration strategy is triggered through the task calculation request; When the migration strategy is to migrate the computing task to the edge server, a caching strategy of the medical data is obtained; if the medical data has been stored in the blockchain node, the caching strategy is to share the medical data through the blockchain node, and the task calculation request is returned; if the medical data storage is not included in the blockchain node, it is determined that the caching strategy is to cache nearby to the edge server for calculation, and then the calculation result is synchronized to all blockchain nodes through the blockchain network, and the task calculation request is returned; The method further comprises: When the caching strategy is to cache the medical data to the edge server, a migration value of the medical data, a transmission power of the edge server, a distance from the device to the edge server, a channel gain of a channel, a bandwidth of a subchannel and a loss coefficient of a wireless channel are obtained; an interference variable is calculated according to the migration value, the transmission power and the channel gain; the uplink transmission rate between the device and the edge server is calculated through the bandwidth, the transmission power, the distance, the migration value, the interference variable and the loss coefficient; the task quantity of the transmission task, the computing capacity of the edge server, the first uplink subchannel quantity of the edge server and the computing speed of the edge server are obtained; the transmission task delay is calculated through the task quantity, the uplink transmission rate and the migration value; the task calculation delay is calculated through the first uplink subchannel quantity, the migration value, the task quantity and the computing speed of the edge server; the first task delay is obtained by the transmission task delay and the task calculation delay; the first task energy consumption is calculated by the computing capacity of the edge server and the task calculation delay; When the migration strategy is to cache the medical data locally, the second task delay and the second task energy consumption are calculated; The total task delay is obtained by the first task delay and the second task delay; The total task energy consumption is obtained by the first task energy consumption and the second task energy consumption; The target particle swarm optimization strategy is used to optimize the total task delay and the total task energy consumption to obtain an optimization result; Based on the optimization result, the medical data is processed. 2.The blockchain-based medical data processing method of claim 1, wherein, The computing capacity of the edge server is obtained, comprising: The switching rate between the network and the edge server, the load capacitance value of the edge server and the working voltage are obtained; The computing capacity of the edge server is calculated by the switching rate, the load capacitance value, the computing speed of the edge server and the working voltage. 3.The blockchain-based medical data processing method of claim 1, wherein, The second task delay and the second task energy consumption are calculated when the migration strategy is to locally cache the medical data. When the migration strategy is to locally cache the medical data, the second uplink subchannel quantity of the local device, the migration value of the medical data, the calculation speed of the local device, and the task quantity of the transmission task are obtained. The second task delay is calculated through the second uplink subchannel quantity, the migration value, the calculation speed of the local device, and the task quantity. The calculation capability of the local device is obtained. The second task energy consumption is calculated through the calculation capability of the local device and the second task delay. 4.The blockchain-based medical data processing method of claim 1, wherein, The total task delay and the total task energy consumption are optimized using a target particle swarm optimization strategy to obtain an optimization result, including: The delay weight coefficient and the energy consumption weight coefficient are obtained. The total task delay and the total task energy consumption are constrained through the delay weight coefficient and the energy consumption weight coefficient to obtain a first to-be-optimized target. A penalty mechanism is set using a target particle swarm optimization strategy, and the first to-be-optimized target is converted into a second to-be-optimized target. The second to-be-optimized target is optimized through the target particle swarm optimization strategy to obtain an optimization result. 5.The blockchain-based medical data processing method of claim 4, wherein, The second to-be-optimized target is optimized through the target particle swarm optimization strategy to obtain an optimization result, including: An inertia weight, a random value, a local optimal position of a particle, and a global optimal position in a particle swarm are set through the target particle swarm optimization strategy. The initial speed of the particle is updated through the inertia weight, the random value, the local optimal position of the particle, and the global optimal position in the particle swarm to obtain a target speed of the particle. A target fitness value is calculated based on the target speed. The second to-be-optimized target is optimized through the target fitness value to obtain an optimization result. 6.A blockchain-based medical data processing apparatus, characterized by, The medical data processing device based on the blockchain includes: A response module is configured to respond to a task calculation request of medical data triggered by a medical device, and trigger a migration strategy through the task calculation request. A calculation module is configured to obtain a caching strategy of medical data when the migration strategy is to migrate a calculation task to an edge server; if the medical data is stored in a blockchain node, the caching strategy is to share the medical data through the blockchain node, and the task calculation request is returned; if the medical data is not stored in the blockchain node, it is determined that the caching strategy is to cache the medical data to the edge server for calculation, and then the calculation result is synchronized to all blockchain nodes through the blockchain network, and the task calculation request is returned. The calculation module is further configured to: When the caching strategy is to cache the medical data to the edge server, obtain a migration value of the medical data, a transmission power of the edge server, a distance from the device to the edge server, a channel gain of a channel, a bandwidth of a subchannel, and a loss coefficient of a wireless channel. An interference variable is calculated according to the migration value, the transmission power, and the channel gain. calculate an uplink transmission rate between the computing device and the edge server based on the bandwidth, the transmission power, the distance, the migration value, the interference variable, and the loss coefficient; obtain a number of transmission tasks, a computing capability of the edge server, a first number of uplink sub-channels of the edge server, and a computing speed of the edge server; calculate a transmission task delay based on the number of transmission tasks, the uplink transmission rate, and the migration value; calculate a task computing delay based on the first number of uplink sub-channels, the migration value, the number of transmission tasks, and the computing speed of the edge server; obtain a first task delay based on the transmission task delay and the task computing delay; calculate a first task energy consumption based on the computing capability of the edge server and the task computing delay; when the migration strategy is to locally cache medical data, calculate a second task delay and a second task energy consumption; obtain a total task delay based on the first task delay and the second task delay; obtain a total task energy consumption based on the first task energy consumption and the second task energy consumption; use a module for optimizing the total task delay and the total task energy consumption using a target particle swarm optimization strategy to obtain an optimization result; a processing module for processing medical data based on the optimization result. 7.A blockchain-based medical data processing device, characterized by, The blockchain-based medical data processing device comprises a memory, a processor, and a blockchain-based medical data processing program stored on the memory and executable on the processor, and the blockchain-based medical data processing program is configured to implement the blockchain-based medical data processing method according to any one of claims 1 to 5.

8. A storage medium, characterized by The storage medium stores a blockchain-based medical data processing program, and the blockchain-based medical data processing program implements the blockchain-based medical data processing method according to any one of claims 1 to 5 when executed by the processor.

Citation Information

Patent Citations

  • Resource awareness computing migration method and device based on particle swarm algorithm, and medium

    CN111813506A

  • Task migration method of edge computing network based on deep reinforcement learning

    CN116489711A

  • Energy-time delay equalization method based on adaptive multi-mode migration optimization

    CN116963181A