Laboratory business data storage method, device and system based on block chain

By adopting a blockchain-based distributed data storage system in the laboratory management system, the pressure and delay problems existing in the data comparison process of the laboratory management system are solved, and fast and real-time data comparison is achieved, which reduces hardware costs and ensures data security and integrity.

CN119537362APending Publication Date: 2025-02-28BEIJING HAIHUA XINAN BIOLOGICAL INFORMATION TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311086085.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing laboratory management system has great pressure in the data comparison process, which leads to delay problems in issuing and feedback of the comparison results, and the hardware cost is high, making it difficult to achieve fast and real-time data comparison.

Method used

A distributed data storage system based on blockchain is adopted to realize the immutability of data and the consistency of the entire network through blockchain technology. The client compares it in the blockchain in the region to achieve fast and real-time data comparison.

Benefits of technology

Shorten the comparison cycle, improve the comparison efficiency, reduce hardware costs, and ensure data security and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537362A_ABST
    Figure CN119537362A_ABST
Patent Text Reader

Abstract

The invention provides a laboratory business data storage method based on a block chain, a laboratory business data storage system based on the block chain, computing equipment and a computer readable storage medium, and relates to the technical field of data storage. The laboratory service storage system based on the block chain comprises a server and a plurality of clients, and each client comprises a data acquisition module used for acquiring at least one piece of laboratory service data; the server comprises a verification module which is used for verifying the client and outputting a verification message; and the client further comprises a data adding module which is used for adding the laboratory service data into the block chain when the verification message shows that the verification of the client is passed. According to the technical scheme provided by the invention, a distributed data storage system is constructed according to a resource sharing principle, the data cannot be tampered by utilizing a block chain technology, and the whole network consistency is finally realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a blockchain-based laboratory business data storage method, a blockchain-based laboratory business data storage system, a computing device, and a computer-readable storage medium. Background Art

[0002] In recent years, criminal science and technology has developed rapidly, playing an increasingly important role in improving the ability of public security organs to combat crime and improve the level of law enforcement and case handling. Public security organs across the country have successively established a series of important information systems such as the "Laboratory Management System (LIMS)", which provide strong support for case detection.

[0003] Data is reported and compared step by step, that is, districts and counties report data to cities, cities report data to provincial level, and provincial level reports data to ministerial system. Districts and counties first compare data within the local system and display data comparison results in a timely manner. At the provincial node, only data between laboratories within the province are compared, and the results of the comparison are sent back to the laboratory. At the ministerial node, only data between provinces are compared, and the results of the comparison are sent back to the laboratory. Through the above process, the comparison between "two samples" of laboratory business data across the country can be achieved.

[0004] The laboratory management system supports multi-level deployment at the ministry, province, city, district and county levels. Through a series of standard data interfaces, data is reported from local laboratories to the municipal and provincial levels, and finally to the ministry-level database, after being connected and reviewed by multiple laboratory business database systems. Among them, the ministry-level system focuses on high-speed comparison and the release of cross-provincial comparison results, as well as the management and data statistics of provincial-level systems; the provincial-level system focuses on ensuring the smoothness and accuracy of data transfer (including data reporting and the release of comparison results), and managing the municipal-level systems and data statistics of the province; the prefecture-level, city-level, district-level and county-level systems are the main practical units, with data collection, inspection, and local comparison as the core of the system application, and its goal is to ensure the correctness and reliability of laboratory business data.

[0005] According to the above comparison scheme, the data needs to be reported to the superior "laboratory management system" step by step, which puts great pressure on the provincial and ministerial comparison nodes. Take the ministerial system as an example: each sample must be compared with the 68.5 million samples in the ministerial library twice, which is equivalent to 137 million comparisons at the ministerial level. Every day, the national library receives about 50,000 to 60,000 reported sample data, which is equivalent to more than 8 trillion comparisons at the ministerial level every day. Overall, it puts great pressure on the departmental data comparison of the laboratory management system. In order to quickly and in real time feedback on the comparison report, the "laboratory management system" at the ministerial level has added horizontal expansion support for the comparison engine, increased the comparison throughput, and improved the comparison performance, but it also increased a lot of hardware costs. And due to factors such as many transmission layer nodes and unstable network, there is still a delay in the issuance and feedback of the comparison results, and there is no fundamental solution.

[0006] The above traditional methods have solved many important cases, but they require a lot of manpower, material and financial resources, and due to the multi-level architecture, feedback requires a certain period of time. The business data of laboratories in various places are reported layer by layer, which makes the data in the ministerial laboratory business database out of sync with the business data of laboratories in various places. If there is a problem with the transmission at any level during the period, it may not be processed normally. If some cases, such as anti-trafficking, cannot be handled effectively and in a timely manner, it is possible to miss the best time to solve the case. In addition, due to the low efficiency of comparing the database of the provincial department laboratory management system and the fact that all parts of the province have not reported all the data to the provincial department, the comparison results are unsatisfactory, and a large number of manual joint investigation and comparison reports still need to be sent to laboratories at all levels.

