Work meeting data encryption processing method and system

By combining format-preserving encryption and homomorphic message authentication with programmable access control, the problems of format corruption and unverifiable data encryption in trade union data are solved, achieving field-level secure encryption and dynamic authorization, and improving the security and controllability of data transmission and storage.

CN120979784APending Publication Date: 2025-11-18SHENZHEN ZHIGONG SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511290360.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing union data encryption technologies ignore the format characteristics of the original fields when performing field encryption, resulting in encrypted data that cannot meet the format consistency requirements, affecting system parsing and compatibility, and failing to achieve field-level homomorphic verifiability, making it difficult to adapt to the business needs of multi-dimensional cross-authorization.

Method used

A method combining format-preserving encryption, homomorphic message authentication, and programmable access control policies is adopted. Format-preserving encryption generates ciphertext with consistent format, homomorphic message authentication algorithm generates field authentication values, and access control policies are generated based on user attributes to achieve field-level binding and dynamic authorization control.

Benefits of technology

It improves the synergy and compatibility between data encryption and the business logic of the trade union system, enhances the anti-tampering capability and verifiability of sensitive data, realizes the ability to adapt to multi-role, multi-responsibility, and multi-regional access management, and builds a closed-loop data link with security and trustworthiness throughout the entire lifecycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979784A_ABST
    Figure CN120979784A_ABST
Patent Text Reader

Abstract

The invention discloses a work meeting data encryption processing method and system, and the method comprises the following steps: obtaining original field data including identity information, contact information and job codes, extracting field format information, carrying out the format keeping encryption of each field according to the field format information, generating an encrypted ciphertext, and storing the encrypted ciphertext in a database; the system further utilizes a message authentication algorithm to calculate an authentication value of the encrypted ciphertext, binds the ciphertext with the corresponding authentication value to form a data encapsulation unit, generates an access control strategy according to organization attribute information of an access request user, and performs matching mapping on the strategy and the data encapsulation unit to form an access control result. The method comprises the following steps: constructing a composite packaging object comprising an encrypted field, an authentication value and an access strategy, executing access authority verification, data integrity check and controlled decryption operation in the data transmission, storage and access processes, and finally outputting a field data result which can be used by a service system. According to the invention, secure packaging and controlled use of the structured sensitive information are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, and in particular to a method and system for encrypting union data. Background Technology

[0002] With the widespread deployment of digital office and information management systems in trade union organizations, structured data involving sensitive information such as member identity, contact information, and job titles is increasingly flowing across regions and functional departments, necessitating encrypted processing and access control of data throughout its entire lifecycle. Currently, trade union systems mainly rely on traditional field encryption and role-based access control for data protection. These methods generally suffer from problems such as coarse granularity, poor flexibility, and inability to guarantee field-level integrity.

[0003] On the one hand, existing encryption technologies often ignore the format characteristics of the original fields when encrypting them, resulting in encrypted data that fails to meet format consistency requirements, thus affecting system parsing and compatibility. On the other hand, existing authentication methods mostly use discrete digest signatures, which cannot achieve homomorphic verifiability for field-level ciphertext, nor can they be precisely bound to structural attributes. This makes it difficult to track the structural consistency and integrity of data during transmission and use. Access control policies lack deep integration with field structure and organizational attributes, often relying on static rule matching, which is difficult to adapt to the actual business needs of multi-dimensional cross-authorization based on roles, responsibilities, and regions in trade union organizations.

[0004] Therefore, how to provide a method and system for encrypting union data is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a method and system for encrypting union data. This invention adopts a technical approach that combines format-preserving encryption, homomorphic message authentication, and programmable access control strategies. It describes in detail the processing flow for achieving field-level encryption, authentication, and authorized access without changing the data structure, and has the advantages of strong structural compatibility, high data reliability, and fine-grained access control.

[0006] A method and system for encrypting union data according to an embodiment of the present invention includes the following steps:

[0007] Obtain the raw field data containing identity information, contact information, and job code fields from the trade union system, and extract the field format information for each field.

[0008] Based on the field format information of each field data, perform format preservation encryption operation on each field data separately to generate a set of format preservation encrypted field ciphertext;

[0009] For each field in the ciphertext set, use the homomorphic message authentication algorithm to calculate the field authentication value and generate a set of field authentication values;

[0010] Each ciphertext field in the ciphertext field set is bound to the corresponding field authentication value in the field authentication value set at the field level, thus constructing a data encapsulation unit set containing the ciphertext field and the authentication value field.

[0011] Based on the organizational attribute information of the user requesting access, including role identification, job type and geographical affiliation information, an access control policy is generated;

[0012] The access control policy and the data encapsulation unit set are mapped to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy;

[0013] When transmitting, storing, and accessing composite encapsulated objects in the union system, access permission verification, field ciphertext integrity verification, and controlled decryption processing are performed, and the field data results are output for business system calls.

[0014] Optionally, the field format information includes: field type information describing the character type of the field, field length information limiting the length of the field, structure pattern information indicating the character arrangement structure of the field, and encoding rule information identifying that the field contains specific encoding and check bit rules.

[0015] Optionally, the generation of the encrypted ciphertext set of fields while maintaining the format includes:

[0016] Obtain the field format information for each field, including field character type, field length, and structural position rules. Construct a field format description structure based on the field format information. The field format description structure includes field name information, field length parameter, field position parameter, structural position weight parameter, character type, length requirement, and field identifier.

[0017] The original field data is format-mapped using a field format description structure to obtain a format mapping value, which is used as input to the format-preserving encryption algorithm.

[0018] The format-preserving encryption algorithm is invoked to perform encryption on the format mapping value, generating an initial field ciphertext sequence. The initial field ciphertext sequence satisfies the character type and length requirements defined in the field format description structure, and the character order remains consistent with the original field.

