Government data processing method, device, computer equipment and storage medium

By building a data sharing architecture based on blockchain and federated learning in the government affairs system, and using the isolated forest algorithm to identify and eliminate abnormal data, the problem of government affairs data being attacked and tampered with is solved, and the security and trustworthy application of government affairs data are improved.

CN114398685BActive Publication Date: 2025-09-05HENGYANG FIRE CHAIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111229267.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-09-05
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The existing government system has insufficient network security prevention, and government data is at risk of malicious attacks and tampering, resulting in poor security.

Method used

Based on blockchain technology and federated learning methods, a government data sharing architecture is built, abnormal data is detected and eliminated through isolated forest algorithms, and the blockchain anti-tampering mechanism is used to ensure data security.

Benefits of technology

It realizes the timely identification and removal of abnormal data of government affairs data, improves the security and trustworthy application of government affairs data, and prevents data leakage and malicious tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398685B_ABST
    Figure CN114398685B_ABST
Patent Text Reader

Abstract

The present invention discloses a government data processing method, apparatus, computer equipment, and storage medium. The method includes: building a government data sharing architecture based on blockchain technology and federated learning to form a government data model for multi-site joint offices; utilizing the government data model to detect whether there is a predetermined abnormal data in the government data of the multi-site joint office, and removing the abnormal data if the predetermined abnormal data is detected. This solution improves the security of government data by detecting and removing abnormal data in the government data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and specifically relates to a government data processing method, device, computer equipment and storage medium, and more particularly to an abnormal data detection algorithm, device, computer equipment and storage medium based on blockchain and federated learning. Background Art

[0002] With the rapid development of computer network technology and the widespread use of the internet, viruses and hacker attacks are increasing in number, and the methods of attack are becoming increasingly diverse. This puts the computers of numerous businesses, institutions, and individuals at risk of attack and intrusion. Government systems are particularly vulnerable to viruses and hackers. However, the existing network security of government systems is insufficient, and government data is vulnerable to malicious attacks and tampering.