[0007] Therefore, how to provide a new solution that can solve the above technical problems is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0008] In view of this, the present application provides a laboratory business data storage method based on blockchain, a laboratory business data storage system based on blockchain, a computing device, and a computer-readable storage medium. According to the principle of resource sharing, a distributed data storage system is constructed, and blockchain technology is used to achieve data immutability and ultimately achieve consistency across the entire network.

[0009] To achieve the above objectives, this application provides the following technical solutions: According to the first aspect of the present application, a laboratory business data storage method based on blockchain is proposed, and the method is applied to a laboratory business data storage system based on blockchain, the system includes a server and multiple clients, and the method includes: The client obtains at least one laboratory business data; When the server outputs a message indicating that the client has passed the verification, the client adds the laboratory business data to the blockchain.

[0010] Preferably, the method further comprises: The client sends a login request to the server, where the login request carries the IP address and / or certificate information corresponding to the client; The server obtains a plurality of pre-stored IP addresses and / or certificate information; When the IP address and / or certificate information corresponding to the client is recorded in the multiple IP addresses and / or certificate information pre-stored in the server, the server outputs a message indicating that the client has passed the verification.

[0011] Preferably, the client adding the laboratory business data to the blockchain includes: The client forms a block according to the laboratory business data; The client sends the block corresponding to the laboratory business data to all clients; All clients verify the block separately and output verification messages; When the verification messages output by all clients show that the number of blocks that have passed verification exceeds a preset threshold, all clients will add the blocks to the blockchain, otherwise, the blocks will be deleted.

[0012] Preferably, the client forms a block according to the laboratory business data, including: The client obtains a hash value of the last block in the blockchain, referred to as a first hash value; Outputting a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data; A block is formed according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, and the block is the block corresponding to the laboratory business data.

[0013] Preferably, all clients verify the blocks separately, and the output verification message includes: All clients obtain a first hash value from the block; All clients obtain the hash value of the last block from the last block of the blockchain, which is called the second hash value; When the first hash value is the same as the second hash value, output a verification message indicating that the block verification has passed; When the first hash value is different from the second hash value, a verification message indicating that the block verification has failed is output.

[0014] Preferably, the method further comprises: The client receives at least one laboratory business data comparison request, wherein the laboratory business data comparison request carries at least one laboratory business data to be compared; Obtaining laboratory business data stored in each block on the blockchain; The laboratory business data to be compared is compared with the laboratory business data stored in each block, and a comparison result is output.

[0015] According to the second aspect of the present application, a laboratory business data storage system based on blockchain is proposed, the system comprising a server and multiple clients. The client comprises a data acquisition module, which is used to acquire at least one laboratory business data; The server includes a verification module, which is used to verify the client and output a verification message; The client also includes a data adding module, which is used to add the laboratory business data to the blockchain when the verification message shows that the client verification is passed.

[0016] Optionally, the client further comprises: A login request sending module, used to send a login request to the server, wherein the login request carries the IP address and / or certificate information corresponding to the client; The server also includes: A storage information acquisition module, used to acquire a plurality of pre-stored IP addresses and / or certificate information; The verification module comprises: A first verification module, configured to output a message indicating that the client has passed verification when the IP address and / or certificate information corresponding to the client is recorded in a plurality of pre-stored IP addresses and / or certificate information; The second verification module is used to output a message indicating that the client has not passed the verification when the IP address and / or certificate information corresponding to the client is not recorded in the pre-stored multiple IP addresses and / or certificate information.

[0017] Preferably, the data adding module includes: A block forming module, used for forming a block according to the laboratory business data; A data sending module, used for sending the block corresponding to the laboratory business data to the client; A block verification module, used to verify the block individually and output a verification message; A block adding module, configured to add the block to the blockchain when the number of blocks that have passed the verification indicated in the verification message exceeds a preset threshold; The block deletion module is used to delete the block when the number of blocks that have not passed the verification shown in the verification message exceeds a preset threshold.

[0018] Preferably, the block forming module comprises: A hash value acquisition module, used to obtain the hash value of the last block in the blockchain, referred to as the first hash value; A hash value determination module, configured to output a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data; The block determination module is used to form a block according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, and the block is the block corresponding to the laboratory business data.

[0019] Preferably, the block verification module includes: A first hash value acquisition module, used to acquire a first hash value from the block; A second hash value acquisition module, used to obtain a hash value of the last block in the blockchain, referred to as a second hash value; A first verification message output module, configured to output a verification message indicating that the block verification has passed when the first hash value is the same as the second hash value; The second verification message output module is used to output a verification message indicating that the block verification has failed when the first hash value is different from the second hash value.

