Information encryption methods, systems, devices, and media

The information encryption method addresses the vulnerability of fixed-key symmetric encryption by using keyword-based, multi-level encryption processes to dynamically generate keys, enhancing security and resistance to decryption.

JP7834944B1Active Publication Date: 2026-03-24SICHUAN LIANGSHANSHUILUOHE ELECTRICITY DEV CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Conventional symmetric encryption technologies using fixed keys are vulnerable to decryption once the key is compromised, leading to low security and ease of unauthorized access due to fixed encryption rules.

Method used

An information encryption method that dynamically generates encryption keys based on keyword frequencies and relationships, employing odd and even dynamic disturbance coefficients, and multi-level encryption processes to create a layered security barrier.

Benefits of technology

Enhances security by dynamically adjusting encryption keys according to document content, making it difficult for attackers to crack the encryption, thus increasing resistance to decryption attempts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007834944000001_ABST
    Figure 0007834944000001_ABST
Patent Text Reader

Abstract

This invention discloses information encryption methods, systems, devices, and media, and belongs to the field of text encryption technology. [Solution] The present invention first statistically analyzes the frequency of document keywords, selects high-frequency anchor words, extracts keywords from sentences, constructs two types of association vectors by linking them with the word frequency ratio and word associations with the anchor words, generates odd-even dynamic disturbance coefficients based on the keyword-anchor association vectors, generates key encryption keywords by linking them with word frequencies, obtains an initial encrypted sentence, divides the initial encrypted sentence into blocks according to the sentence-anchor association vectors, generates block-level keys, completes encryption stitching to obtain sentence-level encryption code vectors, finally obtains a cross-sentence linked key, and obtains an encrypted document by linking all sentence-level encryption code vectors. The present invention enhances the security and decryption resistance of text encryption through multi-layered association encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0004] , , ,

[0001] The present invention relates to the technical field of text encryption technology, and specifically relates to an information encryption method, system, device and medium.

Background Art

[0002] In the digital age, various electronic documents carry a large amount of sensitive information, covering core contents such as trade secrets, government affairs data, and personal privacy. Ensuring security in the information transmission and storage processes is an important issue that urgently needs to be solved. As a core means of protecting information security, information encryption technology performs conversion processing on the original document to prevent unauthorized entities from decrypting the information content, thereby countering security risks such as illegal theft and tampering, and is widely applied in multiple fields such as finance, communication, and government affairs.

[0003] In traditional information encryption technology, symmetric encryption technology is widely applied in small and medium-sized document encryption scenarios because of its high encryption and decryption efficiency and small computational overhead. Such technology generally performs overall encryption processing on the document content using a fixed key, that is, a group of encryption keys is preset, and the content such as characters and symbols in the document is converted according to a unified rule, and the original document is restored by the inverse operation of the same key during decryption.

[0004] However, there are obvious security defects in the above symmetric encryption technology using a fixed key. Since the key is fixed throughout the process and not dynamically adjusted together with the content characteristics of the document, once the key is illegally decrypted or leaked, the attacker can directly decrypt the entire encrypted document and obtain all the original information. Moreover, the fixed encryption rule is easy to find the rule by means of the attacker's statistical analysis, brute-force decryption, etc., and it is difficult to ensure the security of the encrypted document, resulting in the problem of low security of text encryption.

Summary of the Invention

[0005] In contrast to the problems described above in conventional technologies, the information encryption method, system, device, and medium according to the present invention solve the problem of the low security of text encryption that exists in conventional technologies. [Means for solving the problem]

[0006] To achieve the objective of the above invention, the technical solution used in the present invention is an information encryption method, and this information encryption method is Step S1 involves statistically analyzing the frequency of each keyword in the document and selecting the most frequently occurring keywords as anchor words. Step S2 involves extracting each keyword from each sentence and constructing a sentence-anchor relationship vector and a keyword-anchor relationship vector based on the word frequency ratio and word relationship between each keyword and the anchor word. Step S3 involves generating odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, associating them with keyword frequencies to generate corresponding encryption keys, encrypting the keywords, and obtaining an initial encrypted text. Step S4 involves dividing the initial encrypted sentence into blocks based on the sentence-anchor association vector, generating a block-level encryption key, and performing encryption and stitching on each block to be encrypted to obtain a sentence-level encryption code vector. The process includes step S5, which involves obtaining a cross-sentence linked key for a sentence-level encryption code vector, performing linked encryption on each sentence-level encryption code vector in the document, and obtaining an encrypted document.