[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The purpose of the present invention is to provide a government data processing method, device, computer equipment and storage medium to solve the problem that government data is subject to malicious attacks and malicious tampering, resulting in poor security of government data, and to achieve the effect of improving the security of government data by detecting and eliminating abnormal data in government data.

[0005] The present invention provides a government data processing method, including: constructing a government data sharing architecture based on blockchain technology and federated learning to form a government data model for joint offices in multiple locations; using the government data model to detect whether there is set abnormal data in the government data of joint offices in multiple locations, so as to eliminate the abnormal data when the set abnormal data is detected in the government data of joint offices in multiple locations.

[0006] In some embodiments, a government data sharing architecture is constructed based on blockchain technology and federated learning, including: collecting government nodes of government data as sample nodes; randomly selecting a node from the government nodes of government data through the consensus algorithm in blockchain technology to become the aggregation node of the current round; using the aggregation nodes of the current round, after dimensionality reduction based on the parameter set, constructing an isolation forest to obtain an isolated parameter vector, and completing the aggregation after removing the isolated parameter vector; uploading the hash of the vector after removing the isolated parameter vector to the blockchain for tamper-proofing, and delegating the vector source data to the participating nodes in the next round to complete the aggregation of the multi-location joint government model.

[0007] In some embodiments, dimensionality reduction based on a parameter set includes: aggregating the government nodes for each dimension of the parameter vector, collecting corresponding values ​​of each dimension, and performing data dimensionality reduction based on a box plot parameter dimensionality reduction algorithm.

[0008] In some embodiments, constructing an isolation forest includes: aggregating the government nodes according to the parameter set after dimensionality reduction, using a parameter isolation forest detection algorithm, constructing an isolation forest with k isolated trees, and obtaining an isolated parameter vector; k is a positive integer.

[0009] In some embodiments, eliminating isolated parameter vectors includes: calculating a box plot key function for each dimension of the parameter vector of the government node; according to the box plot key function, if all values ​​in a dimensional vector are within a set range, the dimensional vector is eliminated; if half of the values ​​in a dimensional vector are outside the set range, the dimensional vector is eliminated.

[0010] Matching the above method, the present invention provides a government data processing device on the other hand, including: a modeling unit, configured to build a government data sharing architecture based on blockchain technology and federated learning, and form a government data model for joint offices in multiple locations; a processing unit, configured to use the government data model to detect whether there is set abnormal data in the government data of joint offices in multiple locations, so as to eliminate the abnormal data when it is detected that there is set abnormal data in the government data of joint offices in multiple locations.

[0011] In some embodiments, the modeling unit constructs a government data sharing architecture based on blockchain technology and federated learning, including: collecting government nodes of government data as sample nodes; randomly selecting a node from the government nodes of government data through the consensus algorithm in blockchain technology to become the aggregation node of the current round; using the aggregation nodes of the current round to construct an isolation forest after dimensionality reduction based on the parameter set to obtain an isolated parameter vector, and completing the aggregation after eliminating the isolated parameter vector; uploading the hash of the vector after eliminating the isolated parameter vector to the blockchain for tamper-proofing, and delegating the vector source data to the participating nodes in the next round to complete the aggregation of the multi-location joint government model.

[0012] In some embodiments, the modeling unit reduces the dimension according to the parameter set, including: aggregating the government nodes for each dimension of the parameter vector, collecting the corresponding values ​​of each dimension, and performing data dimension reduction according to the box plot parameter dimension reduction algorithm.

[0013] In some embodiments, the modeling unit constructs an isolation forest, including: aggregating the government nodes according to the parameter set after dimensionality reduction, using a parameter isolation forest detection algorithm to construct an isolation forest with k isolated trees to obtain an isolated parameter vector; k is a positive integer.

[0014] In some embodiments, the modeling unit eliminates isolated parameter vectors, including: calculating the box plot key function for each dimension of the parameter vector of the government node; according to the box plot key function, if all values ​​in a dimensional vector are within a set range, the dimensional vector is eliminated; if half of the values ​​in a dimensional vector are outside the set range, the dimensional vector is eliminated.

[0015] Matching the above-mentioned device, the present invention further provides a computer device, including: the government data processing device mentioned above.

[0016] In accordance with the above method, the present invention provides a storage medium on another aspect, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned government data processing method.

[0017] Therefore, the solution of the present invention, by constructing a government data sharing architecture based on blockchain and adopting federated learning, can promptly identify abnormal data and reasonably eliminate abnormal data when government data is attacked; thereby, by detecting and eliminating abnormal data in government data, the security of government data is improved.

[0018] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present invention.

[0019] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of an embodiment of a method for processing government data according to the present invention is shown;

[0021] Figure 2 A schematic diagram of a process for constructing a government data sharing architecture according to an embodiment of the present invention;

[0022] Figure 3 This is a schematic structural diagram of an embodiment of a government data processing device of the present invention;

[0023] Figure 4 This is a flowchart of an embodiment of the abnormal data detection algorithm based on blockchain and federated learning of the present invention.

[0024] In conjunction with the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:

[0025] 102 - modeling unit; 104 - processing unit. DETAILED DESCRIPTION

[0026] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0027] According to an embodiment of the present invention, a method for processing government data is provided, such as Figure 1 FIG2 is a flow chart of an embodiment of the method of the present invention. The government data processing method may include: step S110 and step S120.

[0028] In step S110, based on blockchain technology and federated learning, a government data sharing architecture is constructed to form a government data model for joint offices in multiple locations.

[0029] In some embodiments, the specific process of building a government data sharing architecture based on blockchain technology and federated learning in step S110 is described in the following exemplary embodiment.

[0030] The following combination Figure 2 The flowchart of an embodiment of constructing a government data sharing architecture in the method of the present invention further illustrates the specific process of constructing the government data sharing architecture in step S110, including: steps S210 to S240.

[0031] Step S210: Collect government nodes of government data as sample nodes.

[0032] In step S220, a node is randomly selected from the government nodes of the government data through the consensus algorithm in the blockchain technology to become the aggregation node of the current round.

[0033] Step S230 , using the aggregation nodes of the current round, after dimensionality reduction according to the parameter set, an isolation forest is constructed to obtain isolated parameter vectors, and the aggregation is completed after the isolated parameter vectors are eliminated.

