Medical waste data processing method and device, medium and electronic equipment
By partitioning the request for medical waste data and optimizing the blockchain network parameters, the performance problems of blockchain medical waste supervision solutions in a high concurrency environment are solved, and the balance of data storage and the effectiveness of supervision are achieved.
Patent Information
- Application Number
- CN202411124837.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-03-11
AI Technical Summary
The existing blockchain medical waste supervision solution under high concurrent request pressure in the Internet of Things environment, the performance and throughput are not as good as traditional databases. Due to the differences in hospital business volume, the load on-chain requests and data storage is unbalanced, which increases the difficulty of regulatory agencies in managing compliance audits of on-chain medical waste data.
By receiving the on-chain request for medical waste data and performing partition processing, the cache area is determined, the trained blockchain network parameters are obtained, and the blockchain nodes accessed by the cache area are determined based on these parameters, and the smart contract is called to store the data in the blockchain node.
It realizes supervision and management of the entire process of medical waste data processing, improves transaction throughput and reduces transaction response time, enhances the network expansion of the blockchain, and ensures the balance between the computing load and data storage between the partitions of each cache area.
Smart Images

Figure CN119601187A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of medical and health technology, and in particular relates to a medical waste data processing method based on blockchain, a medical waste data processing device based on blockchain, a computer-readable storage medium and an electronic device. Background Art
[0002] Medical waste may contain a large number of pathogenic microorganisms and harmful chemicals, and even radioactive and damaging substances. Therefore, medical waste is a dangerous factor that causes disease transmission or related public health problems. Since a unified medical waste management platform has not yet been established, medical institutions at all levels generally lack information support for medical waste management, and there are many problems in medical waste management.
[0003] Traditional medical waste supervision systems mostly use centralized relational databases to store and manage medical waste treatment data. Such solutions all have the problem of easy fraud and data tampering in centralized data storage. In recent years, some medical waste supervision solutions have introduced blockchain systems to enhance the credibility and security of data. However, the performance and throughput of blockchain medical waste supervision solutions under the high concurrent request pressure of the Internet of Things environment are not as good as traditional databases. In addition, due to the differences in business volume of each hospital, the load of chain requests and data storage will be unbalanced, which also increases the difficulty of regulatory agencies to manage compliance audits of medical waste data on the chain. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a medical waste data processing method based on blockchain, a medical waste data processing device based on blockchain, a computer-readable storage medium and an electronic device.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for processing medical waste data based on blockchain is provided, the method comprising: Receive a request for uploading medical waste data to the blockchain, and partition the request to the blockchain to determine a cache area, where the first address of the cache area is determined by the second address of the terminal device that uploads the request to the blockchain in the blockchain; Obtaining the trained network parameters of the blockchain, and determining the blockchain node to which the cache area is connected according to the network parameters; The smart contract of the blockchain is called to store the medical waste data in the blockchain node.
[0006] Optionally, partitioning the uplink request to determine a cache area includes: Obtaining the number of buffer areas corresponding to the uplink request and the second address, and calculating the number of buffer areas to obtain a target value; A first address of the cache area is determined according to the second address and the target value.
[0007] Optionally, before obtaining the trained network parameters of the blockchain, the method further includes: Define a state space, an action space, and a short-term reward function, and construct a long-term reward function based on the state space, the action space, and the short-term reward function; The state space, the action space and the short-term reward function are iteratively trained using a neural network to determine the network parameters of the blockchain according to the long-term reward function.
[0008] Optionally, defining the state space, action space and short-term reward function includes: Define the state space, which is determined by transaction volume load, partition computing power, disk read and write speed, and blockchain height; Defining an action space, wherein the action space is determined by the network access strategy, target block capacity, block time, and target number of transactions of the blockchain; The short-term reward function is defined, and the short-term reward function is determined by the target time, the partition computing power, the number of transaction bytes, the disk read and write speed, the transaction volume load, and the blockchain height.
[0009] Optionally, after storing the medical waste data in the blockchain node, the method further includes: Determining target data in the medical waste data, and grouping the target data according to waste identifiers to obtain grouped target data, wherein the target data includes the waste identifier; Performing a data closed-loop check on the grouped target data to obtain a check result, and performing a data audit on the grouped target data according to the check result to obtain a audit result; The smart contract of the blockchain is called, and an alarm record of the grouped target data is written into the blockchain node according to the audit result.
[0010] Optionally, performing a data closed-loop check on the grouped target data to obtain a check result includes: When the target data includes reporting record data, storage record data and outbound record data, determining that the inspection result is a closed loop of the grouped target data; or When the target data includes one or two of the reporting record data, the incoming record data and the outgoing record data, it is determined that the inspection result is that the grouped target data is not closed-loop.
[0011] Optionally, performing data audit on the grouped target data according to the inspection result to obtain an audit result includes: When the inspection result is a closed loop of the target data after the grouping, the weight data in the reported record data, the incoming record data and the outgoing record data are obtained respectively, and the weight data in the reported record data, the incoming record data and the outgoing record data are compared to obtain an audit result of whether the weight data is inconsistent; and / or When the inspection result is a closed loop of the target data after grouping, the time data in the reported record data and the outbound record data and the time threshold corresponding to the time data are obtained respectively, and the time data in the reported record data and the outbound record data are calculated to obtain a time difference, so as to compare the time difference and the time threshold to obtain an audit result as to whether the processing of the target data after grouping has timed out.
[0012] According to a second aspect of an embodiment of the present disclosure, a device for processing medical waste data based on blockchain is provided, comprising: A request partitioning module is configured to receive a request for uploading medical waste data to a blockchain, and partition the request to the blockchain to determine a cache area, wherein a first address of the cache area is determined by a second address of a terminal device that uploads the request to the blockchain in the blockchain; A partition access module is configured to obtain the trained network parameters of the blockchain and determine the blockchain node to which the cache area is connected according to the network parameters; The data chain module is configured to call the smart contract of the blockchain to store the medical waste data in the blockchain node.
[0013] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of any one of the blockchain-based medical waste data processing methods provided in the first aspect of the present disclosure are implemented.
[0014] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including: processor; a memory for storing processor-executable instructions; In which, the processor is configured to: execute the executable instructions to implement the steps of any one of the blockchain-based medical waste data processing methods provided in the first aspect of the present disclosure.
[0015] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects: In the method and device provided by the exemplary embodiment of the present disclosure, the on-chain request for medical waste data is partitioned to determine the cache area, providing a data basis for parallel partition access. Furthermore, the blockchain node accessed by the cache area is determined by the network parameters trained by the deep learning algorithm, taking into account the load of the cache area, while improving the transaction throughput and reducing the transaction response time, the network scalability of the blockchain is enhanced, and the balance of the computing load and data storage between the cache areas is ensured, realizing the supervision and management of the entire process of medical waste data processing.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0018] Figure 1 A schematic diagram of a process of processing medical waste data based on blockchain in an exemplary embodiment of the present disclosure is schematically shown; Figure 2 A schematic diagram of a process of partitioning an uplink request in an exemplary embodiment of the present disclosure is shown; Figure 3 A schematic diagram of a process for obtaining network parameters through training in an exemplary embodiment of the present disclosure is schematically shown; Figure 4 A schematic diagram schematically shows a flow chart of a method for defining three functions in an exemplary embodiment of the present disclosure; Figure 5 The flowchart of the method for writing an alarm record in a blockchain node in an exemplary embodiment of the present disclosure is schematically shown; Figure 6 A schematic diagram of a flow chart of a method for data closed loop checking in an exemplary embodiment of the present disclosure is schematically shown; Figure 7 A schematic diagram of a process flow of a method for data review in an exemplary embodiment of the present disclosure is schematically shown; Figure 8 A schematic diagram schematically illustrates a process flow of a method for treating medical waste in an application scenario in an exemplary embodiment of the present disclosure; Fig. 9 A flowchart schematically illustrates a method for processing medical waste data based on blockchain in an application scenario in an exemplary embodiment of the present disclosure; Fig.10An interface diagram schematically illustrates a method for accessing a transaction pool and a blockchain node in an application scenario in an exemplary embodiment of the present disclosure; Fig.11 A flowchart schematically illustrates an iterative training method in an application scenario in an exemplary embodiment of the present disclosure; Fig.12 A schematic diagram of the structure of a device for processing medical waste data based on blockchain in an exemplary embodiment of the present disclosure is schematically shown; Fig.13 A schematic diagram schematically shows the structure of another device for processing medical waste data based on blockchain in an exemplary embodiment of the present disclosure; Fig.14 A schematic diagram of the structure of another blockchain-based medical waste data processing device in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0020] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0021] Medical waste refers to waste that is directly or indirectly infectious, toxic or otherwise harmful and is generated by medical institutions in the course of medical treatment, prevention, health care and other related activities. Medical waste may contain a large number of pathogenic microorganisms and harmful chemicals, and even radioactive and damaging substances. Therefore, medical waste is an important risk factor that causes disease transmission or related public health problems.
[0022] Since a unified medical waste management platform has not yet been established, medical institutions at all levels generally lack information support for medical waste management. There are many problems in medical waste management, which are mainly manifested in the following aspects.
[0023] Compliance supervision is difficult: It is difficult to track the medical waste management process on site every day. Supervision is usually carried out by regular spot checks or irregular surprise inspections on site, checking historical registration information or tracking and checking the recycling process. It is impossible to effectively monitor the compliance of hospital medical waste treatment.
[0024] Difficult decision support: Most medical institutions record information manually, and it is difficult for regulatory authorities to quickly query, count and analyze the medical waste management situation in medical institutions. It is impossible to obtain real data in a timely manner to support management decisions, such as decisions on the establishment and capacity planning of medical waste treatment centers, and data support for responding to medical waste emergencies.
[0025] Real-time supervision is difficult: The competent authorities are unable to supervise the real-time status of medical waste collection, classification, transportation, and handover in medical institutions. Due to the lack of effective supervision of each link, a small amount of medical waste is illegally processed for secondary processing or used as raw materials for other daily necessities, leading to medical accidents.
[0026] Difficulty in tracing the entire process: There is a lack of detailed information on the entire process of medical waste disposal. Once incidents of loss or leakage of medical waste occur, it is difficult to trace the problematic links, problematic waste, and responsible persons.
[0027] Traditional medical waste supervision systems mostly use centralized relational databases to store and manage medical waste treatment data. Such solutions all have the problem of centralized data storage being prone to fraud and data tampering.
[0028] In recent years, some medical waste supervision programs have introduced blockchain systems to enhance the credibility and security of data, but they have only replaced relational databases with blockchains, making a simple replacement for medical waste data storage.
[0029] The current blockchain medical waste supervision solution has inferior performance and throughput of on-chain data under the high concurrent request pressure of the IoT environment as traditional databases. The difference in business volume of each hospital will cause an imbalance between on-chain request load and data storage, which also increases the difficulty of regulatory agencies in managing compliance audits of on-chain medical waste data.
[0030] In view of the problems existing in the related technologies, this paper provides a method for processing medical waste data based on blockchain. Figure 1 is a flowchart of a method for processing medical waste data based on blockchain according to an exemplary embodiment. Figure 1 As shown, the method may at least include the following steps: Step S110. Receive a request for uploading medical waste data to the blockchain, and partition the request to determine a cache area. The first address of the cache area is determined by the second address of the terminal device that uploads the request to the blockchain in the blockchain.
[0031] Step S120. Obtain the network parameters of the trained blockchain, and determine the blockchain node to which the cache area is connected based on the network parameters.
[0032] Step S130. Call the smart contract of the blockchain to store the medical waste data in the blockchain node.
[0033] In the exemplary embodiment of the present disclosure, the on-chain request for medical waste data is partitioned to determine the cache area, providing a data basis for parallel partition access. Furthermore, the blockchain node to which the cache area is accessed is determined by the network parameters trained by the deep learning algorithm, taking into account the load of the cache area, while improving the transaction throughput and reducing the transaction response time, the network scalability of the blockchain is enhanced, and the balance of the computing load and data storage between the cache areas is ensured, realizing the supervision and management of the entire process of medical waste data processing.
[0034] The following is a detailed description of the various steps of the blockchain-based medical waste data processing method.
[0035] In step S110, a request for uploading medical waste data to the blockchain is received, and the request is partitioned to determine a cache area, wherein the first address of the cache area is determined by the second address of the terminal device that uploads the request to the blockchain in the blockchain.
[0036] In the exemplary embodiments of the present disclosure, medical waste refers to waste that is directly or indirectly infectious, toxic, or otherwise hazardous and is generated by medical institutions in the course of medical treatment, prevention, health care, and other related activities.
[0037] Correspondingly, the medical waste data may include the medical waste code, medical waste type, reported weight, and reporting time generated during the handover process of medical waste; it may also include the medical waste code, medical waste type, entry weight, and entry time generated during the warehousing process of medical waste; it may also include the medical waste code, medical waste type, exit weight, and exit time generated during the outbound transfer process of medical waste.
[0038] The request for uploading the medical waste data to the blockchain may be sent by a smart IoT terminal connected to the blockchain network. Generally, the number of smart IoT terminal devices connected to the blockchain network may be N.
[0039] In an alternative embodiment, Figure 2 A flow chart of a method for partitioning an uplink request is shown, such as Figure 2 As shown, the method may at least include the following steps: In step S210, the number of buffer areas and the second address corresponding to the uplink request are obtained, and the number of buffer areas is calculated to obtain a target value.
[0040] The buffer area can be K transaction pools formed by partitioning the uplink request and used to cache the uplink request, where K is the number of buffer areas.
[0041] Each smart IoT terminal device generates and allocates an independent 64-bit binary blockchain network address D as the second address. The first 24 bits of the second address D are the code of the medical institution where the IoT terminal is located, the next 8 bits are the device type code, the next 16 bits are the device number, and the last 16 bits are reserved.
[0042] Furthermore, the number of buffer areas is calculated according to formula (1): n= [log(K) / log(2)] + 1(1) Where n is the target value and satisfies n<=64.
[0043] In step S220, a first address of the buffer area is determined according to the second address and the target value.
[0044] After the target value is calculated, the leftmost n digits of the second address D can be intercepted according to the target value and converted into decimal to obtain the first address. The first address is the cache address added by the smart IoT terminal device when submitting the transaction.
[0045] In step S120, the network parameters of the trained blockchain are obtained, and the blockchain nodes to which the cache area is connected are determined based on the network parameters.
[0046] In an exemplary embodiment of the present disclosure, after the cache area is determined, a node of the partitioned network to which the cache area is connected may be further determined.
[0047] In an alternative embodiment, Figure 3 A flow chart of the method for training to obtain network parameters is shown, such as Figure 3 As shown, the method may at least include the following steps: in step S310, define a state space, an action space and a short-term reward function, and construct a long-term reward function based on the state space, the action space and the short-term reward function.
[0048] In an alternative embodiment, Figure 4 A flow chart showing the method of defining three functions is shown, such as Figure 4 As shown, the method may at least include the following steps: In step S410, a state space is defined, and the state space is determined by transaction volume load, partition computing power, disk read and write speed, and blockchain height.
[0049] Specifically, at each time t, the state space is defined as S(t)={X(t), Y (t), Z(t), H(t)}. Among them, X(t) is the transaction volume load of the trading pool, and the transaction volume state set of all trading pools is expressed as: X(t)={x1(t),x2(t),…xK(t)}, and x(t) is the historical transaction load fitting function.
[0050] Y(t) is the partition computing capacity of the blockchain, Yk(t)={mk-Mk(t)}. Where mk is the maximum number of CPU (Central Processing Unit) cores of the computing node in the partition, Mk(t) is the number of CPU cores used by the partition node load, Y(t)={y1(t),y2(t),…yK(t)}.
[0051] Z(t) is the disk IO (Input / Output, or read / write) capacity of the blockchain partition, Zk(t)={nk- Nk(t)}. Among them, nk is the peak number of blockchain node disk IOPS (Input / Output Operations Per Second, read and write times per second), Nk(t) is the used IO load of the partition node, Z(t)={z1(t),z2(t),…zK(t)}.
[0052] H(t) is the height of the blockchain in the partition, H(t) = {h1(t),h2(t),…hK(t)}. Among them, hK(t) is the height of the blockchain at time t in the K partition.
[0053] In step S420, an action space is defined, and the action space is determined by the network access strategy, target block capacity, block time and target number of transactions of the blockchain.
[0054] At each time t, the action space is defined as D(t) = {A(t), V(t), T(t), B(t)}. Among them, A(t) represents the transaction pool and the partitioned blockchain network access strategy a i,j (t)={0,1}, where 0 means that the i-th shard is not connected to the j-th trading pool; 1 means that the i-th shard is connected to the j-th trading pool.
[0055] At time t, the access strategy of all partitions of the blockchain can be expressed as: A(t)=
[0056] The sum of the values of each column or row of the matrix A(t) is equal to 1, satisfying the one-to-one correspondence between the partitioned network and the transaction pool.
[0057] V(t) represents the maximum block capacity of the blockchain, that is, the target block capacity Vk(t) MB (megabytes), Vk(t)∈{2,3,4,…100}, V(t)={V1(t),V2(t),…VK(t)}, indicating that the maximum block capacity of the blockchain is limited to between 2 and 100 to ensure the computing power of the blockchain network.
[0058] T(t) represents the block time of the blockchain, Tk(t) seconds, Tk(t) ∈{0.5,1,1.5,…5}, T(t)={T1(t),T2(t),…TK(t)}.
[0059] B(t) represents the maximum number of transactions in a blockchain block batch, that is, the target transaction number Bk(t), Bk(t) ∈{10,15,20,…500}, B(t)={B1(t),B2(t),…BK(t)}.
[0060] In step S430, a short-term reward function is defined, which is determined by the target time, partition computing power, number of transaction bytes, disk read and write speed, transaction volume load, and blockchain height.
[0061] The short-term reward function is to maximize the system throughput, minimize the transaction response time within the partition, and try to make the block height in each partition close to the average of the overall block height. The short-term reward function can be defined as R(t), as shown in formula (2): (2) in, , Q k (t)=(a k +b k +c k )X k (t), a k ,b k ,c k are the CPU time required for signing, verification and consensus, respectively, Q(t)={q1(t),q2(t),…q K (t)},W k (t) = X k (t)d k , d k is the historical average number of bytes per transaction, W(t)={w1(t),w2(t),…w K (t)}. And , expressed as the weight coefficients of the three influencing factors, which are set to 0.4, 0.4 and 0.2 by default respectively.
[0062] Based on the state space, action space and short-term reward function, a long-term reward function can be further constructed. In the long-term reward function, 24h represents the long-term evaluation period of the reward function in units of 24 hours, as shown in formula (3):
[0063] (3) In step S320, the state space, action space and short-term reward function are iteratively trained using a neural network to determine the network parameters of the blockchain according to the long-term reward function.
[0064] Through iterative training of deep learning algorithms, the long-term reward function When maximizing, the corresponding action sequence values on each time series are obtained , the action series value will be adjusted accordingly as a system parameter.
[0065] Specifically, the iterative training process is as follows: (1) Initialize the K partition environments of the blockchain and their environment system state S(t); (2) Initialize and provide the empirical sample training data set D; (3) Randomly initialize the neural network, set the maximum number of training iterations G, the longest discrete time period J (24 hours), and the time interval J` (20 minutes); (4) For each discrete moment t=1,2,3…J in each iteration, use a greedy strategy to select an action D`(t) from the output layer of the neural network. ; (5) Execute action D`(t)={A`(t), V`(t), T`(t), B`(t)} for each blockchain partition, select the corresponding partition access strategy A`(t), adjust the maximum block capacity V`(t), block time T`(t) and the maximum number of transactions in a batch B`(t), obtain the reward R(t) at time t and enter the next state S(t+1); (6) For (S(t), D(t), R(t), S(t+1)), update the neural network weights by gradient descent so that ; (7) After G iterations of training, the network parameter optimization results converge to obtain the trained network parameters network access strategy A`(t), maximum block capacity V`(t), block time T`(t) and maximum number of transactions in a batch B`(t).
[0066] After obtaining the network parameters of the trained blockchain, the blockchain nodes to which the cache area is connected can be determined based on the network parameters to optimize the access process between the shard network and the transaction pool.
[0067] In step S130, the smart contract of the blockchain is called to store the medical waste data in the blockchain node.
[0068] In an exemplary embodiment of the present disclosure, the medical waste data is stored on the blockchain by calling the smart contract of the blockchain. Therefore, the blockchain node stores the medical waste code, medical waste type, reported weight, and reported time generated during the handover process of the medical waste, as well as the medical waste code, medical waste type, storage weight, and storage time generated during the storage process of the medical waste, and the medical waste code, medical waste type, storage weight, and storage time generated during the outbound transfer of the medical waste.
[0069] In an alternative embodiment, Figure 5 A flow chart of a method for writing an alarm record in a blockchain node is shown, Figure 5 As shown, the method may at least include the following steps: in step S510, target data is determined in the medical waste data, and the target data is grouped according to the waste identification to obtain grouped target data, wherein the target data includes the waste identification.
[0070] According to the alarm review cycle, for example, the medical waste data written into the blockchain node in the previous hour can be traversed at a time interval of 1 hour to identify the unclosed-loop medical waste data as the target data.
[0071] Since the blockchain nodes store data on the medical waste code, type of medical waste, reported weight, and reporting time generated during the handover process of medical waste, as well as the medical waste code, type of medical waste, entry weight, and entry time generated during the warehousing process of medical waste, and the medical waste code, type of medical waste, exit weight, and exit time generated during the outbound transfer process of medical waste, the unclosed-loop medical waste data refers to partial data that lacks one or two of the processes.
[0072] Furthermore, since the three processes of handover, storage and transfer-out contain corresponding medical waste codes, types of medical waste, weight and time, and the medical waste code can uniquely represent the medical waste in different processes, the medical waste code is used as the waste identifier, and the unclosed-loop medical waste data is grouped according to the waste identifier to obtain the grouped target data G, G={D1,D2,…D i …D n}, D i ={d1,d2, d3}. The medical waste codes of d1,d2, d3 are consistent, and the data in set D are sorted in chronological order.
[0073] In step S520, a data closed-loop check is performed on the grouped target data to obtain a check result, and a data audit is performed on the grouped target data based on the check result to obtain a audit result.
[0074] In an alternative embodiment, Figure 6A flow chart of a method for data closed loop checking is shown, as Figure 6 As shown, the method may at least include the following steps: In step S610, when the target data includes reporting record data, storage record data and outbound record data, it is determined that the inspection result is a closed loop of the grouped target data.
[0075] Among them, the reporting record data includes the medical waste code, type of medical waste, reported weight and reporting time generated during the handover process of medical waste; the warehousing record data includes the medical waste code, type of medical waste, warehousing weight and warehousing time generated during the warehousing process of medical waste; the outbound record data includes the medical waste code, type of medical waste, outbound weight and outbound time generated during the outbound transfer process of medical waste.
[0076] When the target data includes recorded data corresponding to three processes, it indicates that the medical waste data is closed-loop, so the inspection result is the closed-loop of the target data after grouping.
[0077] In step S620, when the target data includes one or two of the reporting record data, the incoming record data, and the outgoing record data, it is determined that the inspection result is that the grouped target data is not closed-loop.
[0078] When the target data includes record data corresponding to one or two processes, it indicates that the medical waste data has no closed loop, so the inspection result is that the target data after grouping is not closed.
[0079] In an alternative embodiment, Figure 7 A flow chart showing a method for data auditing is shown in FIG. Figure 7 As shown, the method may include at least the following steps: in step S710, when the inspection result is a closed loop of the target data after grouping, the weight data in the reported record data, the incoming record data and the outgoing record data are obtained respectively, and the weight data in the reported record data, the incoming record data and the outgoing record data are compared to obtain an audit result as to whether the weight data is inconsistent.
[0080] Since the reported record data includes the medical waste code, type of medical waste, reported weight and reported time generated during the handover process of medical waste, the warehousing record data includes the medical waste code, type of medical waste, warehousing weight and warehousing time generated during the warehousing process of medical waste, and the outbound record data includes the medical waste code, type of medical waste, outbound weight and outbound time generated during the outbound transfer process of medical waste, the weight data of the three processes can be obtained accordingly, namely the reported weight, warehousing weight and outbound weight.
[0081] When there is inconsistency in the reported weight, inbound weight and outbound weight among the reported record data, inbound record data and outbound record data, it indicates that the audit result is inconsistent weight data, otherwise, the audit result is consistent weight data. The inconsistent situation includes the situation that two weight data among the reported weight, inbound weight and outbound weight are inconsistent, and also includes the situation that all three weight data are inconsistent.
[0082] In step S720, when the inspection result is a closed loop of the target data after grouping, the time data in the reporting record data and the outbound record data and the time threshold corresponding to the time data are obtained respectively, and the time data in the reporting record data and the outbound record data are calculated to obtain the time difference, so as to compare the time difference and the time threshold to obtain the audit result of whether the processing of the target data after grouping has timed out.
[0083] Since the reporting record data includes the medical waste code, type of medical waste, reported weight and reporting time generated during the handover process of medical waste, and the outbound record data includes the medical waste code, type of medical waste, outbound weight and outbound time generated during the outbound transfer process of medical waste, the time data of these two processes can be obtained accordingly, namely the reporting time and outbound time.
[0084] The time threshold is used to characterize the time threshold for the treatment of different types of medical waste, such as 12 hours.
[0085] After obtaining the reporting time in the reporting record data and the delivery time in the delivery record data, the time difference between the two processes can be obtained by subtracting the reporting time from the delivery time.
[0086] Further, the time difference is compared with the time threshold to obtain a comparison result. When the comparison result is that the time difference is greater than the time threshold, it indicates that the processing of the grouped target data has timed out; when the comparison result is that the time difference is less than or equal to the time threshold, it indicates that the processing of the grouped target data has not timed out.
[0087] In step S530, the smart contract of the blockchain is called, and an alarm record of the grouped target data is written into the blockchain node according to the audit result.
[0088] When the audit result is that the weight data is inconsistent and / or the processing of the grouped target data has timed out, an alarm record corresponding to the grouped target data can be generated, and the smart contract of the blockchain can be called to upload the alarm record to the blockchain node and store it on the blockchain.
[0089] The following is a detailed description of the blockchain-based medical waste data processing method in the embodiment of the present disclosure in conjunction with an application scenario.
[0090] Through the analysis of relevant solutions, based on the business characteristics of medical waste IoT chain data requests, such as large node scale, large random business volume of medical waste data, and small amount of single chain data, this application scenario integrates artificial intelligence technology and builds a mathematical model to jointly optimize and solve the problem, improve the performance of the system chain request, and achieve balanced access to chain data.
[0091] Figure 8 A flow chart of a method for treating medical waste in an application scenario is shown, such as Figure 8 As shown, in step S810, a medical waste electronic account is established.
[0092] Medical waste supervisors in the hospital infection control department generate corresponding types of medical waste code labels through the blockchain medical waste supervision system, and print and distribute the labels. In addition, the system can also monitor the usage of each department.
[0093] In step S820, collection and transfer are performed.
[0094] The collection and transportation personnel will deliver the medical waste to the department's disposal room or collection point along the prescribed route. The department's medical waste responsible person will paste the special QR code label on the medical waste bag and hand over the medical waste. The transportation personnel scan the code to log in to the smart terminal configured by the smart transfer vehicle and confirm the identity of the department's medical waste responsible person. The transportation personnel will use the on-board scale to weigh and confirm the handover. The transportation personnel will put the medical waste into the transfer vehicle and complete the medical waste handover. The medical waste IoT terminal system stores the medical waste handover record on the chain by calling the smart contract. The chain data includes medical waste code, medical waste type, reported weight, and reporting time.
[0095] In step S830, the data is checked and stored in the warehouse.
[0096] The collection and transportation personnel go to the temporary storage area to handle the entry of medical waste. The temporary storage area manager scans the code to log in to the verification scale, and can enter the warehouse bag by bag or bucket by bag, so as to achieve one-click entry. The system stores the medical waste entry records on the chain by calling smart contracts. The data on the chain includes medical waste code, medical waste type, entry weight, and entry time.
[0097] In step S840, the goods are shipped out of the warehouse for transfer.
[0098] At the temporary storage area, the staff can scan the code to log in to the intelligent medical waste review scale, which supports bag-by-bag scanning and whole-barrel delivery, and completes the transfer of medical waste. It can also be delivered with one click. The system stores the medical waste delivery record on the chain by calling the smart contract. The data on the chain includes medical waste code, medical waste type, delivery weight, and delivery time.
[0099] It is worth noting that the processing method of the medical waste transfer chain data request, the medical waste storage chain data request and the medical waste outbound transfer chain data request in steps S820-S840 adopts Fig.10 The method shown.
[0100] Blockchain, with its decentralization, point-to-point transmission, open and transparent data and non-tamperable characteristics, can effectively meet the main security challenges faced in the supervision and traceability of medical waste IoT data. By uploading IoT data to the blockchain ledger and backing it up to each blockchain node, the robustness of the system and the tamper-proofness of the data are greatly improved.
[0101] However, the throughput performance bottleneck of blockchain makes it challenging for the technology to host applications with large-scale high concurrency characteristics.
[0102] In the field of medical waste supervision, as the business gradually develops, the medical waste IoT data chain shows the characteristics of large terminal node scale, large random data business volume, and small communication data volume. In this context, the low transaction throughput of blockchain, long consensus and block response time, and block data backup storage capacity need to be solved in the IoT waste supervision scenario.
[0103] Fig. 9 The flowchart of the method for processing medical waste data based on blockchain in the application scenario is shown as follows: Fig. 9 As shown in the figure, the blockchain architecture with a hierarchical partition structure for uploading medical waste data to the chain is used to improve the system transaction throughput, reduce the transaction response time, and ensure the balance of computing load among partitions.
[0104] The blockchain network is divided into the original tracing layer and the abnormal alarm layer. The original tracing layer includes K partitions, and the abnormal alarm layer includes one alarm partition. Each partition has complete blockchain functions, including at least an odd number of consensus nodes and one or more accounting nodes.
[0105] Assuming that the number of smart IoT terminal devices connected to the blockchain network is N, the parallel processing module partitions the chain requests to form K transaction pools for caching chain requests.
[0106] The partitioning method is that the system first generates and assigns an independent 64-bit binary blockchain network address D to each smart IoT terminal device. Among them, the first 24 bits are the code of the medical institution where the IoT terminal is located, the next 8 bits are the device type code, the next 16 bits are the device number, and the last 16 bits are reserved.
[0107] Then, calculate n = [ log(K) / log(2) ] + 1, which needs to satisfy n<=64.
[0108] Finally, the leftmost n digits of the blockchain network address D in binary format are intercepted and converted to decimal, which is the address of the transaction pool that the device submits to join.
[0109] For example, assuming that the blockchain network traceability layer is divided into 20 partitions, numbered 1-20, each IoT (Internet of Things) device needs to select the leftmost 4+1=5 bits of the 64-bit address. Assuming that the leftmost 5 bits of the IoT device's address are 10011, the corresponding decimal number is 10011=19, and the transactions it generates are assigned to the 19th transaction pool.
[0110] When the leftmost 5 digits of the IoT device address exceed the number of partitions, they will be allocated in order from partition 1. For example, when the IoT device address is 11111=31, the transaction will be allocated to transaction pool 31-20=11.
[0111] Due to the real-time randomness of transactions generated by IoT terminals in various hospitals, the fixed access method between the transaction pool and the blockchain partition may lead to an uneven distribution of transactions in each partition. Therefore, a blockchain partition access method for transaction load balancing is proposed to optimize the access process between the shard network and the transaction pool.
[0112] Specifically, the access of the sharded network and the parameter adjustment of the blockchain partition are modeled as a Markov decision process (MDP). By defining the system state space, system action space and system reward function, the reward function is maximized through deep learning iterative training to achieve joint optimization of the blockchain network parameters that affect the system response time and throughput performance.
[0113] Fig.10 The following is a schematic diagram showing the interface of the transaction pool and the access method of the blockchain node in the application scenario. Fig.10 As shown, at each time t, the action space is defined as D(t) = {A(t), V(t), T(t), B(t)}.
[0114] Among them, A(t) is the transaction pool and partition blockchain network access strategy a i,j (t)={0,1}, where 0 means that the i-th shard is not connected to the j-th trading pool; 1 means that the i-th shard is connected to the j-th trading pool.
[0115] At time t, the access strategy of all partitions of the blockchain can be expressed as: A(t)=
[0116] The sum of the values of each column or row of the matrix A(t) is equal to 1, satisfying the one-to-one correspondence between the partitioned network and the transaction pool.
[0117] V(t) is the maximum block capacity Vk(t) MB of the blockchain, Vk(t)∈{2,3,4,…100}, V(t)={V1(t),V2(t),…VK(t)}.
[0118] T(t) is the block time of the blockchain, Tk(t) seconds, Tk(t) ∈{0.5,1,1.5,…5}, T(t)={T1(t),T2(t),…TK(t)}.
[0119] B(t) is the maximum number of transactions in a blockchain block batch, Bk(t), Bk(t) ∈{10,15,20,…500}, B(t)={B1(t),B2(t),…BK(t)}.
[0120] The state space is defined as S(t)={ X(t), Y (t), Z(t), H(t)}.
[0121] Among them, X(t) is the transaction volume load of the transaction pool, and the transaction volume state set of all transaction pools is expressed as: X(t)={x1(t),x2(t),…xK(t)}, and x(t) is the historical transaction load fitting function.
[0122] Y(t) is the partition computing capacity of the blockchain, Yk(t)={mk-Mk(t)}. Where mk is the maximum number of CPU cores of the computing node in the partition, Mk(t) is the number of CPU cores used by the partition node load, and Y(t)={y1(t),y2(t),…yK(t)}.
[0123] Z(t) is the disk IO capacity of the blockchain partition, Zk(t)={nk-Nk(t)}. Where nk is the peak number of disk IOPS of the blockchain node, Nk(t) is the used IO load of the partition node, Z(t)={z1(t),z2(t),…zK(t)}.
[0124] H(t) is the height of the blockchain in the partition, H(t) = {h1(t),h2(t),…hK(t)}. Among them, hK(t) is the height of the blockchain at time t in the K partition.
[0125] The reward function is to maximize the system throughput, minimize the transaction response time within the partition, and try to make the block height in each partition close to the average of the overall block height. The short-term reward function can be defined as R(t), as shown in formula (2).
[0126] In the system long-term reward function, 24h represents the long-term evaluation period of the reward function in units of 24 hours, as shown in formula (3).
[0127] Through iterative training of deep learning algorithms, the long-term reward function When maximizing, the corresponding action sequence values on each time series are obtained , the action series value will be adjusted accordingly as a system parameter.
[0128] Fig.11 A flow chart of an iterative training method in an application scenario is shown, such as Fig.11 As shown, (1) Initialize the K partition environments of the blockchain and their environment system state S(t); (2) Initialize and provide the empirical sample training data set D; (3) Randomly initialize the neural network, set the maximum number of training iterations G, the longest discrete time period J (24 hours), and the time interval J` (20 minutes); (4) For each discrete moment t=1,2,3…J in each iteration, use a greedy strategy to select an action D`(t) from the output layer of the neural network. ; (5) Execute action D`(t)={A`(t), V`(t), T`(t), B`(t)} for each blockchain partition, select the corresponding partition access strategy A`(t), adjust the maximum block capacity V`(t), block time T`(t) and the maximum number of transactions in a batch B`(t), obtain the reward R(t) at time t and enter the next state S(t+1); (6) For (S(t), D(t), R(t), S(t+1)), update the neural network weights by gradient descent so that ; (7) After G iterations of training, the network parameter optimization results converge to obtain the trained network parameters network access strategy A`(t), maximum block capacity V`(t), block time T`(t) and maximum number of transactions in a batch B`(t).
[0129] In this application scenario, the blockchain network is designed as a two-layer structure. The blockchain original traceability layer is used to partition and store the original process data of medical waste treatment, and the abnormal alarm layer stores the abnormal alarm data of medical waste treatment that is the focus of government regulatory agencies.
[0130] Specifically, the abnormal alarm data generation process is to first initialize the alarm review cycle time interval α, such as 1 hour, the timeout threshold βi for processing different types of medical waste, such as 12 hours, and the unclosed-loop medical waste data list L={}.
[0131] Then, every hour, the data records written to the original traceability layer of the blockchain in the previous hour are traversed, and the data in the unclosed-loop medical waste data list L is merged, and L={} is cleared to form a data set P. The data in the data set P is grouped by medical waste code to obtain G, G={D1,D2,…D i …D n}, D i ={d1,d2, d3}. The medical waste codes of d1,d2, d3 are consistent, and the data in set D are sorted in chronological order.
[0132] Furthermore, for each data set D in G i Perform data closed loop check. Specifically, it can be determined that D i Whether the three records d1, d2, and d3 form a data closed loop, d1 refers to the initial handover report record of medical waste, d2 and d3 are the storage and outbound records respectively. The records that have not formed a data closed loop are appended to the data set L, and the data that have formed a data closed loop will be subject to the next step of medical waste treatment compliance audit.
[0133] Finally, the closed-loop data is audited for medical waste weight and processing timeout.
[0134] Specifically, check whether the weights of medical waste in d1, d2, and d3 are consistent. If not, call the alarm smart contract to write the abnormal weight alarm record into the alarm partition of the blockchain. Check whether the d3 time minus the d1 time is greater than the processing time threshold β of this medical type. If it times out, call the alarm smart contract to write the medical waste treatment timeout alarm record into the alarm partition of the blockchain.
[0135] In the exemplary embodiment of the present disclosure, by hierarchical partitioning of the blockchain network, parallel partition access is performed on the on-chain data of the IoT terminal device, and the blockchain partition access strategy and the network parameters of the blockchain partition are adjusted according to the load of the parallel transaction pool, so as to achieve the effect of improving the system transaction throughput and reducing the transaction response time, and to ensure the balance of computing load and data storage between each partition while enhancing the scalability of the blockchain network. Through the supervision and management of the entire process of medical waste, the collection, classification, packaging, storage and other links of medical waste are promoted to be connected with the later medical waste treatment technology and management mode, and the whole process of medical waste sorting, collection, transportation and temporary storage in medical institutions is realized. The automated and trusted management and real-time supervision of each link make the supervision of medical waste in medical institutions standardized, systematic, scientific and modern, and comprehensively improve the efficiency and supervision level of medical waste management in medical institutions.
[0136] In addition, in an exemplary embodiment of the present disclosure, a blockchain-based medical waste data processing device is also provided. Fig.12The schematic diagram of the structure of the medical waste data processing device based on blockchain is shown as follows: Fig.12 As shown, the medical waste data processing device 1200 based on blockchain may include: a partition request module 1210, a partition access module 1220 and a data uplink module 1230. Among them: The request partitioning module 1210 is configured to receive a request for uploading medical waste data to a blockchain, and partition the request to the blockchain to determine a cache area, wherein a first address of the cache area is determined by a second address of a terminal device that uploads the request to the blockchain in the blockchain; The partition access module 1220 is configured to obtain the trained network parameters of the blockchain and determine the blockchain node to which the cache area is accessed according to the network parameters; The data uploading module 1230 is configured to call the smart contract of the blockchain to store the medical waste data in the blockchain node.
[0137] In some embodiments of the present disclosure, the request partitioning module 1210 is configured to: Obtaining the number of buffer areas corresponding to the uplink request and the second address, and calculating the number of buffer areas to obtain a target value; A first address of the cache area is determined according to the second address and the target value.
[0138] In some embodiments of the present disclosure, the medical waste data processing device 1200 based on blockchain is further configured to: Define a state space, an action space, and a short-term reward function, and construct a long-term reward function based on the state space, the action space, and the short-term reward function; The state space, the action space and the short-term reward function are iteratively trained using a neural network to determine the network parameters of the blockchain according to the long-term reward function.
[0139] In some embodiments of the present disclosure, the medical waste data processing device 1200 based on blockchain is further configured to: Define the state space, which is determined by transaction volume load, partition computing power, disk read and write speed, and blockchain height; Defining an action space, wherein the action space is determined by the network access strategy, target block capacity, block time, and target number of transactions of the blockchain; A short-term reward function is defined, where the short-term reward function is determined by the target time, the partition computing power, the number of transaction bytes, the disk read and write speed, the transaction volume load, and the blockchain height.
[0140] In some embodiments of the present disclosure, the medical waste data processing device 1200 based on blockchain is further configured to: Determining target data in the medical waste data, and grouping the target data according to waste identifiers to obtain grouped target data, wherein the target data includes the waste identifier; Performing a data closed-loop check on the grouped target data to obtain a check result, and performing a data audit on the grouped target data according to the check result to obtain a audit result; The smart contract of the blockchain is called, and an alarm record of the grouped target data is written into the blockchain node according to the audit result.
[0141] In some embodiments of the present disclosure, the medical waste data processing device 1200 based on blockchain is further configured to: When the target data includes reporting record data, storage record data and outbound record data, determining that the inspection result is a closed loop of the grouped target data; or When the target data includes one or two of the reporting record data, the incoming record data and the outgoing record data, it is determined that the inspection result is that the grouped target data is not closed-loop.
[0142] In some embodiments of the present disclosure, the medical waste data processing device 1200 based on blockchain is further configured to: When the inspection result is a closed loop of the target data after the grouping, the weight data in the reported record data, the incoming record data and the outgoing record data are obtained respectively, and the weight data in the reported record data, the incoming record data and the outgoing record data are compared to obtain an audit result of whether the weight data is inconsistent; and / or When the inspection result is a closed loop of the target data after grouping, the time data in the reported record data and the outbound record data and the time threshold corresponding to the time data are obtained respectively, and the time data in the reported record data and the outbound record data are calculated to obtain a time difference, so as to compare the time difference and the time threshold to obtain an audit result as to whether the processing of the target data after grouping has timed out.
[0143] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0144] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the blockchain-based medical waste data processing method provided by the present disclosure.
[0145] Fig.13 1 is a block diagram of another device 1300 for processing medical waste data based on blockchain according to an exemplary embodiment. For example, the device 1300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0146] Reference Fig.13 , the device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output interface 1312 , a sensor component 1314 , and a communication component 1316 .
[0147] The processing component 1302 generally controls the overall operation of the device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.
[0148] The memory 1304 is configured to store various types of data to support the operation of the device 1300. Examples of such data include instructions for any application or method operating on the device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0149] The power supply component 1306 provides power to the various components of the device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1300.
[0150] The multimedia component 1308 includes a screen that provides an output interface between the device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0151] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the device 1300 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0152] The input / output interface 1312 provides an interface between the processing component 1302 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0153] The sensor assembly 1314 includes one or more sensors for providing various aspects of the status assessment of the device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the device 1300, the relative positioning of components, such as the display and keypad of the device 1300, the sensor assembly 1314 can also detect the position change of the device 1300 or a component of the device 1300, the presence or absence of user contact with the device 1300, the orientation or acceleration / deceleration of the device 1300, and the temperature change of the device 1300. The sensor assembly 1314 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0154] The communication component 1316 is configured to facilitate wired or wireless communication between the device 1300 and other devices. The device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0155] In an exemplary embodiment, the apparatus 1300 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0156] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by the processor 1320 of the device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0157] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned blockchain-based medical waste data processing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned blockchain-based medical waste data processing method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned method.
[0158] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned blockchain-based medical waste data processing method when executed by the programmable device.
[0159] Fig.14 1 is a block diagram of another device 1400 for processing medical waste data based on blockchain according to an exemplary embodiment. For example, the device 1400 can be provided as a server. Fig.14, the device 1400 includes a processing component 1422, which further includes one or more processors, and a memory resource represented by a memory 1432 for storing instructions executable by the processing component 1422, such as an application. The application stored in the memory 1432 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1422 is configured to execute instructions to perform the above-mentioned blockchain-based medical waste data processing method.
[0160] The device 1400 may also include a power supply component 1426 configured to perform power management of the device 1400, a wired or wireless network interface 1450 configured to connect the device 1400 to a network, and an input / output interface 1458. The device 1400 may operate based on an operating system stored in the memory 1432.
[0161] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0162] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing medical waste data based on blockchain, characterized in that: include: Receive a request for uploading medical waste data to the blockchain, and partition the request to the blockchain to determine a cache area, where the first address of the cache area is determined by the second address of the terminal device that uploads the request to the blockchain in the blockchain; Obtaining the trained network parameters of the blockchain, and determining the blockchain node to which the cache area is connected according to the network parameters; The smart contract of the blockchain is called to store the medical waste data in the blockchain node.
2. The method for processing medical waste data based on blockchain according to claim 1 is characterized in that: The partitioning process of the uplink request to determine the buffer area includes: Obtaining the number of buffer areas corresponding to the uplink request and the second address, and calculating the number of buffer areas to obtain a target value; A first address of the cache area is determined according to the second address and the target value.
3. The method for processing medical waste data based on blockchain according to claim 1 is characterized in that: Before obtaining the trained network parameters of the blockchain, the method further includes: Define a state space, an action space, and a short-term reward function, and construct a long-term reward function based on the state space, the action space, and the short-term reward function; The state space, the action space and the short-term reward function are iteratively trained using a neural network to determine the network parameters of the blockchain according to the long-term reward function.
4. The method for processing medical waste data based on blockchain according to claim 3 is characterized in that: The definition of state space, action space and short-term reward function includes: Define the state space, which is determined by transaction volume load, partition computing power, disk read and write speed, and blockchain height; Defining an action space, wherein the action space is determined by the network access strategy, target block capacity, block time, and target number of transactions of the blockchain; A short-term reward function is defined, where the short-term reward function is determined by the target time, the partition computing power, the number of transaction bytes, the disk read and write speed, the transaction volume load, and the blockchain height.
5. The method for processing medical waste data based on blockchain according to claim 1 is characterized in that: After storing the medical waste data in the blockchain node, the method further includes: Determining target data in the medical waste data, and grouping the target data according to waste identifiers to obtain grouped target data, wherein the target data includes the waste identifier; Performing a data closed-loop check on the grouped target data to obtain a check result, and performing a data audit on the grouped target data according to the check result to obtain a audit result; The smart contract of the blockchain is called, and an alarm record of the grouped target data is written into the blockchain node according to the audit result.
6. The method for processing medical waste data based on blockchain according to claim 5 is characterized in that: The step of performing a data closed-loop check on the grouped target data to obtain a check result includes: When the target data includes reporting record data, storage record data and outbound record data, determining that the inspection result is a closed loop of the grouped target data; or When the target data includes one or two of the reporting record data, the incoming record data and the outgoing record data, it is determined that the inspection result is that the grouped target data is not closed-loop.
7. The method for processing medical waste data based on blockchain according to claim 5 is characterized in that: The step of performing data audit on the grouped target data according to the inspection result to obtain an audit result includes: When the inspection result is a closed loop of the target data after the grouping, the weight data in the reported record data, the incoming record data and the outgoing record data are obtained respectively, and the weight data in the reported record data, the incoming record data and the outgoing record data are compared to obtain an audit result of whether the weight data is inconsistent; and / or When the inspection result is a closed loop of the target data after grouping, the time data in the reported record data and the outbound record data and the time threshold corresponding to the time data are obtained respectively, and the time data in the reported record data and the outbound record data are calculated to obtain a time difference, so as to compare the time difference and the time threshold to obtain an audit result as to whether the processing of the target data after grouping has timed out.
8. A medical waste data processing device based on blockchain, characterized in that: include: A request partitioning module is configured to receive a request for uploading medical waste data to a blockchain, and partition the request to the blockchain to determine a cache area, wherein a first address of the cache area is determined by a second address of a terminal device that uploads the request to the blockchain in the blockchain; A partition access module is configured to obtain the trained network parameters of the blockchain and determine the blockchain node to which the cache area is connected according to the network parameters; The data chain module is configured to call the smart contract of the blockchain to store the medical waste data in the blockchain node.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent contract operation compliance detection method and system
CN120724432A
A smart contract operation compliance detection method and system
CN120724432B