[0007] Furthermore, S2 is Substep S21 involves adding up the frequencies of each anchor word to obtain the total anchor word frequency, Substep S22 involves defining the word frequency ratio as the ratio of the frequency of each keyword in a sentence to the total anchor word frequency, and constructing the word frequency ratios belonging to the same sentence as a sentence-anchor relationship vector. The process includes a substep S23 in which the similarity between the vector of each keyword in a sentence and the vector of the anchor word is defined as a word association, and word associations belonging to the same keyword are constructed as a keyword-anchor association vector.

[0008] Furthermore, S3 is Substep S31 involves dividing the keyword vector into two parts to obtain a first keyword subvector and a second keyword subvector, Substep S32 generates odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, Substep S33 generates a first encryption key and a second encryption key by multiplying the keyword frequency by the keyword-anchor association vector and incorporating odd dynamic disturbance coefficients and even dynamic disturbance coefficients, respectively. Substep S34 involves performing an XOR operation on the first encryption key and the first keyword subvector to obtain the first cipherword vector, Substep S35 involves performing an XOR operation on the second encryption key and the second keyword subvector to obtain the second cipherword vector, Substep S36 involves stitching together the first cipherword vector and the second cipherword vector to obtain the target cipherword vector, The process includes a substep S37 in which the target cipherword vector is replaced with a vector of keywords corresponding to the sentence to obtain an initial ciphertext.

[0009] Furthermore, S32 is, Substep S321 extracts word associations with odd numbers in the keyword-anchor association vector and constructs an odd-numbered association vector, Substep S322 extracts word associations with even numbers in the keyword-anchor association vector and constructs an even-numbered association vector, Substep S323 generates odd-numbered dynamic disturbance coefficients based on odd-numbered association vectors, The process includes a substep S324 that generates even dynamic disturbance coefficients based on even-numbered association vectors.

[0010] Furthermore, the formula for generating the odd dynamic disturbance coefficient in S323 is as follows: The formula for generating the even dynamic disturbance coefficient in JPEG0007834944000002.jpg9170JPEG0007834944000003.jpg19170S324 is as follows: JPEG0007834944000004.jpg8170JPEG0007834944000005.jpg19170

[0011] Furthermore, the S33 is Substep S331 involves multiplying the keyword frequency by the keyword-anchor association vector to obtain a frequency association weighting vector, Substep S332 involves adding the frequency-related weighting vector and the odd dynamic disturbance coefficient, and then performing an integer conversion to obtain the first key seed subvector. Substep S333 involves converting each element in the first key seed subvector into binary to obtain the first encryption key, Substep S334 involves adding the frequency-related weighting vector and the even dynamic disturbance coefficient, and then performing an integer conversion to obtain a second key seed subvector. The process includes a substep S335 in which each element in the second key seed subvector is converted to a binary number to obtain a second encryption key.

[0012] Furthermore, S4 is, Substep S41 divides the initial encrypted text into multiple blocks to be encrypted, Substep S42 generates a block-level cipher corresponding to the block to be encrypted, based on the block number to be encrypted, the sentence-anchor association vector, and the total frequency of keywords in the sentence. Substep S43 involves configuring a block-level cipher belonging to the same block to be encrypted as a block-level encryption key, A sub-step S44 of obtaining a block-level encryption vector by performing an XOR operation on a block-level encryption key and a block to be encrypted corresponding thereto, including a sub-step S45 of stitching the encryption vectors at each block level according to the corresponding block positions to be encrypted to obtain a sentence-level encryption code vector.

[0013] Furthermore, the calculation formula for the block-level encryption in S42 is as follows: JPEG0007834944000006.jpg7170JPEG0007834944000007.jpg18170JPEG0007834944000008.jpg14170