[0034] In some embodiments, the dimensionality reduction according to the parameter set in step S230 includes: aggregating the government nodes for each dimension of the parameter vector, collecting corresponding values ​​of each dimension, and performing data dimensionality reduction according to a box plot parameter dimensionality reduction algorithm.

[0035] Figure 4 This is a flow chart of an embodiment of the abnormal data detection algorithm based on blockchain and federated learning of the present invention. Figure 4 , the specific implementation process of the solution of the present invention is exemplified. Figure 4As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, including:

[0036] Step 1: Local update: The core government department randomly selects a government node through the consensus algorithm to become the aggregation node for the current round.

[0037] The aggregation node of the current round randomly selects the government nodes participating in this aggregation. The participating government nodes download the latest global model and perform local training, and upload the training results to the aggregation government node.

[0038] Step 2: Parameter dimensionality reduction: Aggregate the government nodes for each dimension of the parameter vector, collect their corresponding values, and perform data dimensionality reduction based on the box plot idea. Specifically, data dimensionality reduction based on the box plot idea is performed based on the box plot parameter dimensionality reduction algorithm (Dimensionality Reduction).

[0039] Box plot parameter dimensionality reduction algorithm, specifically including:

[0040] Step 21: For n departments, where n is a positive integer, a department i among the n departments obtains the local model parameter w by training the local government data. i , if the model vector has d dimensions, then the local model parameters are expressed as:

[0041]

[0042] Step 22: For each dimension, the dimension matrix is ​​expressed as:

[0043]

[0044] In some embodiments, constructing the isolation forest in step S230 includes: aggregating the government nodes according to the parameter set after dimensionality reduction, using a parameter isolation forest detection algorithm, constructing an isolation forest with k isolated trees, and obtaining an isolated parameter vector, where k is a positive integer.

[0045] like Figure 4 As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, which also includes:

[0046] Step 3: Construct an isolation forest: Aggregate government nodes based on the parameter set after dimensionality reduction, construct an isolation forest with k isolated trees, and obtain an isolated parameter vector.

[0047] Among them, the parametric isolation forest detection algorithm (Tree Reduction) can be used to construct an isolation forest.

[0048] Parameterized Isolation Forest Detection Algorithm, specifically including:

[0049] Step 31: For each parameter dimension Sort the dimensions from smallest to largest and divide the data into two parts: one with smaller values ​​and the other with larger values. The number of data in each part should be the same or differ by one. To create k isolation trees, divide the data into k parts, with each part containing half the smaller values ​​and half the larger values. For each part, construct an isolation tree.

[0050] Step 32: Randomly select a variable S as the root node in the training set, and randomly select a split point p within the value range of S.

[0051] Step 33: Place samples with values ​​greater than or equal to p at the left node, and samples with values ​​less than or equal to p at the right node.

[0052] Step 34: Repeat steps 32 and 33 for the data of the left and right nodes until the end. The end condition is one of the following three situations:

[0053] ① Reach the maximum tree height. ② The values ​​of the corresponding features of the samples on the node are all equal. ③ The node has only one sample.

[0054] In some embodiments, removing isolated parameter vectors in step S230 includes: calculating a box plot key function for each dimension of the parameter vector of the government node; and removing the dimension vector if all values ​​in a dimension vector are within a set range according to the box plot key function. Removing the dimension vector if half of the values ​​in a dimension vector are outside the set range is also considered to be a problem.

[0055] like Figure 4 As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, which also includes:

[0056] Step 4: Abnormal data removal: Aggregate government affairs nodes to remove isolated parameter vectors from the parameter vector set.

[0057] Specifically, for each dimension Calculate the key function Q of the box diagram:

[0058] Q = [Q1, Q3, M, IQR, L, H], Q1 is the lower quartile, Q3 is the upper quartile, M is the median, IQR = Q3-Q1, L = Q1-1.5IQR, H = Q3-1.5IQR.

[0059] If all values ​​in a dimension vector are in the range of L to H, the dimension vector is eliminated.

