Data processing method and device and electronic equipment
By segmenting the file into paragraphs with associated semantics based on text semantic analysis and encrypting according to the sensitivity level, the problem of single key and paragraph separation in file sensitive information protection is solved, and the decryption effect with high security and low computing consumption is achieved.
Patent Information
- Application Number
- CN202411440918.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the method of protecting file sensitive information has the risk of the single and multiple storage of keys, and the separation of paragraphs of associated semantics leads to high decryption calculation and poor flexibility.
Through text semantic analysis, the file to be encrypted is divided into different file paragraphs. Each file paragraph is a paragraph with associated semantics. The encryption policy is determined according to the sensitivity level of each file paragraph, and each file paragraph is encrypted to obtain their own secrets. arts.
The key inconsistency of each file paragraph is achieved. Even one key leak will not cause the entire file to be leaked, reducing decryption calculation consumption, enhancing flexibility, and improving the security of file-sensitive information.
Smart Images

Figure CN119475372A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data protection and information security technology, and in particular to a data processing method, device and electronic equipment. Background Art
[0002] With the acceleration of the informatization process, the Internet has become the main channel for file transmission. The file contains sensitive information. Once the sensitive information is leaked or illegally used, it is very likely to cause serious damage to individuals. Therefore, the protection of sensitive information in files is of great significance.
[0003] At present, the commonly used methods for protecting sensitive information in files include: the client and the server use symmetric algorithms for encryption and decryption to protect the sensitive information of the file; or manage multiple keys and use different keys to encrypt and decrypt the segments after the file is split, so as to protect the sensitive information of the file.
[0004] However, when the client and server use symmetric algorithms to encrypt and decrypt to ensure the security of sensitive information in files, since the key is stored in a single place and in multiple locations, once the key is leaked, the encrypted file will be compromised as a whole, which brings great risks. When managing multiple keys and using different keys to encrypt and decrypt the segments of the file to ensure the security of sensitive information in the file, segments with related semantics may be separated, resulting in the need to decrypt multiple segments together or even as a whole. However, since the keys for each segment are often different, the decryption computational cost is high and the flexibility is poor. Summary of the invention
[0005] The present application provides a data processing method, device and electronic device to solve the problems of common protection methods for sensitive information of files, such as the risk of storing a single key in multiple locations, and the problem of high computational consumption and poor flexibility of decryption due to the separation of paragraphs with related semantics. The specific implementation scheme is as follows:
[0006] In a first aspect, the present application provides a data processing method, the method comprising:
[0007] Based on text semantic analysis, the file to be encrypted is divided into different file sections; wherein each of the file sections has associated semantics;
[0008] Determining the sensitivity level corresponding to each of the document paragraphs;
[0009] According to the encryption strategy corresponding to the sensitivity level, each of the file sections is encrypted respectively to obtain the ciphertext corresponding to each of the file sections.
[0010] Through the above-mentioned application embodiment, based on text semantic analysis, the paragraphs with associated semantics in the file to be encrypted are segmented into the same file paragraph, thereby avoiding the paragraphs with associated semantics from being separated, and then based on the encryption strategy corresponding to the sensitivity level corresponding to the segmented file paragraph, the corresponding file paragraphs are encrypted respectively, thereby realizing the encryption of the file to be encrypted. Since the encryption is performed according to the encryption strategy corresponding to the sensitivity level of each file paragraph, the key of each file paragraph is different, and even if one key is leaked, it will not cause the entire file to be leaked, thereby further enhancing the security of the sensitive information of the file. In addition, since the paragraphs with associated semantics are divided into the same file paragraph for encryption, only one file paragraph needs to be decrypted during subsequent decryption, which greatly reduces the computing consumption and enhances the flexibility.
[0011] In a possible implementation, the text semantic analysis includes feature extraction of the file to be encrypted and analysis of the file to be encrypted using a term frequency-inverse file frequency TF-IDF algorithm. Then, the text semantic analysis-based segmentation of the file to be encrypted into different file paragraphs includes:
[0012] Performing feature extraction on the file to be encrypted to obtain file information of the file to be encrypted, and analyzing the file to be encrypted based on the TF-IDF algorithm to obtain paragraph information of the file to be encrypted;
[0013] According to the file information and the paragraph information, the paragraphs with associated semantics in the file to be encrypted are divided into the same file paragraph.
[0014] Through the above-mentioned application embodiment, according to the file information obtained after feature extraction of the file to be encrypted and the paragraph information obtained after analyzing the file to be encrypted by the TF-IDF algorithm, the paragraphs with related semantics in the file to be encrypted are divided into the same file paragraph, thereby ensuring that each file paragraph into which the file to be encrypted is divided is a paragraph with related semantics, so that when decrypting later, if it is necessary to obtain certain semantically related information, it is only necessary to decrypt a file paragraph corresponding to the semantics without decrypting each paragraph, which helps to reduce computing consumption and improve flexibility.
[0015] In a possible implementation manner, determining the sensitivity level corresponding to each of the document paragraphs includes:
[0016] Obtain the target document paragraph analysis model;
[0017] Scoring the sensitive information of each of the document paragraphs according to the target document paragraph analysis model;
[0018] According to the sensitive information score of each of the document paragraphs, the sensitivity level corresponding to each of the document paragraphs is determined.
[0019] Through the above-mentioned application embodiment, the sensitive information of the file paragraph is scored according to the target file paragraph analysis model, and then the sensitivity level corresponding to the file paragraph is determined according to the obtained sensitive information score, so that the determination of the sensitivity level of the file paragraph is more accurate.
[0020] In a possible implementation manner, before obtaining the target document paragraph analysis model, the method further includes:
[0021] Based on federated learning, the document paragraph analysis model is trained to generate the target document paragraph analysis model.
[0022] Through the above-mentioned application embodiments, the obtained target document paragraph analysis model has the best effect and the highest accuracy in subsequent sensitive information scoring of document paragraphs.
[0023] In a possible implementation manner, the encryption strategy is specifically:
[0024] If it is determined that the sensitivity level is the first sensitivity level, plain text storage is adopted;
[0025] If it is determined that the sensitivity level is the second sensitivity level, symmetric encryption is performed using the key generated by the encryption and decryption module;
[0026] If it is determined that the sensitivity level is the third sensitivity level, symmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module;
[0027] If it is determined that the sensitivity level is the fourth sensitivity level, asymmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module.
[0028] Through the above application embodiments, different encryption methods are used for different sensitivity levels, further improving the security of the files to be encrypted. Moreover, as the sensitivity level increases, the security of the encryption method used is also higher, so that the encryption level of the file sections with higher sensitivity levels is higher, further ensuring the security of sensitive information. For the file sections with low sensitivity levels, a simple encryption method is used to improve the encryption speed of the ciphertext corresponding to the file sections. Furthermore, through the above application embodiments, the encryption of the files to be encrypted is more efficient, and the security of sensitive information is higher.
[0029] In a possible implementation manner, after encrypting each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections, the method further includes:
[0030] Determine the file storage node of each file paragraph according to the hash calculation of the paragraph identification code of each file paragraph;
[0031] The ciphertext obtained after encrypting each file paragraph is stored in the corresponding file storage node through the corresponding paragraph identification code.
[0032] Through the above application embodiment, the storage location of the ciphertext of the file paragraph corresponding to the paragraph identification code can be determined according to the paragraph identification code, so as to better obtain the corresponding ciphertext later.
[0033] In a possible implementation manner, after encrypting each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections, the method further includes:
[0034] Obtaining customer requirements, and determining the document paragraph to be obtained and the paragraph identification code of the document paragraph to be obtained according to the customer requirements;
[0035] According to the paragraph identification code of the file paragraph to be obtained, the ciphertext corresponding to the file paragraph to be obtained is obtained from the corresponding file storage node, and according to the sensitivity level of the file paragraph to be obtained, the encryption and decryption module is called to decrypt the ciphertext corresponding to the file paragraph to be obtained to obtain the file paragraph to be obtained.
[0036] Through the above application embodiments, it is possible to determine which file paragraph's corresponding ciphertext needs to be decrypted according to customer needs, so that the file can be flexibly decrypted to meet customer needs.
[0037] In a second aspect, the present application further provides a data processing device, the device comprising:
[0038] A segmentation module, used for segmenting the to-be-encrypted file into different file segments based on text semantic analysis; wherein each of the file segments is a segment with associated semantics;
[0039] A sensitivity identification module, used to determine the sensitivity level corresponding to each of the document paragraphs;
[0040] The processing module is used to encrypt each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections.
[0041] In a possible implementation, the text semantic analysis includes feature extraction of the file to be encrypted and analysis of the file to be encrypted using a term frequency-inverse file frequency (TF-IDF) algorithm. The segmentation module is specifically used to extract features from the file to be encrypted to obtain file information of the file to be encrypted, and to analyze the file to be encrypted based on the TF-IDF algorithm to obtain paragraph information of the file to be encrypted; and according to the file information and the paragraph information, the paragraphs with related semantics in the file to be encrypted are divided into the same file paragraph.
[0042] In a possible implementation, the sensitive identification module is specifically used to obtain a target file paragraph analysis model; score the sensitive information of each of the file paragraphs according to the target file paragraph analysis model; and determine the sensitivity level corresponding to each of the file paragraphs according to the sensitive information score of each of the file paragraphs.
[0043] In a possible implementation, the sensitive identification module is specifically used to train the document paragraph analysis model based on federated learning to generate the target document paragraph analysis model.
[0044] In one possible implementation, the encryption strategy is specifically as follows: if the sensitivity level is determined to be the first sensitivity level, plain text storage is adopted; if the sensitivity level is determined to be the second sensitivity level, symmetric encryption is performed using the key generated by the encryption and decryption module; if the sensitivity level is determined to be the third sensitivity level, symmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module; if the sensitivity level is determined to be the fourth sensitivity level, asymmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module.
[0045] In a possible implementation, the processing module is specifically used to determine the file storage node of each file paragraph based on the hash calculation of the paragraph identification code of each file paragraph; and store the ciphertext obtained after encrypting each file paragraph to the corresponding file storage node through the corresponding paragraph identification code.
[0046] In a possible implementation, the processing module is specifically used to obtain customer needs, and determine the file paragraph to be obtained and the paragraph identification code of the file paragraph to be obtained according to the customer needs; obtain the ciphertext corresponding to the file paragraph to be obtained from the corresponding file storage node according to the paragraph identification code of the file paragraph to be obtained, and call the encryption and decryption module to decrypt the ciphertext corresponding to the file paragraph to be obtained according to the sensitivity level of the file paragraph to be obtained, so as to obtain the file paragraph to be obtained.
[0047] In a third aspect, the present application provides an electronic device, including:
[0048] Memory, used to store computer programs;
[0049] The processor is used to implement the above-mentioned data processing method steps when executing the computer program stored in the memory.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned data processing method steps are implemented.
[0051] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the architecture of the model training based on federated learning provided in the embodiment of the present application;
[0054] Figure 3 A schematic diagram of the processing process of the data processing method provided in the embodiment of the present application;
[0055] Figure 4 A schematic diagram of a data processing device provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0058] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0059] In the commonly used protection methods for sensitive information of files, when symmetric algorithms are used on the client and server to encrypt and decrypt to ensure the security of sensitive information of files, since the stored key is single and stored in multiple places, once the key is leaked, the encrypted file as a whole will be compromised, which brings great risks. In the commonly used protection methods for sensitive information of files, multiple keys are managed and different keys are used to encrypt and decrypt the segments after the files are split to ensure the security of sensitive information of files. The segments with related semantics may be separated, resulting in the need to decrypt multiple segments together or even as a whole when decrypting. However, since the keys of each segment are often different, the decryption computational consumption is large and the flexibility is poor.
[0060] Therefore, the present application proposes a data processing method, firstly based on text semantic analysis, the paragraphs with associated semantics in the file to be encrypted are divided into the same file paragraph, thereby realizing the division of the file paragraphs of the file to be encrypted, and then the corresponding file paragraphs are encrypted according to the encryption strategy corresponding to the sensitivity level of each file paragraph determined, and the ciphertext corresponding to each file paragraph is obtained. In this way, the paragraphs with associated semantics are divided into the same file paragraph, so that when decrypting, only one file paragraph can be decrypted to obtain the paragraphs corresponding to the associated semantics, which greatly reduces the calculation destruction and enhances the flexibility. At the same time, since the encryption is performed according to the encryption strategy corresponding to the sensitivity level corresponding to each file paragraph, the key of each file paragraph is different, even if one key is leaked, it will not cause the entire file to be leaked, thereby further enhancing the security of the sensitive information of the file.
[0061] Reference Figure 1 The figure is a flow chart of a data processing method provided by an embodiment of the present application, the method comprising:
[0062] S101, based on text semantic analysis, the file to be encrypted is divided into different file sections.
[0063] Among them, each paragraph in the file segment is a paragraph with associated semantics. In other words, a file segment can be composed of multiple paragraphs with associated semantics. If there is only one paragraph with associated semantics in the file to be encrypted, the file segment corresponding to the semantics only includes one paragraph.
[0064] In order to encrypt the file to be encrypted, the file to be encrypted is first segmented based on text semantic analysis.
[0065] In the embodiment of the present application, text semantic analysis may include feature extraction of the encrypted file and analysis of the encrypted file based on the term frequency-inverse document frequency (English: Term Frequency-Inverse Document Frequency, abbreviated as TF-IDF) algorithm. The specific process of segmenting the encrypted file based on text semantic analysis is as follows:
[0066] Specifically, firstly, a file to be encrypted is obtained, which is obtained after data preprocessing of the original file to be encrypted.
[0067] In an embodiment of the present application, data preprocessing may include: elimination of missing values, abnormal values, repeated values, special values, and elimination of meaningless and overly evenly distributed features (such as elimination of modal particles, structural particles, special characters, etc.), thereby reducing the noise of the file to be encrypted, and avoiding the influence of factors such as missing values, abnormal values, repeated values, special values, modal particles, structural particles, special characters, etc. on the segmentation of the file to be encrypted, which helps to further improve the accuracy of subsequent segmentation of the file to be encrypted, thereby helping to further improve the accuracy of subsequent determination of the sensitivity level of file paragraphs.
[0068] Furthermore, after obtaining the file to be encrypted, feature extraction is performed on the file to be encrypted to obtain file information of the file to be encrypted. And word frequency analysis is performed on the file to be encrypted based on the TF-IDF algorithm to achieve more accurate and effective text analysis, thereby obtaining paragraph information of the file to be encrypted.
[0069] The file information may include file type, file size, etc. The paragraph information may include paragraph identification code (English: Identity document, abbreviated as ID), paragraph meaning, paragraph content, paragraph size, etc. The file information and paragraph information are file features of the file to be encrypted.
[0070] The above feature extraction is performed on the file to be encrypted to obtain the file information of the file to be encrypted. The file to be encrypted can be processed through a presentation (English: PowerPoint, abbreviated as PPT), a word processor application (such as Word), etc., so that the file type, file size and other file information of the file to be encrypted can be directly obtained, but it is not limited to this.
[0071] In addition to analyzing the encrypted file through the TF-IDF algorithm, the paragraph information of the encrypted file can also be obtained through other algorithms, such as word vector (English: Word to Vector, abbreviated as Word2Vec), but is not limited to this.
[0072] After obtaining the file characteristics of the file to be encrypted, that is, the file information and paragraph information of the file to be encrypted, based on the comprehensive analysis of the file information and paragraph information, the paragraphs with related semantics in the file to be encrypted can be divided into the same file paragraph, thereby realizing the segmentation of the file to be encrypted, so that the paragraphs with related semantics in the file to be encrypted are all divided into one file paragraph, avoiding the subsequent decryption of multiple paragraphs together, which helps to reduce the computational consumption during decryption and improve the flexibility during decryption.
[0073] Exemplarily, after obtaining the file information and paragraph information (such as paragraph meaning, paragraph size, paragraph content, etc.) of the file to be encrypted, the content of each natural paragraph in the file to be encrypted can be learned.
[0074] For example, the file to be encrypted includes 10 natural segments. According to the file information and segment information of the file to be encrypted, the 1st to 4th natural segments all describe content A, the 5th to 6th natural segments all describe content B, and the 7th to 10th natural segments all describe content C.
[0075] Therefore, the 1st to 4th natural segments can be divided into the same file paragraph, the 5th to 6th natural segments can be divided into the same file paragraph, and the 7th to 10th natural segments can be divided into the same file paragraph, so that the file to be encrypted is divided into three different file paragraphs, and each file paragraph is composed of paragraphs (i.e., natural segments) with associated semantics.
[0076] S102, determining the sensitivity level corresponding to each document paragraph.
[0077] After obtaining the file sections of the file to be encrypted in step S101, the sensitivity level corresponding to each file section is determined, so that the file sections can be encrypted according to the sensitivity level later.
[0078] The sensitivity level may include a first sensitivity level, a second sensitivity level, a third sensitivity level and a fourth sensitivity level. The first sensitivity level has the lowest sensitivity and the fourth sensitivity level has the highest sensitivity. However, this is not limited to this, and the number of sensitivity levels may be adjusted according to specific application scenarios.
[0079] The specific process of determining the sensitivity level corresponding to each file paragraph can be as follows:
[0080] Specifically, first, the target file paragraph analysis model is obtained. Then, the sensitive information of each file paragraph is scored according to the target file paragraph analysis model, so as to obtain the sensitive information score corresponding to each file paragraph. Then, according to the sensitive information score of each file paragraph, the sensitivity level corresponding to each file paragraph is determined, so that the sensitivity level of the file paragraph is determined more accurately.
[0081] In the embodiment of the present application, the relationship between the sensitivity level (such as the first sensitivity level, the second sensitivity level, the third sensitivity level, and the fourth sensitivity level) and the sensitive information score can be as follows:
[0082] The sensitive information scores corresponding to the first level of sensitivity include sensitive information scores less than the first score threshold; the sensitive information scores corresponding to the second level of sensitivity include sensitive information scores greater than or equal to the first score threshold and less than the second score threshold; the sensitive information scores corresponding to the third level of sensitivity include sensitive information scores greater than or equal to the second score threshold and less than the third sensitive information score; the fourth level of sensitivity includes sensitive information scores greater than or equal to the third score threshold. The first score threshold, the second score threshold, and the third score threshold can be adjusted according to specific application scenarios.
[0083] Optionally, the above-mentioned target file paragraph analysis model may include a target image recognition algorithm and a target Light Gradient Boosting Machine (LightGBM) algorithm. The LightGBM algorithm is an open source distributed gradient boosting (GBDT) framework based on a decision tree algorithm. The core idea is to perform gradient boosting through training data, gradually fit the objective function, and optimize the fitting results of each step, and finally obtain an efficient prediction model. Therefore, scoring sensitive information based on the target file paragraph analysis model including the target LightGBM algorithm can make the determined sensitive information level more accurate.
[0084] Then, the above target file paragraph analysis model is used to score the sensitive information of each file paragraph, specifically:
[0085] For the image content in the document paragraph, a target image recognition algorithm is used to score the sensitive information of the image content in the document paragraph.
[0086] For the text content in the file paragraph, the target LightGBM algorithm is used to score the sensitive information of the text content in the file paragraph.
[0087] In an embodiment of the present application, the data preprocessing corresponding to the above-mentioned image content may also include grayscale conversion to facilitate better identification of the sensitive information score of the image content.
[0088] Since Opencv is a cross-platform computer vision and machine learning software library released under the Apache 2.0 license (open source), it has a very rich visual processing algorithm that can easily and efficiently implement image analysis, detection, and recognition.
[0089] Therefore, in the embodiment of the present application, the above-mentioned target image recognition algorithm can be Opencv, so as to score the sensitive information of the file paragraph based on Opencv to improve the accuracy of the sensitive information score in the image content. Exemplarily, if the b file paragraph includes a seal, the seal is scored for sensitive information based on Opencv.
[0090] However, it should be noted that before using the above-mentioned target image recognition algorithm and target LightGBM algorithm (i.e., the target file paragraph analysis model) to score the sensitive information of the file paragraphs, it is necessary to first train the image recognition algorithm and the LightGBM algorithm so as to obtain the optimal target image recognition algorithm and target LightGBM model. That is, it is necessary to first train the file paragraph analysis model so as to obtain the optimal target file paragraph analysis model, so that when performing subsequent sensitive information scoring, it will be more accurate and more in line with the actual situation of the file paragraphs.
[0091] In the embodiment of the present application, the training of the above-mentioned document paragraph analysis model can be based on federated learning. Thus, the training of the document paragraph analysis model based on federated learning makes the obtained target document paragraph analysis model have the best effect and the highest accuracy in the subsequent sensitive information scoring of document paragraphs.
[0092] However, before training the file paragraph analysis model based on federated learning, it is necessary to obtain training data for training the file paragraph analysis model. Specifically, first obtain the original file. Then, the original file is processed in the same way as the file to be encrypted in step S101 to obtain the file paragraph of the original file. The file paragraph of the original file is the training data.
[0093] Furthermore, based on the training data and federated learning, the document paragraph analysis model is trained to obtain the target document paragraph analysis model. Model training based on federated learning is essentially a process of integrating parameters of models (such as document paragraph analysis models) trained on different data sources (i.e., training data from different data sources) to update the model. The overall architecture of the process can be described as follows: Figure 2 As shown:
[0094] Different local participants (such as local participant 1, local participant 2, local participant 3, and local participant 4) perform model training (i.e., machine learning) locally using their own training data, and then upload the parameters obtained after training to the central processing unit (CPU). The CPU then processes the received model parameters and sends the processing results to different local participants, so that the local participants continue training based on the received processing results until the optimal target model (such as the target file paragraph analysis model) is obtained.
[0095] When the above-mentioned local participants use their own training data to train models locally, they can use the LightGBM algorithm for local training to speed up model training and reduce memory consumption. At the same time, it can also improve the accuracy of the model, so that it can achieve excellent performance in subsequent sensitive information scoring.
[0096] In the parameter exchange process in which the local participants upload the trained parameters to the CPU and the CPU sends the processing results to the local participants, the parameter exchange can be carried out by negotiating an encryption algorithm, that is, the exchanged parameters are encrypted, thereby avoiding parameter leakage during the parameter exchange process, which in turn helps to improve the security of the model training process.
[0097] In the embodiment of the present application, the encryption algorithm for parameter exchange by negotiating the encryption algorithm can be a homomorphic encryption of the Paillier algorithm. The Paillier algorithm is an additive homomorphic algorithm, and its properties are as follows:
[0098] For any plaintext m1, m2∈Z N , any random number r1, The corresponding ciphertext is c1=E[m1,r1],c2=E[m2,r2]. Then c1*c2=m1+m2.
[0099] Where Z N Represents a plaintext set, represents a set of random numbers, and E represents encryption.
[0100] Therefore, the additive homomorphic characteristics of the Paillier algorithm can further ensure that all data exchanges between local participants and the CPU are based on ciphertext, thereby ensuring the security of the data in the entire process.
[0101] The above-mentioned different local participants (such as local participant 1, local participant 2, local participant 3, local participant 4) respectively use their own training data to perform model training (i.e., machine learning) locally, and then upload the parameters obtained after training to the CPU, and the CPU then processes the received model parameters and sends the processing results to different local participants respectively, so that the local participants continue to train based on the received processing results until the optimal target model (such as the target file paragraph analysis model) is obtained. The specific process can also be shown as follows:
[0102] After completing a round of local model training, each local participant will encrypt and upload the calculated quantiles (i.e., parameters after model training) to the CPU through the Paillier algorithm. The CPU aggregates the encrypted data uploaded by each local participant, so that the aggregated result in plain text can be directly obtained. Then, the CPU calculates the sum of the quantiles of each local participant on each feature, divides it by the number of local participants, and obtains the average quantile value, and uses the average quantile value as the global quantile, and then sends the global quantile to each local participant, so that each local participant can perform the next round of iterative training based on the received global quantile until the optimal target model (i.e., the target file paragraph analysis model) is trained.
[0103] S103, encrypting each file section according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each file section.
[0104] After determining the sensitivity level corresponding to each file paragraph in step S102, the encryption strategy corresponding to each file paragraph is determined according to the sensitivity level corresponding to each file paragraph, and then the corresponding file paragraph is encrypted based on the encryption strategy to obtain the ciphertext corresponding to each file paragraph.
[0105] In the embodiment of the present application, the encryption strategies corresponding to different levels of sensitivity are inconsistent.
[0106] Specifically, the encryption strategy corresponding to the first level of sensitivity is: plain text storage, that is, no encryption.
[0107] The encryption strategy corresponding to the second level of sensitivity is: symmetric encryption using the key generated by the encryption and decryption module.
[0108] The encryption strategy corresponding to the third level of sensitivity is: symmetric encryption using the cipher machine connected to the encryption and decryption module.
[0109] The encryption strategy corresponding to the fourth level of sensitivity is: using asymmetric encryption using the cipher machine connected to the encryption and decryption module.
[0110] Therefore, if it is determined that the sensitivity level corresponding to the file paragraph is the first sensitivity level, the file paragraph is encrypted in a plaintext storage manner to obtain the ciphertext corresponding to the file paragraph.
[0111] If it is determined that the sensitivity level corresponding to the file paragraph is the second sensitivity level, the file paragraph is symmetrically encrypted using the key generated by the encryption and decryption module to obtain the ciphertext corresponding to the file paragraph.
[0112] If it is determined that the sensitivity level corresponding to the file paragraph is the third sensitivity level, the cipher machine connected to the encryption and decryption module is used to symmetrically encrypt the file paragraph to obtain the ciphertext corresponding to the file paragraph.
[0113] If it is determined that the sensitivity level corresponding to the file paragraph is the fourth level of sensitivity, the cipher machine connected to the encryption and decryption module is used to asymmetrically encrypt the file paragraph to obtain the ciphertext corresponding to the file paragraph.
[0114] In an embodiment of the present application, the above-mentioned encryption and decryption module can be used to maintain the association relationship between file storage nodes and keys. It can also call the symmetric key or asymmetric key corresponding to the cryptographic machine to encrypt plaintext (such as file paragraphs) and decrypt ciphertext according to the input file storage node and encryption strategy or decryption strategy, or directly encrypt plaintext and decrypt ciphertext according to its own key algorithm.
[0115] The encryption and decryption module can also maintain the relationship between the two by establishing an association between the cipher machine index and the file storage node, thereby ensuring that each file storage node includes a symmetric key and a pair of asymmetric keys generated by the cipher machine, and the corresponding key index can be obtained through the ID or paragraph ID of the file storage node, thereby realizing encryption of plain text and decryption of cipher text. In addition, after adding a new file storage node, a symmetric key and a pair of asymmetric keys can also be automatically added to the cipher machine.
[0116] The above-mentioned cipher machine strictly complies with the national standard specifications, ensuring that the key does not leave the cipher machine throughout the entire process, thereby ensuring that information in the entire encryption and decryption process is not leaked, further improving the security of the files to be encrypted and the security of subsequent file segments to be obtained.
[0117] Through the above method, segmented storage of the file to be encrypted is achieved, and the key of each file segment is inconsistent, which avoids the entire file to be encrypted from being compromised due to the leakage of the key of one file segment, thereby further improving the security of the file to be encrypted.
[0118] Optionally, after encrypting each file segment according to the encryption strategy corresponding to the sensitivity level and obtaining the ciphertext of each file segment, the ciphertext needs to be stored. The storage process of the ciphertext can be as follows:
[0119] First, a hash calculation is performed on the paragraph ID of the file paragraph to obtain the hash value of the paragraph ID, and then the file storage node of the corresponding file paragraph is determined according to the hash value. Then, the corresponding ciphertext is stored in the corresponding file storage node according to the paragraph ID corresponding to the file paragraph, so that the storage location of the ciphertext corresponding to the paragraph ID can be determined according to the paragraph ID, so as to better obtain the corresponding ciphertext later.
[0120] The above-mentioned hash calculation is performed on the paragraph ID of the file paragraph to obtain the hash value of the paragraph ID, and then the file storage node of the corresponding file paragraph is determined according to the hash value. It can also be performed before encrypting each file paragraph according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext of each file paragraph, or it can be performed simultaneously.
[0121] In addition, in the embodiment of the present application, after the file segment is encrypted and stored, when the customer needs to decrypt, it can also be decrypted according to the customer's needs, so as to retrieve the file segment required by the customer.
[0122] Specifically, first obtain the customer demand. The customer demand may be to decrypt the entire file, or to decrypt a portion of the file, i.e., a portion of the file paragraphs in the file. In addition, the customer demand may also be the required file paragraph (i.e., the file paragraph to be obtained) determined by the user according to the introduction of the file paragraph.
[0123] Then, according to the customer's demand, the file paragraph to be obtained and the paragraph ID corresponding to the file paragraph to be obtained are determined. The number of the file paragraphs to be obtained can be Z, where Z is a positive integer. Exemplarily, if the customer's demand is to decrypt the entire file, the file paragraphs to be obtained include the file paragraphs corresponding to the entire file in the customer's demand. If the customer's demand is to decrypt a portion of the file, the file paragraphs to be obtained include the file paragraphs corresponding to the portion of the file.
[0124] Then, according to the paragraph ID of the file paragraph to be obtained, the file storage node corresponding to the paragraph ID is determined. Then, the ciphertext corresponding to the file paragraph to be obtained is obtained from the file storage node corresponding to the paragraph ID.
[0125] In the embodiment of the present application, the above method of determining the file storage node corresponding to the paragraph ID according to the paragraph ID is consistent with the method of determining the file storage node corresponding to the file paragraph according to the paragraph ID of the file paragraph in the aforementioned step S103, and will not be repeated here.
[0126] After obtaining the ciphertext corresponding to the file to be obtained, the corresponding decryption strategy is determined according to the sensitivity level corresponding to the file to be obtained, so as to call the encryption and decryption module and use the corresponding decryption strategy to decrypt the ciphertext to obtain the file to be obtained.
[0127] In the embodiment of the present application, the above decryption strategy corresponds one-to-one to the above encryption strategy.
[0128] For example, the encryption strategy corresponding to the first level of sensitivity is: use plain text storage. Then the decryption strategy corresponding to the first level of sensitivity is: directly obtain the corresponding content without decryption.
[0129] The encryption strategy corresponding to the second level of sensitivity is: symmetric encryption using the key generated by the encryption and decryption module. The decryption strategy corresponding to the second level of sensitivity is: decryption based on the decryption algorithm and decryption key corresponding to the first ciphertext (i.e., the ciphertext obtained by symmetric encryption using the key generated by the encryption and decryption module).
[0130] The encryption strategy corresponding to the third level of sensitivity is: symmetric encryption using the cipher machine connected to the encryption and decryption module. The decryption strategy corresponding to the third level of sensitivity is: decryption based on the decryption algorithm and decryption key corresponding to the second ciphertext (i.e., the ciphertext obtained by symmetric encryption using the cipher machine connected to the encryption and decryption module).
[0131] The encryption strategy corresponding to the fourth level of sensitivity is: asymmetric encryption using the cipher machine connected to the encryption and decryption module. The decryption strategy corresponding to the fourth level of sensitivity is: decryption based on the decryption algorithm and decryption key corresponding to the third ciphertext (i.e., the ciphertext obtained by asymmetric encryption using the cipher machine connected to the encryption and decryption module).
[0132] In summary, the data processing method proposed in this application dynamically determines the file paragraph division rules based on the text semantic analysis of the TF-IDF algorithm, ensuring that the paragraphs with related semantics in the encrypted file are divided together. And through multi-node training (i.e., training the file paragraph analysis model based on federated learning), the overall training speed and accuracy of the model (such as the file paragraph analysis model) are improved, ensuring that the file division has logical meaning and ensuring the scoring of sensitive information of the encrypted file.
[0133] The training results (i.e., the target file paragraph analysis model) are then used to score the sensitive information of each file paragraph of the encrypted file, thereby identifying the sensitivity level corresponding to each file paragraph.
[0134] Then, different logics, that is, the encryption strategy corresponding to the sensitivity level, are used to process the corresponding file segments, and the processed file segments (that is, the ciphertext obtained after encrypting the file segments) are stored in the corresponding file storage nodes, thereby realizing segmented encryption of the files to be encrypted, and further improving the security of sensitive information in the files to be encrypted.
[0135] In addition, since the file segment division is logical, it can provide customers with flexible file segment viewing and preview functions, while reducing the pressure and frequency of system encryption and decryption calculations. Moreover, according to the customer's sequence requirements, the ciphertext corresponding to the file to be obtained by the customer can be decrypted to obtain the file to be obtained. Therefore, when the customer views the file (i.e. decrypts the file), he can request the file as a whole or specify the file segment.
[0136] In addition, by continuously optimizing the model training process and algorithm optimization, the data processing method provided by the embodiment of the present application can continuously use a wider range of more complex file types and content structures, ensuring the high accuracy and wide applicability of file splitting and encryption processing. It not only improves the intelligent level of file processing, but also sets a new benchmark in the field of data protection and information security.
[0137] The technical solution of this application is further explained below in conjunction with a specific application process.
[0138] like Figure 3 The figure shows a processing process diagram of the data processing method. First, in the data preprocessing module, the original data (such as the original file corresponding to the training data and the target file corresponding to the file to be encrypted) is obtained. Then, the missing values, abnormal values, repeated values, and special values in the original data are removed, and the meaningless and overly evenly distributed features (such as modal particles, structural particles, special characters, etc.) are removed to obtain the data to be used (such as the clean data corresponding to the training data and the file to be encrypted). The data to be used is then input into the text semantic analysis module to determine the paragraph information of the data to be used.
[0139] In the text semantic analysis module, the data to be used (such as the clean data corresponding to the training data, the file to be encrypted) transmitted by the data preprocessing module is received. Then, feature extraction is performed on the data to be used to obtain the file features of the data to be used, and based on the TF-IDF algorithm, the data to be used is subjected to word frequency analysis to obtain the paragraph information of the data to be used. Then, according to the paragraph information, the paragraphs with associated semantics in the data to be used are divided into the same file paragraph, thereby realizing the division of the file paragraphs of the data to be used, and then obtaining multiple file paragraphs. If the data to be used is the clean data corresponding to the training data, the multiple file paragraphs obtained are the training data. Then, the training data is input into the training module so that the training module trains the file paragraph analysis model based on the training data. If the data to be used is the file to be encrypted, the multiple file paragraphs obtained are the file paragraphs corresponding to the file to be encrypted. Then, the multiple file paragraphs corresponding to the file to be encrypted are transmitted to the sensitivity level determination module so that the sensitivity level determination module determines the sensitivity level of each of the multiple file paragraphs.
[0140] In the training module, the training data transmitted from the text semantic analysis module is received. Based on the training data, federated learning, LightGBM algorithm and Paillier algorithm, the file paragraph analysis model is trained to obtain the target file paragraph analysis model with the best sensitive information scoring effect. The target file paragraph analysis model is then transmitted to the sensitivity level determination module, so that the sensitivity level determination module can score the sensitive information of the file paragraph based on the target file paragraph analysis model.
[0141] In the sensitivity level determination module, multiple file paragraphs corresponding to the file to be encrypted transmitted by the text semantic analysis module and the target file paragraph analysis model transmitted by the training module are received. Then, the target file paragraph analysis model is used to score the sensitive information of each file paragraph to obtain the sensitive information score corresponding to the file paragraph. Then, according to the sensitive information score corresponding to the file paragraph, the sensitivity level corresponding to the corresponding file paragraph is determined. The sensitivity level corresponding to the file paragraph is transmitted to the data segment encryption module, so that the data segment encryption module encrypts the corresponding file paragraph based on the sensitivity level.
[0142] In the data segment encryption module, the sensitivity level corresponding to the file segment transmitted by the sensitivity level determination module is received. Then, the encryption and decryption module is called to encrypt the corresponding file segment according to the encryption strategy corresponding to the sensitivity level to obtain the encrypted file segment (i.e., the ciphertext corresponding to the file segment). At the same time, according to the hash calculation of the segment ID of the file segment, the file storage node corresponding to the file segment in the storage module is determined, and then according to the file storage node, the corresponding ciphertext is stored in the corresponding position in the storage module.
[0143] In the data segmentation and decryption module, obtain customer needs, determine the file segment to be obtained and the segment ID corresponding to the file segment to be obtained. Then determine the corresponding file storage node according to the segment ID, and according to the file storage node, take out the ciphertext corresponding to the file segment to be obtained from the corresponding position in the storage module. Then, call the encryption and decryption module, and decrypt the ciphertext through the decryption strategy corresponding to the sensitivity level corresponding to the file segment to be obtained, so as to obtain the file segment to be obtained.
[0144] Based on the same inventive concept, the present application also provides a data processing device, such as Figure 4 The figure is a schematic diagram of the structure of a data processing device provided by the present application, the device comprising:
[0145] The segmentation module 401 is used to segment the file to be encrypted into different file segments based on text semantic analysis; wherein each of the file segments has associated semantics;
[0146] A sensitivity identification module 402, used to determine the sensitivity level corresponding to each of the document paragraphs;
[0147] The processing module 403 is used to encrypt each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections.
[0148] In a possible implementation, the text semantic analysis includes feature extraction of the file to be encrypted and analysis of the file to be encrypted using a term frequency-inverse file frequency (TF-IDF) algorithm. The segmentation module 401 is specifically used to perform feature extraction on the file to be encrypted to obtain file information of the file to be encrypted, and analyze the file to be encrypted based on the TF-IDF algorithm to obtain paragraph information of the file to be encrypted; and according to the file information and the paragraph information, the paragraphs with related semantics in the file to be encrypted are divided into the same file paragraph.
[0149] In a possible implementation, the sensitive identification module 402 is specifically used to obtain a target file paragraph analysis model; score the sensitive information of each of the file paragraphs according to the target file paragraph analysis model; and determine the sensitivity level corresponding to each of the file paragraphs according to the sensitive information score of each of the file paragraphs.
[0150] In a possible implementation, the sensitive identification module 402 is specifically configured to train the document paragraph analysis model based on federated learning to generate the target document paragraph analysis model.
[0151] In one possible implementation, the encryption strategy is specifically as follows: if the sensitivity level is determined to be the first sensitivity level, plain text storage is adopted; if the sensitivity level is determined to be the second sensitivity level, symmetric encryption is performed using the key generated by the encryption and decryption module; if the sensitivity level is determined to be the third sensitivity level, symmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module; if the sensitivity level is determined to be the fourth sensitivity level, asymmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module.
[0152] In a possible implementation, the processing module 403 is specifically used to determine the file storage node of each file paragraph based on the hash calculation of the paragraph identification code of each file paragraph; and store the ciphertext obtained after encrypting each file paragraph in the corresponding file storage node through the corresponding paragraph identification code.
[0153] In a possible implementation, the processing module 403 is specifically used to obtain customer needs, and determine the file paragraph to be obtained and the paragraph identification code of the file paragraph to be obtained according to the customer needs; obtain the ciphertext corresponding to the file paragraph to be obtained from the corresponding file storage node according to the paragraph identification code of the file paragraph to be obtained, and call the encryption and decryption module to decrypt the ciphertext corresponding to the file paragraph to be obtained according to the sensitivity level of the file paragraph to be obtained, so as to obtain the file paragraph to be obtained.
[0154] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application. The electronic device can realize the functions of the aforementioned data processing device. Figure 5 , the electronic equipment includes:
[0155] At least one processor 501, and a memory 502 connected to the at least one processor 501. The specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present application. Figure 5 In the example, the processor 501 and the memory 502 are connected via a bus 500. The bus 500 is Figure 5 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 500 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 501 can also be called a controller, and there is no limitation on the name.
[0156] In the embodiment of the present application, the memory 502 stores instructions that can be executed by at least one processor 501. The at least one processor 501 can execute the data processing method discussed above by executing the instructions stored in the memory 502. The processor 501 can implement Figure 4 The functions of each module in the device shown.
[0157] Among them, the processor 501 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 502 and calling data stored in the memory 502, the various functions of the device and processing data, the device can be monitored as a whole.
[0158] In one possible design, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0159] Processor 501 can be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the data processing method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0160] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, abbreviated as RAM), a static random access memory (English: Static Random Access Memory, abbreviated as SRAM), a programmable read-only memory (English: Programmable Read Only Memory, abbreviated as PROM), a read-only memory (English: Read Only Memory, abbreviated as ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0161] By designing and programming the processor 501, the code corresponding to the data processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the data processing method when it is running. Figure 1 The steps of the data processing method of the embodiment shown are as follows: How to design and program the processor 401 is a technique well known to those skilled in the art and will not be described in detail here.
[0162] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the data processing method discussed above.
[0163] In some possible implementations, various aspects of the data processing method provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the data processing method according to various exemplary implementations of the present application described above in this specification.
[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method, characterized in that: include: Based on text semantic analysis, the file to be encrypted is divided into different file sections; wherein each of the file sections has associated semantics; Determining the sensitivity level corresponding to each of the document paragraphs; According to the encryption strategy corresponding to the sensitivity level, each of the file sections is encrypted respectively to obtain the ciphertext corresponding to each of the file sections.
2. The method according to claim 1, characterized in that The text semantic analysis includes feature extraction of the file to be encrypted and analysis of the file to be encrypted using a word frequency-inverse file frequency (TF-IDF) algorithm. The text semantic analysis-based segmentation of the file to be encrypted into different file paragraphs includes: Performing feature extraction on the file to be encrypted to obtain file information of the file to be encrypted, and analyzing the file to be encrypted based on the TF-IDF algorithm to obtain paragraph information of the file to be encrypted; According to the file information and the paragraph information, the paragraphs with associated semantics in the file to be encrypted are divided into the same file paragraph.
3. The method according to claim 1, characterized in that Determining the sensitivity level corresponding to each of the document paragraphs includes: Obtain the target document paragraph analysis model; Scoring the sensitive information of each of the document paragraphs according to the target document paragraph analysis model; According to the sensitive information score of each of the document paragraphs, the sensitivity level corresponding to each of the document paragraphs is determined.
4. The method according to claim 3, characterized in that Before obtaining the target document paragraph analysis model, the method further includes: Based on federated learning, the document paragraph analysis model is trained to generate the target document paragraph analysis model.
5. The method according to claim 1, characterized in that The encryption strategy is specifically: If it is determined that the sensitivity level is the first sensitivity level, plain text storage is adopted; If it is determined that the sensitivity level is the second sensitivity level, symmetric encryption is performed using the key generated by the encryption and decryption module; If it is determined that the sensitivity level is the third sensitivity level, symmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module; If it is determined that the sensitivity level is the fourth sensitivity level, asymmetric encryption is performed using the cryptographic machine connected to the encryption and decryption module.
6. The method according to claim 1, characterized in that After encrypting each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections, the method further includes: Determine the file storage node of each file paragraph according to the hash calculation of the paragraph identification code of each file paragraph; The ciphertext obtained after encrypting each file paragraph is stored in the corresponding file storage node through the corresponding paragraph identification code.
7. The method according to claim 1, characterized in that After encrypting each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections, the method further includes: Obtaining customer requirements, and determining the document paragraph to be obtained and the paragraph identification code of the document paragraph to be obtained according to the customer requirements; According to the paragraph identification code of the file paragraph to be obtained, the ciphertext corresponding to the file paragraph to be obtained is obtained from the corresponding file storage node, and according to the sensitivity level of the file paragraph to be obtained, the encryption and decryption module is called to decrypt the ciphertext corresponding to the file paragraph to be obtained to obtain the file paragraph to be obtained.
8. A data processing device, characterized in that: include: A segmentation module, used for segmenting the to-be-encrypted file into different file segments based on text semantic analysis; wherein each of the file segments is a segment with associated semantics; A sensitivity identification module, used to determine the sensitivity level corresponding to each of the document paragraphs; The processing module is used to encrypt each of the file sections according to the encryption strategy corresponding to the sensitivity level to obtain the ciphertext corresponding to each of the file sections.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.