[0014] Furthermore, S5 includes a sub-step S51 of using the similarity of the sentence-anchor related vectors of adjacent sentences as a coupling coefficient, a sub-step S52 of dividing the sentence-level encryption code vector of the previous sentence into binary numbers with 8 bits in each group and converting each group into a decimal number to obtain a sentence-level encryption numerical vector of the previous sentence, a sub-step S53 of multiplying the coupling coefficient and the sentence-level encryption numerical vector of the previous sentence to obtain a cross-sentence coupling key, and a sub-step S54 of performing an XOR operation on the cross-sentence coupling key and the sentence-level encryption code vector of the current sentence to obtain a sentence-depth encryption vector, and constructing each sentence-depth encryption vector as an encrypted document.

[0015] Furthermore, the calculation formula for the cross-sentence coupling key is as follows: JPEG0007834944000009.jpg717JPEG0007834944000010.jpg25170

Advantages of the Invention

[0016] The beneficial effects of the present invention are as follows.

[0017] 1. This invention uses high-frequency keywords in a document as anchor words, constructs a relation vector based on the word frequency ratio and word relation relationship between the keyword and the anchor word, generates odd and even dynamic disturbance coefficients, and generates a corresponding encryption key in conjunction with the keyword frequency, thereby deeply binding the key generation with the content features of the document. Instead of using a unified fixed key, the encryption key corresponding to each keyword is dynamically adjusted according to the relation attribute between itself and the anchor word, fundamentally avoiding the risk of the entire document being decrypted after the key is leaked, and enhancing the security and decryption resistance of the key itself.

[0018] 2. The present invention implements three levels of encryption processing: keyword level, sentence block level, and sentence-crossing linked level. First, keyword encryption is completed using a dynamic key to obtain an initial encrypted sentence. Then, blocks are divided based on sentence-anchor association vectors, block-level keys are generated, and encryption is performed on each block within the sentence. Finally, linked encryption of sentence-level encryption code vectors is achieved using a sentence-crossing linked key. This layered encryption mode makes the encryption process more precise, and each layer uses encryption logic that is suited to the content characteristics of the corresponding layer, forming a multi-layered protective barrier. This prevents the entire encryption from becoming invalid after a single encryption rule is cracked, thereby increasing the stability of the encryption system.

[0019] 3. The entire encryption process is based on content characteristics such as keyword frequency, sentence and anchor word relationships within the document itself. Each stage, including key generation, block partitioning, encryption, and linked encryption, depends on document-specific attributes, dynamically changing the encryption rules along with the document content. This deeply content-bound encryption method significantly increases the difficulty for attackers to uncover the encryption rules through statistical analysis, violent decryption, and other methods, effectively avoiding the problem of fixed encryption rules being easily cracked and further enhancing the overall security of text encryption. [Brief explanation of the drawing]

[0020] [Figure 1]This is a flowchart of information encryption methods. [Modes for carrying out the invention]

[0021] Specific embodiments of the present invention are described below to facilitate understanding for those skilled in the art. However, the present invention is not limited to the forms for carrying out the invention, and it will be clear to those skilled in the art that any variations are within the spirit and scope of the invention as defined by the appended claims, and that any inventive creation utilizing the concept of the present invention is protected.

[0022] Example 1, as shown in Figure 1, is an information encryption method, and this method is Step S1 involves statistically analyzing the frequency of each keyword in the document and selecting the most frequently occurring keywords as anchor words. Step S2 involves extracting each keyword from each sentence and constructing a sentence-anchor relationship vector and a keyword-anchor relationship vector based on the word frequency ratio and word relationship between each keyword and the anchor word. Step S3 involves generating odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, associating them with keyword frequencies to generate corresponding encryption keys, encrypting the keywords, and obtaining an initial encrypted text. Step S4 involves dividing the initial encrypted sentence into blocks based on the sentence-anchor association vector, generating a block-level encryption key, and performing encryption and stitching on each block to be encrypted to obtain a sentence-level encryption code vector. The process includes step S5, which involves obtaining a cross-sentence linked key for a sentence-level encryption code vector, performing linked encryption on each sentence-level encryption code vector in the document, and obtaining an encrypted document.

[0023] In this embodiment, the R keywords with the highest frequency of occurrence in the document are used as anchor words, where R is a positive integer and its value is 10 or greater.