[0060] If half of the values ​​in a dimension vector are outside the range of L to H, the dimension vector is eliminated.

[0061] Step 5: Server-side aggregation: The aggregation government node completes model aggregation based on the latest parameter vector set.

[0062] Step 6. Blockchain upload: Upload the hash of the vector to the blockchain to prevent tampering.

[0063] This solution enables the co-construction of a government model without leaving local government departments, ensuring that critical government data is not leaked. It also protects government data from malicious attacks, removing any malicious data tampering. Uploading parameter vectors to the blockchain enables trusted traceability, ensuring the reliable application of government data.

[0064] In step S240, the hash of the vector after removing the isolated parameter vector is uploaded to the blockchain for tamper-proofing, and the vector source data is decentralized to the next round of participating nodes to complete the aggregation of the multi-location joint government model.

[0065] In the solution of the present invention, core government departments use a consensus algorithm (any blockchain consensus algorithm, such as PoW or PoS) to randomly select a node to become the aggregation node for the current round. This node (i.e., the aggregation node for the current round) constructs an isolation forest based on a parameter set after dimensionality reduction, obtaining an isolated parameter vector. The isolated parameter vectors are then removed to complete the aggregation. Furthermore, the hash of this vector (i.e., the vector after removing the isolated parameter vectors) is uploaded to the blockchain for tamper-proofing, and the source vector data is decentralized to the next round of participating nodes, completing the aggregation of the multi-region joint government model.

[0066] In step S120, the government data model is used to detect whether there is set abnormal data in the government data of the multi-site joint office, so as to eliminate the abnormal data when it is detected that there is set abnormal data in the government data of the multi-site joint office.

[0067] The solution of the present invention proposes an abnormal data detection algorithm based on blockchain and federated learning, builds a government data sharing architecture based on blockchain, and adopts federated learning to solve the problem of joint government data modeling in multiple locations. For example, it is necessary to develop a voice recognition software for department meetings between departments in different locations, and a key extraction model for government documents that is only used within the department. The purpose is to be able to identify abnormal data in a timely manner when the government data of multiple joint offices is attacked, reasonably eliminate abnormal data, and reduce the impact of abnormal data on the accuracy of the government system.

[0068] Blockchain is a term used in the field of information technology. Essentially, it is a shared database where the data or information stored is characterized by being "unforgeable," "traceable," "open and transparent," and "collectively maintained."

[0069] Federated learning, also known as federated machine learning or federated learning, is a machine learning framework that effectively helps multiple organizations use data and conduct machine learning modeling while meeting user privacy, data security, and regulatory requirements.

[0070] By adopting the technical solution of this embodiment, a government data sharing architecture is built based on blockchain and federated learning is used to promptly identify and properly remove abnormal data when government data is attacked. This improves the security of government data by detecting and removing abnormal data.

[0071] According to an embodiment of the present invention, a government data processing device corresponding to the government data processing method is also provided. Figure 3 The structure diagram of an embodiment of the apparatus of the present invention is shown as follows. The apparatus for processing government data may include: a modeling unit 102 and a processing unit 104 .

[0072] The modeling unit 102 is configured to build a government data sharing architecture based on blockchain technology and federated learning, forming a government data model for multi-site joint office. The specific functions and processing of the modeling unit 102 are shown in step S110.

[0073] In some embodiments, the modeling unit 102 constructs a government data sharing architecture based on blockchain technology and federated learning, including:

[0074] The modeling unit 102 is specifically configured to collect government data as a government node, which is used as a sample node. The specific functions and processing of the modeling unit 102 are also shown in step S210.

[0075] The modeling unit 102 is specifically configured to randomly select a node from the government nodes of the government data using a consensus algorithm in blockchain technology to become the aggregation node for the current round. The specific functions and processing of the modeling unit 102 are further described in step S220.

[0076] The modeling unit 102 is specifically configured to use the aggregated nodes of the current round to construct an isolation forest based on the parameter set after dimensionality reduction, obtain isolated parameter vectors, and complete aggregation after removing the isolated parameter vectors. The specific functions and processing of the modeling unit 102 are also described in step S230.