[0019] Based on the field format description structure, the structural sensitivity and information entropy distribution of each character position are evaluated, and a ciphertext position perturbation weight model is generated.

[0020] A perturbation function is constructed based on the ciphertext position perturbation weight model. The perturbation function is an invertible function, which dynamically generates the ciphertext position rearrangement index.

[0021] The initial field ciphertext sequence is rearranged based on the ciphertext position rearrangement index to generate a ciphertext sequence of the field after ciphertext rearrangement.

[0022] Perform format consistency verification on the ciphertext sequence of the rearranged fields to confirm that it meets all format constraints defined in the field format description structure. After the verification is passed, add the ciphertext sequence of the rearranged fields to the set of ciphertexts of the format-preserving encrypted fields.

[0023] Optionally, the generation of the field authentication value set includes:

[0024] Extract each field ciphertext from the encrypted field ciphertext set that preserves the format, and construct field labels based on the structural position and field identifier of the corresponding field in the field format description structure;

[0025] The ciphertext of the field is structurally combined with the field label to generate a field authentication input unit. The field authentication input unit includes a field position encoding segment and a field content encoding segment. The field position encoding segment is used to identify the location information of the ciphertext of the field in the structure, and the field content encoding segment is used to represent the encoding result of the ciphertext of the field.

[0026] Set the encryption parameters for the homomorphic message authentication algorithm, and pass the field authentication input unit and the encryption parameters as authentication input to the homomorphic message authentication algorithm to perform homomorphic aggregation processing on the field position encoding segment and the field content encoding segment to generate an intermediate authentication structure;

[0027] The intermediate authentication structure is mapped to the field labels to generate field authentication values, which include the field label binding area and the authentication digest area.

[0028] The field authentication value is bound to the corresponding field ciphertext to form a field authentication value set. Each field authentication value in the field authentication value set maintains a one-to-one correspondence with the field ciphertext in the field-level structure.

[0029] Optionally, the construction of the data encapsulation unit set includes:

[0030] Extract the ciphertext of each field one by one from the set of ciphertexts that have been encrypted while maintaining the format, and extract the field authentication value corresponding to each ciphertext of each field from the set of field authentication values, where the field authentication value contains the field label;

[0031] Based on the field format description structure, the field name information and field position parameters of the records are described. The field ciphertext and field authentication value are structurally consistent to confirm the one-to-one correspondence between the two in the field dimension.

[0032] Perform field-level binding operations, build a field binding mapping table, and use field name information and field structure position as key indexes to match the field ciphertext and field authentication value according to the field label to generate a binding structure tuple.

[0033] Based on the binding structure tuples generated in the field binding mapping table, construct data encapsulation units. Each data encapsulation unit includes a field ciphertext segment, a field authentication value segment, and a field structure identifier segment.

[0034] All data encapsulation units are written into the data encapsulation unit set to form a complete data encapsulation unit set corresponding to the field-level structure. Each data encapsulation unit maintains the consistency of binding between the field ciphertext, the field authentication value, and the structure identifier.

[0035] Optionally, the generation of access control policies includes:

[0036] The organization attribute information of the user requesting access is received. The organization attribute information includes user role identifier, duty category code and geographical affiliation code, which are used to represent the access request user’s authority level, business function type and geographical level in the trade union organizational structure, respectively.

[0037] The role access level is determined based on the user role identifier. The role access level includes management roles, execution roles and audit roles. An initial access permission template is constructed based on the role access level.

[0038] Based on the responsibility category coding, the responsibility access domain is matched. The responsibility access domain limits the set of field types that can be accessed in the corresponding business function module, and the responsibility access domain is mapped to the initial access permission template to form an access permission model with responsibility constraints.

[0039] Based on the geographic affiliation code, the access boundary range is determined, and geographic access constraint rules are constructed. These geographic access constraint rules limit data access requests to be effective only in the region where the requesting user belongs and the authorized region.

[0040] Access control policies are constructed by combining role access levels, responsibility access domains, and geographical access constraints. These access control policies are defined using a structured permission expression language, which includes two types of clauses: field access expressions and logical judgment expressions.

[0041] Optionally, the generation of the composite encapsulation object includes:

[0042] Extract each data encapsulation unit from the data encapsulation unit set, and read the field ciphertext segment, field authentication value segment, and field structure identifier segment, where the field structure identifier segment includes field name information and field position parameters;

[0043] Parse the field access expressions and logical judgment expressions contained in the access control policy, and construct a policy mapping rule set, which includes field name matching rules, field structure position matching rules, and access permission matching rules;

[0044] For each data encapsulation unit, the following policy mapping process is performed: Field name information in the field structure identifier segment is matched according to field name matching rules to determine whether the corresponding field falls within the scope of fields allowed by the access control policy; field position parameters are judged according to field structure position matching rules to confirm whether the field's position in the structure conforms to the access range defined by the policy; and the organizational attribute information of the user requesting access is checked according to access permission matching rules to determine whether their role access level, responsibility category, and geographical affiliation information meet the access authorization conditions for the corresponding field.

[0045] When all three matching rules are met, the corresponding data encapsulation unit is marked as a policy-allowed access unit, and a policy mapping matching unit set is generated.

[0046] For each data encapsulation unit in the policy mapping matching unit set, a composite encapsulation unit is constructed. The composite encapsulation unit includes a field ciphertext segment, a field authentication value segment, and an access control policy identifier field. The access control policy identifier field records the policy number and the authorization rule hash value.

[0047] All composite packaging units are aggregated to generate a composite packaging object.

[0048] Optionally, the output of field data results includes:

[0049] Extract the composite encapsulation unit one by one from the composite encapsulation object, and read the field ciphertext segment, field authentication value segment, field structure identifier segment and access control policy identifier field;