[0020] Preferably, the client further includes: A comparison request receiving module, used to receive at least one laboratory business data comparison request, wherein the laboratory business data comparison request carries at least one laboratory business data to be compared; A laboratory business data acquisition module, used to acquire laboratory business data stored in each block on the blockchain; The laboratory business data comparison module is used to compare the laboratory business data to be compared with the laboratory business data stored in each block, and output the comparison result.

[0021] According to a third aspect of the present application, a computing device is provided, the computing device comprising: a processor adapted to implement various instructions and a storage device, the storage device storing a plurality of instructions, the instructions being adapted to be loaded and executed by the processor: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.

[0022] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to execute: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.

[0023] It can be seen from the above technical solutions that this application builds a distributed data storage system in accordance with the principle of resource sharing, uses blockchain technology to achieve data immutability and ultimately achieves consistency across the entire network. When the client needs to compare laboratory business data, it only needs to compare in the local blockchain, and the comparison results are returned immediately, achieving fast and real-time data comparison, shortening the comparison cycle, and improving comparison efficiency.

[0024] In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A flowchart of a laboratory business data storage method based on blockchain provided by the present application is shown; Figure 2 A flowchart of a second implementation method of a laboratory business data storage method based on blockchain provided by the present application is shown; Figure 3 Shows Figure 2 Schematic diagram of the process of step S205 in; Figure 4 Shows Figure 3 Schematic diagram of the process of step S301 in ; Figure 5 Shows Figure 3 Schematic diagram of the process of step S303 in ; Figure 6 A flowchart of implementation method 3 of a blockchain-based laboratory business data storage method provided by the present application is shown; Figure 7 A block diagram of a laboratory business data storage system based on blockchain provided by the present application is shown; Figure 8A structural block diagram of implementation mode 1 of a client in a laboratory business data storage system based on blockchain provided by the present application is shown; Fig. 9 A structural block diagram of a server in a laboratory business data storage system based on blockchain provided by the present application is shown; Fig.10 Shows a structural block diagram of the verification module in the server; Fig.11 Shows a structural block diagram of a data adding module in a client; Fig.12 It shows the structural block diagram of the block formation module in the client; Fig.13 It shows the structural block diagram of the block verification module in the client; Fig.14 A structural block diagram of implementation method 2 of a client in a laboratory business data storage system based on blockchain provided by the present application is shown; Fig.15 A schematic diagram of adjacent blocks in the blockchain provided by this application is shown. Implementation

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.

[0029] Although the present application provides method operation steps or device structures as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments or drawings of the present application. When the method or module structure is applied to an actual device or terminal product, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiments or drawings.

[0030] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.

[0031] This application provides a laboratory business data storage system based on blockchain. Figure 7 For a schematic diagram of the system, see Figure 7 , the system provided in this application includes a server 100 and multiple clients 200.

[0032] The blockchain in the laboratory business data storage system provided in this application uses the P2P (peer-to-peer) principle. If the blockchain is only stored on one machine, when the machine is offline, other machines will not be able to obtain information. Therefore, the latest status of the blockchain needs to be synchronized to all machines, which are called "nodes". These nodes ensure that the data is the latest version through P2P. In this application, multiple clients 200 are "nodes". Specifically in the field of laboratory business data storage, the client refers to the laboratory.

[0033] In order to ensure that the data in each block of the blockchain can only be used by the affiliated nodes, a dedicated server is set up, namely the server 100 in this application.

[0034] Figure 8 A structural diagram of the implementation method of the client is shown in FIG. Figure 8 In the first implementation of the present application, the client includes: The login request sending module 203 is used to send a login request to the server, where the login request carries the IP address and / or certificate information corresponding to the client.

[0035] Fig. 9 The structural block diagram of the server in this application is shown in Fig. 9 , the server 100 comprises: The storage information acquisition module 102 is used to obtain multiple pre-stored IP addresses and / or certificate information. In this application, the server records the IP addresses and / or certificate information of all participating nodes (i.e., clients). All participating nodes will have a consensus mechanism. The consensus mechanism is a set of rules that are agreed upon by the nodes in the network by running software. These rules ensure that the network works securely and remains synchronized.

[0036] The verification module 101 is used to verify the client and output a verification message.

[0037] Fig.10 The structure diagram of the verification module 101 in the server 100 is shown in FIG. Fig.10 , the verification module 101 includes: The first verification module 1011 is used to output a message indicating that the client has passed verification when the IP address and / or certificate information corresponding to the client is recorded in a plurality of pre-stored IP addresses and / or certificate information; The second verification module 1012 is used to output a message indicating that the client has not passed the verification when the IP address and / or certificate information corresponding to the client is not recorded in the pre-stored multiple IP addresses and / or certificate information.

[0038] That is, when the server receives a login request sent by at least one client, it first parses the IP address and / or certificate information corresponding to the client from the login request, and then checks whether the IP address and / or certificate information corresponding to the client is recorded in the pre-stored multiple IP addresses and / or certificate information. When the verification result shows that the IP address and / or certificate information corresponding to the client is recorded in the pre-stored multiple IP addresses and / or certificate information, it is considered that the current client belongs to a participating client, so the server outputs a message that the client has been verified. When the verification result shows that the IP address and / or certificate information corresponding to the client is not recorded in the pre-stored multiple IP addresses and / or certificate information, it is considered that the current client does not belong to a participating client, so the server outputs a message that the client has not been verified.