[0077] In some embodiments, the modeling unit 102 performs dimensionality reduction based on a parameter set, including: the modeling unit 102 is specifically configured to aggregate the government node for each dimension of the parameter vector, collect the corresponding values ​​of each dimension, and perform data dimensionality reduction based on a box plot parameter dimensionality reduction algorithm.

[0078] Figure 4 This is a flow chart of an embodiment of the abnormal data detection algorithm based on blockchain and federated learning of the present invention. Figure 4 , the specific implementation process of the solution of the present invention is exemplified. Figure 4 As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, including:

[0079] Step 1: Local update: The core government department randomly selects a government node through the consensus algorithm to become the aggregation node for the current round.

[0080] The aggregation node of the current round randomly selects the government nodes participating in this aggregation. The participating government nodes download the latest global model and perform local training, and upload the training results to the aggregation government node.

[0081] Step 2: Parameter dimensionality reduction: Aggregate the government nodes for each dimension of the parameter vector, collect their corresponding values, and perform data dimensionality reduction based on the box plot idea. Specifically, data dimensionality reduction based on the box plot idea is performed based on the box plot parameter dimensionality reduction algorithm (Dimensionality Reduction).

[0082] Box plot parameter dimensionality reduction algorithm, specifically including:

[0083] Step 21: For n departments, where n is a positive integer, a department i among the n departments obtains the local model parameter w by training the local government data. i , if the model vector has d dimensions, then the local model parameters are expressed as:

[0084]

[0085] Step 22: For each dimension, the dimension matrix is ​​expressed as:

[0086]

[0087] In some embodiments, the modeling unit 102 constructs the isolation forest, including: the modeling unit 102 is specifically configured to aggregate the government nodes according to the parameter set after dimensionality reduction, and use a parameter isolation forest detection algorithm to construct an isolation forest with k isolated trees to obtain an isolated parameter vector, where k is a positive integer.

[0088] like Figure 4 As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, which also includes:

[0089] Step 3: Construct an isolation forest: Aggregate government nodes based on the parameter set after dimensionality reduction, construct an isolation forest with k isolated trees, and obtain an isolated parameter vector.

[0090] Among them, the parametric isolation forest detection algorithm (Tree Reduction) can be used to construct an isolation forest.

[0091] Parameterized Isolation Forest Detection Algorithm, specifically including:

[0092] Step 31: For each parameter dimension Sort the dimensions from smallest to largest and divide the data into two parts: one with smaller values ​​and the other with larger values. The number of data in each part should be the same or differ by one. To create k isolation trees, divide the data into k parts, with each part containing half the smaller values ​​and half the larger values. For each part, construct an isolation tree.

[0093] Step 32: Randomly select a variable S as the root node in the training set, and randomly select a split point p within the value range of S.

[0094] Step 33: Place samples with values ​​greater than or equal to p at the left node, and samples with values ​​less than or equal to p at the right node.

[0095] Step 34: Repeat steps 32 and 33 for the data of the left and right nodes until the end. The end condition is one of the following three situations:

[0096] ① Reach the maximum tree height. ② The values ​​of the corresponding features of the samples on the node are all equal. ③ The node has only one sample.

[0097] In some embodiments, the modeling unit 102 removes isolated parameter vectors, including:

[0098] The modeling unit 102 is specifically configured to calculate the box plot key function for each dimension of the parameter vector of the government node.

[0099] The modeling unit 102 is specifically configured to, based on the box plot key function, remove a dimension vector if all values ​​in the dimension vector are within a set range, and remove the dimension vector if half of the values ​​in the dimension vector are outside the set range.

[0100] like Figure 4 As shown, the solution of the present invention provides an abnormal data detection algorithm based on blockchain and federated learning, which also includes:

[0101] Step 4: Abnormal data removal: Aggregate government affairs nodes to remove isolated parameter vectors from the parameter vector set.

[0102] Specifically, for each dimension Calculate the key function Q of the box diagram:

[0103] Q = [Q1, Q3, M, IQR, L, H], Q1 is the lower quartile, Q3 is the upper quartile, M is the median, IQR = Q3-Q1, L = Q1-1.5IQR, H = Q3-1.5IQR.