[0024] In this embodiment, S2 is Substep S21 involves adding up the frequencies of each anchor word to obtain the total anchor word frequency, Substep S22 involves defining the word frequency ratio as the ratio of the frequency of each keyword in a sentence to the total anchor word frequency, and constructing the word frequency ratios belonging to the same sentence as a sentence-anchor relationship vector. The process includes a substep S23 in which the similarity between the vector of each keyword in a sentence and the vector of the anchor word is defined as a word association, and word associations belonging to the same keyword are constructed as a keyword-anchor association vector.

[0025] JPEG0007834944000011.jpg30170

[0026] JPEG0007834944000012.jpg29170

[0027] In this embodiment, the keyword vector and anchor word vector are vectors obtained by encoding the keywords in the text, and the encoding scheme includes ASCII encoding and UTF-8 encoding.

[0028] In S23, if the lengths of the two vectors do not match, 0 is used for interpolation.

[0029] In this example, all similarity calculations use cosine similarity.

[0030] In this embodiment, S3 is Substep S31 involves dividing the keyword vector into two parts to obtain a first keyword subvector and a second keyword subvector, Substep S32 generates odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, Substep S33 generates a first encryption key and a second encryption key by multiplying the keyword frequency by the keyword-anchor association vector and incorporating odd dynamic disturbance coefficients and even dynamic disturbance coefficients, respectively. Substep S34 involves performing an XOR operation on the first encryption key and the first keyword subvector to obtain the first cipherword vector, Substep S35 involves performing an XOR operation on the second encryption key and the second keyword subvector to obtain the second cipherword vector, Substep S36 involves stitching together the first cipherword vector and the second cipherword vector to obtain the target cipherword vector, The process includes a substep S37 in which the target cipherword vector is replaced with a vector of keywords corresponding to the sentence to obtain an initial ciphertext.

[0031] In this embodiment, the lengths of the first keyword subvector and the second keyword subvector are the same.

[0032] This invention generates odd and even dynamic disturbance coefficients differentiated by keyword-anchor association vectors, constructs a corresponding dual encryption key linked to keyword frequencies, and completes the encryption replacement of keyword vectors by dividing the keyword vectors into blocks, then encrypting each block using XOR and stitching, thereby forming an initial encrypted text, deeply binding the generation of encryption keys with the keyword features of the document itself, and realizing keyword-level dynamic encryption. Furthermore, the accuracy of keyword vector encryption is enhanced by the block-specific XOR and stitching encryption method.

[0033] In this embodiment, S32 is Substep S321 extracts word associations with odd numbers in the keyword-anchor association vector and constructs an odd-numbered association vector, Substep S322 extracts word associations with even numbers in the keyword-anchor association vector and constructs an even-numbered association vector, Substep S323 generates odd-numbered dynamic disturbance coefficients based on odd-numbered association vectors, The process includes a substep S324 that generates even dynamic disturbance coefficients based on even-numbered association vectors.

[0034] In this example, the formula for generating the odd dynamic disturbance coefficient in S323 is as follows: The formula for generating the even dynamic disturbance coefficient in JPEG0007834944000013.jpg8170JPEG0007834944000014.jpg19170S324 is as follows: JPEG0007834944000015.jpg7170JPEG0007834944000016.jpg19170

[0035] This invention divides a keyword-anchor association vector by number parity to obtain two types of sub-vectors, and generates differentiated odd and even dynamic disturbance coefficients by linking word-associated numerical values ​​within the vectors with random number weighted sums of different intervals. The generation of disturbance coefficients anchors the keyword semantic association features of the document itself and introduces dynamic variability to the random numbers, thereby avoiding solidification of the disturbance coefficients. Furthermore, the odd and even vectors correspond to the design of different random number intervals, creating a degree of distinction for the two types of disturbance coefficients.

[0036] In this embodiment, S33 is Substep S331 involves multiplying the frequency of the keyword in the document by the keyword-anchor association vector to obtain a frequency association weighting vector, Substep S332 involves adding the frequency-related weighting vector and the odd dynamic disturbance coefficient, and then performing an integer conversion to obtain the first key seed subvector. Substep S333 involves converting each element in the first key seed subvector into binary to obtain the first encryption key, Substep S334 involves adding the frequency-related weighting vector and the even dynamic disturbance coefficient, and then performing an integer conversion to obtain a second key seed subvector. The process includes a substep S335 in which each element in the second key seed subvector is converted to a binary number to obtain a second encryption key.