[0039] Please refer again Figure 8 After the client passes the verification of the server, in the first embodiment of the present application, the client further includes: The data acquisition module 201 is used to acquire at least one laboratory business data.

[0040] The data adding module 202 is used to add the laboratory business data to the blockchain. Fig.11 The structure diagram of the data adding module 202 is shown in FIG. Fig.11 , the data adding module 202 includes: A block forming module 2021, used to form a block according to the laboratory business data; The data sending module 2022 is used to send the block corresponding to the laboratory business data to the client.

[0041] The block verification module 2023 is used to verify the block individually and output a verification message; The block adding module 2024 is used to add the block to the blockchain when the number of blocks that have passed the verification indicated in the verification message exceeds a preset threshold; The block deletion module 2025 is used to delete the block when the number of blocks that have not passed the verification indicated in the verification message exceeds a preset threshold.

[0042] In one embodiment of the present application, the data sending module can send the block corresponding to the laboratory business data to the client, where the client refers to all other clients other than the client that obtains the laboratory business data, that is, Figure 7 In the specific schematic diagram shown, it is assumed that there are 10 clients, and the first client obtains the laboratory business data, then the client sends the block formed by the laboratory business data to the other 9 clients. At this time, the block verification modules 2023 of the other 9 clients respectively verify the blocks separately and output verification messages. When the server determines that the verification messages output by the block verification modules of the 9 clients show that the number of blocks that have passed verification exceeds a preset threshold (such as 5), it is considered that a consensus is reached, and all clients add the current block to the blockchain, otherwise the block is deleted.

[0043] In one embodiment of the present application, the data sending module can send the block corresponding to the laboratory business data to the client, where the client refers to all clients of the system, that is, Figure 7 In the specific schematic diagram shown, it is assumed that there are 10 clients, and the first client obtains the laboratory business data, then the client sends the block formed by the laboratory business data to all 10 clients. At this time, the block verification modules 2023 of all 10 clients respectively verify the blocks separately and output verification messages. When the server determines that the verification messages output by the block verification modules of the 10 clients show that the number of blocks that have passed verification exceeds a preset threshold (such as 6), it is considered that a consensus has been reached, and all clients can add the current block to the blockchain, otherwise the block is deleted.

[0044] Fig.12 The block diagram of the client block formation module is shown in Fig.12 , the block forming module 2021 includes: A hash value acquisition module 20211 is used to obtain the hash value of the last block in the blockchain, referred to as the first hash value; A hash value determination module 20212, configured to output a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data; The block determination module 20213 is used to form a block according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, and the block is the block corresponding to the laboratory business data.

[0045] Fig.15 A schematic diagram showing adjacent blocks in the blockchain provided by this application is shown in Fig.15, each block in the blockchain includes the hash value of the previous block, the data of the current block, and the hash value of the current block. Specifically, Fig.15 As shown, the hash value of the previous block in block number 2 is 1Z8F, which is the same as Fig.15 The hash value 1Z8F in the block numbered 1 is the same. The hash value of the previous block in the block numbered 3 is 6BQ1, which is the same as the hash value 6BQ1 in the block numbered 2. Therefore, the hash value of the previous block recorded in each block on the blockchain needs to match the hash value of the previous block, so that two adjacent blocks can be linked together.

[0046] Therefore, the block formation module 2021 first obtains the hash value of the last block in the blockchain, that is, the first hash value, and then determines the hash value corresponding to the current block, which is related to the first hash value and the laboratory business data that the current block needs to store. The first hash value and the laboratory business data can be calculated according to the hash algorithm to obtain the hash value corresponding to the laboratory business data. Finally, the block is formed according to the hash value corresponding to the laboratory business data, the laboratory business data, and the first hash value. The hash algorithm mentioned here can be implemented according to the hash algorithm in the prior art, and this application does not limit this.

[0047] Fig.13 The block diagram of the client block verification module is shown in Fig.13 , the block verification module 2023 includes: A first hash value acquisition module 20231, used to acquire a first hash value from the block; A second hash value acquisition module 20232 is used to obtain a hash value of the last block in the blockchain, referred to as a second hash value; A first verification message output module 20233, configured to output a verification message indicating that the block verification has passed when the first hash value is the same as the second hash value; The second verification message output module 20234 is used to output a verification message indicating that the block verification has failed when the first hash value is different from the second hash value.

[0048] That is, by comparing the hash value of the previous block stored in the block generated by the block formation module with the hash value of the last block in the current blockchain, it can be determined whether the current block has passed the verification. When the hash value of the previous block stored in the block generated by the block formation module is tampered with, that is, it is different from the hash value of the last block in the current blockchain, a verification message indicating that the verification has failed is output.