[0104] If all values ​​in a dimension vector are in the range of L to H, the dimension vector is eliminated.

[0105] If half of the values ​​in a dimension vector are outside the range of L to H, the dimension vector is eliminated.

[0106] Step 5: Server-side aggregation: The aggregation government node completes model aggregation based on the latest parameter vector set.

[0107] Step 6. Blockchain upload: Upload the hash of the vector to the blockchain to prevent tampering.

[0108] This solution enables the co-construction of a government model without leaving local government departments, ensuring that critical government data is not leaked. It also protects government data from malicious attacks, removing any malicious data tampering. Uploading parameter vectors to the blockchain enables trusted traceability, ensuring the reliable application of government data.

[0109] The modeling unit 102 is specifically configured to upload the hash of the vector after removing isolated parameter vectors to the blockchain for tamper-proofing, and to delegate the vector source data to the next round of participating nodes, thereby completing the aggregation of the multi-region joint government model. The specific functions and processing of the modeling unit 102 are further described in step S240.

[0110] In the solution of the present invention, core government departments use a consensus algorithm to randomly select a node to become the aggregation node for the current round. This node (i.e., the aggregation node for the current round) constructs an isolation forest based on the parameter set after dimensionality reduction, obtains an isolated parameter vector, and completes the aggregation after removing the isolated parameter vector. Furthermore, the hash of this vector (i.e., the vector after removing the isolated parameter vector) is uploaded to the blockchain for tamper-proofing, and the vector source data is decentralized to the participating nodes in the next round, completing the aggregation of the multi-region joint government model.

[0111] Processing unit 104 is configured to use the government data model to detect whether there is any abnormal data in the government data of the multi-site joint office, and to remove the abnormal data if the abnormal data is detected. The specific functions and processing of processing unit 104 are described in step S120.

[0112] The solution of the present invention proposes an abnormal data detection algorithm based on blockchain and federated learning, builds a government data sharing architecture based on blockchain, and adopts federated learning to solve the problem of joint government data modeling in multiple locations. It aims to be able to identify abnormal data in a timely manner when government data of multiple locations are attacked, reasonably eliminate abnormal data, and reduce the impact of abnormal data on the accuracy of the government system.

[0113] Blockchain is a term used in the field of information technology. Essentially, it is a shared database where the data or information stored is characterized by being "unforgeable," "traceable," "open and transparent," and "collectively maintained."

[0114] Federated learning, also known as federated machine learning or federated learning, is a machine learning framework that effectively helps multiple organizations use data and conduct machine learning modeling while meeting user privacy, data security, and regulatory requirements.

[0115] Since the processing and functions implemented by the device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for any details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0116] By adopting the technical solution of the present invention, by building a government data sharing architecture based on blockchain and using federated learning, when government data is attacked, abnormal data can be identified in a timely manner and reasonably eliminated, ensuring that key government data is not leaked.

[0117] According to an embodiment of the present invention, a computer device corresponding to the government data processing apparatus is also provided. The computer device may include: the government data processing apparatus described above.

[0118] Since the processing and functions implemented by the computer device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned devices, for any details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0119] By adopting the technical solution of the present invention, by building a government data sharing architecture based on blockchain and using federated learning, when government data is attacked, abnormal data can be identified in a timely manner and reasonably eliminated to ensure the trustworthy application of government data.

[0120] According to an embodiment of the present invention, a storage medium corresponding to the government data processing method is also provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned government data processing method.

[0121] Since the processing and functions implemented by the storage medium of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for any details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0122] By adopting the technical solution of the present invention, by building a government data sharing architecture based on blockchain and using federated learning, when government data is attacked, abnormal data can be identified in a timely manner, and abnormal data can be reasonably eliminated, thereby reducing the impact of abnormal data on the accuracy of the government system.

[0123] In summary, it is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.

[0124] The foregoing description is merely an embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of the claims.

Claims