[0037] In this embodiment, the expression for obtaining the first key seed subvector is as follows: JPEG0007834944000017.jpg6170JPEG0007834944000018.jpg25170

[0038] The expression for obtaining the second key seed subvector is as follows: JPEG0007834944000019.jpg6170JPEG0007834944000020.jpg12170

[0039] This invention deeply incorporates the keyword frequencies, semantic-related features, and dynamic disturbance factors of a document into the generation of an encryption key by weighting and linking keyword frequencies and keyword-anchor association vectors, incorporating differentiated odd and even dynamic disturbance coefficients, generating a key seed subvector through expansion, rounding, and modulo operations, and further converting it to binary to obtain a dual encryption key.

[0040] JPEG0007834944000021.jpg12170

[0041] In this embodiment, if the length of the encryption key and the keyword subvector do not match in S34 and S35, and the length of the encryption key (first / second encryption key) is smaller than the length of the corresponding keyword subvector, the encryption keys are stitched together sequentially and cyclically until the length of the stitched key matches the length of the keyword subvector, and then the XOR operation is performed.

[0042] When the length of the encryption key (first / second encryption key) is greater than the length of the corresponding keyword subvector, the first C bits of the encryption key (where C is the length of the keyword subvector) are truncated, the portion matching the length of the keyword subvector is reserved, and then the XOR operation is performed. During the XOR operation, it is ensured that the encryption key and each element of the keyword subvector participate in the XOR operation in a one-to-one correspondence, based on the length of the keyword subvector.

[0043] In this embodiment, S4 is Substep S41 divides the initial encrypted text into multiple blocks to be encrypted, Substep S42 generates a block-level cipher corresponding to the block to be encrypted, based on the block number to be encrypted, the sentence-anchor association vector, and the total frequency of keywords in the sentence. JPEG0007834944000022.jpg25170 is the nth block-level cipher corresponding to the nth block to be encrypted, where N is the number of block-level ciphers in substep S43. Substep S44 involves performing an XOR operation on the block-level encryption key and the corresponding block to be encrypted to obtain a block-level encryption vector, The process includes a substep S45 in which each block-level encryption vector is stitched together according to the corresponding block position to be encrypted to obtain a sentence-level encryption code vector.

[0044] In this embodiment, the encoding corresponding to the initial encrypted message is divided into multiple blocks to be encrypted.

[0045] In this embodiment, the formula for calculating the block-level encryption in S42 is as follows: JPEG0007834944000023.jpg7170JPEG0007834944000024.jpg31170

[0046] In this invention, M block-level ciphers are obtained by the calculation formula for block-level ciphers in step S42, the M block-level ciphers are arranged in order to form an initial block-level encryption key, if the length of the initial block-level encryption key is insufficient, the initial block-level encryption key is stitched repeatedly in order until the length of the stitched key matches the block length to be encrypted, and if the length is too long, the first few block-level ciphers of the initial block-level encryption key are taken so that the key matches the block length to be encrypted.

[0047] The total frequency of keywords in a sentence refers to how often each keyword appears in the document.

[0048] This invention involves multiplying the frequency ratio of each word in the sentence-anchor association vector by the corresponding number of the block to be encrypted, adding the total frequency of the sentence, performing a modulo calculation on 2 to obtain a block-level cipher, arranging the block-level ciphers belonging to the same block to be encrypted in order to obtain a block-level encryption key.

[0049] This invention uses a sentence-anchor association vector as its core, multiplies the number of the block to be encrypted by the sentence-anchor association vector, ensures that each block to be encrypted has a unique block-level encryption key, adds the total frequency of the sentences, and deeply associates the key of the encrypted sentence with the sentence.

[0050] This invention deeply binds sentence-level encryption processing to content features of the document itself, such as word frequency ratios and total keyword frequencies, and associates it with the block number to be encrypted to achieve differentiated generation of block-level encryption keys. This ensures that sentence-level encryption is accurate in matching sentence features, subdivides the granularity of sentence-level encryption through block-based encryption, and guarantees consistency between block-level encryption logic and pre-sentence keyword-level encryption.