[0050] Based on the policy number recorded in the access control policy identifier field, the corresponding access control policy is retrieved, and the field access expressions and logical judgment expressions contained therein are parsed. Access permission verification is then performed in conjunction with the organizational attribute information of the user requesting access. Access permission verification includes: matching the field permission scope defined in the field access expression based on the field name information and field position parameters in the field structure identifier segment; performing Boolean judgment on the logical judgment expression in conjunction with the user role identifier, responsibility type, and geographical affiliation information to confirm whether the access authorization logic is satisfied; if the above matching and judgment are both true, then the current composite encapsulation unit is determined to be accessible.

[0051] For composite encapsulation units that pass access permission verification, extract the field label binding area and authentication digest area from the field ciphertext segment and the field authentication value segment. Based on the field name information and field position parameters in the field structure identifier segment, perform a structural comparison of the field label binding area to confirm that the field authentication value segment and the field ciphertext segment are structurally consistent.

[0052] The homomorphic message authentication verification algorithm is used to perform authentication digest recalculation on the field ciphertext segment and the field label binding area. The recalculated digest value is compared with the authentication digest value recorded in the authentication digest area. If they match, it is confirmed that the field ciphertext segment has not been tampered with, and the field integrity verification is completed.

[0053] For the encrypted field segment that has passed integrity verification, based on the field name information, field format description structure, permutation key and perturbation index in the field structure identifier segment, the format-preserving decryption operation is performed, which specifically includes: restoring the original character position order based on the perturbation index, parsing the field structure rules based on the format description structure, and calling the decryption algorithm to restore the plaintext characters of the field;

[0054] The plaintext data of the fields obtained by decryption is restructured according to the field name information and field position parameters recorded in the field structure identifier segment to generate the field data result.

[0055] Optional, including the following modules:

[0056] The data acquisition module is used to acquire raw field data from the trade union system and extract the field format information for each field.

[0057] The format preservation encryption module is used to perform format preservation encryption on each field data according to the field format information, and generate a set of format preservation encrypted field ciphertexts.

[0058] The field authentication module is used to perform homomorphic message authentication algorithm calculations on each field ciphertext in the format-preserving encrypted field ciphertext set to generate a set of field authentication values;

[0059] The field binding module is used to bind each ciphertext of a field in the ciphertext set to the corresponding field authentication value in the field authentication value set at the field level, thereby constructing a data encapsulation unit set.

[0060] The policy generation module is used to generate access control policies based on the organizational attribute information of the user making the access request.

[0061] The policy mapping module is used to perform policy mapping processing on access control policies and data encapsulation unit sets to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy;

[0062] The access control module is used to perform access permission verification, field ciphertext integrity verification, and controlled decryption processing when transmitting, storing, and accessing composite encapsulated objects in the union system, and to output the field data results.

[0063] The beneficial effects of this invention are:

[0064] (1) By introducing a format preservation encryption mechanism, this invention solves the problem of poor database compatibility caused by format destruction in traditional encryption methods in structured data environments. It realizes secure encryption of fields such as identity information, contact information, and job code while preserving the original format structure, effectively improving the collaborative compatibility between data encryption and the business logic of the trade union system.

[0065] (2) This invention innovatively applies the homomorphic message authentication algorithm to the field-level ciphertext integrity verification. By combining the binding method of field structure information and authentication value, it can identify and protect against field-level data tampering without decrypting the data, thereby enhancing the anti-tampering capability and verifiability of sensitive data in the trade union system during transmission and storage.

[0066] (3) By constructing an access control strategy that includes field names, structural locations and organizational attribute information, and combining a field binding mapping table with a composite encapsulation mechanism, this invention enables dynamic fine-grained authorization control of access permissions for different users at the data encapsulation layer, effectively improving the adaptability to the management of multiple roles, responsibilities and regions in the complex organizational structure of trade unions.

[0067] (4) By implementing access permission verification, encrypted integrity verification and controlled decryption in the data entry and exit process, this invention constructs a closed-loop data security link that integrates encryption protection, authentication verification and access control, which significantly improves the security, reliability and controllability of structured sensitive data throughout its entire life cycle. Attached Figure Description

[0068] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0069] Figure 1 This is a flowchart of a union data encryption processing method and system proposed in this invention;

[0070] Figure 2 This is a schematic diagram illustrating the structural interaction between format-preserving encryption and homomorphic message authentication value generation in this invention. Detailed Implementation

[0071] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0072] refer to Figures 1-2 A method and system for encrypting union data, comprising the following steps:

[0073] Obtain the raw field data containing identity information, contact information, and job code fields from the trade union system, and extract the field format information for each field.

[0074] Based on the field format information of each field data, perform format preservation encryption operation on each field data separately to generate a set of format preservation encrypted field ciphertext;

[0075] For each field in the ciphertext set, use the homomorphic message authentication algorithm to calculate the field authentication value and generate a set of field authentication values;

[0076] Each ciphertext field in the ciphertext field set is bound to the corresponding field authentication value in the field authentication value set at the field level, thus constructing a data encapsulation unit set containing the ciphertext field and the authentication value field.

[0077] Based on the organizational attribute information of the user requesting access, including role identification, job type and geographical affiliation information, an access control policy is generated;

[0078] The access control policy and the data encapsulation unit set are mapped to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy;

[0079] When transmitting, storing, and accessing composite encapsulated objects in the union system, access permission verification, field ciphertext integrity verification, and controlled decryption processing are performed, and the field data results are output for business system calls.

[0080] In this embodiment, the field format information includes: field type information describing the character type of the field, field length information limiting the length of the field, structure pattern information indicating the character arrangement structure of the field, and encoding rule information identifying that the field contains specific encoding and check bit rules.

[0081] In this embodiment, the generation of the format-preserving encrypted field ciphertext set includes:

[0082] Obtain the field format information for each field, including field character type, field length, and structural position rules. Construct a field format description structure based on the field format information. The field format description structure includes field name information, field length parameter, field position parameter, structural position weight parameter, character type, length requirement, and field identifier.

[0083] The original field data is format-mapped using a field format description structure to obtain a format mapping value, which is used as input to the format-preserving encryption algorithm.

[0084] The format-preserving encryption algorithm is invoked to perform encryption on the format mapping value, generating an initial field ciphertext sequence. The initial field ciphertext sequence satisfies the character type and length requirements defined in the field format description structure, and the character order remains consistent with the original field.

[0085] Based on the field format description structure, the structural sensitivity and information entropy distribution of each character position are evaluated, and a ciphertext position perturbation weight model is generated.

[0086] A perturbation function is constructed based on the ciphertext position perturbation weight model. The perturbation function is an invertible function, which dynamically generates the ciphertext position rearrangement index.

[0087] The initial field ciphertext sequence is rearranged based on the ciphertext position rearrangement index to generate a rearranged field ciphertext sequence. The character arrangement order of the rearranged field ciphertext sequence is different from that of the initial field ciphertext sequence, provided that the character set and field length remain unchanged.

[0088] Perform format consistency verification on the ciphertext sequence of the rearranged fields to confirm that it meets all format constraints defined in the field format description structure. After the verification is passed, add the ciphertext sequence of the rearranged fields to the set of ciphertexts of the format-preserving encrypted fields.

[0089] The encryption operation employs a character-level substitution mechanism based on a format-preserving encryption algorithm. First, the original field data is mapped to a sequence of numbers in a specific base according to its character type and length requirements; for example, numeric fields are mapped to decimal numbers, and alphabetic fields are mapped to base-26 numbers. This value is then used as the input encryption field. Using a preset symmetric key, the format-preserving encryption algorithm encrypts this input value, generating a ciphertext value within the original format field. This ciphertext value is then remapped to a character sequence consistent with the original field format. This encryption process maintains the original data's length, character set, and positional constraints, allowing the encrypted data to directly replace the original field without altering the system structure. The generated initial field ciphertext then undergoes a character position perturbation process.

[0090] The perturbation function is constructed based on the structural features and information entropy weights of each character position in the field format description structure. Structural sensitivity analysis is performed on each character position in the field to identify regions with fixed semantics or high exposure risks, such as the birth date segment in an ID card number or the check digit in an encoded field. Combining historical usage data or a predefined model, the perturbation weight for each character position is calculated. The character position number and corresponding perturbation weight are input into a weight mapping rule to generate a set of character rearrangement indexes sorted by weight. The perturbation function, as a symmetric and reversible rearrangement mapping function, takes the initial ciphertext sequence and key derivation factor as input and outputs a permutation sequence of position indices. This sequence can be used to perform position rearrangement of ciphertext characters and is reversed in the same way during decryption.

[0091] In this embodiment, the generation of the field authentication value set includes:

[0092] Extract each field ciphertext from the encrypted field ciphertext set that preserves the format, and construct field labels based on the structural position and field identifier of the corresponding field in the field format description structure;

[0093] The ciphertext of the field is structurally combined with the field label to generate a field authentication input unit. The field authentication input unit includes a field position encoding segment and a field content encoding segment. The field position encoding segment is used to identify the location information of the ciphertext of the field in the structure, and the field content encoding segment is used to represent the encoding result of the ciphertext of the field.

[0094] Set the encryption parameters for the homomorphic message authentication algorithm, and pass the field authentication input unit and the encryption parameters as authentication input to the homomorphic message authentication algorithm to perform homomorphic aggregation processing on the field position encoding segment and the field content encoding segment to generate an intermediate authentication structure;

[0095] The intermediate authentication structure and field labels are mapped to generate field authentication values. The field authentication values ​​include a field label binding area and an authentication digest area. The field label binding area embeds field label information to identify the structural binding relationship between the field authentication value and the field ciphertext. The authentication digest area contains aggregated authentication data used for integrity verification.

[0096] The field authentication value is bound to the corresponding field ciphertext to form a field authentication value set. Each field authentication value in the field authentication value set and the field ciphertext maintain a one-to-one correspondence in the field-level structure.

[0097] Structure mapping processing refers to combining and binding intermediate authentication structures and field labels according to the format rules of field authentication values, so that the authentication structure can carry both field source information and authentication summary information when outputting field authentication values. Specifically, this includes reserving field label embedding areas and authentication summary areas in the output format of the authentication structure. The former is used to embed the field name information and field position parameters from the field labels, while the latter is used to record the verification summary after homomorphic aggregation. Through a structured combination strategy, the field label content is written into the structure header or specific segments of the field authentication value, while the aggregation result is written into the structure tail or the corresponding verification segment, thus completing the generation of the field authentication value's data structure.

[0098] In this embodiment, the construction of the data encapsulation unit set includes:

[0099] Extract the ciphertext of each field one by one from the set of ciphertexts that are encrypted while maintaining the format, and extract the field authentication value corresponding to each ciphertext from the set of field authentication values. The field authentication value contains a field tag, which is used to identify the field name information and field structure position of the ciphertext.

[0100] Based on the field format description structure, the field name information and field position parameters of the records are described. The field ciphertext and field authentication value are structurally consistent to confirm the one-to-one correspondence between the two in the field dimension.

[0101] Perform field-level binding operations, build a field binding mapping table, and use field name information and field structure position as key indexes to match the field ciphertext and field authentication value according to the field label to generate a binding structure tuple.

[0102] Based on the binding structure tuples generated in the field binding mapping table, a data encapsulation unit is constructed. Each data encapsulation unit includes a field ciphertext segment, a field authentication value segment, and a field structure identifier segment. The field structure identifier segment records field name information and field position parameters, which are used to track the structural positioning of the ciphertext and authentication value.