[0049] As above, this application provides a laboratory business data storage system based on blockchain, and each client saves the latest blockchain. The blockchain mentioned in this application is simply a data structure, which is a log that records all transaction records. It is like an unfinished log, with information on each page and the number of pages written on the footer, so you can immediately know which page you are on. Like a book, each "block" in the blockchain is a page that records detailed information. There is no page number in the "block", but there is a timestamp. New blocks are always added to the latest block after verification. In the laboratory business data storage system, each block records the laboratory business data of all participating clients, the hash value of the current block, and the hash value of the previous block. In addition, it can also include timestamps, user signatures and other information. The amount of laboratory business data in each block can be adjusted according to demand. In accordance with the principle of resource sharing, the distributed data storage system constructed uses blockchain technology to achieve data that cannot be tampered with and ultimately consistent across the entire network.

[0050] As described above, a blockchain-based laboratory business data storage system provided by the present application is introduced. The following describes how to compare laboratory business data in the blockchain-based laboratory business data storage system provided by the present application.

[0051] In this application, all laboratories can selectively join and publish laboratory business data to other nodes of the network. Other members of the information alliance only have access rights after permission, but no disposal rights, which ensures the security of the data. For example, laboratory A can upload and modify its own laboratory business data, but can only view the data of laboratory B and has no right to modify it. The participating laboratories continuously update and share data to ensure that they have the latest version and effectively complete the required comparison business.

[0052] Fig.14 The structural block diagram of the second implementation scheme of the client in the laboratory business data storage system based on blockchain provided by this application is shown in FIG. Fig.14 In the second implementation mode, the client further includes: The comparison request receiving module 203 is used to receive at least one laboratory business data comparison request, wherein the laboratory business data comparison request carries at least one laboratory business data to be compared; The laboratory business data acquisition module 204 is used to acquire the laboratory business data stored in each block on the blockchain; The laboratory business data comparison module 205 is used to compare the laboratory business data to be compared with the laboratory business data stored in each block, and output the comparison result.

[0053] Specifically, when the laboratory business data to be compared is consistent with the laboratory business data stored in a block, a successful comparison result is output, and the laboratory business data stored in the block, such as identity information, can be output in the comparison result.

[0054] When the laboratory business data to be compared is inconsistent with the laboratory business data stored in all blocks, a comparison result indicating that the comparison failed is output.

[0055] Since the laboratory business data storage system provided by this application changes the existing technical architecture, it adopts a distributed P2P method for comparison and comparison result feedback, and uses blockchain technology to store and transmit data. Therefore, the laboratory business data obtained by all laboratories across the country are first entered into the laboratory management system of each laboratory. When a laboratory initiates a comparison task, it only needs to compare in the local blockchain node library, and the comparison result will be returned immediately. This method utilizes the idle computing resources of laboratories across the country to achieve a fast and real-time data comparison method, which improves the efficiency of feedback results by more than one order of magnitude compared to the traditional step-by-step comparison method.

[0056] The present invention also provides a computer device, comprising a processor adapted to implement various instructions and a storage device, wherein the storage device stores a plurality of instructions, wherein the instructions are adapted to be loaded and executed by the processor: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.

[0057] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program is used to execute: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.

[0058] In addition, although several unit modules of the system are mentioned in the above detailed description, this division is only non-mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units described above can be concretized in one unit. Similarly, the features and functions of a unit described above can also be further divided into being concretized by multiple units. The terms "module" and "unit" used above can be software and / or hardware that implements a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0059] After introducing the system, computer device, and computer-readable storage medium for laboratory business data storage based on blockchain according to the exemplary embodiment of the present invention, the method of the exemplary embodiment of the present invention is introduced with reference to the accompanying drawings. The implementation of the method can refer to the above overall implementation, and the repeated parts will not be repeated.

[0060] Figure 1 A flowchart of a blockchain-based laboratory business data storage method provided by this application is shown in FIG. Figure 1 , the method comprising: S101: The client obtains at least one laboratory business data.

[0061] The blockchain in the laboratory business data storage system provided in this application uses the P2P (peer-to-peer) principle. If the blockchain is only stored on one machine, when the machine is offline, other machines will not be able to obtain information. Therefore, the latest status of the blockchain needs to be synchronized to all machines, which are called "nodes". These nodes ensure that the data is the latest version through P2P. In this application, multiple clients 200 are "nodes". Specifically in the field of laboratory business data storage, clients refer to all laboratories in the country, and all laboratories can choose to join.

[0062] In order to ensure that the data in each block of the blockchain can only be used by the affiliated nodes, a dedicated server is set up, namely the server 100 in this application.

[0063] S102: When the server outputs a message indicating that the client has passed the verification, the client adds the laboratory business data to the blockchain.