[0051] In this embodiment, S5 is Substep S51 involves using the similarity of the sentence-anchor association vectors of adjacent sentences as the linkage coefficient, and if the lengths are different, interpolating with 0 to make the lengths of the sentence-anchor association vectors of adjacent sentences match. Substep S52 involves dividing the sentence-level encrypted code vector of the previous sentence into binary numbers of 8 bits each, converting each group to a decimal number, and obtaining a sentence-level encrypted numerical vector of the previous sentence. Substep S53 involves multiplying the linkage coefficient by the sentence-level encrypted numerical vector of the previous sentence to obtain a cross-sentence linkage key, The process includes a substep S54 in which a cross-sentence linked key and the sentence-level encryption code vector of the current sentence are XORed to obtain a sentence-depth encryption vector, and each sentence-depth encryption vector is configured as an encrypted document.

[0052] In S52, if the last group is less than 8 bits during splitting, zeros are used to interpolate and each element in the sentence-level encrypted numeric vector is made a decimal number. In S54, if the length of the inter-sentence linked key is insufficient, the inter-sentence linked keys are stitched together cyclically in sequence until the length of the stitched key matches the length of the sentence-level encrypted code vector of the current sentence. If the length is too long, the first few codes of the inter-sentence linked key are taken and adjusted so that the key matches the length of the sentence-level encrypted code vector of the current sentence.

[0053] In this embodiment, the calculation formula for the inter-text linked key is as follows: JPEG0007834944000025.jpg7170JPEG0007834944000026.jpg25170

[0054] This invention constructs a linkage coefficient from the similarity of sentence-anchor association vectors of adjacent sentences, generates a cross-sentence linkage key by associating it with the sentence-level encrypted numerical vector of the previous sentence, and achieves deep cross-sentence encryption of the current sentence through XOR processing. It extends document encryption from a single-sentence hierarchy to a cross-sentence linkage hierarchy, deeply binds content-related features between encryption logic and sentences in a document, realizes document-level stepwise encryption, guarantees the feasibility of cross-sentence encryption operations, ensures that each sentence in an encrypted document forms an encryption association with the previous sentence, further enhances the integrity and security of whole-document encryption, and improves the multi-layer encryption system from the keyword level and sentence block level to the cross-sentence level.

[0055] Example 2, an information encryption system, the information encryption system includes an anchor word selection unit, an association vector construction unit, a sentence initial encryption unit, a sentence secondary encryption unit, and an interlocking encryption unit. The anchor word selection unit statistically analyzes the frequency of each keyword in the document and uses the most frequently occurring keywords as anchor words. The association vector construction unit is used to extract each keyword in each sentence and construct sentence-anchor association vectors and keyword-anchor association vectors based on the word frequency ratio and word relationships between each keyword and the anchor word. The initial sentence encryption unit is used to generate odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, associate them with keyword frequencies to generate corresponding encryption keys, and encrypt the keywords to obtain the initial encrypted sentence. The sentence-level encryption unit is used to divide the initial encrypted sentence into blocks based on the sentence-anchor association vector, generate block-level encryption keys, and perform encryption and stitching on each block to be encrypted to obtain a sentence-level encryption code vector. The linked encryption unit is used to obtain a linked key across sentences for each sentence-level encryption code vector in a document, and then to perform linked encryption on each sentence-level encryption code vector in the document to obtain an encrypted document.

[0056] The specific implementation process for Example 2 is the same as that for Example 1.

[0057] Example 3 is an information encryption device, which includes a processor and a computer program, the computer program being executed by the processor to implement the contents of Example 1.

[0058] Example 4 is an information encryption medium on which a computer program is stored, and the computer program is executed by a processor to realize the contents of Example 1.

[0059] This invention uses high-frequency keywords in a document as anchor words, constructs a relation vector based on the word frequency ratio and word relationship between the keyword and the anchor word, generates odd and even dynamic disturbance coefficients, and generates a corresponding encryption key in conjunction with the keyword frequency, thereby deeply binding the key generation with the content features of the document. Instead of using a unified fixed key, the encryption key corresponding to each keyword is dynamically adjusted according to the relation attribute between itself and the anchor word, fundamentally avoiding the risk of the entire document being decrypted after the key is leaked, and enhancing the security and decryption resistance of the key itself.