[0103] All data encapsulation units are written into the data encapsulation unit set to form a complete data encapsulation unit set corresponding to the field-level structure. Each data encapsulation unit maintains the consistency of binding between the field ciphertext, the field authentication value, and the structure identifier.

[0104] In this embodiment, the generation of access control policies includes:

[0105] The organization attribute information of the user requesting access is received. The organization attribute information includes user role identifier, duty category code and geographical affiliation code, which are used to represent the access request user’s authority level, business function type and geographical level in the trade union organizational structure, respectively.

[0106] The role access level is determined based on the user role identifier. The role access level includes management roles, execution roles and audit roles. An initial access permission template is constructed based on the role access level.

[0107] Based on the responsibility category coding, the responsibility access domain is matched. The responsibility access domain limits the set of field types that can be accessed in the corresponding business function module, and the responsibility access domain is mapped to the initial access permission template to form an access permission model with responsibility constraints.

[0108] Based on the geographic affiliation code, the access boundary range is determined, and geographic access constraint rules are constructed. These geographic access constraint rules limit data access requests to be effective only in the region where the requesting user belongs and the authorized region.

[0109] Access control policies are constructed by combining role access levels, responsibility access domains, and geographical access constraints. These access control policies are defined using a structured permission expression language, which includes two types of clauses: field access expressions and logical judgment expressions, used to describe field-level access conditions and combined logical relationships.

[0110] The initial access permission template is a structured permission configuration object extracted from a predefined role access template library based on the role identifier of the user requesting access. It defines the field access scope, operation permission categories, and permission activation conditions for different roles. The initial access permission template includes a field access granularity table, an operation permission mapping table, and a role trigger condition group. The field access granularity table defines the structural hierarchy and field type classification of accessible fields; the operation permission mapping table specifies the supported operation types for each field type, such as read, modify, audit, and anonymized viewing; the role trigger condition group describes the prerequisites for the current template to take effect in a specific role environment, including role level, organizational level, and responsibility compatibility parameters.

[0111] In this embodiment, the generation of the composite encapsulation object includes:

[0112] Extract each data encapsulation unit from the data encapsulation unit set, and read the field ciphertext segment, field authentication value segment, and field structure identifier segment, where the field structure identifier segment includes field name information and field position parameters;

[0113] Parse the field access expressions and logical judgment expressions contained in the access control policy, and construct a policy mapping rule set, which includes field name matching rules, field structure position matching rules, and access permission matching rules;

[0114] For each data encapsulation unit, the following policy mapping process is performed: Field name information in the field structure identifier segment is matched according to field name matching rules to determine whether the corresponding field falls within the scope of fields allowed by the access control policy; field position parameters are judged according to field structure position matching rules to confirm whether the field's position in the structure conforms to the access range defined by the policy; and the organizational attribute information of the user requesting access is checked according to access permission matching rules to determine whether their role access level, responsibility category, and geographical affiliation information meet the access authorization conditions for the corresponding field.

[0115] When all three matching rules are met, the corresponding data encapsulation unit is marked as a policy-allowed access unit, and a policy mapping matching unit set is generated.

[0116] For each data encapsulation unit in the policy mapping matching unit set, a composite encapsulation unit is constructed. The composite encapsulation unit includes a field ciphertext segment, a field authentication value segment, and an access control policy identifier field. The access control policy identifier field records the policy number and the authorization rule hash value.

[0117] All composite packaging units are aggregated to generate a composite packaging object.

[0118] In this implementation, the output of the field data results includes:

[0119] Extract the composite encapsulation unit one by one from the composite encapsulation object, and read the field ciphertext segment, field authentication value segment, field structure identifier segment and access control policy identifier field. The field structure identifier segment includes field name information and field position parameters, and the access control policy identifier field records the policy number and authorization rule hash value.

[0120] Based on the policy number recorded in the access control policy identifier field, the corresponding access control policy is retrieved, and the field access expressions and logical judgment expressions contained therein are parsed. Access permission verification is then performed in conjunction with the organizational attribute information of the user requesting access. Access permission verification includes: matching the field permission scope defined in the field access expression based on the field name information and field position parameters in the field structure identifier segment; performing Boolean judgment on the logical judgment expression in conjunction with the user role identifier, responsibility type, and geographical affiliation information to confirm whether the access authorization logic is satisfied; if the above matching and judgment are both true, then the current composite encapsulation unit is determined to be accessible.

[0121] For composite encapsulation units that pass access permission verification, extract the field label binding area and authentication digest area from the field ciphertext segment and the field authentication value segment. Based on the field name information and field position parameters in the field structure identifier segment, perform a structural comparison of the field label binding area to confirm that the field authentication value segment and the field ciphertext segment are structurally consistent.

[0122] The homomorphic message authentication verification algorithm is used to perform authentication digest recalculation on the field ciphertext segment and the field label binding area. The recalculated digest value is compared with the authentication digest value recorded in the authentication digest area. If they match, it is confirmed that the field ciphertext segment has not been tampered with, and the field integrity verification is completed.

[0123] For the encrypted field segment that has passed integrity verification, based on the field name information, field format description structure, permutation key and perturbation index in the field structure identifier segment, the format-preserving decryption operation is performed, which specifically includes: restoring the original character position order based on the perturbation index, parsing the field structure rules based on the format description structure, and calling the decryption algorithm to restore the plaintext characters of the field;

[0124] The plaintext data of the fields obtained by decryption is restructured according to the field name information and field position parameters recorded in the field structure identifier segment to generate the field data result.

[0125] This embodiment includes the following modules:

[0126] The data acquisition module is used to acquire raw field data from the trade union system and extract the field format information for each field.