[0064] Figure 2 The flowchart of the second implementation method of the laboratory business data storage method based on blockchain provided by this application is shown in Figure 2 , the method in implementation mode 2 includes: S201: The client sends a login request to the server, where the login request carries the IP address and / or certificate information corresponding to the client; S202: The server obtains multiple pre-stored IP addresses and / or certificate information. In this application, the server records the IP addresses and / or certificate information of all participating nodes (i.e., clients). All participating nodes will have a consensus mechanism. The consensus mechanism is a set of rules that are agreed upon by the nodes in the network by running software. These rules ensure that the network works securely and remains synchronized.

[0065] S203: When the IP address and / or certificate information corresponding to the client is recorded in the pre-stored multiple IP addresses and / or certificate information, the server outputs a message indicating that the client has passed the verification.

[0066] That is, when the server receives a login request sent by at least one client, it first parses the IP address and / or certificate information corresponding to the client from the login request, and then checks whether the IP address and / or certificate information corresponding to the client is recorded in the pre-stored multiple IP addresses and / or certificate information. When the verification result shows that the IP address and / or certificate information corresponding to the client is recorded in the pre-stored multiple IP addresses and / or certificate information, it is considered that the current client belongs to a participating client, so the server outputs a message that the client has been verified. When the verification result shows that the IP address and / or certificate information corresponding to the client is not recorded in the pre-stored multiple IP addresses and / or certificate information, it is considered that the current client does not belong to a participating client, so the server outputs a message that the client has not been verified.

[0067] S204: The client obtains at least one laboratory business data.

[0068] S205: The client adds the laboratory business data to the blockchain.

[0069] Figure 3 The flow chart of step S205 is shown in FIG. Figure 3 , the steps include: S301: The client forms a block according to the laboratory business data; S302: Send the block corresponding to the laboratory business data to the client.

[0070] S303: Performing separate verification on the block and outputting a verification message; S304: When the number of blocks that have passed the verification shown in the verification message exceeds a preset threshold, the block is added to the blockchain; otherwise, the block is deleted.

[0071] In one embodiment of the present application, step S302 may send the block corresponding to the laboratory business data to the client, where the client refers to all other clients other than the client that obtains the laboratory business data, that is, Figure 7In the specific schematic diagram shown, it is assumed that there are 10 clients, and the first client obtains the laboratory business data, then the client sends the block formed by the laboratory business data to the other 9 clients. At this time, the block verification modules 2023 of the other 9 clients respectively verify the blocks separately and output verification messages. When the server determines that the verification messages output by the block verification modules of the 9 clients show that the number of blocks that have passed verification exceeds a preset threshold (such as 5), it is considered that a consensus is reached, and all clients add the current block to the blockchain, otherwise the block is deleted.

[0072] In one embodiment of the present application, step S302 may send the block corresponding to the laboratory business data to the client, where the client refers to all clients of the system, that is, Figure 7 In the specific schematic diagram shown, it is assumed that there are 10 clients, and the first client obtains the laboratory business data, then the client sends the block formed by the laboratory business data to all 10 clients. At this time, the block verification modules 2023 of all 10 clients respectively verify the blocks separately and output verification messages. When the server determines that the verification messages output by the block verification modules of the 10 clients show that the number of blocks that have passed verification exceeds a preset threshold (such as 6), it is considered that a consensus has been reached, and all clients can add the current block to the blockchain, otherwise the block is deleted.

[0073] Figure 4 The flowchart of step S301 is shown in FIG. Figure 4 , the steps include: S401: The client obtains a hash value of the last block in the blockchain, referred to as a first hash value; S402: Outputting a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data.

[0074] S403: Form a block according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, where the block is the block corresponding to the laboratory business data.

[0075] Fig.15 A schematic diagram showing adjacent blocks in the blockchain provided by this application is shown in Fig.15 , each block in the blockchain includes the hash value of the previous block, the data of the current block, and the hash value of the current block. Specifically, Fig.15 As shown, the hash value of the previous block in block number 2 is 1Z8F, which is the same as Fig.15The hash value 1Z8F in the block numbered 1 is the same. The hash value of the previous block in the block numbered 3 is 6BQ1, which is the same as the hash value 6BQ1 in the block numbered 2. Therefore, the hash value of the previous block recorded in each block on the blockchain needs to match the hash value of the previous block, so that two adjacent blocks can be linked together.

[0076] Therefore, step S301 first obtains the hash value of the last block in the blockchain, that is, the first hash value, and then determines the hash value corresponding to the current block, which is related to the first hash value and the laboratory business data that the current block needs to store. The first hash value and the laboratory business data can be calculated according to the hash algorithm to obtain the hash value corresponding to the laboratory business data. Finally, a block is formed according to the hash value corresponding to the laboratory business data, the laboratory business data, and the first hash value. The hash algorithm mentioned here can be implemented according to the hash algorithm in the prior art, and this application does not limit this.