1. A method for processing government data, characterized in that: include: Based on blockchain technology and federated learning, a government data sharing architecture is built to form a government data model with joint offices in multiple locations. Using the government data model, detecting whether there is set abnormal data in the government data of the multi-site joint office, so as to eliminate the abnormal data when detecting that there is set abnormal data in the government data of the multi-site joint office; Based on blockchain technology and federated learning, a government data sharing architecture is constructed, including: The government nodes that collect government data serve as sample nodes; Through the consensus algorithm in blockchain technology, a node is randomly selected from the government nodes of government data to become the aggregation node of the current round; Using the aggregation nodes of the current round, after dimensionality reduction according to the parameter set, an isolation forest is constructed to obtain isolated parameter vectors, and the isolated parameter vectors are removed before completing the aggregation; The hash of the vector after removing the isolated parameter vector is uploaded to the blockchain to prevent tampering, and the vector source data is decentralized to the next round of participating nodes to complete the aggregation of the multi-location joint government model.

2. The government data processing method according to claim 1, characterized in that: Dimensionality reduction based on parameter sets, including: Aggregate the government nodes for each dimension of the parameter vector, collect the corresponding values ​​of each dimension, and perform data dimensionality reduction according to the box plot parameter dimensionality reduction algorithm.

3. The government data processing method according to claim 1, characterized in that: Construct an isolation forest, including: Aggregate the government nodes according to the parameter set after dimensionality reduction, use the parameter isolation forest detection algorithm to construct an isolation forest with k isolated trees, and obtain an isolated parameter vector; k is a positive integer.

4. The government data processing method according to claim 1, characterized in that: Eliminate isolated parameter vectors, including: For each dimension of the parameter vector of the government affairs node, calculate the key function of the box plot; According to the key function of the box plot, if all the values ​​in a dimensional vector are within the set range, the dimensional vector is eliminated; if half of the values ​​in a dimensional vector are outside the set range, the dimensional vector is eliminated.

5. A government data processing device, characterized in that: include: The modeling unit is configured to build a government data sharing architecture based on blockchain technology and federated learning, forming a government data model for joint offices in multiple locations; a processing unit configured to detect whether there is set abnormal data in the government data of the multi-site joint office using the government data model, and to remove the abnormal data if the set abnormal data is detected in the government data of the multi-site joint office; The modeling unit, based on blockchain technology and federated learning, builds a government data sharing architecture, including: The government nodes that collect government data serve as sample nodes; Through the consensus algorithm in blockchain technology, a node is randomly selected from the government nodes of government data to become the aggregation node of the current round; Using the aggregation nodes of the current round, after dimensionality reduction according to the parameter set, an isolation forest is constructed to obtain isolated parameter vectors, and the isolated parameter vectors are removed before completing the aggregation; The hash of the vector after removing the isolated parameter vector is uploaded to the blockchain to prevent tampering, and the vector source data is decentralized to the next round of participating nodes to complete the aggregation of the multi-location joint government model.

6. The government data processing device according to claim 5, characterized in that: The modeling unit reduces the dimension according to the parameter set, including: Aggregate the government nodes for each dimension of the parameter vector, collect the corresponding values ​​of each dimension, and perform data dimensionality reduction according to the box plot parameter dimensionality reduction algorithm.

7. The government data processing device according to claim 5, characterized in that: The modeling unit, constructing the isolation forest, includes: Aggregate the government nodes according to the parameter set after dimensionality reduction, use the parameter isolation forest detection algorithm to construct an isolation forest with k isolated trees, and obtain an isolated parameter vector; k is a positive integer.

8. The government data processing device according to claim 6, characterized in that: The modeling unit, which eliminates isolated parameter vectors, includes: For each dimension of the parameter vector of the government affairs node, calculate the key function of the box plot; According to the key function of the box plot, if all the values ​​in a dimensional vector are within the set range, the dimensional vector is eliminated; if half of the values ​​in a dimensional vector are outside the set range, the dimensional vector is eliminated.

9. A computer device, characterized in that: include: A government data processing device as described in any one of claims 5 to 8.

10. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the government data processing method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • A power consumption data anomaly detection model based on isolated forest algorithm

    CN108985632A

  • Data sharing method, computer equipment applying same and readable storage medium

    CN111931242A