[0127] The format preservation encryption module is used to perform format preservation encryption on each field data according to the field format information, and generate a set of format preservation encrypted field ciphertexts.

[0128] The field authentication module is used to perform homomorphic message authentication algorithm calculations on each field ciphertext in the format-preserving encrypted field ciphertext set to generate a set of field authentication values;

[0129] The field binding module is used to bind each ciphertext of a field in the ciphertext set to the corresponding field authentication value in the field authentication value set at the field level, thereby constructing a data encapsulation unit set.

[0130] The policy generation module is used to generate access control policies based on the organizational attribute information of the user making the access request.

[0131] The policy mapping module is used to perform policy mapping processing on access control policies and data encapsulation unit sets to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy;

[0132] The access control module is used to perform access permission verification, field ciphertext integrity verification, and controlled decryption processing when transmitting, storing, and accessing composite encapsulated objects in the union system, and to output the field data results.

[0133] Example 1:

[0134] To verify the feasibility of this invention in practice, it was applied to a provincial trade union personnel information management platform to process structured personnel data containing employee identity information, contact information, and job title data. The aim is to improve the security and access compliance of data storage and transfer, and prevent risks such as leakage, tampering, or unauthorized access of sensitive information.

[0135] Before applying the method of this invention, the core personnel information database of the trade union platform adopted a general database encryption strategy and an access control method based on account permissions. However, this method is difficult to achieve fine-grained access control at the field level, and it is also impossible to perform structure-preserving encryption and integrity authentication of data at the field level, resulting in data security and authorization consistency risks in cross-level and cross-regional access.

[0136] After deploying the processing system of this invention, the data acquisition module first extracts data records containing fields such as name, ID number, contact number, unit code and job category from the personnel database. The system automatically extracts the field format information of each field, such as field type (number, letter, mixed), field length, structural position rules and encoding rules.

[0137] The format-preserving encryption module performs format-preserving encryption on each field's data based on the field format description structure. Taking the ID card number field as an example, this field consists of 18 characters, including the date of birth, regional code, and check digit. The system first maps this field to a numerical representation according to the description structure, and then performs format-preserving encryption based on a symmetric key to generate ciphertext that maintains the original format but with perturbed character positions. A perturbation function is then constructed to rearrange the positions of the ciphertext, thereby enhancing structural security.

[0138] The field authentication module performs a homomorphic message authentication algorithm on the encrypted field, extracts structural position parameters and field tag information to construct an authentication input unit, and performs homomorphic aggregation through encrypted parameters to generate a field authentication value containing a field tag binding area and an authentication digest area, ensuring tamper detection at the field granularity.

[0139] The field binding module performs field-level binding operations on the ciphertext and authentication value of the field based on the field name and structural location information, builds a field binding mapping table, and generates a set of data encapsulation units that correspond one-to-one with the structural identifier, authentication value, and ciphertext.

[0140] The policy generation module generates an access control policy based on the organizational attributes of the user requesting access (e.g., a user is a "city-level execution position," with a job title code of "external liaison," and a geographical affiliation of "East China"). This policy restricts the user's access to fields limited to contact person fields and basic job title fields, and restricts access only to data within the user's local region. The system selects a corresponding template from the permission template library and generates field access expressions and logical judgment expressions to describe the access granularity and conditional logic.

[0141] The policy mapping module parses access control policies and matches them against the encapsulated data using three rules: field name, structure location, and user permissions. It then filters out the data encapsulation units that are allowed to be accessed and embeds an access control policy identifier field into each composite encapsulation unit. Finally, it constructs a composite encapsulation object for data transmission and storage.

[0142] During data access, the access control module parses the access request policy number and verifies access permissions by combining the user's current role, responsibilities, and geocoding information to determine whether the field meets the authorization policy. For data that passes verification, the field authentication value is extracted and the authentication digest is recalculated. The original digest value is compared to confirm the integrity of the encrypted field. If authentication is successful, the format-preserving decryption algorithm is invoked to restore the plaintext field based on the perturbation index and format description structure. The data field structure is then reconstructed based on the structure identifier for use by the business system.

[0143] To evaluate the data security and access efficiency performance of this method in actual business operations, the platform compared several key indicators before and after deploying the method of this invention. The statistical data is shown below:

[0144] Table 1. Comparison of the technical effects of the method of the present invention and traditional trade union information protection schemes.

[0145] Evaluation indicators Traditional system This invention system Field-level access control support capabilities no yes Number of fields supported for field-level integrity verification 0 100% Access authorization policy granularity Character level Role + Responsibility + Geography Sensitive field leakage rate (past quarter) 0.63% 0.01% Number of cross-regional access violations blocked Unable to count An average of 34 blocks per day Field decryption format consistency verification failure rate 5.8% <0.1% Overall data access response latency 430ms 512ms System field-level access audit log traceability Not supported 100% Average configuration time for access authorization of sensitive fields in departments 1.3 hours 7 minutes