[0077] Figure 5 The flowchart of step S303 is shown in FIG. Figure 5 , the steps include: S501: The client obtains a first hash value from the block; S502: Obtain a hash value of the last block from the last block of the blockchain, referred to as a second hash value.

[0078] S503: When the first hash value is the same as the second hash value, output a verification message indicating that the block verification has passed; S504: When the first hash value is different from the second hash value, output a verification message indicating that the block verification has failed.

[0079] That is, whether the current block has passed the verification can be determined by checking whether the hash value of the previous block stored in the block generated in step S301 is the same as the hash value of the last block in the current blockchain. When the hash value of the previous block stored in the block generated in step S301 is tampered with, that is, it is different from the hash value of the last block in the current blockchain, a verification message indicating that the verification has failed is output.

[0080] As above, this application provides a laboratory business data storage method based on blockchain, and each client saves the latest blockchain. The blockchain mentioned in this application is simply a data structure, which is a log that records all transaction records. It is analogous to an unfinished log, with information on each page and the number of pages written in the footer, so you can immediately know which page you are on. Like a book, each "block" in the blockchain is a page that records detailed information. There is no page number in the "block", but there is a timestamp. New blocks are always added to the latest block after verification. In the laboratory business data storage system, each block records the laboratory business data of all participating clients, the hash value of the current block, and the hash value of the previous block. In addition, it can also include timestamps, user signatures and other information. The amount of laboratory business data in each block can be adjusted according to demand. In accordance with the principle of resource sharing, the distributed data storage system constructed uses blockchain technology to achieve data that cannot be tampered with and ultimately consistent across the entire network.

[0081] As described above, a blockchain-based laboratory business data storage method provided by the present application is introduced. The following describes how to compare laboratory business data according to the blockchain-based laboratory business data storage method provided by the present application.

[0082] In this application, all laboratories can selectively join and publish laboratory business data to other nodes of the network. Other members of the information alliance only have access rights after permission, but no disposal rights, which ensures the security of the data. For example, laboratory A can upload and modify its own laboratory business data, but can only view the data of laboratory B and has no right to modify it. The participating laboratories continuously update and share data to ensure that they have the latest version and effectively complete the required comparison business.

[0083] Figure 6 The flowchart of the third implementation method of the laboratory business data storage method based on blockchain provided by this application is shown in Figure 6 In the third embodiment, the method includes: S601: The client obtains at least one laboratory business data; S602: When the server outputs a message that the client has passed the verification, the client adds the laboratory business data to the blockchain; S603: Receive at least one laboratory business data comparison request, where the laboratory business data comparison request carries at least one laboratory business data to be compared; S604: Obtain laboratory business data stored in each block on the blockchain; S605: Compare the laboratory business data to be compared with the laboratory business data stored in each block, and output the comparison result.

[0084] Specifically, when the laboratory business data to be compared is consistent with the laboratory business data stored in a block, a successful comparison result is output, and the laboratory business data stored in the block, such as identity information, can be output in the comparison result.

[0085] When the laboratory business data to be compared is inconsistent with the laboratory business data stored in all blocks, a comparison result indicating that the comparison failed is output.

[0086] Since the laboratory business data storage method provided by this application changes the existing technical system structure, it adopts a distributed P2P method for comparison and comparison result feedback, and uses blockchain technology to store and transmit data. Therefore, the laboratory business data obtained by all laboratories in the country are first entered into the laboratory management system of each laboratory. The sum of the data of each laboratory is equal to the departmental level of the "laboratory management system", and the timeliness is better. When a laboratory initiates a comparison task, it only needs to compare in the local blockchain node library, and the comparison result will be returned immediately. This method utilizes the idle computing resources of laboratories across the country to achieve a fast and real-time data comparison method, which improves the efficiency of feedback results by more than one order of magnitude compared to the traditional step-by-step comparison method.

[0087] The technical solution provided in this application creatively proposes a distributed comparison mode, which solves the defects of the existing system-level comparison, significantly improves the efficiency of grassroots case investigation and provides strong support for case detection.

[0088] The beneficial effects of the present invention include: There is no need to report to all levels one by one, thus improving the efficiency of laboratory comparison work across the country.

[0089] Distributed data is stored in multiple locations to ensure data security and integrity, and prevent the server from going offline and becoming inaccessible.

[0090] It should be noted that although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0091] Although the present application provides method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only order of execution. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements.

[0092] The units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this application, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0093] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0094] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0095] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0096] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0097] Although the present application has been described through embodiments, persons skilled in the art will appreciate that there are many modifications and variations of the present application without departing from the spirit of the present application. It is intended that the appended claims include these modifications and variations without departing from the spirit of the present application.

Claims

1. A laboratory business data storage method based on blockchain, characterized in that: The method is applied to a laboratory business data storage system based on blockchain, the system includes a server and multiple clients, and the method includes: The client obtains at least one laboratory business data; When the server outputs a message indicating that the client has passed the verification, the client adds the laboratory business data to the blockchain.

