A cross-department government affair data security sharing system and method based on federated learning
By establishing a cross-departmental government data security sharing system based on federated learning, the problems of data exposure and access control in government data interaction have been solved, and the reliability of fine-grained access control and secure data sharing has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU YUNRUNDA DATA SERVICES CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-10
AI Technical Summary
When existing government data interaction directly executes centralized aggregation processing, it is easy for raw data to be exposed to uncontrolled nodes, facing the risk of privacy leakage, making it difficult to achieve precise fine-grained division of permissions, cross-domain access is often accompanied by unauthorized calls, and there is a lack of state tracing and blocking mechanisms, which leads to the spread of abnormal gradients and makes it difficult to ensure the security and reliable progress of the sharing process.
A cross-departmental government data security sharing system based on federated learning is adopted. Through modules such as sovereignty identifier resolution, conflict verification, parameter snapshot rollback, and gradient boundary circuit breaking, a field slot mapping table is constructed to detect out-of-bounds access and generate a rollback parameter set, thereby achieving fine-grained access control and abnormal gradient circuit breaking to ensure data security.
It achieves fine-grained access control and the purity of the global sharing model during cross-domain data transfer, ensuring data security, preventing privacy leaks and unauthorized access, and realizing reliable sharing of government data.
Smart Images

Figure CN122372172A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of government data sharing technology, and in particular to a cross-departmental government data secure sharing system and method based on federated learning. Background Technology
[0002] The field of government data sharing technology encompasses the technical specifications and implementation methods involved in data collection, storage, transmission, exchange, and utilization among various government functional departments. Its core lies in breaking down data barriers between different administrative levels and horizontal functional departments to achieve effective flow and collaborative utilization of data resources. This field involves technical directions such as data standardization, identity authentication and access control, data encryption and de-identification, cross-network transmission protocol design, data catalog management, and data quality verification. Simultaneously, it must consider data security compliance requirements and administrative management system constraints to ensure that sensitive information is not leaked or data is misused during the data sharing process. Government data sharing technology aims to support cross-departmental business collaboration, assist government decision-making analysis, and provide convenient integrated government services to the public, serving as a crucial technological foundation for promoting the construction of digital government.
[0003] Traditional cross-departmental government data security sharing systems refer to information systems used to enable data exchange and sharing among different government functional departments while ensuring data security. The core technical challenge of such systems lies in how to conduct data sharing among multiple departments with independent data sovereignty, while ensuring that the original data of each participating party is not exposed externally. Traditionally, such systems employ a centralized data aggregation approach, where each department uploads its local data to a unified government data exchange platform, which manages and schedules the data centrally. Identity authentication is achieved through a combination of digital certificates and usernames / passwords; data transmission security is ensured through transport layer encryption protocols; and de-identification rules are used to mask or replace fields such as names and ID numbers. Role-based access control policies are also implemented to limit data read and write permissions for each department. Some systems also introduce audit logs to record data access operations and time points for post-event traceability and compliance checks.
[0004] The current system of directly performing centralized aggregation processing for government data interaction is prone to exposing raw data to uncontrolled nodes during cross-domain transfers, posing a risk of privacy leaks. It is also difficult to achieve precise fine-grained permission division when dealing with heterogeneous data. Cross-domain access is often accompanied by unauthorized calls. Once tampering or out-of-bounds access occurs, due to the lack of state tracing and blocking mechanisms, damaged nodes cannot be restored to a safe baseline in a timely manner. Abnormal gradients spread in the network, causing pollution of the global sharing model, making it difficult to ensure the security of government data and the reliable progress of the sharing process. Summary of the Invention
[0005] To address the technical problems of existing centralized aggregation processing of government data interaction, which is prone to exposing raw data to uncontrolled nodes during cross-domain transfers, posing a privacy risk, making it difficult to achieve precise fine-grained permission division when dealing with heterogeneous data, and often resulting in unauthorized access during cross-domain access, and the inability of damaged nodes to recover to a safe baseline in time due to the lack of state tracing and blocking mechanisms once tampering or out-of-bounds access occurs, and the spread of abnormal gradients in the network causing global sharing model pollution, making it difficult to ensure the security of government data and the reliable progress of the sharing process, this invention provides a cross-departmental government data secure sharing system and method based on federated learning.
[0006] On the one hand, a cross-departmental government data secure sharing system based on federated learning is provided, which includes: The sovereignty identifier resolution module reads the sovereignty identifier information of the government data field from the local government database, obtains the training mode identifier of the federated learning task, extracts the parameter location information of the model file, performs mapping matching between the government data field and the parameter location information, and constructs a field slot mapping table. The sovereignty conflict verification module calls the field slot mapping table to extract the model parameter index position of the government data field, performs permission conflict detection based on the sovereignty identification information and the training mode identification, filters the model parameter index positions of sovereignty over-boundary access, and constructs a conflict parameter index set. The parameter snapshot rollback module extracts the initial parameters of the model according to the conflict parameter index set and writes them into memory. It constructs an original parameter snapshot and compares it with the network updated parameters to extract the unauthorized offset features. It calls the original parameter snapshot to perform storage overwrite based on the unauthorized offset features and generates a rollback parameter set. The gradient boundary circuit breaker module calls the rollback parameter set and the government data field to perform a hash algorithm to extract the inter-layer sovereign boundary fingerprint, compares the inter-layer sovereign boundary fingerprint to extract cross-layer transition features, performs gradient modulation on the rollback parameter set, and constructs a local government sharing model.
[0007] As a further embodiment of the present invention, the field slot mapping table includes data dictionary key values, physical storage offsets and storage routing tables, the conflict parameter index set includes out-of-bounds access pointers, abnormal node indexes and feature dimension sequences, the rollback parameter set includes model weight matrix, parameter update tensor and system baseline values, and the local government sharing model includes model feature extraction layer, model inference operator and security isolation sandbox.
[0008] As a further aspect of the present invention, the sovereignty identifier resolution module includes: The information extraction submodule extracts the sovereignty identification information of government data fields from the local government database, retrieves the training mode identifier of the federated learning task based on the sovereignty identification information, retrieves the file parameter location information, evaluates the offset between the sovereignty identification information and the file parameter location information, and generates the feature deviation distance. The coordinate alignment submodule calls the feature deviation amount, extracts a specific running frequency parameter from the training mode identifier of the federated learning task, performs weight scaling on the feature deviation amount according to the specific running frequency parameter, and generates a dynamic calibration benchmark value. The association matching submodule performs coordinate normalization on the file parameter location information according to the dynamic calibration benchmark value and extracts the corresponding integer bits. It compares the integer bits with the sovereignty identifier information to extract the overlapping element content, performs data field slot mapping operation on the overlapping element content, and generates a field slot mapping table.
[0009] As a further aspect of the present invention, the sovereignty conflict verification module includes: The index position extraction submodule calls the slot mapping table to extract government data fields, performs address pointer scanning on the government data fields to extract the model parameter index position and starting address, calculates the absolute difference between the model parameter index position and the starting address, and generates parameter offset coordinate values. The permission conflict detection submodule calls the parameter offset coordinate value, extracts the sovereignty identifier information and the training mode identifier, performs an XOR operation on the sovereignty identifier information and the training mode identifier to extract the difference identifier bit, and performs a bitwise AND operation on the parameter offset coordinate value based on the difference identifier bit to generate the permission access logic value. The out-of-bounds parameter aggregation submodule calls the permission access logic value, compares the permission access logic value with the preset access permission threshold, filters out the model parameter index positions that are lower than the preset access permission threshold and records them as sovereign out-of-bounds access parameters, performs array concatenation on the sovereign out-of-bounds access parameters, and constructs a conflict parameter index set.
[0010] As a further aspect of the present invention, the preset access permission threshold is determined based on the bit width length of the sovereign identification information and the training mode identification to determine the initial upper limit of the threshold. After segmentation mapping in combination with the bit value distribution of the sovereign identification information, the median value is selected from the target threshold interval corresponding to the training mode identification and obtained after boundary constraint processing.
[0011] As a further aspect of the present invention, the parameter snapshot rollback module includes: The snapshot construction submodule obtains the initial parameters of the model based on the conflict parameter index set, extracts the header fields of the initial parameters of the model and compares them with the data types in the benchmark whitelist for type identification, and writes the successfully matched initial parameters of the model into an independent mapped memory area according to consecutive addresses to generate the original parameter snapshot. The feature extraction submodule obtains simulated test data to extract network update parameters, compares the baseline mapping address of the original parameter snapshot with the write offset pointer of the network update parameters, locates the pointer node where the network update parameters cross the boundary, extracts the corresponding data fragments and performs byte alignment, and generates over-weight offset features. The rollback submodule is overwritten, and the abnormal register address is extracted by calling the unauthorized offset feature. Based on the abnormal register address, the target memory block is extracted by reverse addressing of the original parameter snapshot. The initial data in the original parameter snapshot is overwritten and written to the target memory block to generate the rollback parameter set.
[0012] As a further aspect of the present invention, the gradient boundary circuit breaker module includes: The fingerprint extraction submodule calls the rollback parameter set and the government data field to perform bitwise logical concatenation of the data, divides the concatenated feature sequence generated by the concatenation into fixed-length groups, performs a circular left shift and bitwise logical NOT operation to extract the hash mapping bit sequence for each data group, and generates interlayer boundary summary values. The feature matching submodule calls the interlayer boundary summary value, obtains the network reference summary value stored in the preset free memory, performs a bitwise XOR comparison between the interlayer boundary summary value and the network reference summary value to extract the off-coordinate nodes, calculates the three-dimensional Euclidean distance of the off-coordinate nodes, and generates cross-layer transition feature quantities. The gradient modulation submodule sets the truncation gradient threshold of the reverse feedback link based on the cross-layer transition feature quantity, compares the difference with the numerical components carried by the rollback parameter set, filters out the numerical components that exceed the truncation gradient threshold and assigns zero value to force a reset of the parameter state, and generates a local government affairs sharing model.
[0013] As a further aspect of the present invention, the system includes: The federated parameter aggregation module inputs the local government sharing model into the homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate aggregated ciphertext parameters, performs a distributed decryption process on the aggregated ciphertext parameters to extract global update parameters, and loads the global update parameters into the local government server to build a global government sharing model. The global government affairs sharing model includes a domain knowledge graph, a distributed inference engine, and a federated learning framework.
[0014] As a further aspect of the present invention, the federated parameter aggregation module includes: The ciphertext aggregation submodule obtains the core model weight matrix extracted from the local government affairs sharing model, performs a dot-multiplication encryption operation on the core model weight matrix according to the public key factor to obtain the homomorphic ciphertext component, and performs a homomorphic matrix addition operation on the homomorphic ciphertext component and the ciphertext component of the simulated node to generate an aggregated ciphertext sequence. The distributed decryption submodule performs a splitting operation to extract ciphertext data packets based on the aggregated ciphertext sequence, performs modulo operation and noise reduction operation on the ciphertext data packets based on the private key factor to eliminate encryption perturbation components, performs reconstruction on the data bit stream after eliminating encryption perturbation components to recover plaintext values, and generates a global update feature vector. The parameter loading submodule addresses the memory allocation mapping table of the target government server based on the global update feature vector, writes the global update feature vector into the specified register range according to the continuous address indicated by the memory allocation mapping table, performs parameter replacement in the specified register range, and generates a global government sharing model.
[0015] On the other hand, a method for secure sharing of cross-departmental government data based on federated learning, which is executed based on the aforementioned system for secure sharing of cross-departmental government data based on federated learning, includes the following steps: S1: Read the sovereignty identification information of the government data field from the local government database, obtain the training mode identifier of the federated learning task, extract the parameter location information of the model file, perform mapping matching between the government data field and the parameter location information, and construct the field slot mapping table; S2: Call the field slot mapping table to extract the model parameter index position of the government data field, perform permission conflict detection based on sovereignty identification information and training mode identification, filter the model parameter index positions of sovereignty over-boundary access, and construct a conflict parameter index set; S3: Extract the initial parameters of the model according to the conflict parameter index set and write them into memory. Construct an original parameter snapshot and compare it with the network update parameters to extract the unauthorized offset features. Call the original parameter snapshot and perform storage overwrite based on the unauthorized offset features to generate a rollback parameter set. S4: Call the rollback parameter set and the government data field to perform a hash algorithm to extract the inter-layer sovereignty boundary fingerprint, compare the inter-layer sovereignty boundary fingerprint to extract cross-layer transition features, perform gradient modulation on the rollback parameter set, and construct a local government sharing model; S5: Input the local government affairs sharing model into the homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate the aggregated ciphertext parameters, perform a distributed decryption process on the aggregated ciphertext parameters to extract global update parameters, and load the global update parameters into the local government affairs server to build a global government affairs sharing model.
[0016] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: By reading the sovereignty identification information of government data fields and matching it with the task mode to construct a field slot mapping table, a conflict detection mechanism based on the identifier and mode accurately filters the model parameter index position of sovereignty overreach access. The initial parameters of the model are extracted using the constructed conflict parameter set and compared with the features of the original parameter snapshot. Based on the extracted overreach offset features, storage overwrite and reverse write are performed to generate a rollback parameter set. By relying on data bit-by-bit concatenation and hash algorithm to extract the sovereignty boundary fingerprint between layers and perform gradient modulation, real-time circuit breaking of abnormal gradients and baseline recovery of damaged nodes are realized. The overreach call path is cut off from the bottom layer, ensuring fine-grained permission control and global shared model purity during cross-domain transfer. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the accompanying drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the system according to the present invention; Figure 2 This is a schematic diagram of the system framework of the present invention; Figure 3 This is a flowchart of the sovereignty identifier resolution module in this invention; Figure 4 This is a flowchart of the sovereignty conflict verification module in this invention; Figure 5 This is a flowchart of the parameter snapshot rollback module in this invention; Figure 6 This is a flowchart of the gradient boundary circuit breaking module in this invention; Figure 7 This is a flowchart of the federated parameter aggregation module in this invention; Figure 8 This is a flowchart of the method of the present invention. Detailed Implementation
[0019] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0021] This invention provides a cross-departmental government data secure sharing system based on federated learning, such as... Figure 1-2 The diagram shown illustrates a cross-departmental government data security sharing system based on federated learning. This system includes: The sovereignty identifier resolution module reads the sovereignty identifier information of the government data field from the local government database, obtains the training mode identifier of the federated learning task, extracts the parameter location information of the model file, performs mapping matching between the government data field and the parameter location information, and constructs a field slot mapping table. The sovereignty conflict verification module calls the field slot mapping table to extract the model parameter index position of the government data field, performs permission conflict detection based on the sovereignty identification information and the training mode identification, filters the model parameter index positions of sovereignty over-boundary access, and constructs a set of conflict parameter indexes. The parameter snapshot rollback module extracts the initial parameters of the model from the conflict parameter index set and writes them into memory. It constructs the original parameter snapshot and compares it with the network updated parameters to extract the unauthorized offset features. It calls the original parameter snapshot to perform storage overwrite based on the unauthorized offset features and generates the rollback parameter set. The gradient boundary circuit breaker module calls the rollback parameter set and government data fields to perform a hash algorithm to extract the inter-layer sovereign boundary fingerprint, compares the inter-layer sovereign boundary fingerprint to extract cross-layer transition features, performs gradient modulation on the rollback parameter set, and constructs a local government sharing model. The Federal Parameter Aggregation Module takes the local government sharing model as input, performs a homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate aggregated ciphertext parameters, performs a distributed decryption process on the aggregated ciphertext parameters to extract global update parameters, and loads the global update parameters into the local government server to build a global government sharing model. The field slot mapping table includes data dictionary key-value pairs, physical storage offsets, and storage routing tables. The conflict parameter index set includes out-of-bounds access pointers, abnormal node indexes, and feature dimension sequences. The rollback parameter set includes model weight matrices, parameter update tensors, and system baseline values. The local government shared model includes model feature extraction layers, model inference operators, and a security isolation sandbox. The global government shared model includes domain knowledge graphs, distributed inference engines, and federated learning frameworks.
[0022] Specifically, such as Figure 2 , 3 As shown, the sovereignty identifier resolution module includes: The information extraction submodule extracts the sovereignty identification information of government data fields from the local government database, retrieves the training mode identifier of the federated learning task based on the sovereignty identification information, retrieves the file parameter location information, evaluates the offset between the sovereignty identification information and the file parameter location information, and generates the feature deviation distance. The information extraction submodule connects to the municipal government's intranet's household registration database via Secure Sockets Layer (SSL) protocol. It reads a 256-bit header field and removes null records from the database return value using pre-defined non-null cleaning rules. The first 64 bits of the cleaned header field are extracted as the sovereignty identifier. The module then invokes the system's inter-process communication mechanism to read a 128-bit training mode identifier from the memory space of the federated learning task scheduling daemon. A direct memory access request is sent to the disk controller to read the starting logical block address and physical offset of the government data file within the solid-state storage medium. Byte concatenation is performed on the starting logical block address and physical offset to generate a 64-bit file parameter location information. The sovereignty identifier information and file parameter location information are aligned bit-by-bit. The sovereignty identifier information is divided into eight 8-bit byte blocks and converted into a decimal value sequence. Simultaneously, the file parameter location information is also divided into eight 8-bit byte blocks and converted into a corresponding decimal value sequence. The subtraction operation is performed on the corresponding positions of the two sets of decimal numerical sequences to obtain the difference, and the absolute value of all the resulting differences is extracted. The extracted absolute values are then summed to obtain the total absolute offset. This total absolute offset is divided by the total number of byte blocks, 8, to calculate the feature deviation. For example, the first three decimal values after conversion of sovereignty identification information are 120, 205, and 180, and the first three decimal values after conversion of file parameter position information are 110, 210, and 175. Subtracting the two sets of values at their corresponding positions and taking the absolute values yields 10, 5, and 5 respectively. The absolute values of all eight positions are then summed, resulting in a total absolute offset of 64. Dividing the total absolute offset of 64 by the number of byte blocks, 8, yields the feature deviation of 8. The calculated feature deviation of 8 is then compared with a preset tolerance benchmark value of 5. The tolerance benchmark value of 5 was determined by performing the same absolute value averaging operation on 1000 sets of routine government document query records in a test environment, extracting the value at the 95th percentile of the result distribution. The comparison results show that the feature deviation is greater than the preset tolerance benchmark value, indicating a significant offset in the physical storage location of the current data field, requiring subsequent alignment operations to be triggered.
[0023] The coordinate alignment submodule calls the feature offset, extracts a specific running frequency parameter from the training mode identifier of the federated learning task, performs weight scaling on the feature offset according to the specific running frequency parameter, and generates a dynamic calibration benchmark value. The coordinate alignment submodule reads the output feature offset. It parses the 128-bit training mode identifier, extracting 16 consecutive binary bits from bits 32 to 48. This truncated binary sequence is converted into an unsigned decimal integer as a specific running frequency parameter. This parameter reflects the clock synchronization communication frequency between the current Federated Learning Center server and the local computing node. The system clock reference parameter, pre-loaded in the system registry, is retrieved, and the specific running frequency parameter is divided by it to obtain a frequency normalization factor. The frequency normalization factor is multiplied by the feature offset to obtain a scaled feature value. A mathematical calculation library is used to extract the natural logarithm of the feature offset, and this logarithm is added to the scaled feature value to generate a dynamic calibration reference value. For example, if the extracted specific running frequency parameter is converted to 200, and the system clock reference parameter in the system registry is set to 100, dividing 200 by 100 yields a frequency normalization factor of 2. The coordinate alignment submodule extracts the feature deviation amount 8 generated in the previous step, and multiplies it by the frequency normalization factor 2 to obtain the scaled feature value 16. The natural logarithm of the feature deviation amount 8 is approximately 2.08. Adding the scaled feature value 16 to the natural logarithm 2.08 yields the dynamic calibration baseline value of 18.08. The generated dynamic calibration baseline value of 18.08 is compared with the set effective calibration threshold range of 10 to 20. The lower limit of this effective calibration threshold range of 10 and the upper limit of 20 are the optimal baseline value fluctuation range recorded in 500 network latency injection experiments to ensure that the data packet loss rate is less than 1%. The comparison results show that the dynamic calibration baseline value of 18.08 falls completely within the effective calibration threshold range, indicating that the currently generated baseline value has the effective constraint capability to perform coordinate correction.
[0024] The association matching submodule performs coordinate normalization on the file parameter location information according to the dynamic calibration benchmark value and extracts the corresponding integer bits. It compares the integer bits with the sovereignty identifier information to extract the content of overlapping elements. It performs data field slot mapping operation on the content of overlapping elements to generate a field slot mapping table. The correlation matching submodule retrieves file parameter location information and the dynamic calibration benchmark value written upstream from the cache register. It divides the decimal values of each dimension covered by the file parameter location information by the dynamic calibration benchmark value to obtain a normalized floating-point coordinate sequence. For each floating-point value in the normalized coordinate sequence, the correlation matching submodule performs a floor function to discretize it, discarding the decimal part and extracting the corresponding integer bits to construct an integer bit vector. The sovereignty identification information is bitwise decomposed and converted into a decimal vector of the same dimension. The values in the integer bit vector are compared with the corresponding dimensions in the sovereignty identification information vector, and a dimension-by-dimensional equality check is performed. The dimension index positions where the values on both sides are completely equal are recorded, and the data items associated with these index positions are taken as overlapping elements. For the extracted overlapping elements, a pre-stored hash table is called, and the overlapping element content is used as the retrieval key for addressing operations in the hash table to extract the slot numbers output by the hash table. The overlapping element content and the extracted slot numbers are concatenated using a key-value pair to generate a field-slot mapping table. For example, if the file parameter location information has a value of 100 in one dimension and a dynamic calibration baseline value of 18.08, the association matching submodule divides 100 by 18.08 to obtain a normalized coordinate value of 5.53, and after performing a round-down operation, extracts the integer part as 5. The sovereignty identifier information also has a value of 5 in the corresponding dimension. Since the two are completely equal, they are identified as overlapping elements. The overlapping element content 5 is input into a hash table, and after hash mapping, the output slot number is 24. Then, a key-value pair is generated and written to the field slot mapping table.
[0025] Table 1: Field Slot Mapping Data Table
[0026] As shown in Table 1, the specific slot allocation obtained after hash mapping of overlapping element content is listed, which intuitively presents the data binding relationship of the mapping operation.
[0027] Specifically, such as Figure 2 , 4 As shown, the sovereignty conflict verification module includes: The index position extraction submodule calls the slot mapping table to extract government data fields, performs address pointer scanning on the government data fields to extract the model parameter index position and starting address, calculates the absolute difference between the model parameter index position and the starting address, and generates parameter offset coordinate values. The index location extraction submodule receives and parses the field slot mapping table through the inter-process communication channel, extracts the specific slot number in the table, and directly initiates a physical addressing request to the underlying government data storage array. The block reads a complete 128-byte government data field from the corresponding track in the storage array based on the slot number. A hardware-level memory address scanner is activated, performing a continuous sliding traversal operation with a step size of 4 bytes on the virtual memory page loaded with the government data field. In the scanning loop, the current memory block data is compared one by one with the system's preset government document magic request header flag. The absolute physical offset of the memory corresponding to the moment the magic request header matches successfully is recorded and used as the model parameter index location. Simultaneously, the base memory address of the virtual memory page when it was initially allocated by the operating system is recorded as the starting address. The model parameter index location and the starting address are subtracted to obtain the pure address difference, and the absolute value operation is performed on this address difference using a sign-clearing instruction. For example, during the sliding scan, the model parameter index location matching the magic request header is located at physical memory address 4096, and the starting address of the current virtual memory page is 1024. Subtracting 4096 from 1024 yields 3072. Taking the absolute value of 3072 generates a parameter offset coordinate value of 3072. The calculated parameter offset coordinate value of 3072 is then locked and written into a dedicated parameter offset register.
[0028] The permission conflict detection submodule calls the parameter offset coordinate value, extracts the sovereignty identifier information and the training mode identifier, performs an XOR operation on the sovereignty identifier information and the training mode identifier to extract the difference identifier bit, and performs a bitwise AND operation on the parameter offset coordinate value based on the difference identifier bit to generate the permission access logic value. The permission conflict detection submodule calls the system's direct memory access controller to read the parameter offset coordinate value 3072 stored in the dedicated parameter offset register. Simultaneously, it extracts 64-bit sovereignty identification information and 128-bit training mode identifier from the task context stack. Sixty-four consecutive zero bits are appended to the end of the 64-bit sovereignty identification information, forcibly padding its total length to 128 bits to achieve alignment with the training mode identifier. A bitwise XOR operation is performed between the padded and aligned sovereignty identification information and the training mode identifier, extracting all bits with a value of 1 from the XOR result as difference identifier bits. These difference identifier bits are then arranged in their original order to form a 128-bit mask string. The parameter offset coordinate value is converted into a 128-bit binary sequence. A bitwise AND operation is performed between the generated mask string and the binary sequence of parameter offset coordinate values, and the final binary output of the bitwise AND operation is converted back to a decimal value. For example, the first 8 bits of the padded sovereignty identification information are represented as 10101010, and the first 8 bits of the training mode identifier are represented as 11001100. Performing a bitwise XOR operation on both results in the first 8 bits of the difference flag being 01100110. The key bits of the parameter offset coordinate value 3072, after being converted to a binary sequence, are assumed to be 11110000. Performing a bitwise AND operation between the mask string 01100110 and the sequence 11110000 yields a result sequence with the first 8 bits being 01100000. Converting this sequence to decimal gives 96. The permission conflict detection submodule outputs this decimal value 96 as the final permission access logic value.
[0029] The out-of-bounds parameter aggregation submodule calls the access permission logic value, compares the access permission logic value with the preset access permission threshold, filters out the model parameter index positions that are lower than the preset access permission threshold and records them as sovereign out-of-bounds access parameters, performs array concatenation on the sovereign out-of-bounds access parameters, and constructs a conflict parameter index set. The out-of-bounds parameter aggregation submodule receives the access permission logic value 96 and immediately starts the dynamic threshold calculation engine. It extracts the initial bit width of the sovereign identifier (64) and the bit width of the training mode identifier (128), performing a simple addition operation to obtain 192, which is used as the dynamically set initial threshold upper limit. The out-of-bounds parameter aggregation submodule traverses the original sovereign identifier bitstream, counting the number of bits with a binary value of 1, and divides this number by the total bit width of the sovereign identifier to calculate the distribution density value. It multiplies the distribution density value with the initial threshold upper limit to define the target threshold interval for the current training mode identifier, extracting the integer value in the middle of this interval as the median. It performs a minimum value selection operation on this median value and a preset system boundary constraint constant, generating a preset access permission threshold after this boundary constraint processing. It performs a strict numerical comparison operation between the generated access permission logic value and the preset access permission threshold. It filters out all model parameter index positions whose access permission logic values are less than the preset access permission threshold, determining these index positions as illegal sovereign out-of-bounds access parameters. A contiguous dynamic array space is allocated in physical memory. All sovereign boundary access parameters obtained from the determination are concatenated in ascending order of memory address to construct a complete conflict parameter index set. For example, the initial threshold upper limit obtained by adding the bit width length is 192, and the number of sovereign identifier information with a median value of 1 is 32. The boundary parameter aggregation submodule divides 32 by 64 to obtain a distribution density value of 0.5. Multiplying the initial threshold upper limit 192 by the distribution density value 0.5 yields 96, defining the target threshold range as 0 to 96, and extracting the median value as 48. The system's preset boundary constraint constant is 60. Taking the minimum value between 48 and 60 yields the preset access permission threshold of 48. The permission access logic value is 96, which is not less than the preset access permission threshold of 48. Assuming there is another model parameter index position in the current batch with a permission access logic value of 30, since 30 is less than 48, it is extracted as a sovereign boundary access parameter and concatenated into the conflict parameter index set for storage.
[0030] Table 2: Screening Feature Table for Out-of-bounds Parameter Distribution
[0031] As shown in Table 2, the specific judgment results and out-of-bounds classification of different access logic values under the constraints of dynamically generated preset permission thresholds are presented in detail.
[0032] Specifically, such as Figure 2 , 5 As shown, the parameter snapshot rollback module includes: The snapshot construction submodule obtains the initial parameters of the model based on the conflict parameter index set, extracts the header fields of the initial parameters of the model and compares them with the data types in the benchmark whitelist for type identification, and writes the successfully matched initial parameters of the model into an independent mapped memory area according to the consecutive addresses to generate the original parameter snapshot. The snapshot construction submodule sends an extraction command to the high-speed storage unit of model parameters via the motherboard's internal data bus. Based on the index values recorded in the conflict parameter index set, it sequentially extracts the corresponding initial parameters of the model that are at risk of conflict. It reads the first 16 bytes of data for each extracted initial parameter and uses them as the data header field. It calls the baseline whitelist configuration table pre-loaded in the secure read-only register to extract the security codes of all legal data types that have completed registration and verification within the baseline whitelist. It converts the obtained data header field to decimal encoding and performs a byte-by-byte equality comparison with all legal data type security codes to complete the type identification of the parameter's internal structure. For model initial parameters that have successfully matched, it sends a request command to the operating system kernel's virtual memory manager to allocate a 2-megabyte independent mapped memory area. It calls the underlying system's direct memory overwrite interface function to write the successfully identified model initial parameters one by one into the independent mapped memory area in sequentially increasing order of their original physical addresses. For example, the initial model parameter header field, when converted to decimal, is 105. The system's baseline whitelist of registered legal data type security codes explicitly covers 105, 110, and 115. 105 is compared one by one with the code set to confirm its existence in the whitelist, thus completing type identification. Subsequently, these 500 initial model parameters, starting from the allocated memory address 8192, are sequentially written to an independent mapped memory area with a fixed step size of 4 bytes, ultimately generating a raw parameter snapshot data block with a total size of 2000 bytes.
[0033] The feature extraction submodule obtains simulated test data to extract network update parameters, compares the baseline mapping address of the original parameter snapshot with the write offset pointer of the network update parameters, locates the pointer node where the network update parameters cross the boundary, extracts the corresponding data fragments and performs byte alignment, and generates overweight offset features. The feature extraction submodule establishes a dedicated connection channel with the government system test simulator to receive a 1024-dimensional simulated test data matrix that has been denoised using a Gaussian distribution model. This simulated test data matrix is directly injected into a locally deployed deep convolutional neural network framework, sequentially passing through an input convolutional layer containing 64 feature extraction channels and a hidden fully connected layer using a linear rectified function to perform forward propagation. The module outputs the prediction result and calculates the loss error value, then calculates the backward gradient flow based on the loss error value to generate network update parameters. The operating system's memory page allocation table is queried to extract the baseline mapping address of the previously generated original parameter snapshot. Simultaneously, a system-level monitoring daemon thread is activated to intercept the current write offset pointer of the network update parameters during the write operation. The intercepted write offset pointer value is compared with the memory upper limit boundary value calculated from the baseline mapping address. The write offset pointers corresponding to the subtraction result being greater than zero are precisely selected and positioned as pointer nodes that have crossed the safety boundary. Based on the physical location of this pointer node that has crossed the boundary, 64-byte data segments in its memory region are read sequentially. The process involves appending zero bytes to the end of the extracted data segment in a loop until the total bit width of the data segment reaches a multiple of 128 bytes, as required by the hardware architecture, thus completing the byte alignment process. For example, the calculated memory upper limit boundary value of the original parameter snapshot baseline address is 65536, and the network update parameter write offset pointer value intercepted by the daemon thread in real time is 65600. Subtracting 65600 from 65536 yields 64. Since the subtraction result 64 is greater than zero, this write offset pointer is determined to be a pointer node that has crossed the boundary. The corresponding 64-byte data segment at the starting position is immediately read, and 64 zero-value bytes are appended to its end, making its total length reach 128 bytes to complete the memory structure byte alignment operation and generate the final fixed over-limit offset feature.
[0034] The rollback submodule is overridden, and the abnormal register address is extracted by calling the unauthorized offset feature. Based on the abnormal register address, the target memory block is extracted by reverse addressing of the original parameter snapshot. The initial data in the original parameter snapshot is overwritten and written to the target memory block to generate the rollback parameter set. The rollback submodule scans the 128-byte unauthorized offset feature data segment passed from the feature extraction submodule. It precisely extracts the last 8 bytes of data containing the exception read / write operation flag at the end of this segment and converts them into an unsigned long integer as the exception register address. Using this extracted exception register address as the starting point, it subtracts the fixed segment length value pre-registered in the global configuration table during the generation of the original parameter snapshot, generating a reverse addressing base address. Based on this base address, it performs a continuous memory block address scan in the system's physical memory mapping space towards higher addresses, extracting a continuous 4096-byte physical memory region as the target memory block. A data recovery request is initiated to the underlying file system via the system kernel-level interface to extract the uncontaminated initial parameter data stream from the security cache within the original parameter snapshot. The underlying operating system's memory block-level copy interface is directly called to forcibly overwrite the acquired initial parameter data stream byte-by-byte into the located target memory block. After the overwrite operation is complete, the latest status indicator code combination at the end of the target memory block is read and packaged to generate a rollback parameter set. For example, the extracted exception register address, converted to a decimal absolute address, is 80000. The system sets the fixed segment length of the original parameter snapshot to 4096. Subtracting 4096 from 80000 yields the reverse addressing base address 75904. Starting from memory address 75904, a 4096-byte memory space is allocated in ascending order as the target memory block. The initial parameter data stream from the original parameter snapshot is then completely overwritten and filled back into this contiguous memory space from 75904 to 80000, completing parameter cleaning and encapsulation.
[0035] Specifically, such as Figure 2 , 6 As shown, the gradient boundary circuit breaker module includes: The fingerprint extraction submodule calls the rollback parameter set and the government data field to perform bitwise logical concatenation of the data, divides the concatenated feature sequence generated by concatenation into fixed-length groups, performs a circular left shift and bitwise logical NOT operation to extract the hash mapping bit sequence for each data group, and generates the interlayer boundary summary value. The fingerprint extraction submodule retrieves the binary parameter matrix bitstream corresponding to the rollback parameter set and the core identity binary bitstream generated from the original government data fields from the system's security domain isolation buffer. It performs a bitwise logical OR operation between the binary bitstream of the rollback parameter set and the binary bitstream of the government data fields in the hardware logic operation unit, thereby achieving bitwise logical concatenation of cross-data domain data to generate a long serial feature sequence with a total length of 2048 bits. This long serial feature sequence is then subjected to a forced cyclic segmentation operation according to fixed-length boundaries of 64 bits per group, completing the fixed-length grouping processing of the long sequence. For each independent data group obtained from the segmentation, its internal 64-bit binary data is forcibly shifted 3 bits to the left towards the higher bits. A bitwise logical NOT operation is performed on the recombined binary data bitstream, completely reversing the values of all bits in the sequence. The newly generated binary bit string after the reversal is extracted as the hash mapping bit sequence. Finally, the hash mapping bit sequences generated for each group are reassembled end-to-end according to the original segmentation order. For example, the first 8 bits of the binary stream of the rollback parameter set are 10100000, and the first 8 bits of the binary stream of the government data field are 01010000. Performing a logical OR operation on these two sets of bits generates a concatenated first 8-bit feature sequence, 11110000. Extracting one data group 11110000 with a length set to 8 bits, and performing a left shift operation of 3 bits, yields the new sequence 10000111. Then, performing a logical NOT operation on 10000111 converts zero bits to one bits and one bits to zero bits, ultimately resulting in the hash mapping bit sequence 01111000. This hash mapping bit sequence 01111000 is converted to the decimal value 120 and added to the sequence set of inter-layer boundary summary values.
[0036] The feature matching submodule calls the inter-layer boundary summary value, obtains the network baseline summary value stored in the preset free memory, performs a bitwise XOR comparison between the inter-layer boundary summary value and the network baseline summary value to extract the off-coordinate nodes, calculates the three-dimensional Euclidean distance of the off-coordinate nodes, and generates cross-layer transition feature quantities. The feature comparison submodule scans the pre-defined free memory pages specifically allocated by the operating system kernel to obtain the 256-bit network baseline digest value persistently stored there during the system's initial startup. The inter-layer boundary digest value generated by the preceding process is aligned bit-by-bit with the network baseline digest value in a register, and a bit-by-bit XOR comparison operation is performed. The XOR operation output sequence is traversed, and the exact position index value of the bits with a value of 1 is extracted. All extracted position index values are recorded sequentially and encapsulated as offset coordinate nodes. All recorded offset coordinate nodes are grouped in three-dimensional space according to a fixed rule of three index values per group. Three consecutive index values within the same group are directly mapped to the horizontal, vertical, and abscissa values in the virtual three-dimensional space environment. The square of each horizontal, vertical, and abscissa value within a group is calculated, and the three squared results are summed. The square root operation is performed on the final result of the summation operation to obtain the true Euclidean distance scalar of the two sets of feature sequences in the three-dimensional mapping space. Finally, the three-dimensional Euclidean distances obtained from each group are numerically accumulated to generate the cross-layer transition feature quantity. For example, the first 8 bits of the generated inter-layer boundary summary value are 11001100, and the first 8 bits of the network baseline summary value are 10101010. After performing a bitwise XOR operation on the two, the output sequence is 01100110. The bit indices with a value of 1 in the output sequence are recorded as positions 2, 3, and 6. Positions 2, 3, and 6 form an offset coordinate node group, which is used as the x-coordinate, y-coordinate, and vertical coordinate of the three-dimensional coordinates, respectively. The squares of 2, 3, and 6 are calculated to obtain 4, 9, and 36, respectively. The sum of 4, 9, and 36 is 49. The square root operation is performed on 49 to calculate the three-dimensional Euclidean distance of the current group as 7. After processing all deviation groups, the Euclidean distances of each group are summed to obtain the cross-layer transition characteristic value, which is set to 35.
[0037] Table 3: Distance Table for 3D Spatial Mapping of Feature Transitions
[0038] As shown in Table 3, the specific calculation results of the mapping combination and Euclidean distance of the off-coordinate nodes extracted from the one-dimensional summary features after XOR processing are presented in detail.
[0039] The gradient modulation submodule sets the truncation gradient threshold of the reverse feedback link based on the cross-layer transition feature quantity, compares the difference with the numerical components carried by the rollback parameter set, filters out the numerical components that exceed the truncation gradient threshold and assigns zero value to force the parameter state to reset, and generates the local government affairs sharing model. The gradient modulation submodule reads the cross-layer transition feature value of 35 and immediately wakes up the network structure parsing engine. Internally, it loads and parses the underlying architecture of the current federated learning model, confirming that the model contains a data input layer responsible for feature reception, connected to a fully connected hidden layer with 128 operational neurons to perform large-scale feature matrix multiplication, and filtering all negative values in the network output through a linear rectified activation function deployed within the hidden layer. Finally, it connects to the fully connected output layer to complete the classification calculation of the business prediction value. The acquired cross-layer transition feature value is multiplied by a global decay constant preset in the system environment variables to calculate a truncated gradient threshold specifically applied to the network's back-feedback link. The module traverses and scans the memory region recorded in the rollback parameter set, extracting all gradient update numerical components one by one. The absolute value of each extracted gradient numerical component is extracted, and the calculated absolute value is compared with the truncated gradient threshold. Abnormal numerical components with absolute values exceeding the truncated gradient threshold are precisely selected, and the underlying memory addressing interface is directly controlled to forcibly overwrite the memory address of the abnormal numerical component with a zero value, performing an irreversible parameter state forced reset operation. The safe numerical components that did not trigger the reset condition are reloaded back into the connection weight matrix structure corresponding to the 128 hidden layer neuron nodes, and repackaged to generate the local government sharing model. For example, the cross-layer transition feature value calculated in the previous term is 35, and the pre-set decay constant in the environment variables is assigned a value of 0.2. Multiplying 35 and 0.2 yields a truncation gradient threshold of 7. The three continuous gradient numerical components extracted from the rollback parameter set are 5, -9, and 3. Taking their absolute values yields positive values 5, 9, and 3. Comparing 5, 9, and 3 with the truncation gradient threshold of 7, since the value 9 is greater than the set threshold of 7, the physical memory address occupied by the original value -9 is accurately located and a forced overwrite operation is performed on it. The values 5 and 3 do not exceed the threshold of 7, so they are retained as is and loaded into the hidden layer connection weight matrix, completing the safe modulation of the local model.
[0040] Specifically, such as Figure 2 , 7 As shown, the federated parameter aggregation module includes: The ciphertext aggregation submodule obtains the core model weight matrix from the local government sharing model, performs a dot-multiplication encryption operation on the core model weight matrix based on the public key factor to obtain the homomorphic ciphertext component, and performs a homomorphic matrix addition operation on the homomorphic ciphertext component and the ciphertext component of the simulated node to generate the aggregated ciphertext sequence. The ciphertext aggregation submodule connects to the independent memory space of the local government shared model's workspace, directly reading the core model weight matrix (128 rows × 128 columns) in the fully connected hidden layer of the local government shared model. It initiates an encryption request to the key distribution server of the security certificate management center to obtain a 2048-bit public key factor parameter sequence. It performs modular multiplication on each element of the core model weight matrix with a pre-defined large prime number parameter in the public key factor, and then adds a Gaussian noise mask value generated in real-time by a hardware true random number generator to complete the dot-multiplication encryption process, thereby obtaining the homomorphic ciphertext component. Through a high-throughput message queue interface within the local area network, it receives the simulated node ciphertext component matrices broadcast by all other federated learning computing nodes. The ciphertext aggregation submodule merges the homomorphic ciphertext component matrix it calculates with the received ciphertext component matrix from the simulated node by calling the homomorphic matrix addition operation instruction specific to the homomorphic encryption algorithm. This involves performing direct arithmetic addition on the ciphertext values at corresponding row and column positions of the two ciphertext matrices of the same dimension, merging them to generate a unified aggregated ciphertext sequence across the entire network. For example, the plaintext value extracted from an element at a certain two-dimensional coordinate position in the core model weight matrix is 10, the large prime number parameter used for modular multiplication in the public key factor configuration is 17, and the noise mask value generated by the true random number generator is 3. The ciphertext aggregation submodule multiplies 10 and 17 to obtain 170, and adds 170 to the noise mask value 3 to obtain the final calculated homomorphic ciphertext component value of 173 at that position. The value of the simulated node ciphertext component received through the message queue at the same matrix coordinate position is 120. The homomorphic addition operation is performed on the corresponding position of the homomorphic ciphertext component value 173 and the simulated node ciphertext component value 120 to obtain the ciphertext accumulation value of 293 at that specific position in the aggregated ciphertext sequence. This accumulation value is then written to the ciphertext aggregation buffer.
[0041] The distributed decryption submodule performs a splitting operation to extract ciphertext data packets based on the aggregated ciphertext sequence, performs modulo operations and noise reduction on the ciphertext data packets based on the private key factor to eliminate encryption perturbation components, and performs reconstruction on the data bit stream after eliminating encryption perturbation components to recover plaintext values and generate a globally updated feature vector. The distributed decryption submodule receives the aggregated ciphertext sequence transmitted by the ciphertext aggregation submodule via the system's high-speed peripheral component interconnect bus. It scans the data stream of this sequence, performing splitting and truncation operations on the long sequence according to the pre-defined feature delimiters in the network transmission protocol, cutting the long sequence and extracting independent ciphertext data packet segments. It calls the private key factor parameters stored in the physically isolated area inside the hardware-level secure encryption chip. It divides all ciphertext values in the extracted ciphertext data packets sequentially by the modulus parameter provided by the private key factor, obtaining the quotient and remainder generated during the division operation, and extracting the remainder separately as the direct output of the modulo operation. It subtracts the sum of global noise masks pre-registered in the system's global configuration registry from the extracted remainder, performing a noise reduction operation to eliminate additional encryption disturbances introduced by network nodes during the encryption stage. The resulting clean data bitstream values after noise reduction are then subjected to array recombination and tensor dimension transformation operations strictly according to the 128×128 row and column size structure of the original neural network model matrix, restoring them to standard format plaintext values and generating a globally updated feature vector. For example, the ciphertext value extracted from a certain position in the ciphertext data packet obtained after being segmented by delimiters is 293. The modulus parameter configured in the private key factor area for decryption is 17, and the sum of the global node noise masks registered in the system registry is 3. Dividing the value 293 by the modulus parameter 17 yields a quotient of 17 with a remainder of 4. This remainder of 4 is directly extracted to complete the modulo operation for decryption. The extracted remainder of 4 is then subtracted from the sum of the global noise masks of 3 to reduce noise, resulting in the final plaintext value of 1 after noise removal. The plaintext value of 1, along with the plaintext data recovered from the remaining positions, is packaged and written into a contiguous memory structure for updating the global feature vector.
[0042] The parameter loading submodule addresses the memory allocation mapping table of the target government server based on the globally updated feature vector, writes the globally updated feature vector into the specified register range according to the continuous address indicated by the memory allocation mapping table, performs parameter replacement in the specified register range, and generates a global government sharing model. The parameter loading submodule extracts the global update feature vector, the final output of the distributed decryption submodule, from the main memory space. It parses the hardware addressing routing label information appended to the header of this global update feature vector structure. Using this parsed information, it directly queries the underlying memory allocation mapping table maintained within the physical memory space of the target government center's main server to obtain the base address of the physical register where the vector data should ultimately be written. The underlying direct memory access hardware controller is then driven to write all plaintext numerical elements covered by the global update feature vector, strictly following the base address indicated by the memory allocation mapping table, to consecutive specified register ranges in ascending order of memory address. By overwriting the original physical address in place, a complete physical-level replacement is performed on the previously stored old version model cache parameters within the specified register range. After listening for and confirming the completion of the hardware interrupt signal indicating the end of the replacement process, the model version number controller state maintained by the operating system kernel layer is incremented and refreshed, officially building and generating the global government shared model, which is then mounted and activated in the actual government production network environment. For example, parsing the global update feature vector reveals a total effective data length of 4096 parameter bits. The memory allocation mapping table indicates that the base address of the physical register currently mounted by the model is 1048576 in decimal. The parameter loading submodule starts from address 1048576 and sequentially writes 4096 new plaintext parameter values to the hardware register in increments of 1, until the end address reaches 1052671. After the entire continuous writing process is completed, a version controller refresh command is triggered, completing the system-level model iteration and opening the government data security sharing query interface for cross-network access by various departments.
[0043] Please see Figure 8 The method for secure sharing of cross-departmental government data based on federated learning is implemented based on the aforementioned system for secure sharing of cross-departmental government data based on federated learning, and includes the following steps: S1: Read the sovereignty identification information of the government data field from the local government database, obtain the training mode identifier of the federated learning task, extract the parameter location information of the model file, perform mapping matching between the government data field and the parameter location information, and construct the field slot mapping table; S2: Call the field slot mapping table to extract the model parameter index position of the government data field, perform permission conflict detection based on sovereignty identification information and training mode identification, filter the model parameter index positions of sovereignty over-boundary access, and construct a set of conflict parameter indexes; S3: Extract the initial parameters of the model from the conflict parameter index set and write them into memory. Construct an original parameter snapshot and compare it with the network updated parameters to extract the unauthorized offset features. Call the original parameter snapshot and perform storage overwrite based on the unauthorized offset features to generate a rollback parameter set. S4: Call the rollback parameter set and government data fields to perform a hash algorithm to extract the inter-layer sovereignty boundary fingerprint, compare the inter-layer sovereignty boundary fingerprint to extract cross-layer transition features, perform gradient modulation on the rollback parameter set, and build a local government sharing model; S5: Input the local government sharing model into the homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate the aggregated ciphertext parameters, perform a distributed decryption process on the aggregated ciphertext parameters to extract the global update parameters, and load the global update parameters into the local government server to build the global government sharing model.
[0044] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the described technical solutions.
Claims
1. A cross-departmental government data secure sharing system based on federated learning, characterized in that, The system includes: The sovereignty identifier resolution module reads the sovereignty identifier information of the government data field from the local government database, obtains the training mode identifier of the federated learning task, extracts the parameter location information of the model file, performs mapping matching between the government data field and the parameter location information, and constructs a field slot mapping table. The sovereignty conflict verification module calls the field slot mapping table to extract the model parameter index position of the government data field, performs permission conflict detection based on the sovereignty identification information and the training mode identification, filters the model parameter index positions of sovereignty over-boundary access, and constructs a conflict parameter index set. The parameter snapshot rollback module extracts the initial parameters of the model according to the conflict parameter index set and writes them into memory. It constructs an original parameter snapshot and compares it with the network updated parameters to extract the unauthorized offset features. It calls the original parameter snapshot to perform storage overwrite based on the unauthorized offset features and generates a rollback parameter set. The gradient boundary circuit breaker module calls the rollback parameter set and the government data field to perform a hash algorithm to extract the inter-layer sovereign boundary fingerprint, compares the inter-layer sovereign boundary fingerprint to extract cross-layer transition features, performs gradient modulation on the rollback parameter set, and constructs a local government sharing model.
2. The cross-departmental government data secure sharing system based on federated learning according to claim 1, characterized in that, The field slot mapping table includes data dictionary key-value pairs, physical storage offsets, and storage routing tables. The conflict parameter index set includes out-of-bounds access pointers, abnormal node indexes, and feature dimension sequences. The rollback parameter set includes model weight matrices, parameter update tensors, and system baseline values. The local government sharing model includes a model feature extraction layer, model inference operators, and a security isolation sandbox.
3. The cross-departmental government data secure sharing system based on federated learning according to claim 1, characterized in that, The sovereignty identifier resolution module includes: The information extraction submodule extracts the sovereignty identification information of government data fields from the local government database, retrieves the training mode identifier of the federated learning task based on the sovereignty identification information, retrieves the file parameter location information, evaluates the offset between the sovereignty identification information and the file parameter location information, and generates the feature deviation distance. The coordinate alignment submodule calls the feature deviation amount, extracts a specific running frequency parameter from the training mode identifier of the federated learning task, performs weight scaling on the feature deviation amount according to the specific running frequency parameter, and generates a dynamic calibration benchmark value. The association matching submodule performs coordinate normalization on the file parameter location information according to the dynamic calibration benchmark value and extracts the corresponding integer bits. It compares the integer bits with the sovereignty identifier information to extract the overlapping element content, performs data field slot mapping operation on the overlapping element content, and generates a field slot mapping table.
4. The cross-departmental government data secure sharing system based on federated learning according to claim 1, characterized in that, The sovereignty conflict verification module includes: The index position extraction submodule calls the slot mapping table to extract government data fields, performs address pointer scanning on the government data fields to extract the model parameter index position and starting address, calculates the absolute difference between the model parameter index position and the starting address, and generates parameter offset coordinate values. The permission conflict detection submodule calls the parameter offset coordinate value, extracts the sovereignty identifier information and the training mode identifier, performs an XOR operation on the sovereignty identifier information and the training mode identifier to extract the difference identifier bit, and performs a bitwise AND operation on the parameter offset coordinate value based on the difference identifier bit to generate the permission access logic value. The out-of-bounds parameter aggregation submodule calls the permission access logic value, compares the permission access logic value with the preset access permission threshold, filters out the model parameter index positions that are lower than the preset access permission threshold and records them as sovereign out-of-bounds access parameters, performs array concatenation on the sovereign out-of-bounds access parameters, and constructs a conflict parameter index set.
5. The cross-departmental government data secure sharing system based on federated learning according to claim 4, characterized in that, The preset access permission threshold is determined based on the bit width of the sovereign identifier information and the training mode identifier. After segmentation mapping based on the bit value distribution of the sovereign identifier information, the median value is selected from the target threshold interval corresponding to the training mode identifier and then subjected to boundary constraint processing.
6. The cross-departmental government data secure sharing system based on federated learning according to claim 4, characterized in that, The parameter snapshot rollback module includes: The snapshot construction submodule obtains the initial parameters of the model based on the conflict parameter index set, extracts the header fields of the initial parameters of the model and compares them with the data types in the benchmark whitelist for type identification, and writes the successfully matched initial parameters of the model into an independent mapped memory area according to consecutive addresses to generate the original parameter snapshot. The feature extraction submodule obtains simulated test data to extract network update parameters, compares the baseline mapping address of the original parameter snapshot with the write offset pointer of the network update parameters, locates the pointer node where the network update parameters cross the boundary, extracts the corresponding data fragments and performs byte alignment, and generates over-weight offset features. The rollback submodule is overwritten, and the abnormal register address is extracted by calling the unauthorized offset feature. Based on the abnormal register address, the target memory block is extracted by reverse addressing of the original parameter snapshot. The initial data in the original parameter snapshot is overwritten and written to the target memory block to generate the rollback parameter set.
7. The cross-departmental government data secure sharing system based on federated learning according to claim 6, characterized in that, The gradient boundary circuit breaker module includes: The fingerprint extraction submodule calls the rollback parameter set and the government data field to perform bitwise logical concatenation of the data, divides the concatenated feature sequence generated by the concatenation into fixed-length groups, performs a circular left shift and bitwise logical NOT operation to extract the hash mapping bit sequence for each data group, and generates interlayer boundary summary values. The feature matching submodule calls the interlayer boundary summary value, obtains the network reference summary value stored in the preset free memory, performs a bitwise XOR comparison between the interlayer boundary summary value and the network reference summary value to extract the off-coordinate nodes, calculates the three-dimensional Euclidean distance of the off-coordinate nodes, and generates cross-layer transition feature quantities. The gradient modulation submodule sets the truncation gradient threshold of the reverse feedback link based on the cross-layer transition feature quantity, compares the difference with the numerical components carried by the rollback parameter set, filters out the numerical components that exceed the truncation gradient threshold and assigns zero value to force a reset of the parameter state, and generates a local government affairs sharing model.
8. The cross-departmental government data secure sharing system based on federated learning according to claim 1, characterized in that, The system includes: The federated parameter aggregation module inputs the local government sharing model into the homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate aggregated ciphertext parameters, performs a distributed decryption process on the aggregated ciphertext parameters to extract global update parameters, and loads the global update parameters into the local government server to build a global government sharing model. The global government affairs sharing model includes a domain knowledge graph, a distributed inference engine, and a federated learning framework.
9. The cross-departmental government data secure sharing system based on federated learning according to claim 8, characterized in that, The federation parameter aggregation module includes: The ciphertext aggregation submodule obtains the core model weight matrix extracted from the local government affairs sharing model, performs a dot-multiplication encryption operation on the core model weight matrix according to the public key factor to obtain the homomorphic ciphertext component, and performs a homomorphic matrix addition operation on the homomorphic ciphertext component and the ciphertext component of the simulated node to generate an aggregated ciphertext sequence. The distributed decryption submodule performs a splitting operation to extract ciphertext data packets based on the aggregated ciphertext sequence, performs modulo operation and noise reduction operation on the ciphertext data packets based on the private key factor to eliminate encryption perturbation components, performs reconstruction on the data bit stream after eliminating encryption perturbation components to recover plaintext values, and generates a global update feature vector. The parameter loading submodule addresses the memory allocation mapping table of the target government server based on the global update feature vector, writes the global update feature vector into the specified register range according to the continuous address indicated by the memory allocation mapping table, performs parameter replacement in the specified register range, and generates a global government sharing model.
10. A method for secure sharing of cross-departmental government data based on federated learning, characterized in that, The implementation of the cross-departmental government data security sharing system based on federated learning according to any one of claims 1-9 includes the following steps: S1: Read the sovereignty identification information of the government data field from the local government database, obtain the training mode identifier of the federated learning task, extract the parameter location information of the model file, perform mapping matching between the government data field and the parameter location information, and construct the field slot mapping table; S2: Call the field slot mapping table to extract the model parameter index position of the government data field, perform permission conflict detection based on sovereignty identification information and training mode identification, filter the model parameter index positions of sovereignty over-boundary access, and construct a conflict parameter index set; S3: Extract the initial parameters of the model according to the conflict parameter index set and write them into memory. Construct an original parameter snapshot and compare it with the network update parameters to extract the unauthorized offset features. Call the original parameter snapshot and perform storage overwrite based on the unauthorized offset features to generate a rollback parameter set. S4: Call the rollback parameter set and the government data field to perform a hash algorithm to extract the inter-layer sovereignty boundary fingerprint, compare the inter-layer sovereignty boundary fingerprint to extract cross-layer transition features, perform gradient modulation on the rollback parameter set, and construct a local government sharing model; S5: Input the local government affairs sharing model into the homomorphic encryption algorithm to perform ciphertext aggregation operation to calculate the aggregated ciphertext parameters, perform a distributed decryption process on the aggregated ciphertext parameters to extract global update parameters, and load the global update parameters into the local government affairs server to build a global government affairs sharing model.