An adaptive government affair shared data shape-preserving encryption method and system
By performing structured analysis and sensitivity assessment of government data, and combining it with adaptive encryption algorithms, differentiated processing of data with different sensitivity levels is achieved. This solves the problem of mismatch between encryption strength and resource consumption in existing technologies, and improves the security and efficiency of government data sharing.
Patent Information
- Application Number
- CN202510863894.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing government data encryption methods fail to effectively differentiate the sensitivity of data, resulting in a mismatch between encryption strength and resource consumption. They cannot meet the needs of high-frequency sharing and personalized desensitization, and lack sensitivity analysis and dynamic encryption protection at the granular level of data content.
By performing structured analysis on government data, identifying potentially sensitive content and generating sensitive labels, constructing a sensitivity assessment matrix, and employing adaptive encryption algorithms to differentiate data entities with different sensitivity levels, a combination of conformal encryption and homomorphic encryption is used to ensure the structural consistency of high- and medium-sensitivity data and the computational operability of low-sensitivity data.
It enables accurate and sensitive identification and dynamic encryption of government data, improves the flexibility and security of encryption processing, avoids insufficient encryption strength or waste of resources, and meets the legal compliance and privacy protection requirements for sharing in multiple scenarios.
Smart Images

Figure CN120705910B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of government affair shared data encryption, and particularly relates to a self-adaptive government affair shared data shape-preserving encryption method and system. BACKGROUND
[0002] With the continuous promotion of government data resource sharing work, data interaction across departments and levels is increasingly frequent, and the data type structure presents complex characteristics of diversification, unstructuredness and coexistence of high sensitivity. A large amount of personal sensitive information such as natural person identity, address, contact information and account number is contained in government data. In the process of data sharing and disclosure, if it is not effectively protected, it is easy to cause privacy leakage, illegal tampering and even data abuse and other problems. Therefore, how to realize accurate identification and differential encryption protection of sensitive data on the premise of guaranteeing data availability and semantic integrity has become the research focus in the field of government information security.
[0003] In the prior art, for example, patent CN108924104B proposes an electronic government affair encryption and decryption method, which introduces self-built system authentication coding, user encryption coding and user decryption coding, constructs an access control mechanism of "double authentication + single sign-on", and realizes preliminary encryption protection of the electronic government affair platform in the user authentication and system access level. This method has certain practical value in access end security, but mainly focuses on identity verification and encryption authorization process, and lacks sensitive analysis and dynamic encryption protection of the content granularity level of data itself.
[0004] At the same time, the current mainstream government data encryption scheme generally has the following problems: it does not distinguish the sensitivity of data, resulting in mismatch between encryption strength and resource consumption; sensitive entities such as identity card number, address and contact information are difficult to automatically identify, and fine-grained identification of content structure level cannot be realized; it cannot meet the dual needs of high-frequency sharing and personalized desensitization, and cannot adaptively adjust the encryption strategy in different sharing scenarios, which is easy to cause information leakage or data redundancy.
[0005] In summary, the traditional encryption method often uses a unified algorithm to process all sensitive data, ignoring the diversity needs of different sensitive level entities, which is easy to cause insufficient encryption strength or waste of computing resources; although some methods introduce sensitivity evaluation, the evaluation method is too static, and the sensitivity is not dynamically adjusted combined with context semantic features and word structure attributes, which is difficult to adapt to complex multi-source government text environment. Therefore, an adaptive government affair shared data encryption method with multi-dimensional sensitivity modeling, semantic structure joint perception and supporting differential shape-preserving encryption processing is urgently needed to improve the accuracy of sensitive information identification and the flexibility of encryption processing, to guarantee data availability while meeting legal compliance and privacy protection requirements. SUMMARY
[0006] In view of this, the present application provides an adaptive government sharing data shape encryption method, which structurally analyzes the original government data, combines the inter-word semantic correlation strength and word attributes, identifies data entities containing potential sensitive content and sensitive tags, constructs a sensitivity evaluation matrix and performs sensitive level clustering, and introduces the sensitivity evaluation result in the clustering process to prevent high and low sensitive data entity aggregation misjudgment, and introduces an adaptive neighborhood radius to dynamically adjust the clustering perception scale according to the sensitive score, so that the high sensitive data entity has a finer granularity separation capability, improves the clustering boundary precision, effectively divides different sensitive levels, and then uses an adaptive encryption algorithm to select shape or homomorphic encryption with different encryption strengths for data entities of different sensitive levels, avoiding insufficient encryption strength or wasting computing resources, and performing shape encryption on high and medium sensitive data entities in the encryption process to avoid using data structure to determine whether to be encrypted, by replacing the original data entity with encrypted ciphertext, a government sharing data version with complete structure and safe and controllable security is constructed, which adapts to multi-scene sharing requirements, effectively realizes the coexistence of controllable desensitization and structure preservation of government sharing data, and provides technical support and practical value for data sharing in high security scenarios.
[0007] To achieve the above purpose, the present application provides an adaptive government sharing data shape encryption method, comprising the following steps:
[0008] S1: structurally analyzing the original government data, identifying data entities containing potential sensitive content in the original government data after structural analysis by using an improved entity recognition model, and generating sensitive tags of the data entities containing potential sensitive content;
[0009] S2: constructing a sensitivity evaluation matrix, performing sensitivity evaluation on the data entities containing potential sensitive content based on the sensitive tags, and performing sensitive classification processing on the data entities containing potential sensitive content by using an improved clustering algorithm to obtain three types of sensitive classification data entity sets;
[0010] The three types of sensitive classification data entity sets include high sensitive data entities, medium sensitive data entities and low sensitive data entities with gradually decreasing sensitivity;
[0011] S3: performing encryption processing on the sensitive classified data entities by using an adaptive encryption algorithm to obtain the encryption ciphertext corresponding to the data entities; the high sensitive data entities and the medium sensitive data entities use shape encryption mode, and the low sensitive data entities use homomorphic encryption mode;
[0012] S4: replacing the data entities containing potential sensitive content in the original government data with the corresponding encryption ciphertext to obtain government sharing data and perform sharing.
[0013] Optionally, the structured parsing comprises performing character-by-character matching on the original government data by using a regular expression, and cleaning up the matched characters, performing word segmentation on the cleaned characters by using a word segmentation algorithm, and obtaining the original government data after structured parsing; the constructed regular expression comprises special symbols, HTML tags, and garbled codes; and an improved entity recognition model is constructed, the improved entity recognition model comprising an input representation layer, a dual-modal graph construction layer, a hybrid information propagation layer, and a CRF decoding layer.
[0014] Optionally, the improved entity recognition model is used to identify data entities containing potential sensitive content in the original government data after structured parsing, and generate sensitive labels of the data entities containing potential sensitive content, comprising:
[0015] The input representation layer is a word vector model, configured to receive the original government data after structured parsing, and generate a word vector of each word;
[0016] The dual-modal graph construction layer is configured to calculate semantic association relationships between any two words based on the word vector, construct a semantic association graph, and extract word attribute information of each word in the original government data, and construct a word structure graph, the word attribute information comprising a position, a TF-IDF value, and a word type. The word type corresponding to Chinese, numbers, and English in sequence;
[0017] The hybrid information propagation layer is configured to convert the word structure graph into an adjacency matrix, wherein a matrix element in the adjacency matrix is a connection relationship between any two words, convert the adjacency matrix into a normalized adjacency matrix for graph convolution based on a degree matrix, and perform multi-round semantic feature extraction and structural feature extraction on the word vector respectively, to obtain a hybrid information vector of each word in the original government data after structured parsing;
[0018] The CRF decoding layer is configured to receive the hybrid information vector of all words in the original government data after structured parsing, generate a label mapping matrix of the hybrid information vector by using a full connection layer, perform label transition and calculate a label transition score by using a Viterbi algorithm, take the label transition score of all words and the probability between the words and the labels as path scores, and obtain a label sequence with the maximum path score; the length of the label sequence is consistent with the number of words in the original government data after structured parsing, and the labels in the label sequence are sequentially and respectively labels of N words in the original government data after structured parsing, wherein N represents the number of words in the original government data after structured parsing; the label mapping matrix is a probability matrix between the hybrid information vector and different labels; the labels are divided into two categories, one category being a non-sensitive label category not containing potential sensitive content, and the other category being a sensitive label category containing potential sensitive content, and the sensitive label category comprising a plurality of sensitive labels.
[0019] extract the words of the label category as data entities containing potential sensitive content, and extract the corresponding sensitive label.
[0020] Optionally, based on the normalized adjacency matrix, the semantic feature extraction and the structural feature extraction of the word vector are performed in multiple rounds of propagation to obtain a hybrid information vector of each word in the structured parsed original government data, including:
[0021] A word vector matrix corresponding to the word vector in the structured parsed original government data is constructed, the word vector matrix is in the form of an N-row Len-column matrix, Len represents the dimension of the word vector, and the nth row in the word vector matrix is a word vector of the nth word in the structured parsed original government data,
[0022] The semantic feature extraction and the structural feature extraction of the word vector matrix are performed in H rounds of propagation, and the formula for the hth round of propagation is:
[0023]
[0024]
[0025] wherein, the hybrid propagation matrix of the word vector matrix after the hth round of propagation, the hybrid propagation matrix of the word vector matrix after the (h-1)th round of propagation, the feature extraction matrix of the hth round of propagation, the activation function
[0026] the initial hybrid matrix corresponding to the word vector matrix, C represents the word vector matrix, the normalized adjacency matrix, element-wise addition, the semantic correlation graph, the structural feature extraction matrix, the semantic feature extraction matrix;
[0027] The hybrid information vector matrix is in the form of an N-row matrix, corresponding to the hybrid information vector of the N words in the structured parsed original government data.
[0028] Optionally, a sensitivity evaluation matrix is constructed, and the sensitivity of the data entity containing potential sensitive content is evaluated based on the sensitive label, including:
[0029] The sensitivity evaluation matrix is a sensitive attribute of different sensitive labels in multi-dimensional sensitivity, and the multi-dimensional sensitivity includes legal sensitivity, personal privacy, and data uniqueness, and the range of the sensitive attribute is 0-1.
[0030] The sensitive label in the sensitive attribute of the sensitivity evaluation matrix is taken as an initial sensitivity evaluation result of the data entity, word attribute information of the data entity is extracted, the initial sensitivity evaluation result is dynamically optimized and adjusted, and a sensitivity evaluation result of the data entity is obtained, the sensitivity evaluation result is a 3-dimensional vector, and the dynamic sensitive attributes of the data entity in legal sensitivity, personal privacy, and data uniqueness are sequentially represented, and the word attribute information includes position, TF-IDF value, and word type of the data entity.
[0031] Optionally, according to the sensitivity evaluation result of the data entity containing potential sensitive content, an improved clustering algorithm is used to perform sensitive classification processing on the data entity containing potential sensitive content, and three sets of sensitive classification data entities are obtained, including:
[0032] The sensitivity score of the data entity containing potential sensitive content is calculated based on the sensitivity evaluation result, and the sensitivity score is the sum of all vector values in the sensitivity evaluation result.
[0033] The improved distance between the data entities and the adaptive sensitive neighborhood radius of the data entity are calculated based on the sensitivity score.
[0034] The DBSCAN clustering algorithm is used to perform sensitive classification processing on the data entity containing potential sensitive content in combination with the improved distance between the data entities and the adaptive sensitive neighborhood radius of the data entity, and three sets of sensitive classification data entities are obtained. , wherein In turn, they are high-sensitive data entities, medium-sensitive data entities, and low-sensitive data entities.
[0035] Optionally, an adaptive encryption algorithm is used to perform encryption processing on the sensitive classification data entity, and an encryption ciphertext corresponding to the data entity is obtained, including:
[0036] An encryption algorithm identifier of the sensitive classification data entity is generated, a pre-training model is used to perform vectorization processing on the data entity, and an adaptive encryption algorithm is used to perform encryption processing on the vectorization-processed data entity, and the encryption algorithm identifier and the encryption processing result are spliced to serve as the encryption ciphertext corresponding to the data entity.
[0037] Optionally, the data entity containing potential sensitive content in the original government data is replaced by the corresponding encryption ciphertext, and government shared data is obtained, including:
[0038] Based on the three types of sensitive classification data entity set, the data entities containing potential sensitive content in the original government data are traversed, the encrypted ciphertext corresponding to the data entities is obtained, the data entities containing potential sensitive content in the original government data are replaced by the corresponding encrypted ciphertext, and the government sharing data is obtained.
[0039] In order to solve the above problems, the application provides a kind of adaptive government sharing data shape encryption system, the adaptive government sharing data shape encryption system includes server and data acquisition device, the data acquisition device is used to collect original government data, and the original government data is structured and parsed;
[0040] The server includes an entity recognition module and an adaptive encryption module:
[0041] The entity recognition module is used to identify data entities containing potential sensitive content in the original government data parsed by the improved entity recognition model, generate sensitive labels of data entities containing potential sensitive content, construct a sensitivity evaluation matrix, evaluate the sensitivity of data entities containing potential sensitive content based on the sensitive label, and process the sensitive classification of data entities containing potential sensitive content using the improved clustering algorithm to obtain a set of data entities classified by three types of sensitivity.
[0042] The adaptive encryption module is used to encrypt the data entities classified by sensitivity using an adaptive encryption algorithm to obtain encrypted ciphertext corresponding to the data entities.
[0043] Compared with the prior art, the application has the following beneficial effects:
[0044] Firstly, the application introduces a double-modal graph construction mechanism, fuses two types of heterogeneous information sources of semantic association graph and word structure graph, fully captures the multi-level relationship between words in the original government data, and makes up for the defects of the insufficient modeling ability of traditional sequence models on structural information. In the semantic dimension, the semantic association strength between words is calculated through word vector, and a semantic graph is formed to reflect the context dependency relationship; in the structure dimension, a word structure graph is constructed based on the position information, TF-IDF value and word type of the word, and features irrelevant to semantics but critical to sensitivity discrimination are introduced into the entity representation. Then, in the mixed information propagation layer, the graph convolution propagation of features on the two types of graphs is realized through the normalized adjacency matrix, the semantic and structural signals are effectively fused, and the representation expression ability of each word is enhanced. The mixed information vector is globally labeled by introducing a CRF decoder, and the optimal label path is obtained by using the Viterbi algorithm, which not only improves the recognition accuracy of the sensitive label, but also strengthens the label transition constraint, which is significantly better than the recognition method based on context or single feature. The overall method can realize high-accuracy identification of potential sensitive words, and provide strong input support for subsequent sensitivity evaluation and encryption strategy.
[0045] Meanwhile, the application innovatively improves the DBSCAN clustering algorithm by introducing a sensitive score driven improved distance metric and an adaptive neighborhood radius mechanism, and realizes accurate hierarchical processing of potential sensitive data entities. Compared with the traditional clustering method based on semantic features or spatial density, the application combines the multi-dimensional sensitive attribute evaluation results of data entities, so that when the sensitivity difference is significant, the "perception distance" between data entities can be effectively enlarged, preventing high and low sensitive data entities from being aggregated and misjudged. At the same time, the adaptive neighborhood radius dynamically adjusts the clustering perception scale according to the sensitive score, so that the high sensitive data entities have finer granularity separation ability and improve the clustering boundary accuracy. In the encryption stage, combined with the sensitive grading results, a differential encryption processing is carried out, and an encryption mode selection strategy based on sensitive labels is proposed to improve the security and computational efficiency of the encryption process. The high sensitive data entities and the medium sensitive data entities use shape-preserving encryption to maintain structural consistency, and the low sensitive data entities use homomorphic encryption to support computing operations, effectively realizing the coexistence of controllable desensitization and structure preservation of government shared data, and providing technical support and practical value for data sharing in high security scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 A flowchart of an adaptive government shared data shape-preserving encryption method provided by an embodiment of the application.
[0047] Figure 2 A flowchart of data entity sensitive grading provided by an embodiment of the application. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are merely intended to explain the application, and are not intended to limit the application.
[0049] The embodiment of the application provides an adaptive government shared data shape-preserving encryption method, and the execution subject of the method includes but is not limited to at least one of electronic devices such as a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the application. In other words, the adaptive government shared data shape-preserving encryption method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0050] Referring to Figure 1 Embodiment 1 of the application is:
[0051] An adaptive government shared data shape-preserving encryption method includes the following steps:
[0052] S1: structurally parsing the original government data, identifying the data entity containing the potential sensitive content in the original government data after the structural parsing by using the improved entity recognition model, and generating the sensitive label of the data entity containing the potential sensitive content.
[0053] Further, the structural parsing includes performing character-by-character matching on the original government data by using a regular expression, cleaning the matched characters, and performing word segmentation by using a word segmentation algorithm to obtain the original government data after the structural parsing. The constructed regular expression includes special symbols, HTML tags, and garbled codes. An improved entity recognition model is constructed, which includes an input representation layer, a dual-modal graph construction layer, a hybrid information propagation layer, and a CRF decoding layer.
[0054] It should be noted that the special symbol is a symbol excluding Chinese characters, English letters, numbers, spaces, and punctuation marks. The garbled code includes Unicode illegal regions. The word segmentation algorithm is a JIEBA word segmentation algorithm.
[0055] Further, the data entity containing the potential sensitive content in the original government data after the structural parsing is identified by using the improved entity recognition model, and the sensitive label of the data entity containing the potential sensitive content is generated, including:
[0056] The input representation layer is a word vector model, which is used to receive the original government data after the structural parsing and generate a word vector of each word.
[0057] Specifically, the word vector model includes a BERT word vector model and a government domain word vector model constructed based on a government dictionary. The word vector output result of each word in the original government data after the structural parsing is:
[0058] ;
[0059] Wherein, represents the word vector of the nth word in the original government data after the structural parsing, represents the BERT word vector of the nth word output by the BERT word vector model, represents the government domain word vector of the nth word output by the government domain word vector model; is a vector concatenation process, and N represents the number of segmented words in the original government data after the structural parsing.
[0060] Further, the government field word vector is a 5-dimensional one-hot encoding vector. After the structured analysis of the original government data, the words are matched with the government dictionary to obtain the government category of the words, including unsuccessful matching, numbers, place names, organization names, and administrative region codes. The government category of the words is converted into a one-hot encoding vector by using one-hot encoding. The dimension of the BERT word vector is 128, and the dimension of the word vector is 133.
[0061] The double-modal graph construction layer is used to calculate the semantic association relationship between any two words based on the word vector, construct a semantic association graph, and extract the word attribute information of each word in the original government data to construct a word structure graph. The word attribute information includes position, TF-IDF value, and word type. The word type corresponds to Chinese, numbers, and English in sequence. Specifically, the TF represents the word frequency of the word, the IDF represents the inverse document frequency of the word, and the IDF corresponds to the universality of the word in all original government data. The lower the IDF, the more universal the word is in multiple original government data. The higher the TF-IDF value, the more important the word is to the current original government data.
[0062] Assuming that the position of the nth word is n, the calculation formula of the semantic association relationship is as follows:
[0063] ;
[0064] wherein, represents the semantic association relationship between the nth word and the mth word in the structured analyzed original government data, are attention mapping matrices of 133, is a scaling dimension factor used to control the stability of the dimension, and is set to 64, are word vectors of the nth word and the mth word in the structured analyzed original government data, respectively; are respectively used to map the projection results of the two word vectors in different projection directions. By constructing a loss function that makes the words with semantic relevance have a higher semantic association relationship, the loss function is optimized and solved to obtain the attention mapping matrix , is a ReLU activation function; and T represents transposition. The representation forms of the semantic association graph and the word structure graph are as follows:
[0065] The representation forms of the semantic association graph and the word structure graph are as follows:
[0066] ;
[0067] Wherein e represents a semantic association graph, in the form of an N-row and N-column matrix; a word structure graph, is word attribute information of the nth word, and the word attribute information in the embodiment is a 3-dimensional vector. The word structure graph is in the form of an N-row and 3-column matrix.
[0068] Specifically, the semantic relationship graph constructs edge weights through semantic similarity between words, dynamically reflects semantic coupling and context neighborhood relationship between entities, and is suitable for identifying implied ambiguity or weak boundary sensitive fields in government data. The word structure graph forms an entity-level graph structure based on the position, importance and part of speech of the word, which helps to improve the structure perception and generalization ability of the specification entity (such as ID card, address code, unit code).
[0069] The mixed information propagation layer is configured to convert the word structure graph into an adjacency matrix, wherein the matrix elements in the adjacency matrix are connection relationships between any two words. The adjacency matrix is converted into a normalized adjacency matrix for graph convolution based on a degree matrix, and semantic feature extraction and structural feature extraction are performed on the word vectors through multiple rounds of propagation, to obtain a mixed information vector of each word in the structured parsed original government data.
[0070] Specifically, the connection relationship between the nth word and the (m-1)th word in the structured parsed original government data is:
[0071] ;
[0072] Wherein, represents the connection relationship between the nth word and the (m-1)th word in the structured parsed original government data, represents an exponential function with a natural constant as the base, represents a preset position threshold, and is set to 5.
[0073] The adjacency matrix is in the form of:
[0074] ;
[0075] Wherein, represents an adjacency matrix, in the form of an N-row and N-column matrix.
[0076] The degree matrix D is an N-row and N-column diagonal matrix, and the matrix element of the nth row and the nth column in the degree matrix is ;
[0077] The conversion formula of the normalized adjacency matrix is: , wherein is the normalized adjacency matrix.
[0078] The CRF decoding layer is configured to receive a mixed information vector of all words in the original government data after structural analysis, generate a label mapping matrix of the mixed information vector by using a full connection layer, perform label transition and calculate a label transition score by using a Viterbi algorithm, and obtain a label sequence with maximum path scores by taking the label transition scores of all words and the probability between the words and the labels as path scores. The length of the label sequence is consistent with the number of words in the original government data after structural analysis, and the labels in the label sequence are labels of N words in the original government data after structural analysis in sequence, where N represents the number of words in the original government data after structural analysis. The label mapping matrix is a probability matrix between the mixed information vector and different labels. The labels are divided into two categories, one is a non-sensitive label category not containing potential sensitive content, and the other is a sensitive label category containing potential sensitive content. The sensitive label category includes a plurality of sensitive labels.
[0079] Words with a label category of the sensitive label category are extracted as data entities containing potential sensitive content, and the corresponding sensitive labels are extracted.
[0080] Semantic feature extraction and structural feature extraction of the word vector are performed based on a normalized adjacency matrix to obtain a mixed information vector of each word in the original government data after structural analysis, including:
[0081] A word vector matrix corresponding to the word vector of the original government data after structural analysis is constructed. The word vector matrix is in the form of an N-row and Len-column matrix, Len represents the dimension of the word vector, and the nth row of the word vector matrix is the word vector of the nth word in the original government data after structural analysis. Specifically, the Len is 133.
[0082] Semantic feature extraction and structural feature extraction of the word vector matrix are performed for H rounds of propagation, and the formula for the hth round of propagation is:
[0083] ;
[0084] ;
[0085] wherein, represents a mixed propagation matrix of the word vector matrix after the hth round of propagation, represents a mixed propagation matrix of the word vector matrix after the (h-1)th round of propagation, represents a feature extraction matrix of the hth round of propagation, represents an activation function
[0086] represents an initial mixed matrix corresponding to the word vector matrix, and C represents the word vector matrix, denotes a normalized adjacency matrix, denotes element-wise addition, denotes a semantic correlation graph, denotes a structure feature extraction matrix, denotes a semantic feature extraction matrix.
[0087] Specifically, the feature extraction matrix, the structure feature extraction matrix and the semantic feature extraction matrix are all to-be-trained parameters, a loss function is constructed with the minimum error between the corresponding label of the generated hybrid information vector and the real label of the word as the goal, the loss function is optimized and solved to obtain the to-be-trained parameters.
[0088] The hybrid propagation matrix after the Hth round of propagation is extracted as a hybrid information vector matrix, and the hybrid information vector matrix is in the form of an N-row matrix, corresponding to the hybrid information vectors of the N words in the original government data after structured analysis.
[0089] It should be noted that the hybrid information propagation layer in the application is based on the normalized adjacency matrix, and adopts a multi-round information transmission mechanism, so that the semantic correlation graph and the word structure graph in the bimodal graph construction layer, which describe semantic information and structural constraints, are efficiently fused and enhanced in the graph space. This mechanism effectively overcomes the problems of semantic dilution and structural misrecognition in traditional models when processing long texts and cross-domain entity recognition, and improves the sensitive recognition ability of complex nested entities, combined entities and semantic boundary fuzzy fields.
[0090] Further, by introducing a bimodal graph construction mechanism, the application fuses two types of heterogeneous information sources, semantic correlation graphs and word structure graphs, fully captures the multi-level relationships between words in the original government data, and makes up for the defects of the insufficient structural information modeling capability of traditional sequence models. In the semantic dimension, the semantic correlation strength between words is calculated through word vectors, and a semantic graph is formed to reflect the context dependence relationship; in the structural dimension, a word structure graph is constructed based on the position information, TF-IDF value and word type of the word, and features that are irrelevant to semantics but are critical to sensitive discrimination in entity representation are introduced. Then, in the hybrid information propagation layer, the graph convolution propagation of features on the two types of graphs is realized through the normalized adjacency matrix, the semantic and structural signals are effectively fused, and the representation and expression ability of each word is enhanced. By introducing a CRF decoder for global labeling of the hybrid information vector, the optimal label path is obtained using the Viterbi algorithm, which not only improves the recognition accuracy of sensitive labels, but also strengthens the transfer constraint between labels, and is significantly better than the recognition method based on context or single feature.
[0091] S2: Construct a sensitivity evaluation matrix, evaluate the sensitivity of data entities containing potential sensitive content based on sensitive labels, and use an improved clustering algorithm to perform sensitive classification processing on the data entities containing potential sensitive content, to obtain three sets of data entities classified by sensitivity.
[0092] constructing a sensitivity evaluation matrix, performing sensitivity evaluation on data entities containing potential sensitive content based on the sensitive labels, comprising:
[0093] The sensitivity evaluation matrix is a sensitive attribute of different sensitive labels in multi-dimensional sensitivity, and the multi-dimensional sensitivity includes legal sensitivity, personal privacy degree, and data uniqueness, and the range of the sensitive attribute is 0-1;
[0094] Specifically, the sensitive labels include citizen identity, residence information, contact information, financial account information, biological identification information, political face, nationality, certificate information, and work information; as an embodiment of the application, there are multiple types of data under the sensitive label, for example, the citizen identity includes ID number, passport number, etc., and the certificate information includes driver's license, business license, tax registration number, etc.
[0095] Specifically, by issuing a privacy sensitivity questionnaire to 30 data administrators or security auditors in the government field, the scores of each sensitive label in multi-dimensional sensitivity are collected and normalized to obtain the sensitivity evaluation matrix;
[0096] The sensitive attribute of the sensitive label in the sensitivity evaluation matrix is used as the initial sensitivity evaluation result of the data entity, and the word attribute information of the data entity is extracted to dynamically optimize and adjust the initial sensitivity evaluation result to obtain the sensitivity evaluation result of the data entity, and the sensitivity evaluation result is a 3-dimensional vector, which sequentially represents the dynamic sensitive attributes of the data entity in legal sensitivity, personal privacy degree, and data uniqueness. The word attribute information includes the position, TF-IDF value, and word type of the data entity.
[0097] Specifically, the initial sensitivity evaluation result of the data entity is , wherein The legal sensitivity, personal privacy degree, and data uniqueness of the sensitive label corresponding to the data entity in the sensitivity evaluation matrix are sequentially represented.
[0098] The dynamic optimization adjustment formula is:
[0099] ;
[0100] ;
[0101] ;
[0102] ;
[0103] wherein, represents the sensitivity evaluation result of the data entity, represents a dynamic optimization coefficient, and the sensitivity evaluation result of the data entity is Set to 0.7, The data entities are listed in order: word frequency (TF) value, TF-IDF value, and position.
[0104] It should be noted that the original sensitivity attribute vectors (legal sensitivity, personal privacy, and data uniqueness) of sensitive tags are used as prior knowledge. However, this prior knowledge is a static evaluation result and ignores the differences in the actual context of specific data entities. By introducing features such as word frequency, position, and TF-IDF values, the sensitivity attributes are dynamically adjusted in a context-driven manner. A higher word frequency indicates that the data entity is more likely to be a generic word, thus reducing legal sensitivity. The higher the value, the more likely it is to be a personalized identifier, thus increasing personal privacy; the later the position, the further the data entity is from the beginning of the document and the title area, reducing the uniqueness of the data.
[0105] Based on the sensitivity assessment results of data entities containing potentially sensitive content, an improved clustering algorithm is used to perform sensitivity classification processing on the data entities containing potentially sensitive content, resulting in three sets of data entities with different sensitivity classifications, including:
[0106] Sensitivity scores are calculated for data entities containing potentially sensitive content based on the sensitivity assessment results. The sensitivity scores are the sum of all vector values in the sensitivity assessment results.
[0107] The improved distance between data entities and the adaptive sensitive neighborhood radius of the data entities are calculated based on the sensitivity score; specifically, the improved distance between the m-th data entity and the x-th data entity is:
[0108] ;
[0109] in, This represents the improved distance between the m-th data entity and the x-th data entity. Let represent the sensitivity evaluation results of the m-th data entity and the x-th data entity, respectively. Represents the L2 norm. This represents the sensitivity score between the m-th data entity and the x-th data entity. Indicates a sensitive regulatory factor. Let m and x represent the mixed information vectors of the m-th and x-th data entities in the improved entity recognition model, respectively, where M represents the number of data entities containing potentially sensitive content. It is 0.2. To select The minimum value in, The smaller the value, the smaller the sensitive difference between the two data entities. It represents the semantic distance between two data entities.
[0110] It should be noted that the improved distance effectively reflects the constraint logic that the greater the sensitive difference, the farther the entity semantic distance, preventing entities with similar semantics but significant sensitive attribute differences from being incorrectly aggregated, and ensuring the sensitive isolation principle.
[0111] The adaptive sensitive neighborhood radius of the mth data entity is:
[0112]
[0113] wherein, the adaptive sensitive neighborhood radius of the mth data entity, the radius control coefficient, which controls the amplitude of the radius contraction of the data entity with a high sensitive score, is set to 0.6; the initial neighborhood radius is set to 1.8.
[0114] It should be noted that the adaptive sensitive neighborhood radius can dynamically compress the clustering perception range according to the entity sensitive score. The higher the sensitive score of an entity, the more compact its local neighborhood, thereby improving the boundary protection capability of high-sensitive entities and avoiding them from being "attracted" by medium- and low-sensitive entities or having a blurred boundary. At the same time, low-sensitive entities maintain a larger radius to improve recall efficiency and achieve differential adjustment of clustering density. The dual information flow of semantic and sensitivity evaluation results has good semantic preservation and sensitive grading perception capability.
[0115] In combination with the improved distance between data entities and the adaptive sensitive neighborhood radius of the data entities, the DBSCAN clustering algorithm is used to perform sensitive grading processing on the data entities containing potential sensitive content, to obtain a set of three types of sensitive graded data entities , wherein are high-sensitive data entities, medium-sensitive data entities, and low-sensitive data entities, respectively. Specifically, the higher the sensitivity, the greater the privacy risk and harm caused by leakage.
[0116] As shown in Figure 2 , a flowchart of data entity sensitive grading is shown. word1 to wordN are N consecutive words in the original government data after structured parsing, F1 to FN are mixed information vectors of the N consecutive words, G_1 to G_M are M data entities containing potential sensitive content, data is a set of three types of sensitive graded data entities, data1, data2, and data3 are data entity sets composed of high-sensitive data entities, medium-sensitive data entities, and low-sensitive data entities, respectively.
[0117] It should be noted that the application improves the DBSCAN clustering algorithm by introducing a sensitive score driven improved distance metric and an adaptive neighborhood radius mechanism, and realizes accurate hierarchical processing of potential sensitive data entities. Compared with the traditional clustering method based on semantic features or spatial density, the application fuses the multi-dimensional sensitive attribute evaluation results of data entities, so that when the sensitivity difference is significant, the "perception distance" between entities can be effectively enlarged to prevent high and low sensitive entities from being aggregated and misjudged. At the same time, the adaptive neighborhood radius dynamically adjusts the clustering perception scale according to the sensitive score, so that the high sensitive entity has finer separation ability and improves the clustering boundary accuracy.
[0118] S3: using an adaptive encryption algorithm to encrypt the data entity after sensitive classification to obtain the encryption ciphertext corresponding to the data entity, and using a shape-preserving encryption method for the high sensitive data entity and the medium sensitive data entity, and using a homomorphic encryption method for the low sensitive data entity.
[0119] Using an adaptive encryption algorithm to encrypt the data entity after sensitive classification to obtain the encryption ciphertext corresponding to the data entity, including:
[0120] Generating an encryption algorithm identifier of the data entity after sensitive classification, using a pre-trained model to vectorize the data entity, and using an adaptive encryption algorithm to encrypt the data entity after vectorization, and splicing the encryption algorithm identifier and the encryption processing result as the encryption ciphertext corresponding to the data entity.
[0121] It should be noted that in the encryption stage, differential encryption processing is carried out combined with the sensitive classification result, an encryption method selection strategy based on a sensitive label is proposed, the security and calculation efficiency of the encryption process are improved, the high sensitive and medium sensitive entities use shape-preserving encryption to maintain structural consistency, and the low sensitive entities use homomorphic encryption to support calculation operation, effectively realizing the coexistence of controllable desensitization and structural preservation of government affair sharing data, and providing technical support and practical value for data sharing in high security scenarios.
[0122] S4: replacing the data entity containing potential sensitive content in the original government affair data with the corresponding encryption ciphertext to obtain government affair sharing data and sharing.
[0123] Replacing the data entity containing potential sensitive content in the original government affair data with the corresponding encryption ciphertext to obtain government affair sharing data, including:
[0124] Based on the three types of sensitive classification data entity set, traversing the data entity containing potential sensitive content in the original government affair data, and obtaining the encryption ciphertext corresponding to the data entity, replacing the data entity containing potential sensitive content in the original government affair data with the corresponding encryption ciphertext to obtain government affair sharing data.
[0125] As an embodiment of the present application, the encryption mode is identified according to the encryption algorithm identifier in the encrypted ciphertext, and the encrypted ciphertext in the government affair sharing data is decrypted by combining the encryption key and the inverse operation of the encryption algorithm.
[0126] Embodiment 2:
[0127] An adaptive government affair sharing data shape encryption system, the system comprises a server and a data acquisition device;
[0128] The data acquisition device is used for acquiring original government affair data and performing structured analysis on the original government affair data.
[0129] The server comprises an entity recognition module and an adaptive encryption module.
[0130] The entity recognition module is used for identifying data entities containing potential sensitive content in the original government affair data after structured analysis by using an improved entity recognition model, generating sensitive tags of the data entities containing potential sensitive content, constructing a sensitivity evaluation matrix, evaluating the sensitivity of the data entities containing potential sensitive content based on the sensitive tags, and performing sensitive classification processing on the data entities containing potential sensitive content by using an improved clustering algorithm to obtain three sets of sensitive classification data entities.
[0131] The adaptive encryption module is used for performing encryption processing on the sensitive classification data entities by using an adaptive encryption algorithm to obtain encrypted ciphertext corresponding to the data entities.
[0132] It should be understood that the embodiments are only for illustration and are not limited in the scope of the patent application by the structure.
[0133] It should be noted that the above-mentioned embodiment serial numbers of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "include", "contain" or any other variant thereof in this paper are intended to cover non-exclusive inclusion, so that the process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, device, article or method. Without more limitations, the element defined by the statement "including a" does not exclude the existence of another identical element in the process, device, article or method including the element.
[0134] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the contribution to the prior art can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, including a number of instructions to make a terminal device (may be a mobile phone, computer, server, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0135] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An adaptive government shared data shape-preserving encryption method, characterized in that, The method comprises: S1: structurally analyzing original government data, identifying data entities containing potential sensitive content in the structurally analyzed original government data by using an improved entity recognition model, and generating sensitive labels of the data entities containing potential sensitive content; S2: constructing a sensitivity evaluation matrix, evaluating the sensitivity of the data entities containing potential sensitive content based on the sensitive labels, and performing sensitive classification processing on the data entities containing potential sensitive content by using an improved clustering algorithm to obtain a set of three types of sensitive classified data entities; According to the sensitivity evaluation result of the data entities containing potential sensitive content, the improved clustering algorithm is used to perform sensitive classification processing on the data entities containing potential sensitive content, and a set of three types of sensitive classified data entities is obtained, including: Based on the sensitivity evaluation result, the sensitivity score of the data entity containing potential sensitive content is calculated, and the sensitivity score is the sum of all vector values in the sensitivity evaluation result; Based on the sensitivity score, the improved distance between data entities and the adaptive sensitive neighborhood radius of data entities are calculated; In combination with the improved distance between data entities and the adaptive sensitive neighborhood radius of the data entities, the DBSCAN clustering algorithm is used for sensitive classification processing of the data entities containing potential sensitive content, so as to obtain three sets of sensitive classification data entities wherein In sequence, the high sensitive data entity, the medium sensitive data entity and the low sensitive data entity are respectively The set of three types of sensitive classified data entities includes high-sensitive data entities, medium-sensitive data entities and low-sensitive data entities with gradually decreasing sensitivity; S3: encrypting the sensitive classified data entities by using an adaptive encryption algorithm to obtain the corresponding encrypted ciphertext of the data entities, and the high-sensitive data entities and the medium-sensitive data entities use a conformal encryption method, and the low-sensitive data entities use a homomorphic encryption method; S4: replacing the data entities containing potential sensitive content in the original government data with the corresponding encrypted ciphertext to obtain government sharing data and sharing.
2. The self-adaptive government affair shared data shape encryption method according to claim 1, characterized in that, The structured analysis includes matching the original government data character by character by using regular expressions, cleaning the matched characters, and performing word segmentation by using a word segmentation algorithm to obtain the structurally analyzed original government data; The constructed regular expression includes special symbols, HTML tags and garbled codes, and an improved entity recognition model is constructed, which includes an input representation layer, a dual-modal graph construction layer, a hybrid information propagation layer and a CRF decoding layer.
3. The self-adaptive government shared data conformal encryption method of claim 2, wherein, The improved entity recognition model is used to identify the data entities containing potential sensitive content in the structurally analyzed original government data, and generate sensitive labels of the data entities containing potential sensitive content, including: The input representation layer is a word vector model used to receive the structurally analyzed original government data and generate a word vector for each word; The double-mode graph construction layer is used to calculate the semantic correlation between any two words based on word vectors, construct a semantic correlation graph, and extract word attribute information of each word in the original government data to construct a word structure graph, the word attribute information including position, TF-IDF value, and word type wherein the word type correspond to Chinese, numbers, and English respectively The hybrid information propagation layer is used to convert the word structure graph into an adjacency matrix, and the matrix elements in the adjacency matrix are the connection relationships between any two words. The adjacency matrix is converted into a normalized adjacency matrix for graph convolution based on a degree matrix, and the word vectors are subjected to multi-round semantic feature extraction and structural feature extraction to obtain a hybrid information vector for each word in the structurally analyzed original government data; The CRF decoding layer is configured to receive a mixed information vector of all words in the original government data after the structured analysis, and generate a label mapping matrix of the mixed information vector by using a full connection layer, perform label transition and calculate a label transition score by using a Viterbi algorithm, and take the label transition score of all words and the probability between the words and the labels as a path score to obtain a label sequence with the maximum path score; the label sequence has a length consistent with the number of words in the original government data after the structured analysis, and the labels in the label sequence are labels of the N words in the original government data after the structured analysis in sequence, where N represents the number of words in the original government data after the structured analysis, the label mapping matrix is a probability matrix between the mixed information vector and different labels, the labels are divided into two categories, one is a non-sensitive label category not containing potential sensitive content, and the other is a sensitive label category containing potential sensitive content, and the sensitive label category includes a plurality of sensitive labels; The words with the label category of the sensitive label category are extracted as data entities containing potential sensitive content.
4. The self-adaptive government affair shared data conformal encryption method of claim 3, wherein, The semantic feature extraction and the structural feature extraction of the word vector are performed by multiple rounds of propagation based on the normalized adjacency matrix to obtain a mixed information vector of each word in the original government data after the structured analysis, including: constructing a word vector matrix corresponding to the word vectors in the structured parsed original government data, the word vector matrix being in the form of an N-row Len-column matrix, Len representing the dimension of the word vector, the nth row in the word vector matrix being the word vector of the nth word in the structured parsed original government data, ; The semantic feature extraction and the structural feature extraction of the word vector matrix are performed by H rounds of propagation, and the formula for the hth round of propagation is: ; ; wherein, denotes the hybrid propagation matrix of the word vector matrix after the hth round of propagation, denotes the hybrid propagation matrix of the word vector matrix after the (h-1)th round of propagation, denotes the feature extraction matrix of the hth round of propagation, denotes an activation function; denotes an initial mixing matrix corresponding to the word vector matrix, C denotes the word vector matrix, denotes a normalized adjacency matrix, denotes an element-wise addition, denotes a semantic correlation graph, denotes a structure feature extraction matrix, denotes a semantic feature extraction matrix; The mixed propagation matrix after the Hth round of propagation is extracted as a mixed information vector matrix, and the mixed information vector matrix is in the form of an N-row matrix, corresponding to the mixed information vector of the N words in the original government data after the structured analysis.
5. The self-adaptive government shared data constant encryption method of claim 1, wherein, A sensitivity evaluation matrix is constructed, and the data entities containing potential sensitive content are evaluated based on the sensitive labels, including: The sensitivity evaluation matrix is a sensitive attribute of different sensitive labels in multi-dimensional sensitivity, and the multi-dimensional sensitivity includes legal sensitivity, personal privacy, and data uniqueness, and the range of the sensitive attribute is 0-1; The sensitive attribute of the sensitive label in the sensitivity evaluation matrix is taken as an initial sensitivity evaluation result of the data entity, the word attribute information of the data entity is extracted, the initial sensitivity evaluation result is dynamically optimized and adjusted, and the sensitivity evaluation result of the data entity is obtained, the sensitivity evaluation result is a 3-dimensional vector, and the dynamic sensitive attributes of the data entity in the legal sensitivity, the personal privacy, and the data uniqueness are sequentially represented, and the word attribute information includes the position, the TF-IDF value, and the word type of the data entity.
6. The self-adaptive government shared data conformal encryption method of claim 1, wherein, An adaptive encryption algorithm is used to encrypt the data entity after the sensitive classification to obtain an encryption ciphertext corresponding to the data entity, including: An encryption algorithm identifier of the data entity after the sensitive classification is generated, the data entity is vectorized by using a pre-trained model, and the vectorized data entity is encrypted by using an adaptive encryption algorithm, the encryption algorithm identifier and the encryption processing result are spliced to serve as the encryption ciphertext corresponding to the data entity.
7. The self-adaptive government shared data conformal encryption method of claim 1, wherein, The data entities containing potential sensitive content in the original government data are replaced by the corresponding encryption ciphertexts to obtain government sharing data, including: Based on the three types of sensitive classification data entity set, the data entities containing potential sensitive content in the original government data are traversed, the corresponding encrypted ciphertext of the data entities is obtained, the data entities containing potential sensitive content in the original government data are replaced by the corresponding encrypted ciphertext, and the government sharing data is obtained.
8. An adaptive government shared data shape-preserving encryption system, characterized in that, The adaptive government sharing data shape encryption system comprises a server and a data acquisition device. The data acquisition device is used to acquire original government data and perform structured analysis on the original government data. The server comprises an entity recognition module and an adaptive encryption module. The entity recognition module is used to identify data entities containing potential sensitive content in the original government data after structured analysis by using an improved entity recognition model, generate sensitive labels of the data entities containing potential sensitive content, construct a sensitivity evaluation matrix, evaluate the sensitivity of the data entities containing potential sensitive content based on the sensitive labels, and perform sensitive classification processing on the data entities containing potential sensitive content by using an improved clustering algorithm to obtain a three-type sensitive classification data entity set. The adaptive encryption module is used to perform encryption processing on the sensitive classified data entities by using an adaptive encryption algorithm to obtain the encrypted ciphertext corresponding to the data entities. To realize the adaptive government sharing data shape encryption method according to any one of claims 1-7.
Citation Information
Patent Citations
A method for encryption and decryption in e-government
CN108924104B
Method for carrying out security protection on sensitive data through natural language analysis
CN110795751A
Format-preserving encryption method based on stream cipher
US20210135839A1