[0060] This invention implements a three-level encryption process: keyword level, sentence block level, and inter-sentence linked level. First, keyword encryption is completed using a dynamic key to obtain an initial encrypted sentence. Then, blocks are divided based on sentence-anchor association vectors, block-level keys are generated, and encryption is performed on each block within the sentence. Finally, inter-sentence linked encryption of the sentence-level encryption code vectors is achieved using an inter-sentence linked key. This layered encryption mode makes the encryption process more precise, and each layer uses encryption logic that matches the content characteristics of the corresponding layer to form a multi-layered protective barrier. This prevents the entire encryption from becoming invalid after a single encryption rule is cracked, thereby increasing the stability of the encryption system.

[0061] The entire encryption process is based on content characteristics such as keyword frequency, sentence and anchor word relationships within the document itself. Each stage, including key generation, block partitioning, encryption, and linked encryption, depends on document-specific attributes, dynamically changing the encryption rules along with the document content. This deeply content-bound encryption method significantly increases the difficulty for attackers to uncover the encryption rules through statistical analysis, violent decryption, and other methods, effectively avoiding the problem of fixed encryption rules being easily cracked and further enhancing the overall security of text encryption.

[0062] The foregoing are merely preferred embodiments of the present invention and are not intended to limit it. To those skilled in the art, the present invention is subject to various modifications and changes. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should all be within the scope of protection of the present invention.

Claims

1. A method for encrypting information performed by a processor, Step S1 involves statistically analyzing the frequency of each keyword in the document and selecting the multiple keywords with the highest frequency as anchor words. Step S2 involves extracting each keyword from each sentence and constructing a sentence-anchor relationship vector and a keyword-anchor relationship vector based on the word frequency ratio and word relationship between each keyword and the anchor word. Step S3 involves generating odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, generating corresponding encryption keys by associating them with keyword frequencies, encrypting the keywords, and obtaining an initial encrypted text. Step S4 involves dividing the initial encrypted sentence into blocks based on the sentence-anchor association vector, generating a block-level encryption key, and performing encryption and stitching on each block to be encrypted to obtain a sentence-level encryption code vector. An information encryption method characterized by including step S5, which involves obtaining a cross-sentence linked key for a sentence-level encryption code vector, and performing linked encryption on each sentence-level encryption code vector in the document to obtain an encrypted document.

2. The aforementioned S2 is, Substep S21 involves adding up the frequencies of each anchor word to obtain the total anchor word frequency, Substep S22 involves defining the word frequency ratio as the ratio of the frequency of each keyword in a sentence to the total anchor word frequency, and constructing the word frequency ratios belonging to the same sentence as a sentence-anchor relationship vector. The information encryption method according to claim 1, characterized in that it includes a substep S23 in which the similarity between the vector of each keyword in a sentence and the vector of the anchor word is defined as a word association, and word associations belonging to the same keyword are configured as keyword-anchor association vectors.

3. The aforementioned S3 is, Substep S31 involves dividing the keyword vector into two parts to obtain a first keyword subvector and a second keyword subvector, Substep S32 generates odd-numbered and even-numbered dynamic disturbance coefficients based on keyword-anchor-related vectors, Substep S33 involves multiplying the keyword frequency by the keyword-anchor association vector and incorporating odd dynamic disturbance coefficients and even dynamic disturbance coefficients, respectively, to generate a first encryption key and a second encryption key. Substep S34 involves performing an XOR operation on the first encryption key and the first keyword subvector to obtain the first cipherword vector, Substep S35 involves performing an XOR operation on the second encryption key and the second keyword subvector to obtain the second cipherword vector, Substep S36 involves stitching together the first cipherword vector and the second cipherword vector to obtain the target cipherword vector, The information encryption method according to claim 1, characterized by including a substep S37 of replacing a target cipherword vector with a vector of keywords corresponding to a sentence to obtain an initial ciphertext.

4. The aforementioned S32 is, Substep S321 extracts word associations with odd numbers in the keyword-anchor association vector and constructs an odd-numbered association vector, Substep S322 extracts word associations with even numbers in the keyword-anchor association vector and constructs an even-numbered association vector, Substep S323 generates odd-numbered dynamic disturbance coefficients based on odd-numbered related vectors, The information encryption method according to claim 3, further comprising a substep S324 that generates even dynamic disturbance coefficients based on even-numbered association vectors.