2. The method according to claim 1, characterized in that The method further comprises: The client sends a login request to the server, where the login request carries the IP address and / or certificate information corresponding to the client; The server obtains a plurality of pre-stored IP addresses and / or certificate information; When the IP address and / or certificate information corresponding to the client is recorded in the multiple IP addresses and / or certificate information pre-stored in the server, the server outputs a message indicating that the client has passed the verification.

3. The method according to claim 1 or 2, characterized in that: The client adding the laboratory business data to the blockchain includes: The client forms a block according to the laboratory business data; The client sends the block corresponding to the laboratory business data to all clients; All clients verify the block separately and output verification messages; When the verification messages output by all clients show that the number of blocks that have passed verification exceeds a preset threshold, all clients will add the blocks to the blockchain, otherwise, the blocks will be deleted.

4. The method according to claim 3, characterized in that The client forms a block according to the laboratory business data, including: The client obtains a hash value of the last block in the blockchain, referred to as a first hash value; Outputting a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data; A block is formed according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, and the block is the block corresponding to the laboratory business data.

5. The method according to claim 4, characterized in that All clients verify the block separately, and the output verification message includes: All clients obtain a first hash value from the block; All clients obtain the hash value of the last block from the last block of the blockchain, which is called the second hash value; When the first hash value is the same as the second hash value, output a verification message indicating that the block verification has passed; When the first hash value is different from the second hash value, a verification message indicating that the block verification has failed is output.

6. The method according to claim 1, characterized in that The method further comprises: The client receives at least one laboratory business data comparison request, wherein the laboratory business data comparison request carries at least one laboratory business data to be compared; Obtaining laboratory business data stored in each block on the blockchain; The laboratory business data to be compared is compared with the laboratory business data stored in each block, and a comparison result is output.

7. A laboratory business data storage system based on blockchain, characterized in that: The system includes a server and multiple clients. The server includes a verification module, which is used to verify the client and output a verification message; The client comprises a data acquisition module, which is used to acquire at least one laboratory business data; A data adding module is used to add the laboratory business data to the blockchain when the verification message shows that the client verification has passed.

8. The system according to claim 7, characterized in that The client also includes: A login request sending module, used to send a login request to the server, wherein the login request carries the IP address and / or certificate information corresponding to the client; The server also includes: A storage information acquisition module, used to acquire a plurality of pre-stored IP addresses and / or certificate information; The verification module comprises: A first verification module, configured to output a message indicating that the client has passed verification when the IP address and / or certificate information corresponding to the client is recorded in a plurality of pre-stored IP addresses and / or certificate information; The second verification module is used to output a message indicating that the client has not passed the verification when the IP address and / or certificate information corresponding to the client is not recorded in the pre-stored multiple IP addresses and / or certificate information.

9. The system according to claim 7 or 8, characterized in that: The data adding module comprises: A block forming module, used for forming a block according to the laboratory business data; A data sending module, used for sending the block corresponding to the laboratory business data to the client; A block verification module, used to verify the block individually and output a verification message; A block adding module, configured to add the block to the blockchain when the number of blocks that have passed the verification indicated in the verification message exceeds a preset threshold; The block deletion module is used to delete the block when the number of blocks that have not passed the verification shown in the verification message exceeds a preset threshold.

10. The system according to claim 9, characterized in that The block forming module comprises: A hash value acquisition module, used to obtain the hash value of the last block in the blockchain, referred to as the first hash value; A hash value determination module, configured to output a hash value corresponding to the laboratory business data based on a hash algorithm according to the first hash value and the laboratory business data; The block determination module is used to form a block according to the hash value corresponding to the laboratory business data, the laboratory business data and the first hash value, and the block is the block corresponding to the laboratory business data.

11. The system according to claim 9, characterized in that The block verification module includes: A first hash value acquisition module, used to acquire a first hash value from the block; A second hash value acquisition module, used to obtain a hash value of the last block in the blockchain, referred to as a second hash value; A first verification message output module, configured to output a verification message indicating that the block verification has passed when the first hash value is the same as the second hash value; The second verification message output module is used to output a verification message indicating that the block verification has failed when the first hash value is different from the second hash value.

12. The system according to claim 7, characterized in that The client also includes: A comparison request receiving module, used to receive at least one laboratory business data comparison request, wherein the laboratory business data comparison request carries at least one laboratory business data to be compared; A laboratory business data acquisition module, used to acquire laboratory business data stored in each block on the blockchain; The laboratory business data comparison module is used to compare the laboratory business data to be compared with the laboratory business data stored in each block, and output the comparison result.

13. A computing device, characterized in that: The computing device comprises: a processor adapted to implement various instructions and a storage device, wherein the storage device stores a plurality of instructions, and the instructions are adapted to be loaded and executed by the processor: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.

14. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and the computer program is used to execute: Obtain at least one laboratory business data; When the verification is passed, the laboratory business data is added to the blockchain.