[0146] The data analysis in Table 1 shows that this invention achieves substantial improvements over traditional systems in several key dimensions, including data security, access control precision, and operational management efficiency. Regarding field-level access control, traditional systems cannot achieve fine-grained control, while this invention achieves 100% controllable field access permissions, significantly enhancing data granularity control. In terms of field integrity verification, traditional systems lack field-level authentication mechanisms, while this invention verifies the integrity of all fields through field authentication values, ensuring tamper-proof security during data transmission and access. The granularity of access authorization policies has also expanded from the traditional "role-level" to a "role + responsibility + geographic multi-dimensional combination" as in this invention, improving the accuracy of authorization and the expressive power of policies. In terms of actual security effectiveness, the sensitive field leakage rate has decreased significantly from 0.63% to 0.01%, and the ability to block unauthorized access has been increased to an average of 34 interceptions per day, demonstrating the outstanding capabilities of this invention in preventing leakage and unauthorized access. Simultaneously, this invention maintains encryption through a structured format, reducing the failure rate of format consistency verification after field decryption from 5.8% to less than 0.1%, improving the availability and consistency of decrypted data. Regarding access efficiency, although the response latency has slightly improved (from 430ms to 512ms), this improvement remains acceptable considering the newly added encryption authentication and permission judgment mechanisms. In terms of management efficiency, the configuration time for departmental-level sensitive field authorization has been reduced from the traditional 1.3 hours to 7 minutes, demonstrating the high efficiency of this invention in authorization policy configuration and maintenance. Traditional systems do not support field-level audit tracing, while this invention achieves 100% traceability of access operations, enhancing the platform's ability to supervise and hold accountable data usage behavior. Overall, the method of this invention has achieved a systematic breakthrough in security, compliance, controllability, and auditability, and has broad practical application value.

[0147] In summary, this embodiment fully verifies that the proposed union data encryption processing method has feasibility and scalability in real and complex organizational structures. It not only improves the security protection capability of the union data processing system, but also realizes refined data control and management at the structure level, field level, and policy level, which meets the new requirements for data privacy and access control in the context of digital government.

[0148] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for encrypting union data, characterized in that, include: Obtain the raw field data containing identity information, contact information, and job code fields from the trade union system, and extract the field format information for each field. Based on the field format information of each field data, perform format preservation encryption operation on each field data separately to generate a set of format preservation encrypted field ciphertext; For each field in the ciphertext set, use the homomorphic message authentication algorithm to calculate the field authentication value and generate a set of field authentication values; Each ciphertext field in the ciphertext field set is bound to the corresponding field authentication value in the field authentication value set at the field level, thus constructing a data encapsulation unit set containing the ciphertext field and the authentication value field. Based on the organizational attribute information of the user requesting access, including role identification, job type and geographical affiliation information, an access control policy is generated. The access control policy and the data encapsulation unit set are mapped to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy; When transmitting, storing, and accessing composite encapsulated objects in the union system, access permission verification, field ciphertext integrity verification, and controlled decryption processing are performed, and the field data results are output for business system calls.

2. The method for encrypting union data according to claim 1, characterized in that, Field format information includes: field type information describing the character type of the field, field length information limiting the length of the field, structure pattern information indicating the arrangement of characters in the field, and encoding rule information identifying that the field contains specific encoding and check bit rules.

3. The method for encrypting union data according to claim 1, characterized in that, The generation of the encrypted field ciphertext set while maintaining the format includes: Obtain the field format information for each field, including field character type, field length, and structural position rules. Construct a field format description structure based on the field format information. The field format description structure includes field name information, field length parameter, field position parameter, structural position weight parameter, character type, length requirement, and field identifier. The original field data is format-mapped using a field format description structure to obtain a format mapping value, which is used as input to a format-preserving encryption algorithm. The format-preserving encryption algorithm is invoked to perform encryption on the format mapping value, generating an initial field ciphertext sequence. The initial field ciphertext sequence satisfies the character type and length requirements defined in the field format description structure, and the character order remains consistent with the original field. Based on the field format description structure, the structural sensitivity and information entropy distribution of each character position are evaluated, and a ciphertext position perturbation weight model is generated. A perturbation function is constructed based on the ciphertext position perturbation weight model. The perturbation function is an invertible function, which dynamically generates the ciphertext position rearrangement index. The initial field ciphertext sequence is rearranged based on the ciphertext position rearrangement index to generate a ciphertext sequence of the field after ciphertext rearrangement. Perform format consistency verification on the ciphertext sequence of the rearranged fields to confirm that it meets all format constraints defined in the field format description structure. After the verification is passed, add the ciphertext sequence of the rearranged fields to the set of ciphertexts of the format-preserving encrypted fields.

4. The method for encrypting union data according to claim 1, characterized in that, The generation of the field authentication value set includes: Extract each field ciphertext from the encrypted field ciphertext set that preserves the format, and construct field labels based on the structural position and field identifier of the corresponding field in the field format description structure; The ciphertext of the field is structurally combined with the field label to generate a field authentication input unit. The field authentication input unit includes a field position encoding segment and a field content encoding segment. The field position encoding segment is used to identify the location information of the ciphertext of the field in the structure, and the field content encoding segment is used to represent the encoding result of the ciphertext of the field. Set the encryption parameters for the homomorphic message authentication algorithm, and pass the field authentication input unit and the encryption parameters as authentication input to the homomorphic message authentication algorithm to perform homomorphic aggregation processing on the field position encoding segment and the field content encoding segment to generate an intermediate authentication structure; The intermediate authentication structure is mapped to the field labels to generate field authentication values, which include the field label binding area and the authentication digest area. The field authentication value is bound to the corresponding field ciphertext to form a field authentication value set. Each field authentication value in the field authentication value set maintains a one-to-one correspondence with the field ciphertext in the field-level structure.

5. The method for encrypting union data according to claim 1, characterized in that, The construction of the data encapsulation unit set includes: Extract the ciphertext of each field one by one from the set of ciphertexts that have been encrypted while maintaining the format, and extract the field authentication value corresponding to each ciphertext of each field from the set of field authentication values, where the field authentication value contains the field label; Based on the field format description structure, the field name information and field position parameters of the records are described. The field ciphertext and field authentication value are structurally consistent to confirm the one-to-one correspondence between the two in the field dimension. Perform field-level binding operations, build a field binding mapping table, and use field name information and field structure position as key indexes to match the field ciphertext and field authentication value according to the field label to generate a binding structure tuple. Based on the binding structure tuples generated in the field binding mapping table, construct data encapsulation units. Each data encapsulation unit includes a field ciphertext segment, a field authentication value segment, and a field structure identifier segment. All data encapsulation units are written into the data encapsulation unit set to form a complete data encapsulation unit set corresponding to the field-level structure. Each data encapsulation unit maintains the consistency of binding between the field ciphertext, the field authentication value, and the structure identifier.

