A quarantine data processing method and system based on blockchain
By building a blockchain-based quarantine data sharing system, the problem of data cannot be exchanged and shared between different institutions is solved, efficient data sharing and exchange is achieved, cost reduction and decision-making is improved.
Patent Information
- Application Number
- CN202411836962.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
The lack of unified standards and interfaces between different agencies, resulting in data being unable to be directly exchanged and shared, which affects the comprehensiveness and accuracy of quarantine work, increases staff burden and resource waste, and increases the unscientificity of costs and decision-making.
By building a blockchain-based data sharing system, a first blockchain for data sharing is built based on the servers of each quarantine agency, a target quarantine type data set and initial node set are determined, a second blockchain for data analysis is generated, and the target data is determined based on current quarantine needs.
It realizes efficient sharing and exchange of data, reduces construction and maintenance costs, protects data privacy and security, improves the scientificity and accuracy of decision-making, and eliminates data silos.
Smart Images

Figure CN119783165A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a quarantine data processing method and system based on blockchain. Background Art
[0002] Due to the lack of unified standards and interfaces between quarantine data systems of different institutions, data cannot be directly exchanged and shared. This makes each institution work in its own data island and unable to obtain relevant information from other institutions, thus affecting the comprehensiveness and accuracy of quarantine work.
[0003] The data island phenomenon leads to a large amount of repeated data entry and verification work, which not only increases the burden on staff, but also causes a waste of resources. At the same time, since data cannot be shared, each institution may need to independently purchase and maintain its own data system, further increasing costs.
[0004] Data silos prevent decision makers from obtaining comprehensive and accurate information, which affects the scientificity and accuracy of decision-making. In the field of public health and safety, timely and accurate information is the key to formulating effective prevention and control measures. However, data silos make this key information difficult to obtain. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a quarantine data processing method and system based on blockchain that overcomes the above problems or at least partially solves the above problems, including:
[0006] A quarantine data processing method based on blockchain, the method comprising:
[0007] Building the first blockchain for data sharing based on the servers of each quarantine agency;
[0008] Determine, according to the first blockchain and the preset quarantine type, each target quarantine type data set corresponding to the preset quarantine type;
[0009] Determining, in the first blockchain, each initial node set corresponding to each of the target quarantine type data sets according to each of the target quarantine type data sets;
[0010] Generating a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets;
[0011] The target data is determined in the second blockchain according to the current quarantine requirements.
[0012] Furthermore, the step of constructing a first blockchain for data sharing based on each quarantine agency server includes:
[0013] Regularly obtain quarantine information from the servers of several quarantine agencies according to preset time;
[0014] Desensitizing the quarantine information to generate desensitized information;
[0015] Generating an initial node according to the desensitized information and the quarantine information;
[0016] The first blockchain is constructed based on all the initial nodes.
[0017] Furthermore, the step of performing desensitization processing on the quarantine information to generate desensitized information includes:
[0018] Determining desensitization rules in a preset desensitization strategy library according to the quarantine information and the desensitization request;
[0019] Splitting the quarantine information into documents according to the desensitization rules to generate messages to be processed;
[0020] Parsing the message to be processed according to a preset document type to generate a document to be analyzed, wherein the preset document type includes an image type, a table type, and a text type;
[0021] Generating a block corresponding to a target preset document type according to the preset document type and the document to be analyzed;
[0022] Determining whether the block complies with the desensitization rule;
[0023] When the document attribute of the block matches the desensitizing attribute of the desensitizing rule, the field to be desensitized in the desensitizing rule is obtained, and the desensitized information is determined by the field to be desensitized and the quarantine information; or,
[0024] When the document attribute of the block does not match the desensitizing attribute of the desensitizing rule, the target desensitizing rule that matches the document attribute is matched in the preset desensitizing strategy library based on the document attribute of the block, and the desensitizing information is determined by the target desensitizing rule and the quarantine information.
[0025] Furthermore, the step of determining each target quarantine type data set corresponding to the preset quarantine type according to the first blockchain and the preset quarantine type, wherein the preset quarantine type includes sanitary quarantine, animal and plant quarantine, and food safety quarantine, and the target quarantine type data set includes a sanitary quarantine data set, an animal and plant quarantine data set, and a food safety quarantine data set, comprises:
[0026] Dividing the first blockchain into node sets according to the preset quarantine type, the node sets including a health quarantine node set, an animal and plant quarantine node set, and a food safety quarantine node set;
[0027] Acquire node data in the node set, and divide the node data into structured data and unstructured data;
[0028] Performing data standardization processing on the unstructured data to generate standard format data;
[0029] generating quarantine data according to the structured data and the standard format data;
[0030] Determining an association relationship with the node set based on the quarantine data;
[0031] The target quarantine type data set is generated according to the quarantine data, the node set and the association relationship.
[0032] Furthermore, the step of determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain according to each of the target quarantine type data sets includes:
[0033] Determining data to be processed in the target quarantine type data set;
[0034] Determining source traceability information corresponding to the data to be processed based on the data to be processed and the first blockchain;
[0035] Querying and generating traceability data in the first blockchain according to the traceability information;
[0036] Determining an initial source node corresponding to the traceability data based on the traceability data and the first blockchain;
[0037] All the initial source nodes of all the target quarantine type data sets are collected to generate the initial node set.
[0038] Furthermore, the step of determining an initial source node corresponding to the traceability data based on the traceability data and the first blockchain includes:
[0039] Obtaining a hash value of the traceability data;
[0040] Determine a target node storing the same hash value according to the hash value and the first blockchain;
[0041] The target node is marked as the initial source node corresponding to the traceability data.
[0042] Furthermore, the step of determining target data in the second blockchain according to the current quarantine requirements includes:
[0043] The second blockchain receives the current quarantine requirement and determines user information and retrieval identification information corresponding to the current quarantine requirement;
[0044] The user information determines permission information in the second blockchain;
[0045] Determining a node to be searched in the second blockchain according to the permission information and the search identification information;
[0046] Determining the degree of matching with the node to be searched based on the search identification information;
[0047] When the first matching degree between the search identification information and the current node to be searched is greater than a preset matching value, the target data is determined in the current node to be searched according to the search identification information; or,
[0048] When the second matching degree between the search identification information and the current node to be searched is less than the preset matching value, the target search node is determined according to the search identification information and the preset matching value, and the target data is generated through the target search node and the search identification information.
[0049] An embodiment of the present application further discloses a quarantine data processing system based on blockchain, the system comprising:
[0050] A construction module, used to construct a first blockchain for data sharing based on the servers of each quarantine agency;
[0051] A first determination module, configured to determine each target quarantine type data set corresponding to the preset quarantine type according to the first blockchain and the preset quarantine type;
[0052] A second determination module, configured to determine, in the first blockchain, each initial node set corresponding to all the target quarantine type data sets according to each of the target quarantine type data sets;
[0053] A generation module, used to generate a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets;
[0054] The third determination module is used to determine the target data in the second blockchain according to the current quarantine requirements.
[0055] An embodiment of the present application also discloses a computer device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the quarantine data processing method based on blockchain as described above are implemented.
[0056] An embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the quarantine data processing method based on blockchain as described above are implemented.
[0057] This application has the following advantages:
[0058] In the embodiments of the present application, compared with the prior art in which data between existing institutions cannot be exchanged and shared, which affects the comprehensiveness and accuracy of quarantine work, and there are problems such as high labor costs and difficulty in obtaining key information, the present application provides a quarantine data processing solution that can realize data sharing and provide key information, specifically: constructing a first blockchain for data sharing based on the servers of each quarantine agency; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each of the target quarantine type data sets; generating a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets; determining the target data in the second blockchain based on the current quarantine requirements. By constructing a first blockchain for data sharing based on the servers of each quarantine agency; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each target quarantine type data set; generating a second blockchain for data analysis based on each target quarantine type data set and each initial node set; and determining the target data in the second blockchain based on the current quarantine needs, the problem of data being unable to be exchanged and shared between existing agencies, affecting the comprehensiveness and accuracy of quarantine work, and having high labor costs and difficulty in obtaining key information is solved, thereby achieving the effect of improving the efficiency of data sharing and exchange, reducing construction and maintenance costs, protecting data privacy and security, improving the scientificity and accuracy of decision-making, and eliminating the data island phenomenon. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0060] Figure 1 This is a flowchart of a quarantine data processing method based on blockchain provided in one embodiment of the present application;
[0061] Figure 2 This is a structural block diagram of a quarantine data processing system based on blockchain provided in one embodiment of the present application;
[0062] Figure 3 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0064] Reference Figure 1 , showing a flowchart of a quarantine data processing method based on blockchain provided in one embodiment of the present application;
[0065] A quarantine data processing method based on blockchain, the method comprising:
[0066] S110, constructing a first blockchain for data sharing based on the servers of each quarantine agency;
[0067] S120. Determine, according to the first blockchain and the preset quarantine type, each target quarantine type data set corresponding to the preset quarantine type;
[0068] S130. Determine, in the first blockchain, each initial node set corresponding to each of the target quarantine type data sets according to each of the target quarantine type data sets;
[0069] S140, generating a second blockchain for data analysis according to each of the target quarantine type data sets and each of the initial node sets;
[0070] S150. Determine target data in the second blockchain according to current quarantine requirements.
[0071] In the embodiments of the present application, compared with the prior art in which data between existing institutions cannot be exchanged and shared, which affects the comprehensiveness and accuracy of quarantine work, and there are problems such as high labor costs and difficulty in obtaining key information, the present application provides a quarantine data processing solution that can realize data sharing and provide key information, specifically: constructing a first blockchain for data sharing based on the servers of each quarantine agency; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each of the target quarantine type data sets; generating a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets; determining the target data in the second blockchain based on the current quarantine requirements. By constructing a first blockchain for data sharing based on the servers of each quarantine agency; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each target quarantine type data set; generating a second blockchain for data analysis based on each target quarantine type data set and each initial node set; and determining the target data in the second blockchain based on the current quarantine needs, the problem of data being unable to be exchanged and shared between existing agencies, affecting the comprehensiveness and accuracy of quarantine work, and having high labor costs and difficulty in obtaining key information is solved, thereby achieving the effect of improving the efficiency of data sharing and exchange, reducing construction and maintenance costs, protecting data privacy and security, improving the scientificity and accuracy of decision-making, and eliminating the data island phenomenon.
[0072] Below, a quarantine data processing method based on blockchain in this exemplary embodiment will be further described.
[0073] As described in step S110, a first blockchain for data sharing is constructed based on the servers of each quarantine agency.
[0074] In one embodiment of the present invention, the specific process of "building a first blockchain for data sharing based on the servers of each quarantine agency" in step S110 can be further explained in combination with the following description.
[0075] As described in the following steps,
[0076] S210, regularly obtaining quarantine information from a plurality of quarantine agency servers according to a preset time;
[0077] S220, performing desensitization processing on the quarantine information to generate desensitized information;
[0078] S230, generating an initial node according to the desensitized information and the quarantine information;
[0079] S240. Construct the first blockchain based on all the initial nodes.
[0080] It should be noted that, by constructing the first blockchain, the quarantine information of the servers of each quarantine agency is processed and then deployed as the initial blockchain node;
[0081] In this embodiment, a larger-scale quarantine agency builds a blockchain, such as the Cardano blockchain. The Cardano blockchain is a third-generation blockchain platform that focuses on security and scalability. It uses the Ouroboros consensus algorithm, combines the advantages of PoS and PoW, and supports smart contracts and customizable blockchain applications.
[0082] In another embodiment, the Polkadot blockchain, an interoperable blockchain network designed to connect different blockchains and enable cross-chain communication, can also be used. Using the Substrate framework, independent blockchains will be created and connected to the Polkadot network.
[0083] As an example, each quarantine agency joins the first blockchain in the form of a blockchain node. Each quarantine agency deploys its blockchain node on its own server, and the network realizes server intercommunication.
[0084] In a specific implementation, the quarantine information may be real-time quarantine information or historical quarantine information; the preset time is a certain time range, such as hours, days, months, and quarters.
[0085] As described in step S220, the quarantine information is desensitized to generate desensitized information.
[0086] In one embodiment of the present invention, the specific process of "desensitizing the quarantine information to generate desensitized information" in step S220 can be further explained in combination with the following description.
[0087] As described in the following steps,
[0088] S310, determining a desensitization rule in a preset desensitization strategy library according to the quarantine information and the desensitization request;
[0089] S320, splitting the quarantine information into documents according to the desensitization rule to generate messages to be processed;
[0090] S330, parsing the message to be processed according to a preset document type to generate a document to be analyzed, wherein the preset document type includes an image type, a table type, and a text type;
[0091] S340, generating a block corresponding to a target preset document type according to the preset document type and the document to be analyzed;
[0092] S350, determining whether the block complies with the desensitization rule;
[0093] S360, when the document attribute of the block matches the desensitizing attribute of the desensitizing rule, obtaining the field to be desensitized in the desensitizing rule, and determining the desensitized information through the field to be desensitized and the quarantine information; or,
[0094] S370. When the document attribute of the block does not match the desensitizing attribute of the desensitizing rule, a target desensitizing rule that matches the document attribute is matched in the preset desensitizing strategy library according to the document attribute of the block, and the desensitizing information is determined by the target desensitizing rule and the quarantine information.
[0095] It should be noted that the preset desensitization strategy library includes at least: Data Masking Static data masking is used to mask sensitive data when storing data, such as replacing real data with randomly generated false data.
[0096] Dynamic data masking generates masked data in real time as the data is used, which is suitable for scenarios that require frequent access to real data.
[0097] Data obfuscation: Through obfuscation, the identifiability of sensitive data is reduced, such as replacing some digits in a phone number with asterisks.
[0098] Data generalization replaces specific values with broader categories or ranges, such as replacing date of birth with year of birth.
[0099] Data Suppression completely removes certain sensitive data or does not display sensitive data under certain conditions.
[0100] Pseudonymization of data: using pseudonyms to replace real data. Pseudonyms are associated with real data through a separate management system.
[0101] Data hashing (Hashing) converts sensitive data into an irreversible fixed-length string through a hash function, such as converting a name into an MD5 value.
[0102] Data Encryption uses symmetric or asymmetric encryption algorithms to encrypt sensitive data, ensuring that only authorized users can decrypt and access the data.
[0103] Data segmentation stores sensitive data in different locations or databases, making it difficult to obtain complete sensitive data separately.
[0104] Data Microaggregation aggregates multiple records together so that each aggregated record is no longer individually identifiable.
[0105] Differential Privacy protects privacy by adding noise during the data analysis process so that the deletion or addition of a single record has minimal impact on the overall data analysis results.
[0106] Time Stamp Anonymization: blurring time data, such as replacing specific time with year, month, day or hour and minute, to protect time privacy.
[0107] Geographical Anonymization is the process of obfuscating geographic location data, such as replacing specific addresses with postal codes or city-level geographic areas.
[0108] As an example, a desensitization rule is determined in a preset desensitization policy library through a desensitization request, and then the quarantine information is split into messages to be processed through the desensitization rule. The message is parsed according to the preset document type, such as image message, table message and text message, and the corresponding block is generated by the parsed message. Each block is connected to the previous block through a hash value to form a chain. Each block contains the hash value of the previous block. Therefore, any modification to the block data will change the hash value of all subsequent blocks, making it very difficult to tamper with the data.
[0109] In a specific implementation, it is determined whether the block symbol meets the desensitization rule; if it meets the rule, the field to be desensitized in the composite desensitization rule is obtained, and the desensitized information in the quarantine information is determined through the field to be desensitized; if it does not meet the rule, the document attributes of the block are matched with the document attributes corresponding to the desensitization rule, where the document attributes can be title, creation date, modification date, file type, number of words, size, keywords, permissions, version, storage location, metadata, tags, etc., and the corresponding document attributes are marked as target desensitization rules to obtain the desensitized information.
[0110] As described in step S120, each target quarantine type data set corresponding to the preset quarantine type is determined based on the first blockchain and the preset quarantine type.
[0111] It should be noted that the preset quarantine types include sanitary quarantine, animal and plant quarantine and food safety quarantine, and the target quarantine type data set includes a sanitary quarantine data set, an animal and plant quarantine data set and a food safety quarantine data set.
[0112] In one embodiment of the present invention, the specific process of "determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type" in step S120 can be further explained in combination with the following description.
[0113] As described in the following steps,
[0114] S410, dividing the first blockchain into node sets according to the preset quarantine type, the node sets including a health quarantine node set, an animal and plant quarantine node set, and a food safety quarantine node set;
[0115] S420, acquiring node data in the node set, and dividing the node data into structured data and unstructured data;
[0116] S430, performing data standardization processing on the unstructured data to generate standard format data;
[0117] S440, generating quarantine data according to the structured data and the standard format data;
[0118] S450, determining an association relationship with the node set according to the quarantine data;
[0119] S460: Generate the target quarantine type data set according to the quarantine data, the node set and the association relationship.
[0120] It should be noted that quarantine types include inbound goods quarantine, outbound goods quarantine, transit goods quarantine, animal and plant and their products quarantine, food quarantine, health quarantine, means of transport quarantine, luggage quarantine and mail quarantine.
[0121] As an example, the main quarantine types of this application are animal and plant and their product quarantine, food quarantine, and health quarantine.
[0122] In a specific implementation, the first blockchain is divided into different node sets, that is, it is divided into node sets corresponding to the quarantine type according to the quarantine type, and the node data in the node set is obtained. At the beginning, the first blockchain is constructed without processing the data, so the data is different in format. The node data is divided into structured data and unstructured data, and the unstructured data is subjected to data standardization, wherein the data standardization converts the data into a distribution with a mean of 0 and a standard deviation of 1 for standardized analysis and comparison; the data standardization can also be data cleaning processing, data formatting processing or data normalization processing; thereby obtaining standard format data, and then combining it with the structured data as mentioned above to generate quarantine data, and determining the association relationship between the quarantine data and the node set, and finally obtaining the target quarantine type data set by combining the quarantine data, the node set and the association.
[0123] As described in step S130, each initial node set corresponding to all the target quarantine type data sets is determined in the first blockchain based on each of the target quarantine type data sets.
[0124] In one embodiment of the present invention, the specific process of "determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain according to each of the target quarantine type data sets" in step S130 can be further explained in combination with the following description.
[0125] As described in the following steps,
[0126] S510, determining data to be processed in the target quarantine type data set;
[0127] S520: Determine the traceability information corresponding to the data to be processed according to the data to be processed and the first blockchain;
[0128] S530, querying and generating traceability data in the first blockchain according to the traceability information;
[0129] S540, determining an initial source node corresponding to the traceability data according to the traceability data and the first blockchain;
[0130] S550: Collect all the initial source nodes of all the target quarantine type data sets and generate the initial node set.
[0131] It should be noted that traceability data refers to historical records and information used to track and analyze a specific phenomenon, event or process. Traceability data is usually used to determine the causes, influencing factors and evolution of a specific result, thereby providing a basis for decision-making. Traceability data can come from a variety of sources, including but not limited to: historical records such as financial statements, meeting minutes, emails, log files, etc.; statistical data such as market research reports, industry research reports, statistical data, etc.; sensor data such as data collected by temperature sensors, humidity sensors, pressure sensors, etc.; social media data such as user comments and posts on platforms such as Twitter, Facebook, Instagram, etc.; IoT device data such as data collected by smart home devices, industrial equipment, etc.
[0132] As an example, by determining the pending data that needs to be processed in the target quarantine type data set, the corresponding traceability information is determined in the first blockchain through the pending data. The traceability information refers to data that describes the creation, modification, and propagation history of a digital object or its copy, which includes a process that describes metadata of how data moves from one entity to another. Through this process, the corresponding traceability data can be determined.
[0133] In a specific implementation, when traceability data is queried, its initial source node is determined in the first blockchain through partial data feature information of the traceability data, wherein the data feature information may be type, range, central tendency, degree of dispersion, shape characteristics, correlation, uniqueness and missing values; and then all the data in the target quarantine type data set are processed according to the above-mentioned processing process to obtain all the initial source nodes, thereby obtaining an initial node set after integration.
[0134] As described in step S540, an initial source node corresponding to the traceability data is determined based on the traceability data and the first blockchain.
[0135] In one embodiment of the present invention, the specific process of "determining the initial source node corresponding to the traceability data based on the traceability data and the first blockchain" in step S540 can be further explained in combination with the following description.
[0136] As described in the following steps,
[0137] S610, obtaining a hash value of the traceability data;
[0138] S620: Determine a target node storing the same hash value according to the hash value and the first blockchain;
[0139] S630: Mark the target node as the initial source node corresponding to the traceability data.
[0140] It should be noted that a hash value is a value used to verify the integrity of data, which is generated by inputting data into a hash function. The hash function converts the input data into a fixed-length string, which is usually a combination of numbers or characters. Since the hash value is generated by a specific algorithm, even if only one character in the input data is different, the generated hash value will be completely different. During data transmission and storage, the use of hash values can verify the integrity of the data and ensure that the data has not been tampered with or damaged. For example, when downloading a file, the actual hash value of the file can be compared with the hash value provided for download to confirm whether the file is complete.
[0141] As an example, common hash functions include MD5, SHA-1, SHA-256, etc. Each hash function has its specific application scenario and security features. For example, although MD5 is widely used, it has low security and is vulnerable to collision attacks. The hash function of this application is SHA-256, which has higher security and is suitable for the specific implementation scenario of this application.
[0142] In a specific implementation, a target node with the same hash value is determined in the first blockchain by the hash value, and is marked as the initial source node of the current traceability data.
[0143] As described in step S150, target data is determined in the second blockchain according to current quarantine requirements.
[0144] In one embodiment of the present invention, the specific process of "determining target data in the second blockchain according to current quarantine requirements" in step S150 can be further explained in combination with the following description.
[0145] As described in the following steps,
[0146] S710: The second blockchain receives the current quarantine requirement and determines user information and retrieval identification information corresponding to the current quarantine requirement;
[0147] S720. The user information determines permission information in the second blockchain;
[0148] S730. Determine a node to be searched in the second blockchain according to the permission information and the search identification information;
[0149] S740, determining a matching degree with the node to be searched according to the search identification information;
[0150] S750: When the first matching degree between the search identification information and the current node to be searched is greater than a preset matching value, determining the target data in the current node to be searched according to the search identification information; or
[0151] S760: When the second matching degree between the search identification information and the current node to be searched is less than the preset matching value, a target search node is determined based on the search identification information and the preset matching value, and the target data is generated through the target search node and the search identification information.
[0152] It should be noted that the quarantine requirements are generally based on the requirements of the quarantine personnel, including the specific user information of the quarantine personnel and the desired key information, namely, the retrieval identification information.
[0153] As an example, after receiving the quarantine requirement, the second blockchain determines the identity of the quarantine requirement and the goals to be achieved within the requirement. After determining the identity, the second blockchain retrieves the nodes related to it, and screens these nodes as nodes to be retrieved. The degree of matching between them and these nodes to be retrieved is determined by retrieving identification information, and the target data is determined in the second blockchain based on the degree of matching.
[0154] In a specific implementation, the degree of matching can be achieved in the following ways; such as string matching: Levenshtein distance, which calculates the minimum number of operations (insertion, deletion, substitution) required to convert one string into another. Jaccard similarity coefficient, which is applicable to binary sets, calculates the ratio of the intersection and union of two sets. Hamming distance, which is applicable to strings of the same length, calculates the number of characters in different positions.
[0155] Vector matching: Cosine Similarity, calculates the angle between two vectors, with a range of [-1,1]. Euclidean Distance, calculates the distance between two vectors.
[0156] Graph matching: Graph edit distance, similar to string edit distance, but applicable to graph structures. Subgraph isomorphism, determining whether a graph is a partial subgraph of another graph.
[0157] Semantic matching: TF-IDF weighted cosine similarity, converting text into vectors and calculating cosine similarity after weighting by TF-IDF. BERT similarity, using the pre-trained BERT model to convert text into vectors and calculate similarity.
[0158] Compared with the existing technology, the beneficial effects of the technical solution are as follows: 1. Improve the efficiency of data sharing and exchange: The present invention adopts blockchain technology and stores data on multiple nodes in a network through distributed database technology. Each node has a complete copy of the database, and these nodes can synchronize and verify data with each other. This decentralized data storage method does not require manual intervention and data conversion, greatly improves the efficiency of data sharing and exchange, and reduces the workload and the possibility of errors. 2. Reduce construction and maintenance costs: The present invention realizes data sharing and exchange through blockchain technology, and does not need to establish a data sharing platform or data exchange center, thus greatly reducing the construction and maintenance costs. At the same time, blockchain technology has the characteristics of self-organization, self-management and self-repair, which further reduces the maintenance cost of the system. 3. Protect data privacy and security: The present invention adopts blockchain technology and ensures the privacy and security of data during transmission and storage through encryption algorithms and consensus mechanisms. At the same time, blockchain technology has the characteristics of being tamper-proof, ensuring the authenticity and integrity of data, and further protecting data privacy and security. 4. Improve the scientificity and accuracy of decision-making: The present invention realizes data sharing and exchange through blockchain technology, so that decision makers can obtain comprehensive and accurate information, thereby improving the scientificity and accuracy of decision-making. In the field of public health and safety, timely and accurate information is the key to formulating effective prevention and control measures. The implementation of this invention will provide strong support for public health and safety. 5. Eliminate the phenomenon of data silos: This invention uses blockchain technology to achieve data sharing and exchange, breaking the phenomenon of data silos between different institutions, allowing each institution to obtain relevant information from other institutions, thereby improving the comprehensiveness and accuracy of quarantine work. At the same time, this also avoids repeated data entry and verification work, reduces the burden on staff, and saves resources.
[0159] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0160] Reference Figure 2 , showing a structural block diagram of a quarantine data processing system based on blockchain provided by an embodiment of the present application;
[0161] A quarantine data processing system based on blockchain, the system comprising:
[0162] A construction module 210 is used to construct a first blockchain for data sharing based on each quarantine agency server;
[0163] A first determination module 220, configured to determine each target quarantine type data set corresponding to the preset quarantine type according to the first blockchain and the preset quarantine type;
[0164] A second determination module 230 is used to determine, in the first blockchain, each initial node set corresponding to all the target quarantine type data sets according to each of the target quarantine type data sets;
[0165] A generation module 240, configured to generate a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets;
[0166] The third determination module 250 is used to determine the target data in the second blockchain according to the current quarantine requirements.
[0167] In one embodiment of the present invention, the construction module 210 includes:
[0168] The first acquisition submodule is used to periodically acquire quarantine information from a number of quarantine agency servers according to a preset time;
[0169] A first generating submodule, used for performing desensitization processing on the quarantine information to generate desensitized information;
[0170] A second generation submodule, used to generate an initial node according to the desensitized information and the quarantine information;
[0171] The first construction submodule is used to construct the first blockchain based on all the initial nodes.
[0172] In one embodiment of the present invention, the first construction submodule includes:
[0173] A first determining unit, configured to determine a desensitization rule in a preset desensitization strategy library according to the quarantine information and the desensitization request;
[0174] A first generating unit, configured to perform document splitting on the quarantine information according to the desensitization rule to generate a message to be processed;
[0175] A second generating unit, configured to parse the message to be processed according to a preset document type to generate a document to be analyzed, wherein the preset document type includes an image type, a table type, and a text type;
[0176] A third generating unit, configured to generate a block corresponding to a target preset document type according to the preset document type and the document to be analyzed;
[0177] A second determination unit, configured to determine whether the block complies with the desensitization rule;
[0178] A third determining unit is used for obtaining the field to be desensitized in the desensitization rule when the document attribute of the block matches the desensitization attribute of the desensitization rule, and determining the desensitized information through the field to be desensitized and the quarantine information; or,
[0179] The fourth determination unit is used to match the target desensitization rule that matches the document attribute in the preset desensitization strategy library according to the document attribute of the block when there is a mismatch between the document attribute of the block and the desensitization attribute of the desensitization rule, and determine the desensitized information through the target desensitization rule and the quarantine information.
[0180] In one embodiment of the present invention, the first determining module 220 includes:
[0181] A first segmentation submodule, configured to segment the first blockchain into node sets according to the preset quarantine type, wherein the node sets include a health quarantine node set, an animal and plant quarantine node set, and a food safety quarantine node set;
[0182] A second acquisition submodule is used to acquire node data in the node set and divide the node data into structured data and unstructured data;
[0183] A third generating submodule is used to perform data standardization processing on the unstructured data to generate standard format data;
[0184] A fourth generating submodule, used to generate quarantine data according to the structured data and the standard format data;
[0185] A first determination submodule, configured to determine an association relationship with the node set based on the quarantine data;
[0186] The fourth generating submodule is used to generate the target quarantine type data set according to the quarantine data, the node set and the association relationship.
[0187] In one embodiment of the present invention, the second determining module 230 includes:
[0188] A second determination submodule is used to determine the data to be processed in the target quarantine type data set;
[0189] A third determination submodule, configured to determine the traceability information corresponding to the data to be processed based on the data to be processed and the first blockchain;
[0190] A fifth generation submodule, configured to query and generate traceability data in the first blockchain according to the traceability information;
[0191] A fourth determination submodule, configured to determine an initial source node corresponding to the traceability data based on the traceability data and the first blockchain;
[0192] The sixth generation submodule is used to collect all the initial source nodes of all the target quarantine type data sets and generate the initial node set.
[0193] In an embodiment of the present invention, the fourth determining submodule includes:
[0194] A first acquisition unit, used to acquire a hash value of the traceability data;
[0195] A fifth determining unit, configured to determine a target node storing the same hash value according to the hash value and the first blockchain;
[0196] The first marking unit is used to mark the target node as the initial source node corresponding to the traceability data.
[0197] In one embodiment of the present invention, the third determining module 250 includes:
[0198] A fifth determination submodule, configured for the second blockchain to receive the current quarantine requirement and determine user information and retrieval identification information corresponding to the current quarantine requirement;
[0199] A sixth determination submodule, used for determining permission information of the user information in the second blockchain;
[0200] a seventh determination submodule, configured to determine a node to be searched in the second blockchain according to the permission information and the search identification information;
[0201] An eighth determination submodule, configured to determine a matching degree with the node to be searched based on the search identification information;
[0202] A ninth determination submodule, configured to determine the target data in the current node to be searched according to the search identification information when a first matching degree between the search identification information and the current node to be searched is greater than a preset matching value; or
[0203] The seventh generation submodule is used to determine the target retrieval node based on the retrieval identification information and the preset matching value when the second matching degree between the retrieval identification information and the current node to be retrieved is less than the preset matching value, and generate the target data through the target retrieval node and the retrieval identification information.
[0204] Reference Figure 3 , showing a computer device of a quarantine data processing method based on blockchain of the present invention, which may specifically include the following:
[0205] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0206] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.
[0207] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0208] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.
[0209] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0210] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.
[0211] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a quarantine data processing method based on blockchain provided in an embodiment of the present invention.
[0212] That is, when the processing unit 16 executes the program, it realizes: constructing a first blockchain for data sharing based on each quarantine agency server; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each target quarantine type data set; generating a second blockchain for data analysis based on each target quarantine type data set and each initial node set; and determining the target data in the second blockchain based on the current quarantine requirements.
[0213] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a quarantine data processing method based on blockchain as provided in all embodiments of the present application:
[0214] That is, when the program is executed by the processor, it is implemented as follows: constructing a first blockchain for data sharing based on each quarantine agency server; determining each target quarantine type data set corresponding to the preset quarantine type based on the first blockchain and the preset quarantine type; determining each initial node set corresponding to all the target quarantine type data sets in the first blockchain based on each of the target quarantine type data sets; generating a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets; and determining the target data in the second blockchain based on the current quarantine requirements.
[0215] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device.
[0216] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0217] The computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
[0218] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0219] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0220] The above is a detailed introduction to the blockchain-based quarantine data processing and system provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A quarantine data processing method based on blockchain, characterized in that: The method comprises: Building the first blockchain for data sharing based on the servers of each quarantine agency; Determine, according to the first blockchain and the preset quarantine type, each target quarantine type data set corresponding to the preset quarantine type; Determining, in the first blockchain, each initial node set corresponding to each of the target quarantine type data sets according to each of the target quarantine type data sets; Generating a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets; The target data is determined in the second blockchain according to the current quarantine requirements.
2. The method according to claim 1, characterized in that The step of constructing a first blockchain for data sharing based on each quarantine agency server includes: Regularly obtain quarantine information from the servers of several quarantine agencies according to preset time; Desensitizing the quarantine information to generate desensitized information; Generating an initial node according to the desensitized information and the quarantine information; The first blockchain is constructed based on all the initial nodes.
3. The method according to claim 2, characterized in that The step of performing desensitization processing on the quarantine information to generate desensitized information includes: Determining desensitization rules in a preset desensitization strategy library according to the quarantine information and the desensitization request; Splitting the quarantine information into documents according to the desensitization rules to generate messages to be processed; Parsing the message to be processed according to a preset document type to generate a document to be analyzed, wherein the preset document type includes an image type, a table type, and a text type; Generating a block corresponding to a target preset document type according to the preset document type and the document to be analyzed; Determining whether the block complies with the desensitization rule; When the document attribute of the block matches the desensitizing attribute of the desensitizing rule, the field to be desensitized in the desensitizing rule is obtained, and the desensitized information is determined by the field to be desensitized and the quarantine information; or, When the document attribute of the block does not match the desensitizing attribute of the desensitizing rule, the target desensitizing rule that matches the document attribute is matched in the preset desensitizing strategy library based on the document attribute of the block, and the desensitizing information is determined by the target desensitizing rule and the quarantine information.
4. The method according to claim 1, characterized in that The step of determining each target quarantine type data set corresponding to the preset quarantine type according to the first blockchain and the preset quarantine type, wherein the preset quarantine type includes sanitary quarantine, animal and plant quarantine, and food safety quarantine, and the target quarantine type data set includes a sanitary quarantine data set, an animal and plant quarantine data set, and a food safety quarantine data set, comprises: Dividing the first blockchain into node sets according to the preset quarantine type, the node sets including a health quarantine node set, an animal and plant quarantine node set, and a food safety quarantine node set; Acquire node data in the node set, and divide the node data into structured data and unstructured data; Performing data standardization processing on the unstructured data to generate standard format data; generating quarantine data according to the structured data and the standard format data; Determining an association relationship with the node set based on the quarantine data; The target quarantine type data set is generated according to the quarantine data, the node set and the association relationship.
5. The method according to claim 1, characterized in that The step of determining, in the first blockchain, each initial node set corresponding to each of the target quarantine type data sets according to each of the target quarantine type data sets comprises: Determining data to be processed in the target quarantine type data set; Determining traceability information corresponding to the data to be processed based on the data to be processed and the first blockchain; Querying and generating traceability data in the first blockchain according to the traceability information; Determining an initial source node corresponding to the traceability data based on the traceability data and the first blockchain; All the initial source nodes of all the target quarantine type data sets are collected to generate the initial node set.
6. The method according to claim 5, characterized in that The step of determining the initial source node corresponding to the traceability data based on the traceability data and the first blockchain includes: Obtaining a hash value of the traceability data; Determine a target node storing the same hash value according to the hash value and the first blockchain; The target node is marked as the initial source node corresponding to the traceability data.
7. The method according to claim 1, characterized in that The step of determining target data in the second blockchain according to the current quarantine requirements includes: The second blockchain receives the current quarantine requirement and determines user information and retrieval identification information corresponding to the current quarantine requirement; The user information determines permission information in the second blockchain; Determining a node to be searched in the second blockchain according to the permission information and the search identification information; Determining the degree of matching with the node to be searched based on the search identification information; When the first matching degree between the search identification information and the current node to be searched is greater than a preset matching value, the target data is determined in the current node to be searched according to the search identification information; or, When the second matching degree between the search identification information and the current node to be searched is less than the preset matching value, the target search node is determined according to the search identification information and the preset matching value, and the target data is generated through the target search node and the search identification information.
8. A quarantine data processing system based on blockchain, characterized in that: The system comprises: A construction module, used to construct a first blockchain for data sharing based on the servers of each quarantine agency; A first determination module, configured to determine each target quarantine type data set corresponding to the preset quarantine type according to the first blockchain and the preset quarantine type; A second determination module is used to determine, in the first blockchain, each initial node set corresponding to all the target quarantine type data sets according to each of the target quarantine type data sets; A generation module, used to generate a second blockchain for data analysis based on each of the target quarantine type data sets and each of the initial node sets; The third determination module is used to determine the target data in the second blockchain according to the current quarantine requirements.
9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.