5. The formula for generating the odd dynamic disturbance coefficient in S323 is as follows: The formula for generating the even dynamic disturbance coefficient in S324 is as follows:

6. The aforementioned S33 is, Substep S331 involves multiplying the keyword frequency by the keyword-anchor association vector to obtain a frequency association weighting vector, Substep S332 involves adding the frequency-related weighting vector and the odd dynamic disturbance coefficient, and then performing an integer conversion to obtain the first key seed subvector. Substep S333 involves converting each element in the first key seed subvector into binary to obtain the first encryption key, Substep S334 involves adding the frequency-related weighting vector and the even dynamic disturbance coefficient, performing an integer conversion, and obtaining a second key seed subvector. The information encryption method according to claim 3, characterized by including a substep S335 of converting each element in the second key seed subvector into a binary number to obtain a second encryption key.

7. The aforementioned S4 is, Substep S41 divides the initial encrypted text into multiple blocks to be encrypted, Substep S42 generates a block-level cipher corresponding to the block to be encrypted, based on the block number to be encrypted, the sentence-anchor association vector, and the total frequency of keywords in the sentence. Substep S43 involves configuring a block-level cipher belonging to the same block to be encrypted as a block-level encryption key, Substep S44 involves performing an XOR operation on the block-level encryption key and the corresponding block to be encrypted to obtain a block-level encryption vector, The information encryption method according to claim 1, further comprising substep S45, which involves stitching together each block-level encryption vector according to the corresponding block position to be encrypted to obtain a sentence-level encryption code vector.

8. The formula for calculating the block-level encryption in S42 is as follows:

9. The aforementioned S5 is, Substep S51, in which the similarity of the sentence-anchor relationship vectors of adjacent sentences is used as the linkage coefficient, Substep S52 involves dividing the sentence-level encrypted code vector of the previous sentence into binary numbers with 8 bits per group, converting each group to a decimal number, and obtaining a sentence-level encrypted numerical vector of the previous sentence. Substep S53 involves multiplying the linkage coefficient by the sentence-level encrypted numerical vector of the previous sentence to obtain a cross-sentence linkage key, The information encryption method according to claim 1, further comprising substep S54, which involves performing an XOR operation on a cross-sentence linked key and a sentence-level encryption code vector of the current sentence to obtain a sentence-depth encryption vector, and configuring each sentence-depth encryption vector as an encrypted document.

10. The calculation formula for the inter-text linked key is as follows:

11. An information encryption system, implemented based on the information encryption method described in any one of claims 1 to 10, comprising an anchor word selection unit, an association vector construction unit, a sentence initial encryption unit, a sentence secondary encryption unit, and an interlocking encryption unit, The anchor word selection unit statistically analyzes the frequency of each keyword in the document and uses the most frequently occurring keywords as anchor words. The association vector construction unit is used to extract each keyword in each sentence and construct sentence-anchor association vectors and keyword-anchor association vectors based on the word frequency ratio and word relationships between each keyword and the anchor word. The initial sentence encryption unit is used to generate odd and even dynamic disturbance coefficients based on keyword-anchor association vectors, associate them with keyword frequencies to generate corresponding encryption keys, and encrypt the keywords to obtain the initial encrypted sentence. The sentence-level encryption unit is used to divide the initial encrypted sentence into blocks based on the sentence-anchor association vector, generate block-level encryption keys, and perform encryption and stitching on each block to be encrypted to obtain a sentence-level encryption code vector. An information encryption system characterized in that the linked encryption unit is used to obtain a cross-sentence linked key for a sentence-level encryption code vector, and to perform linked encryption on each sentence-level encryption code vector in a document in order to obtain an encrypted document.

12. An information encryption device comprising a processor and a computer program, wherein the computer program is executed by the processor to realize the information encryption method described in any one of claims 1 to 10.

13. An information encryption medium in which a computer program is stored, wherein the computer program is executed by a processor to realize the information encryption method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and system for encrypting and storing spreadsheet and medium

    CN114676142A

  • Electronic document processing method and device, equipment and medium

    CN115408542A