6. The method for encrypting union data according to claim 1, characterized in that, The generation of access control policies includes: The organization attribute information of the user requesting access is received. The organization attribute information includes user role identifier, duty category code and geographical affiliation code, which are used to represent the access request user’s authority level, business function type and geographical level in the trade union organizational structure, respectively. The role access level is determined based on the user role identifier. The role access level includes management roles, execution roles and audit roles. An initial access permission template is constructed based on the role access level. Based on the responsibility category coding, the responsibility access domain is matched. The responsibility access domain limits the set of field types that can be accessed in the corresponding business function module, and the responsibility access domain is mapped to the initial access permission template to form an access permission model with responsibility constraints. Based on the geographic affiliation code, the access boundary range is determined, and geographic access constraint rules are constructed. These geographic access constraint rules limit data access requests to be effective only in the region where the requesting user belongs and the authorized region. Access control policies are constructed by combining role access levels, responsibility access domains, and geographical access constraints. These access control policies are defined using a structured permission expression language, which includes two types of clauses: field access expressions and logical judgment expressions.

7. The method for encrypting union data according to claim 1, characterized in that, The generation of composite encapsulated objects includes: Extract each data encapsulation unit from the data encapsulation unit set, and read the field ciphertext segment, field authentication value segment, and field structure identifier segment, where the field structure identifier segment includes field name information and field position parameters; Parse the field access expressions and logical judgment expressions contained in the access control policy, and construct a policy mapping rule set, which includes field name matching rules, field structure position matching rules, and access permission matching rules; For each data encapsulation unit, the following policy mapping process is performed: Field name information in the field structure identifier segment is matched according to field name matching rules to determine whether the corresponding field falls within the scope of fields allowed by the access control policy; field position parameters are judged according to field structure position matching rules to confirm whether the field's position in the structure conforms to the access range defined by the policy; and the organizational attribute information of the user requesting access is checked according to access permission matching rules to determine whether their role access level, responsibility category, and geographical affiliation information meet the access authorization conditions for the corresponding field. When all three matching rules are met, the corresponding data encapsulation unit is marked as a policy-allowed access unit, and a policy mapping matching unit set is generated. For each data encapsulation unit in the policy mapping matching unit set, a composite encapsulation unit is constructed. The composite encapsulation unit includes a field ciphertext segment, a field authentication value segment, and an access control policy identifier field. The access control policy identifier field records the policy number and the authorization rule hash value. All composite packaging units are aggregated to generate a composite packaging object.

8. The method for encrypting union data according to claim 1, characterized in that, The output of the field data results includes: Extract the composite encapsulation unit one by one from the composite encapsulation object, and read the field ciphertext segment, field authentication value segment, field structure identifier segment and access control policy identifier field; Based on the policy number recorded in the access control policy identifier field, the corresponding access control policy is retrieved, and the field access expressions and logical judgment expressions contained therein are parsed. Access permission verification is then performed in conjunction with the organizational attribute information of the user requesting access. Access permission verification includes: matching the field permission scope defined in the field access expression based on the field name information and field position parameters in the field structure identifier segment; performing Boolean judgment on the logical judgment expression in conjunction with the user role identifier, responsibility type, and geographical affiliation information to confirm whether the access authorization logic is satisfied; if the above matching and judgment are both true, then the current composite encapsulation unit is determined to be accessible. For composite encapsulation units that pass access permission verification, extract the field label binding area and authentication digest area from the field ciphertext segment and the field authentication value segment. Based on the field name information and field position parameters in the field structure identifier segment, perform a structural comparison of the field label binding area to confirm that the field authentication value segment and the field ciphertext segment are structurally consistent. The homomorphic message authentication verification algorithm is used to perform authentication digest recalculation on the field ciphertext segment and the field label binding area. The recalculated digest value is compared with the authentication digest value recorded in the authentication digest area. If they match, it is confirmed that the field ciphertext segment has not been tampered with, and the field integrity verification is completed. For the encrypted field segment that has passed integrity verification, based on the field name information, field format description structure, permutation key and perturbation index in the field structure identifier segment, the format-preserving decryption operation is performed, which specifically includes: restoring the original character position order based on the perturbation index, parsing the field structure rules based on the format description structure, and calling the decryption algorithm to restore the plaintext characters of the field; The plaintext data of the fields obtained by decryption is restructured according to the field name information and field position parameters recorded in the field structure identifier segment to generate the field data result.

9. A trade union data encryption processing system, characterized in that, Includes the following modules: The data acquisition module is used to acquire raw field data from the trade union system and extract the field format information for each field. The format preservation encryption module is used to perform format preservation encryption on each field data according to the field format information, and generate a set of format preservation encrypted field ciphertexts. The field authentication module is used to perform homomorphic message authentication algorithm calculations on each field ciphertext in the format-preserving encrypted field ciphertext set to generate a set of field authentication values; The field binding module is used to bind each ciphertext of a field in the ciphertext set to the corresponding field authentication value in the field authentication value set at the field level, thereby constructing a data encapsulation unit set. The policy generation module is used to generate access control policies based on the organizational attribute information of the user making the access request. The policy mapping module is used to perform policy mapping processing on access control policies and data encapsulation unit sets to generate a composite encapsulation object containing field ciphertext, field authentication value and access control policy; The access control module is used to perform access permission verification, field ciphertext integrity verification, and controlled decryption processing when transmitting, storing, and accessing composite encapsulated objects in the union system, and to output the field data results.