Mail processing method and apparatus

By calculating the encoded value and encrypting the email blocks with random numbers, combined with hiding the layout tag sequence, the security issues in email communication are solved, and the accuracy and convenience of email verification are improved.

CN118900263BActive Publication Date: 2025-11-07CHINA MOBILE INTERNET CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411099859.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-11-07
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

There is a risk that keys may be maliciously replaced or tampered with during the key distribution process in existing email communications, resulting in low security for email verification.

Method used

By calculating the encoded values ​​of multiple email blocks in the initial email, constructing an encoding matrix and encrypting it, using random numbers to securely hide the encrypted matrix, writing it into a layout tag sequence, generating an intermediate email, and further hiding it according to a specific number of layout tags, the security of the email blocks is improved.

Benefits of technology

This technology enhances the security of email blocks from multiple dimensions, improves the security of email communication, and facilitates the accuracy and effectiveness of subsequent email verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900263B_ABST
    Figure CN118900263B_ABST
Patent Text Reader

Abstract

An embodiment of the specification provides a mail processing method and device, the method comprising: performing encoding value calculation on a plurality of mail blocks of an initial mail to obtain an encoding value of each mail block, performing matrix construction using the encoding value of each mail block to obtain an encoding matrix, performing encryption processing on the encoding matrix according to a random number to obtain an encrypted matrix, and writing a layout label sequence corresponding to each mail block of the encrypted matrix into each mail block to obtain an intermediate mail; and in combination with the random number and the number of specific layout labels in the intermediate mail, performing writing processing of the specific layout labels in the intermediate mail to obtain a target mail. The embodiment of the application can improve the communication security of the mail.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present document relates to the technical field of data processing, and particularly relates to a mail processing method and device. BACKGROUND

[0002] With the continuous development of Internet technology, mail gradually becomes an important communication channel, and in the process of information communication through mail, the mail content may be maliciously tampered with, so that the mail receiver cannot obtain the real mail content, and the mail receiver is difficult to verify the mail after receiving the mail.

[0003] At present, in the process of information transmission through mail, the key is often used to achieve the purpose of mail verification, specifically, the hash value of the mail is digitally signed by the private key, the mail and the signed hash value are sent to the mail receiver, the mail receiver decrypts the hash value through the public key, and compares the hash value obtained based on the mail to determine whether the mail is tampered with. Since there is still a risk of malicious replacement or tampering in the key distribution process, the mail verification through the key makes the security of mail communication lower. SUMMARY

[0004] An embodiment of the present specification aims to provide a mail processing method and device to solve the technical problem of how to improve the communication security of mail.

[0005] To solve the above technical problems, an embodiment of the present specification is implemented as follows:

[0006] In a first aspect, an embodiment of the present specification provides a mail processing method, the method comprising:

[0007] Calculating the encoding value of each mail block of the initial mail to obtain the encoding value of each mail block;

[0008] Constructing a matrix based on the encoding value of each mail block to obtain an encoding matrix, and encrypting the encoding matrix according to a pre-generated random number to obtain an encrypted matrix;

[0009] Determining the layout label sequence of each mail block corresponding to the encrypted matrix, and writing the layout label sequence into each mail block to obtain an intermediate mail;

[0010] According to the random number and the number of specific layout labels in the intermediate mail, writing the specific layout labels in the intermediate mail to obtain a target mail.

[0011] The mail processing method provided by the embodiment first performs encoding value calculation on a plurality of mail blocks of an initial mail to obtain an encoding value of each mail block in the plurality of mail blocks, converts the encoding value of each mail block into an encoding matrix, encrypts the encoding matrix by using a random number generated in advance to obtain an encrypted matrix, and thereby realizes encryption of the encoding value of each mail block and enhances the security of the mail block. Secondly, a layout label sequence of each mail block corresponding to the encrypted matrix is written into each mail block to obtain an intermediate mail, and thereby the encoding value of each mail block is safely hidden in each mail block, and the security of each mail block is further improved. On this basis, according to the random number and the number of specific layout labels in the intermediate mail, a specific layout label writing process is performed on the intermediate mail to obtain a target mail. By writing the specific layout label into the intermediate mail, the random number is safely hidden in the intermediate mail. Through matrix encryption, safe hiding of the encoding value, and safe hiding of the random number, safe hiding of the encoding value of each mail block is realized from multiple different dimensions, and it is not easy for a third party to identify or realize, the communication security of the mail is improved, a safe basis is provided for subsequent mail checking, and the convenience of subsequent mail checking is improved.

[0012] In a second aspect, another embodiment of the present specification provides another mail processing method, which comprises:

[0013] Determining the number of specific layout labels in the target mail, and calculating a random number based on the number;

[0014] Identifying the layout label sequence of each mail block in the target mail, and performing matrix construction based on the layout label sequence of each mail block to obtain an encrypted matrix;

[0015] Decrypting the encrypted matrix according to the random number to obtain a decrypted matrix, and performing encoding value conversion on the decrypted matrix to obtain the encoding value of each mail block;

[0016] Performing encoding value calculation on each mail block after the layout label sequence is deleted, and performing checking processing on each mail block according to the encoding value and the calculated encoding value.

[0017] The mail processing method provided by the embodiment is based on the number of specific layout tags in the target mail to calculate a random number, and identifies the layout tag sequence of each mail block in the target mail. The layout tag sequence of each mail block is used to construct a matrix to obtain an encryption matrix. The encryption matrix is decrypted based on the random number to obtain a decryption matrix. The decryption matrix is converted into the encoding values of each mail block. The encoding values of each mail block after the deletion of the layout tag sequence are calculated. Each mail block is checked based on the encoding values of each mail block and the calculated encoding values. In this way, the random number is restored through the specific layout tag, and the encoding values of each mail block are restored through the random number. The real encoding values of each mail block in the target mail can be conveniently restored. Each mail block is checked to improve the effectiveness and accuracy of the checking result of each mail block.

[0018] In a third aspect, another embodiment of the present specification provides a mail processing device, which comprises:

[0019] An encoding value calculation module is configured to calculate the encoding values of the mail blocks of the initial mail to obtain the encoding values of each mail block.

[0020] A matrix construction module is configured to construct a matrix based on the encoding values of each mail block to obtain an encoding matrix, and encrypt the encoding matrix based on a pre-generated random number to obtain an encryption matrix.

[0021] A tag sequence writing module is configured to determine the layout tag sequence of each mail block corresponding to the encryption matrix, and write the layout tag sequence into each mail block to obtain an intermediate mail.

[0022] A tag writing module is configured to write a specific layout tag into the intermediate mail based on the random number and the number of specific layout tags in the intermediate mail to obtain a target mail.

[0023] In a fourth aspect, another embodiment of the present specification provides another mail processing device, which comprises:

[0024] A random number calculation module is configured to determine the number of specific layout tags in a target mail, and calculate a random number based on the number.

[0025] A tag sequence identification module is configured to identify the layout tag sequence of each mail block in the target mail, and construct a matrix based on the layout tag sequence of each mail block to obtain an encryption matrix.

[0026] A decryption processing module is configured to decrypt the encryption matrix based on the random number to obtain a decryption matrix, and convert the decryption matrix into the encoding values of each mail block.

[0027] The checking processing module is configured to calculate the encoding values of each mail block after the layout tag sequence is deleted, and perform checking processing on each mail block according to the encoding values and the calculated encoding values.

[0028] In a fifth aspect, another embodiment of the present specification provides a mail processing device, which comprises a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, and when the computer executable instructions are executed by the processor, the steps of the mail processing method according to the first aspect are implemented.

[0029] In a sixth aspect, another embodiment of the present specification provides another mail processing device, which comprises a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, and when the computer executable instructions are executed by the processor, the steps of the mail processing method according to the second aspect are implemented.

[0030] In a seventh aspect, another embodiment of the present specification provides a computer readable storage medium for storing computer executable instructions, and when the computer executable instructions are executed by a processor, the steps of the mail processing method according to the first aspect are implemented.

[0031] In an eighth aspect, another embodiment of the present specification provides another computer readable storage medium for storing computer executable instructions, and when the computer executable instructions are executed by a processor, the steps of the mail processing method according to the second aspect are implemented.

[0032] In a ninth aspect, another embodiment of the present specification provides a computer program product comprising a mail processing program, and when the mail processing program is executed by a processor, the steps of the mail processing method according to the first aspect are implemented.

[0033] In a tenth aspect, another embodiment of the present specification provides another computer program product comprising a mail processing program, and when the mail processing program is executed by a processor, the steps of the mail processing method according to the second aspect are implemented. BRIEF DESCRIPTION OF DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of one or more embodiments of the present specification or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0035] Figure 1 A mail processing method processing flowchart provided for an embodiment of the present specification;

[0036] Figure 2 A mail processing method processing flowchart applied to a mail encryption scenario provided for an embodiment of the present specification;

[0037] Figure 3 Another mail processing method processing flowchart provided for an embodiment of the present specification;

[0038] Figure 4 A mail processing method processing flowchart applied to a mail decryption scenario provided for an embodiment of the present specification;

[0039] Figure 5 A mail processing device schematic diagram provided for an embodiment of the present specification;

[0040] Figure 6 Another mail processing device schematic diagram provided for an embodiment of the present specification;

[0041] Figure 7 A mail processing device structure schematic diagram provided for an embodiment of the present specification;

[0042] Figure 8 Another mail processing device structure schematic diagram provided for an embodiment of the present specification. DETAILED DESCRIPTION

[0043] In order to enable personnel in the technical field to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be described clearly and completely in conjunction with the drawings in one or more embodiments of the present specification. Obviously, the described embodiments are only a part of the embodiments of the present specification, rather than all the embodiments. Based on one or more embodiments of the present specification, all other embodiments obtained by those skilled in the art without creative labor should belong to the protection scope of the present document.

[0044] The mail processing method provided by the present specification is as follows:

[0045] The mail processing method provided by the present embodiment can be executed by a computer device, which can be a terminal or a server. The terminal can include a mobile phone, a notebook computer, a smart interactive device, etc. The server can include a standalone physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.

[0046] Reference Figure 1The mail processing method provided in the embodiment specifically comprises the following steps S102 to S108.

[0047] In step S102, the encoding value of each mail block of the initial mail is calculated.

[0048] The mail in the embodiment refers to an email. The mail can be a mail body, i.e., mail body content. In addition, the mail can be an entire mail including a mail header, a mail body and an attachment, i.e., a global mail. The mail in the embodiment can be a mail including any content. The mail can be a text mail or a rich text mail. The specific content of the mail is not limited in the embodiment. The initial mail includes an initial mail body and an initial global mail. The initial mail can be obtained by identifying and deleting the empty layout tags in the mail to be processed.

[0049] The multiple mail blocks of the initial mail include multiple mail blocks obtained by block processing of the initial mail, i.e., the initial mail is divided into multiple mail parts. For example, the initial mail is block processed to obtain x mail blocks. In an optional embodiment provided in the embodiment, the multiple mail blocks of the initial mail are obtained by the following method.

[0050] The mail to be processed is obtained, and the empty layout tags in the mail to be processed are identified.

[0051] The empty layout tags in the mail to be processed are deleted to obtain the initial mail. The initial mail is block processed to obtain the multiple mail blocks.

[0052] The empty layout tags in the mail to be processed can be empty content tags or self-closing tags. For example, the empty layout tags can be 、 、 <hr> 、 <area> and the like. By removing the empty layout tags in the mail to be processed, the subsequent mail encryption process is prevented from being disturbed, the efficiency of mail encryption is improved, and by block processing the initial mail, the convenience of subsequent encryption of the encoding values of the multiple mail blocks is achieved, and the comprehensiveness and effectiveness of mail encryption are improved.

[0053] Specifically, in the process of block processing the initial mail to obtain the plurality of mail blocks, the initial mail can be block processed according to a preset block number to obtain a plurality of mail blocks; the preset block number can be a multiple of a preset value, for example, the preset value is 8, and the preset block number can be a multiple of 8. In addition, in the process of block processing the initial mail to obtain the plurality of mail blocks, the initial mail can also be block processed according to a random block number to obtain a plurality of mail blocks; the random block number refers to a randomly generated number for block processing.

[0054] The encoding value of each mail block described in the embodiment includes the hash value or the hash value of each mail block. The encoding value of each mail block can be an encoding string, specifically a fixed-length encoding string. For example, the encoding value of each mail block can be the MD (Message-Digest Algorithm) 5 value of each mail block, and the MD5 value is a 32-bit hexadecimal number. The hash value of each mail block can be obtained by inputting each mail block into a hash function for hash value calculation.

[0055] Step S104, based on the encoding value of each mail block, a matrix is constructed to obtain an encoding matrix, and the encoding matrix is encrypted according to a random number generated in advance to obtain an encrypted matrix.

[0056] The above-mentioned encoding value calculation from the plurality of mail blocks of the initial mail obtains the encoding value of each mail block in the plurality of mail blocks. In this step, the encoding value of each mail block is converted into an encoding matrix, and the encoding matrix is encrypted using a random number generated in advance to obtain an encrypted matrix. In this way, the encoding matrix constructed by the encoding value is encrypted by the random number, and the data security of each mail block is enhanced.

[0057] The encoding matrix in the embodiment refers to an encoding value of each mail block in the form of a matrix. The random number includes a value randomly generated based on a preset value interval. The preset value interval can be determined based on a row element number or a column element number of a plurality of sub-matrices obtained by splitting processing of a rotation matrix obtained by angle rotation of the encoding matrix. That is, the row element number or the column element number of each sub-matrix can be determined, and specifically, a full permutation number obtained by full permutation processing of the row element number or the column element number of the plurality of sub-matrices can be constructed. For example, each sub-matrix is a 4*4 matrix, and the row element number and the column element number of the sub-matrix are both 4. A full permutation of 4 obtains 24, and the preset value interval can be 0-23. The preset value interval can include 0 and 23, and the random number can be randomly generated based on the preset value interval, that is, the random number can be any one of 0-23. The random number includes a first random number and / or a second random number. The first random number can be a column random number, and the second random number can be a row random number.

[0058] In actual application, the encoding value of each mail block can be relatively complex. If the encoding value of each mail block is directly encrypted, the encryption process can be relatively complex, and the encryption efficiency can be relatively low. To simplify the encryption process of the encoding value encryption and improve the encryption efficiency of the encoding value encryption, the encoding value of each mail block can be converted into a matrix form for representation. Specifically, in the process of constructing a matrix based on the encoding value of each mail block to obtain an encoding matrix, the encoding value of each mail block can be converted into a matrix to obtain a conversion matrix of each mail block, and the conversion matrix of each mail block can be subjected to matrix merging processing to obtain the encoding matrix. The encoding matrix can be a square matrix, that is, a matrix with the same number of rows and columns.

[0059] For example, the plurality of mail blocks of the initial mail is eight mail blocks, and the encoding value of the eight mail blocks is an MD5 value. The MD5 value of each mail block is a 32-bit hexadecimal number. The MD5 value of each mail block is converted into a 4*8 matrix, and eight 4*8 matrices are subjected to matrix merging processing to obtain an encoding matrix of 16*16. That is, eight 4*8 matrices are merged into a 16*16 matrix, and the encoding matrix is a square matrix.

[0060] In specific implementation, in order to enable the encoding value of each mail block to be encrypted and transmitted in the mail transmission process, the integrity and security of the mail content can be helped to be ensured. In an optional implementation provided by the embodiment, in the process of encrypting the encoding matrix based on a pre-generated random number to obtain an encrypted matrix, the following operations are performed:

[0061] The rotation angle is calculated according to the random number, and the encoding matrix is angle-rotated according to the rotation angle, to obtain a rotation matrix;

[0062] The rotation matrix is split to obtain a plurality of sub-matrices, and each sub-matrix in the plurality of sub-matrices is matrix-transformed according to a transformation sequence corresponding to the random number, to obtain a plurality of encrypted sub-matrices.

[0063] The rotation angle can be a multiple of 90 degrees, such as 0 degrees, 90 degrees, 180 degrees, 270 degrees, etc. The transformation sequence corresponding to the random number includes a position transformation sequence corresponding to the random number, which can be a column transformation sequence corresponding to the first random number and / or a row transformation sequence corresponding to the second random number.

[0064] Specifically, in the process of calculating the rotation angle according to the random number, the random number can be input into the angle calculation algorithm to calculate the rotation angle, specifically, the first random number and / or the second random number can be input into the angle calculation algorithm to calculate the rotation angle, or the angle calculation value and the first random number and / or the second random number can be input into the angle calculation algorithm to calculate the rotation angle. The angle calculation value can be n, and the angle calculation value can be determined based on the number of rows or columns of the sub-matrix after matrix splitting.

[0065] For example, taking the first random number and the second random number as an example, the angle calculation algorithm includes:

[0066] C = (A + B) mod n x 90°

[0067] Wherein, C represents the rotation angle; A represents the first random number; B represents the second random number; n represents the number of rows or columns of each sub-matrix in the plurality of sub-matrices; (A + B) mod n represents the remainder of (A + B) divided by n.

[0068] It should be noted that, for example, because the rotation matrix will be split into a plurality of 4x4 sub-matrices, the number of rows and columns of each sub-matrix is 4, so in the process of calculating the rotation angle according to the random number, n in the angle calculation algorithm is 4.

[0069] In the process of angle-rotating the encoding matrix according to the rotation angle to obtain the rotation matrix, the encoding matrix can be clockwise or counterclockwise angle-transformed according to the rotation angle.

[0070] For example, the first random number A is randomly generated as 16 in a preset numerical interval of 0-23, the second random number B is randomly generated as 21 in a preset numerical interval of 0-23, and the number of rows or columns of the sub-matrix after the matrix splitting is 4, so the rotation angle C is calculated as (A+B)mod 4x90°=(16+21)mod 4x90°=90° according to the first random number A, the second random number B and the angle calculation value 4, and the 16x16 encoding matrix is rotated clockwise or counterclockwise by 90° to obtain a 16x16 rotation matrix.

[0071] In the process of splitting the rotation matrix to obtain a plurality of sub-matrices, the rotation matrix can be split to obtain a plurality of sub-matrices according to the angle calculation value; optionally, each sub-matrix in the plurality of sub-matrices is a square matrix, and the number of rows or columns of each sub-matrix can be determined based on the angle calculation value, that is, the number of rows or columns of each sub-matrix can be the same as the angle calculation value; for example, the angle calculation value is 4, and the 16x16 rotation matrix is split to obtain 16 4x4 sub-matrices according to the angle calculation value 4, and the number of rows and columns of the sub-matrix is 4, which is the same as the angle calculation value.

[0072] On this basis, in order to further improve the privacy of the block content of each mail block and improve the data security of the mail content, in an optional implementation provided by the embodiment, in the process of performing matrix transformation on each sub-matrix in the plurality of sub-matrices according to the transformation order corresponding to the random number to obtain a plurality of encrypted sub-matrices, a first position transformation is performed on each sub-matrix according to the transformation order corresponding to the first random number to obtain each intermediate sub-matrix, and a second position transformation is performed on each intermediate sub-matrix according to the transformation order corresponding to the second random number to obtain the plurality of encrypted sub-matrices, and specifically, the following operations can be performed:

[0073] performing column transformation on each sub-matrix according to the column transformation order corresponding to the first random number to obtain each intermediate sub-matrix;

[0074] performing row transformation on each intermediate sub-matrix according to the row transformation order corresponding to the second random number to obtain the plurality of encrypted sub-matrices.

[0075] The column transformation order corresponding to the first random number can be the order of performing elementary column transformation on each sub-matrix, and the row transformation order corresponding to the second random number can be the order of performing elementary row transformation on each sub-matrix.

[0076] Specifically, elementary column transformation is performed on each sub-matrix according to the column transformation order corresponding to the first random number to obtain each intermediate sub-matrix, and elementary row transformation is performed on each intermediate sub-matrix according to the row transformation order corresponding to the second random number to obtain the plurality of encrypted sub-matrices.

[0077] Continuing with the previous example, the column transformation order corresponding to the first random number A is [3, 4, 1, 2], and the row transformation order corresponding to the second random number B is [2, 1, 4, 3]. Let's take a specific submatrix as an example to illustrate the matrix transformation process; assume a specific submatrix is:

[0078] Perform column transformations on the submatrix according to the column transformation order [3, 4, 1, 2] corresponding to the first random number, that is, rearrange the columns of the submatrix to [3, 4, 1, 2] to obtain the intermediate submatrix:

[0079] Next, perform row transformation on the intermediate submatrix according to the row transformation order [2, 1, 4, 3] corresponding to the second random number, that is, rearrange the rows of the intermediate submatrix to [2, 1, 4, 3], to obtain the encrypted submatrix:

[0080] The process of performing column and row transformations on other submatrices to obtain encrypted submatrices is similar to the process of processing a certain submatric mentioned above, and will not be repeated here.

[0081] Furthermore, in the process of performing matrix transformations on each of the multiple sub-matrices according to the transformation order corresponding to the random numbers to obtain multiple encrypted sub-matrices, in order to improve the flexibility and convenience of matrix transformations, multiple encrypted sub-matrices can also be obtained by performing column transformations on each sub-matrices according to the column transformation order corresponding to the first random number, or by performing row transformations on each sub-matrices according to the row transformation order corresponding to the second random number, or by performing row transformations on each sub-matrices according to the row transformation order corresponding to the second random number to obtain intermediate sub-matrices, and then performing column transformations on each intermediate sub-matrices according to the column transformation order corresponding to the first random number to obtain multiple encrypted sub-matrices; that is, either row transformation or column transformation can be selected for matrix transformation, or both row transformation and column transformation can be combined for matrix transformation. In this embodiment, the execution order of row transformation and column transformation is not specifically limited.

[0082] It should be noted that, in the process of encrypting the encoding matrix based on the pre-generated random numbers to obtain the encrypted matrix, the encoding matrix can also be split to obtain multiple sub-matrices. The rotation angle is calculated based on the random numbers, and each sub-matrix is ​​rotated according to the rotation angle to obtain multiple rotated sub-matrices. The matrix transformation is performed on each rotated sub-matrix in the multiple rotated sub-matrices according to the transformation order corresponding to the random numbers to obtain multiple encrypted sub-matrices. The process of splitting, calculating the rotation angle, performing the angle rotation, and matrix transformation is similar to that described above, and will not be repeated here.

[0083] Step S106, determine the layout label sequence of the each mail block corresponding to the encryption matrix, and write the layout label sequence into the each mail block, to obtain an intermediate mail.

[0084] The encoding value of each mail block is converted into an encoding matrix, and the encoding matrix is encrypted according to a pre-generated random number to obtain an encryption matrix. In this step, in order to hide the encryption matrix in each mail block, so that a third party cannot easily detect it, and to facilitate subsequent verification of whether the mail content of each mail block is tampered with, the layout label sequence of each mail block corresponding to the encryption matrix is written into each mail block to obtain an intermediate mail, and the secure hiding of the encryption matrix is realized.

[0085] The layout label sequence in this embodiment refers to a sequence composed of one or more labels for layout; the layout label sequence can be an HTML (Hyper Text Markup Language, HyperText Markup Language) label sequence.

[0086] In specific implementation, after the encoding value of each mail block is encrypted to obtain an encryption matrix, in order to facilitate subsequent verification of whether the mail content is maliciously tampered with or replaced, the encrypted encoding value of each mail block can be securely hidden in each mail block, so as to facilitate the determination of whether each mail block is tampered with by comparing the encoding values of each mail block in the subsequent step, and to improve the credibility of each mail block. In an optional implementation provided in this embodiment, in the process of determining the layout label sequence of each mail block corresponding to the encryption matrix, the following operations are performed:

[0087] The encoding value of the encryption matrix is converted to obtain the encrypted encoding value of each mail block.

[0088] In the label sequence mapping table, the layout label sequence of each mail block mapped by the encrypted encoding value is searched.

[0089] In the label sequence mapping table, the layout label sequence of each mail block mapped by the encrypted encoding value is searched.

[0090] The encrypted encoding value and the layout label sequence in the label sequence mapping table in this embodiment are described by taking a 4-bit binary number as an example. It is assumed that the encrypted encoding value includes 0001, 0010, 0011, 0100, and 0101. The layout label sequence mapped by 0001 is , the layout label sequence mapped by 0010 is , and the layout label sequence mapped by 0011 is ,0100 the mapped sequence of layout tags is ,0101 the mapped sequence of layout tags is .

[0091] It should be noted that the layout label sequence of the encryption code value mapping described above is only illustrative, and in practice, the number of bits of the encryption code value can be more, and the encryption code value of each mail block can be a 32-bit hexadecimal number; the label sequence mapping label can store the layout label sequence of the encryption code value mapping; since there is a layout label in each mail block, the encryption matrix is converted into a layout label sequence to achieve the effect of subsequent security hiding the code value of each mail block.

[0092] In addition, after the encryption matrix is converted into the encryption code value of each mail block, in order to improve the effectiveness of the layout label sequence, the layout label sequence of each mail block can also be generated in real time, that is, the layout label sequence corresponding to the encryption code value can be generated, such as inputting the encryption code value into the layout label model to generate the layout label, and obtaining the layout label sequence corresponding to the encryption code value.

[0093] On this basis, in order to improve the writing accuracy of the layout label sequence of each mail block and further improve the high concealment and security of data writing, in an optional implementation provided by the embodiment, in the process of writing the layout label sequence into each mail block to obtain an intermediate mail, the writing position of the layout label sequence of each mail block in each mail block can be determined, and the layout label sequence of each mail block is written into each mail block according to the writing position to obtain the intermediate mail. Specifically, the following operations can be performed:

[0094] The layout label sequence and the mail blocks are input into a position calculation model for position calculation processing to obtain the writing position information of the layout label sequence in the mail blocks;

[0095] The layout label sequence of each mail block is written into each mail block according to the writing position information, and the mail blocks after writing are taken as the intermediate mail.

[0096] The writing position information can be a writing position identifier, that is, an identifier representing which writing position. The model structure of the position calculation model can be a convolutional neural network (CNN).

[0097] Specifically, the position calculation model can perform position calculation processing in the following manner: performing analysis processing on each mail block to obtain block length of each mail block and layout tag information in each mail block, and calculating writing position information of a layout tag sequence of each mail block in each mail block based on the block length and the layout tag information; wherein the block length of each mail block can be the number of characters in each mail block, and the layout tag information in each mail block includes layout tag type, number of tags of each layout tag type, and / or tag nesting information; since there are layout tags in each mail block, the intermediate mail after writing the layout tag sequence into each mail block by converting the encryption matrix into the layout tag sequence is similar to the normal mail, so that the third party is not easy to detect, thereby improving the security of the mail, and by writing the layout tag sequence into each mail block, the intermediate mail is more secure and effective.

[0098] It should be noted that the above position calculation model can be obtained by training in advance, i.e., obtaining the position calculation model after model training of the to-be-trained model, and the training can be performed in the following manner:

[0099] The training data is input into the to-be-trained model to perform position calculation processing, and writing position information of a layout tag sequence in the training data in a mail block is obtained;

[0100] Loss calculation is performed according to the writing position information and the writing position tag of the mail block, and the to-be-trained model is adjusted in parameters based on the obtained loss to obtain the position calculation model.

[0101] Wherein, the training data can include mail blocks and corresponding layout tag sequences; the mail blocks can be obtained by block processing of an intermediate training mail, the intermediate training mail can be obtained by data preprocessing of a training mail, and the training mail can be collected from a mail database, user-authorized data collection, mail samples on the network, and / or from a public mail dataset; the data preprocessing here can include data cleaning, such as removing invalid mails (spam mails), removing duplicate mails, and deleting non-standard mails, so as to ensure the consistency of the quality of the mail data, improve the quality of the training data, and further ensure the accuracy of the model training.

[0102] Step S108, according to the random number and the number of specific layout tags in the intermediate mail, writing processing of the specific layout tags in the intermediate mail is performed to obtain a target mail.

[0103] In the above step, in order to further improve the data security of the mail, according to the random number and the number of specific layout tags in the intermediate mail, the writing processing of the specific layout tags in the intermediate mail is performed to obtain the target mail. The specific layout tag in the embodiment refers to a specified layout tag, and the specific layout tag includes a first specific layout tag and / or a second specific layout tag. The first specific layout tag can be , the second particular layout tag can be .

[0104] In actual application, after sending the mail to the receiver, the receiver can obtain the encoding value from the mail and compare it with the encoding value calculated by himself to determine whether the mail content is tampered with. In this regard, in order to enable the receiver to successfully obtain the encoding value from the received mail, the random number can be further securely hidden in the intermediate mail, so that the receiver can parse the random number from the received mail, and then restore the encoding value based on the random number. In an optional implementation provided by the embodiment, in the process of obtaining the target mail by performing the writing process of the specific layout tag in the intermediate mail according to the random number and the number of specific layout tags in the intermediate mail, the following operations are performed:

[0105] The number of specific layout tags in the intermediate mail is calculated, and the remaining writing number of the specific layout tags is determined according to the number and the random number.

[0106] The writing process of the specific layout tag in the intermediate mail is performed according to the remaining writing number, and the target mail is obtained.

[0107] The remaining writing number refers to the remaining number of specific layout tags written in the intermediate mail, that is, how many numbers of specific layout tags still need to be written in the intermediate mail.

[0108] Specifically, in the process of determining the remaining writing number of the specific layout tag according to the number and the random number, the remaining writing number of the specific layout tag can be determined according to the number, the first random number and the second random number. In the case of one specific layout tag, the remaining writing number of the specific layout tag can also be determined according to the number and the first random number or the second random number. The number and the random number can also be input into a number calculation algorithm to calculate the writing number and obtain the remaining writing number of the specific layout tag.

[0109] For example, the number calculation algorithm includes: Count1 mod 24 = random number A, Count2 mod 24 = random number B; and Count1 = (m1+x1), Count2 = (m2+x2); that is, the number calculation algorithm includes: (m1+x1) mod 24 = random number A, (m2+x2) mod 24 = random number B.

[0110] In which, Count1 represents the number of specific layout tags Countl represents the number of messages to be processed in the first mail; Count2 represents the number of messages to be processed in the second mail the number of the intermediate mail to be satisfied; that is, the final Countl represents the specific layout tag in the target mail Count2 represents the number of specific layout tags in the target mail the number of the intermediate mail; m1 represents a specific layout tag in the intermediate mail the number of the intermediate mail; m2 represents a specific layout tag in the intermediate mail the number of the specific layout tag; x1 represents a specific layout tag x2 represents a specific layout tag a remaining write quantity.

[0111] On this basis, in an optional implementation of the embodiment, in the process of writing the specific layout tag in the intermediate mail according to the remaining write quantity, and obtaining the target mail, the following operations are performed:

[0112] generating a corresponding combined tag containing the specific layout tag according to the remaining write quantity;

[0113] writing the generated combined tag into the intermediate mail to obtain the target mail.

[0114] The combined tag containing the specific layout tag can be composed of the specific layout tag and an end tag of the specific layout tag. For example, the combined tag can be and or any one of and .

[0115] Specifically, the combined tag containing the specific layout tag of the remaining write quantity can be generated, the generated combined tag is written into the intermediate mail to obtain the target mail, and the random number is hidden in the intermediate mail without affecting the reading effect of the mail itself through sufficient combined tags in the target mail, so that the mail recipient can conveniently deduce the random number and it is not easy to be detected by a third party.

[0116] For example, according to the specific layout tag the number n1 and the first random number A determine a specific layout tag the remaining write quantity r1, according to the specific layout tag in the intermediate mail and a second random number B to determine a specific layout tag r2, the remaining number of writes, in accordance with the remaining number of writes r1 to generate r1 layout tags containing the specific layout tag combination tag r2 tags containing a specific layout tag according to the remaining write quantity r2 combination tags The generated r1 combination tags and r2 combination tags are written into the intermediate mail to obtain the target mail.

[0117] Further, in order to improve the comprehensiveness of the secure hiding of the random number, the generated combination tags can be written into the intermediate position according to the writing position to obtain the target mail. In an optional implementation provided by the embodiment, in the process of writing the generated combination tags into the intermediate mail to obtain the target mail, the following operations are performed:

[0118] determining the writing position of the generated combination tags in the intermediate mail;

[0119] writing the generated combination tags into the intermediate mail according to the writing position to obtain the target mail.

[0120] Specifically, the generated combination tags and the intermediate mail can be input into the position calculation model to perform position calculation processing, to obtain the writing position information of the generated combination tags in the intermediate mail, and the generated combination tags are written into the intermediate mail according to the writing position information to obtain the target mail.

[0121] It should be noted that after obtaining the target mail, the target mail can be sent for processing, and in the process of sending the target mail for processing, if the initial mail is a global mail, the target mail can be sent to the mail recipient; if the initial mail is a mail body, the target mail, the mail header and the attachment can be assembled to obtain an assembled mail, and the assembled mail can be sent to the mail recipient.

[0122] After the mail recipient receives the target mail, the target mail here can be the target mail sent in the case where the initial mail is a global mail, or the assembled mail sent in the case where the initial mail is a mail body. After the writing processing of the specific layout tags in the intermediate mail is performed according to the random number and the number of specific layout tags in the intermediate mail to obtain the target mail, the target mail can be further parsed to obtain the encoding values of each mail block, the layout tag sequence of each mail block in the target mail is identified and deleted, the encoding value calculation of each mail block after the deletion of the layout tag sequence is performed, and the inspection processing of each mail block is performed according to the encoding values of each mail block and the calculated encoding values;

[0123] Specifically, after the writing processing of the specific layout tags in the intermediate mail is performed according to the random number and the number of specific layout tags in the intermediate mail to obtain the target mail, the following operations can be performed:

[0124] The random number is calculated according to the number of specific layout tags in the target mail, and the layout tag sequence of each mail block in the target mail is identified, a matrix is constructed based on the layout tag sequence of each mail block to obtain an encryption matrix;

[0125] The decryption matrix is obtained by decrypting the encryption matrix according to the random number, and the encoding value of each mail block is obtained by converting the decryption matrix.

[0126] The encoding value of each mail block after deleting the layout tag sequence is calculated, and each mail block is checked according to the encoding value and the calculated encoding value.

[0127] Among them, the specific layout tag refers to a specified layout tag, and the specific layout tag can be and may also be and any one of the above.

[0128] Specifically, in the process of calculating the random number according to the number of specific layout tags in the target mail, the first random number can be calculated according to the number of first specific layout tags in the target mail and / or the second random number can be calculated according to the number of second specific layout tags in the target mail, or the number of specific layout tags in the target mail can be input into a random number calculation algorithm to calculate the random number and obtain the random number;

[0129] For example, the random number calculation algorithm includes: random number A = Count3 mod 24, random number B = Count4 mod 24;

[0130] Wherein, Count3 represents the number of first specific layout tags in the target mail Count4 represents the number of second specific layout tags in the target mail the number of the target mail.

[0131] In the process of obtaining the encryption matrix based on the layout label sequence of each mail block, the encryption encoding values corresponding to the layout label sequence of each mail block can be found in the label sequence mapping table, and the encryption encoding values of each mail block can be matrix converted to obtain the encryption matrix. In the process of obtaining the decryption matrix by decrypting the encryption matrix according to the random number, the encryption matrix can be split to obtain a plurality of encryption sub-matrices, each encryption sub-matrix in the plurality of encryption sub-matrices can be inversely transformed according to the transformation order corresponding to the random number to obtain a plurality of rotation sub-matrices, the rotation sub-matrices can be combined to obtain a rotation matrix, the rotation angle can be calculated according to the random number, and the rotation matrix can be inversely rotated according to the rotation angle to obtain the decryption matrix. In the process of converting the encoding values of the decryption matrix to obtain the encoding values of each mail block, the decryption matrix can be split according to the number of each mail block to obtain the encoding matrix of each mail block, and the encoding values of each mail block can be converted by converting the encoding matrix of each mail block.

[0132] For example, the first random number A is calculated as 16 according to the number Count3 of the first specific layout label in the target mail, the second random number B is calculated as 21 according to the number Count4 of the second specific layout label in the target mail, the layout label sequence of 8 mail blocks in the target mail is identified, and the encryption encoding values corresponding to the layout label sequence of the 8 mail blocks are found in the label sequence mapping table, i.e. 8 32-bit hexadecimal numbers. The 8 encryption encoding values are matrix converted to obtain the encryption matrix. Specifically, the 8 encryption encoding values can be converted into a 4x8 matrix, and the 8 4x8 matrices can be combined into a 16x16 matrix. The 16x16 matrix is the encryption matrix. The 16x16 encryption matrix is split to obtain 16 4x4 encryption sub-matrices. Each encryption sub-matrix is inversely transformed according to the transformation order [2, 1, 4, 3] corresponding to the second random number B to obtain an intermediate sub-matrix. Each intermediate sub-matrix is inversely transformed according to the transformation order [3, 4, 1, 2] corresponding to the first random number A to obtain 16 rotation sub-matrices. The 16 rotation sub-matrices are combined to obtain a 16x16 rotation matrix. The rotation angle is calculated as 90° according to the first random number A and the second random number B. The rotation matrix is inversely rotated according to the rotation angle 90° to obtain a 16x16 decryption matrix. The decryption matrix is split according to the number 8 of each mail block to obtain the encoding matrix of the 8 mail blocks. The encoding values of the 8 mail blocks are converted by converting the encoding matrix of the 8 mail blocks.

[0133] It should be noted that the various optional embodiments in steps S102 to S108 provided by the present embodiment can be independently executed as needed, or can be combined and referred to each other, and meanwhile, each specific execution step in each optional embodiment can also be independently executed, which is not specifically limited by the present embodiment.

[0134] In summary, the mail processing method provided by the present embodiment first calculates the encoding values of the multiple mail blocks of the initial mail to obtain the encoding values of the mail blocks, constructs a matrix based on the encoding values of the mail blocks to obtain an encoding matrix, and converts the encoding values into the encoding matrix to facilitate subsequent calculation. The rotation angle is calculated according to the random number, and the encoding matrix is rotated at the rotation angle to obtain a rotation matrix. The rotation matrix is split to obtain multiple sub-matrices, and each sub-matrix in the multiple sub-matrices is matrix transformed according to the transformation order corresponding to the random number to obtain multiple encrypted sub-matrices. Secondly, the multiple encrypted sub-matrices are converted into encoding values to obtain the encrypted encoding values of the mail blocks. In the label sequence mapping table, the layout label sequence of each mail block mapped by the encrypted encoding value is searched, and the layout label sequence of each mail block is input into the position calculation model to calculate the writing position information of the layout label sequence in each mail block. According to the writing position information, the layout label sequence of each mail block is written into each mail block. The written mail blocks are used as intermediate mail. In this way, the encrypted encoding values are written into each mail block in the form of a layout label sequence to improve the concealment of the encoding values in each mail block. The encoding values of each mail block are hidden in each mail block in a multi-layer nested manner to improve the effectiveness and comprehensiveness of data hiding. Finally, the number of specific layout labels in the intermediate mail is calculated, and the remaining writing number of the specific layout label is determined according to the number and the random number. The combined label containing the specific layout label is written into the intermediate mail according to the remaining writing number to obtain the target mail. By further hiding the random number in the intermediate mail in the form of a specific layout label, the mail recipient can conveniently obtain the random number without being easily detected by a third party, thereby improving the convenience and accuracy of subsequent mail checking by the mail recipient.

[0135] The following combination Figure 2 The mail processing method provided by the present embodiment is further described by taking the application of the mail processing method provided by the present embodiment in the mail encryption scene as an example. Referring to Figure 2 , the mail processing method applied in the mail encryption scene specifically includes the following steps.

[0136] Step S202, calculating the encoding values of the multiple mail blocks of the initial mail to obtain the encoding values of the mail blocks.

[0137] Step S204, a matrix is constructed based on the encoding values of the mail blocks to obtain an encoding matrix, and a rotation angle is calculated according to the first random number and the second random number.

[0138] Step S206, the encoding matrix is rotated clockwise according to the rotation angle to obtain a rotated matrix, and the rotated matrix is split to obtain a plurality of sub-matrices.

[0139] Here, the encoding matrix can also be rotated counterclockwise according to the rotation angle to obtain a rotated matrix.

[0140] Step S208, each sub-matrix is subjected to elementary column transformation according to the column transformation order corresponding to the first random number to obtain an intermediate sub-matrix, and each intermediate sub-matrix is subjected to elementary row transformation according to the row transformation order corresponding to the second random number to obtain a plurality of encrypted sub-matrices.

[0141] Here, each sub-matrix can also be subjected to elementary row transformation according to the row transformation order corresponding to the second random number to obtain an intermediate sub-matrix, and each intermediate sub-matrix is subjected to elementary column transformation according to the column transformation order corresponding to the first random number to obtain a plurality of encrypted sub-matrices.

[0142] Step S210, the encoding value conversion is performed on the plurality of encrypted sub-matrices to obtain the encrypted encoding value of each mail block, and the layout label sequence of each mail block mapped by the encrypted encoding value is searched in the label sequence mapping table.

[0143] Step S212, the layout label sequence and the position of each mail block are input into a position calculation model for position calculation processing to obtain the writing position information of the layout label sequence in each mail block, and the layout label sequence of each mail block is written into each mail block according to the writing position information, and the written each mail block is taken as an intermediate mail.

[0144] Step S214, the number of first specific layout labels and second specific layout labels in the intermediate mail is calculated, the remaining writing number of the first specific layout label is calculated according to the number of the first specific layout label and the first random number, and the remaining writing number of the second specific layout label is calculated according to the number of the second specific layout label and the second random number.

[0145] Step S216, the combined label containing the first specific layout label is written into the intermediate mail according to the remaining writing number of the first specific layout label, and the combined label containing the second specific layout label is written into the intermediate mail according to the remaining writing number of the second specific layout label, to obtain a target mail.

[0146] It should be noted that any one of steps S202 to S216 or a combination of any multiple steps can be replaced by the corresponding technical means provided in steps S102 to S108 according to the needs of implementation and deployment, which will not be repeated here. It should be added that the related content of the mail processing method provided in the above embodiments can be executed in cooperation with the related content of the mail processing method provided in the following embodiments. By reading the above embodiments, the related content of the following embodiments can be referred to. Correspondingly, by reading the following embodiments, the related content provided in the above embodiments can also be referred to.

[0147] Another mail processing method provided in the present specification is as follows:

[0148] The mail processing method provided in the present embodiment can be executed by a computer device, which can be a terminal or a server. The terminal can include a mobile phone, a notebook computer, a smart interactive device, etc. The server can include a physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.

[0149] Referring to Figure 3 The mail processing method provided in the present embodiment specifically includes steps S302 to S308.

[0150] In step S302, the number of specific layout tags in the target mail is determined, and a random number is calculated based on the number.

[0151] The mail in the present embodiment refers to an email. Specifically, the mail can be a mail body, i.e., mail body content. In addition, the mail can also be an entire mail containing a mail header, a mail body, and an attachment, i.e., a global mail. The mail in the present embodiment can be any content-containing mail. The mail can be a text mail or a rich text mail. The present embodiment does not limit the specific content of the mail.

[0152] The target mail includes a target mail body and a target global mail. The target mail can be a target mail received by a recipient. The target mail can include multiple mail blocks, such as 8 mail blocks. The specific layout tag refers to a designated layout tag. The specific layout tag includes a first specific layout tag and / or a second specific layout tag. The first specific layout tag can be , the second particular layout tag can be The random number can be a numerical value randomly generated by a mail sender of the target mail, and the random number includes a numerical value randomly generated based on a preset numerical interval, for example, the preset numerical interval can include 0 and 23, and the random number can be randomly generated based on the preset numerical interval, that is, the random number can be any one of 0-23.

[0153] In a specific implementation, before the content of the target mail is verified, the encoding values of the mail blocks can be parsed based on the target mail, and in order to parse the encoding values of the mail blocks, the random number hidden in the target mail by the mail sender needs to be calculated; specifically, in the process of calculating the random number based on the number of specific layout tags, a first random number can be calculated according to the number of first specific layout tags in the target mail and / or a second random number can be calculated according to the number of second specific layout tags in the target mail, or the number of specific layout tags in the target mail can be input into a random number calculation algorithm to calculate the random number and obtain the random number.

[0154] For example, the random number calculation algorithm includes: random number A = Count3 mod 24, and random number B = Count4 mod 24.

[0155] In the formula, Count3 represents the number of first specific layout tags in the target mail, Count4 represents the number of second specific layout tags in the target mail, and Count3 and Count4 are integers. Count4 represents the number of second specific layout tags in the target mail The number of the first specific layout tags in the target email is Count3, and the number of the second specific layout tags in the target email is Count4. For example, the first random number A is 16, and the second random number B is 21, which are calculated according to the number Count3 of the first specific layout tags in the target email and the number Count4 of the second specific layout tags in the target email.

[0156] In step S304, the layout tag sequence of each mail block in the target email is identified, and the encryption matrix is obtained by matrix construction based on the layout tag sequence of each mail block.

[0157] The layout tag sequence of each mail block in the embodiment refers to a sequence composed of one or more layout tags. The layout tag sequence can be an HTML (Hyper Text Markup Language) tag sequence.

[0158] In actual application, the layout tag sequence of each mail block in the target email does not belong to the original content of each mail block, but is a layout tag sequence set for hiding the encoding value of each mail block in each mail block for transmission. Therefore, the layout tag sequence of each mail block in the target email can be identified, and the encryption matrix can be obtained by matrix construction based on the layout tag sequence of each mail block. In the process of obtaining the encryption matrix by matrix construction based on the layout tag sequence of each mail block, the encryption encoding value mapped by the layout tag sequence of each mail block can be searched in the tag sequence mapping table, and the encryption encoding value of each mail block can be matrix converted to obtain the encryption matrix. In the process of obtaining the encryption matrix by matrix conversion of the encryption encoding value of each mail block, the encryption encoding value of each mail block can be matrix converted to obtain the conversion matrix of each mail block, and the conversion matrix of each mail block can be processed by matrix merging to obtain the encryption matrix.

[0159] The encryption encoding value of each mail block refers to the encoding value of each mail block after encryption. The encoding value includes the hash value or the hash value of each mail block. The encoding value can be an encoding string, which can be a fixed-length encoding string. For example, the encoding value can be an MD (Message-Digest Algorithm) 5 value, and the MD5 value is a 32-bit hexadecimal number. The hash value of each mail block can be obtained by inputting each mail block into a hash function for hash value calculation.

[0160] Continuing with the above example, the layout label sequence of the 8 mail blocks in the target mail is identified, and the encrypted encoding value of the layout label sequence of the 8 mail blocks, i.e. 8 32-bit hexadecimal numbers, is found in the label sequence mapping table. The encrypted matrix is obtained by matrix conversion of the 8 encrypted encoding values. Specifically, each of the 8 encrypted encoding values is converted into a 4x8 conversion matrix, and the 8 4x8 conversion matrices are matrix-merged to obtain a 16x16 encrypted matrix.

[0161] In step S306, the encrypted matrix is decrypted according to the random number to obtain a decrypted matrix, and the encoding value of each mail block is obtained by encoding value conversion of the decrypted matrix.

[0162] The encoding value of each mail block in the embodiment includes the hash value or the hash value of each mail block. The encoding value of each mail block can be an encoding string, specifically a fixed-length encoding string. For example, the encoding value of each mail block can be the MD5 (Message-Digest Algorithm) value of each mail block. The MD5 value is a 32-bit hexadecimal number.

[0163] After the random number is calculated as described above, in order to parse the encoding value of each mail block from the encrypted matrix, the encrypted matrix can be split to obtain a plurality of encrypted sub-matrices during the process of decrypting the encrypted matrix according to the random number to obtain a decrypted matrix. Each encrypted sub-matrix in the plurality of encrypted sub-matrices is inversely transformed according to the transformation order corresponding to the random number to obtain a plurality of rotated sub-matrices. The plurality of rotated sub-matrices are merged to obtain a rotated matrix. The rotation angle is calculated according to the random number, and the rotated matrix is inversely rotated according to the rotation angle to obtain the decrypted matrix.

[0164] Specifically, each encrypted sub-matrix in the plurality of encrypted sub-matrices is inversely transformed according to the transformation order corresponding to the random number to obtain a plurality of rotated sub-matrices during the process of inversely transforming each encrypted sub-matrix in the plurality of encrypted sub-matrices according to the transformation order corresponding to the random number to obtain a plurality of rotated sub-matrices. Specifically, each encrypted sub-matrix is primary inversely transformed according to the transformation order corresponding to the random number to obtain a plurality of rotated sub-matrices. Specifically, each encrypted sub-matrix is row-inversely transformed according to the transformation order corresponding to the second random number to obtain an intermediate sub-matrix, and the intermediate sub-matrix is column-inversely transformed according to the transformation order corresponding to the first random number to obtain a plurality of rotated sub-matrices.

[0165] Further, if the above embodiment performs matrix transformation on each sub-matrix in the plurality of sub-matrices according to the transformation sequence corresponding to the random number to obtain the plurality of encrypted sub-matrices, and performs column transformation on each sub-matrix according to the column transformation sequence corresponding to the first random number to obtain the plurality of encrypted sub-matrices, then in the process of performing matrix inverse transformation on each encrypted sub-matrix in the plurality of encrypted sub-matrices according to the transformation sequence corresponding to the random number to obtain the plurality of rotated sub-matrices, column inverse transformation can be performed on each encrypted sub-matrix according to the column transformation sequence corresponding to the first random number to obtain the plurality of rotated sub-matrices; if the above embodiment performs row transformation on each sub-matrix according to the row transformation sequence corresponding to the second random number to obtain the plurality of encrypted sub-matrices, then row inverse transformation can be performed on each encrypted sub-matrix according to the row transformation sequence corresponding to the second random number to obtain the plurality of rotated sub-matrices; if the above embodiment performs column transformation on each sub-matrix according to the column transformation sequence corresponding to the first random number to obtain each intermediate sub-matrix, and performs row transformation on each intermediate sub-matrix according to the row transformation sequence corresponding to the second random number to obtain the plurality of encrypted sub-matrices, then row inverse transformation can be performed on each encrypted sub-matrix according to the row transformation sequence corresponding to the second random number to obtain each intermediate sub-matrix, and column inverse transformation can be performed on each intermediate sub-matrix according to the column transformation sequence corresponding to the first random number to obtain the plurality of rotated sub-matrices; if the above embodiment performs row transformation on each sub-matrix according to the row transformation sequence corresponding to the second random number to obtain each intermediate sub-matrix, and performs column transformation on each intermediate sub-matrix according to the column transformation sequence corresponding to the first random number to obtain the plurality of encrypted sub-matrices, then column inverse transformation can be performed on each encrypted sub-matrix according to the column transformation sequence corresponding to the first random number to obtain each intermediate sub-matrix, and row inverse transformation can be performed on each intermediate sub-matrix according to the row transformation sequence corresponding to the second random number to obtain the plurality of encrypted sub-matrices.

[0166] Still taking performing row inverse transformation on each encrypted sub-matrix according to the row transformation sequence corresponding to the second random number to obtain each intermediate sub-matrix, and performing column inverse transformation on each intermediate sub-matrix according to the column transformation sequence corresponding to the first random number to obtain the plurality of rotated sub-matrices as an example for description:

[0167] The 16x16 encrypted matrix is split to obtain 16 4x4 encrypted sub-matrices, row inverse transformation is performed on each encrypted sub-matrix according to the transformation sequence [2, 1, 4, 3] corresponding to the second random number B to obtain each intermediate sub-matrix, and column inverse transformation is performed on each intermediate sub-matrix according to the transformation sequence [3, 4, 1, 2] corresponding to the first random number A to obtain 16 rotated sub-matrices, and merging processing is performed on the 16 rotated sub-matrices to obtain a 16x16 rotated matrix.

[0168] Taking a certain encrypted sub-matrix in the 16 4x4 encrypted sub-matrices as an example, the process of performing inverse transformation on the encrypted sub-matrix according to the random number is described, for example, assuming that the certain encrypted sub-matrix is:

[0169] According to the transformation order corresponding to the second random number B, [2, 1, 4, 3], the row inverse transformation is performed on the encryption sub-matrix, that is, the row arrangement order of the encryption sub-matrix is restored to [2, 1, 4, 3], and an intermediate sub-matrix is obtained:

[0170] According to the transformation order corresponding to the first random number A, [3, 4, 1, 2], the column inverse transformation is performed on the intermediate sub-matrix, that is, the column arrangement order of the intermediate sub-matrix is restored to [3, 4, 1, 2], and a rotation sub-matrix is obtained:

[0171] The process of performing inverse transformation on other encryption sub-matrices to obtain the rotation sub-matrix is similar to the processing process of the above-mentioned certain encryption sub-matrix, and will not be described here.

[0172] In the process of calculating the rotation angle according to the random number and performing inverse direction rotation on the rotation matrix according to the rotation angle to obtain the decryption matrix, the rotation angle can be calculated according to the first random number and / or the second random number, and the decryption matrix can be obtained by performing inverse direction rotation on the rotation matrix according to the rotation angle; wherein the rotation angle can be a multiple of 90 degrees, such as 0 degrees, 90 degrees, 180 degrees, 270 degrees, etc.

[0173] In the process of calculating the rotation angle according to the random number, the rotation angle can be calculated by inputting the random number into the angle calculation algorithm, specifically, the first random number and / or the second random number can be input into the angle calculation algorithm to calculate the rotation angle, or the angle calculation value and the first random number and / or the second random number can be input into the angle calculation algorithm to calculate the rotation angle, the angle calculation value can be n, which can be determined based on the number of rows or columns of each encryption sub-matrix obtained by splitting the encryption matrix, and the specific angle calculation value can be the same as the number of rows or columns.

[0174] For example, taking the first random number and the second random number as an example, the angle calculation algorithm includes:

[0175] C = (A + B) mod n x 90°

[0176] Wherein, C represents the rotation angle; A represents the first random number; B represents the second random number; n represents the number of rows or columns of each encryption sub-matrix in the plurality of encryption sub-matrices; (A + B) mod n represents the remainder of (A + B) divided by n.

[0177] It should be noted that, for example, the number of rows or columns of each encryption sub-matrix in the plurality of encryption sub-matrices is 4, so n in the angle calculation algorithm here can be 4.

[0178] It should be noted that, if the above embodiment is to rotate the encoding matrix according to the rotation angle to obtain the rotation matrix, the rotation matrix is rotated according to the rotation angle to obtain the decryption matrix in the process of rotating the rotation matrix according to the rotation angle to obtain the decryption matrix. If the above embodiment is to rotate the encoding matrix according to the rotation angle to obtain the rotation matrix, the rotation matrix can be rotated according to the rotation angle to obtain the decryption matrix. For example, the rotation angle is calculated to be 90° according to the first random number A and the second random number B, and the rotation matrix is rotated in the reverse direction according to the rotation angle of 90° to obtain a 16x16 decryption matrix.

[0179] In the process of converting the encoding value of the decryption matrix to obtain the encoding value of each mail block, the decryption matrix can be split according to the number of each mail block to obtain the encoding matrix of each mail block, and the encoding value of each mail block is converted by converting the encoding value of each mail block. For example, the decryption matrix is split according to the number of each mail block to obtain 8 encoding matrices of 8 mail blocks, and the encoding value of 8 mail blocks is obtained by converting the encoding value of 8 mail blocks.

[0180] Step S308, the encoding value of each mail block after deleting the layout tag sequence is calculated, and each mail block is checked according to the encoding value and the calculated encoding value.

[0181] The operation of deleting the layout tag sequence in each mail block can be performed at any time after identifying the layout tag sequence of each mail block in the target mail.

[0182] In the process of calculating the encoding value of each mail block after deleting the layout tag sequence, each mail block after deleting the layout tag sequence can be input into a hash value function to calculate the hash value; in the process of checking each mail block according to the encoding value and the calculated encoding value, whether the hash value of each mail block matches the calculated hash value of each mail block can be detected; the abnormal detection of the first mail block in which the hash value matches the calculated hash value is determined to pass, which represents that the first mail block is not tampered; the abnormal detection of the second mail block in which the hash value does not match the calculated hash value is determined to fail, which represents that the second mail block is tampered, and the second mail block which fails in the abnormal detection can be marked in the target mail.

[0183] The following is combined Figure 4 With the application of the mail processing method provided in the embodiment in the mail decryption scenario as an example, the mail processing method provided in the embodiment is further described. Referring to Figure 4 the mail processing method applied in the mail decryption scenario specifically includes the following steps.

[0184] In step S402, the number of first specific layout tags and the number of second specific layout tags in the target mail are determined, a first random number is calculated based on the number of first specific layout tags, and a second random number is calculated based on the number of second specific layout tags.

[0185] In step S404, the layout tag sequence of each mail block in the target mail is identified, and in the tag sequence mapping table, the encrypted encoding value mapped by the layout tag sequence of each mail block is searched, and the encrypted encoding value of each mail block is matrix converted to obtain an encryption matrix.

[0186] In step S406, the encryption matrix is split to obtain a plurality of encryption sub-matrices, each encryption sub-matrix is subjected to elementary inverse row transformation according to the row transformation order corresponding to the second random number to obtain each intermediate sub-matrix, and each intermediate sub-matrix is subjected to elementary inverse column transformation according to the column transformation order corresponding to the first random number to obtain a plurality of rotation sub-matrices.

[0187] Here, each encryption sub-matrix can also be subjected to elementary inverse column transformation according to the column transformation order corresponding to the first random number to obtain each intermediate sub-matrix, and then each encryption sub-matrix can be subjected to elementary inverse row transformation according to the row transformation order corresponding to the second random number to obtain a plurality of rotation sub-matrices.

[0188] In step S408, the plurality of rotation sub-matrices are combined to obtain a rotation matrix, and the rotation angle is calculated according to the first random number and the second random number.

[0189] In step S410, the rotation matrix is rotated counterclockwise according to the rotation angle to obtain a decryption matrix, and the decryption matrix is subjected to encoding value conversion to obtain the encoding value of each mail block.

[0190] Here, the rotation matrix can also be rotated clockwise according to the rotation angle to obtain a decryption matrix.

[0191] In step S412, the encoding value of each mail block after the deletion of the layout tag sequence is calculated, and the encoding value of each mail block and the calculated encoding value are compared.

[0192] In step S414, the abnormality detection result of each mail block is determined according to the comparison result.

[0193] Figure 5 A schematic diagram of a mail processing device provided for an embodiment of the present application is shown in Figure 5 The device includes:

[0194] The encoding value calculation module 502 is configured to calculate encoding values of the plurality of mail blocks of the initial mail to obtain the encoding values of the mail blocks.

[0195] The matrix construction module 504 is configured to construct a matrix based on the encoding values of the mail blocks to obtain an encoding matrix, and encrypt the encoding matrix based on a random number to obtain an encrypted matrix.

[0196] The label sequence writing module 506 is configured to determine a layout label sequence of the mail blocks corresponding to the encrypted matrix, and write the layout label sequence into the mail blocks to obtain an intermediate mail.

[0197] The label writing module 508 is configured to write a specific layout label into the intermediate mail based on the random number and the number of the specific layout label in the intermediate mail to obtain a target mail.

[0198] The mail processing device provided in the embodiment first calculates the encoding values of the plurality of mail blocks of the initial mail by running the encoding value calculation module 502 to obtain the encoding values of the mail blocks, constructs a matrix based on the encoding values of the mail blocks by running the matrix construction module 504 to obtain an encoding matrix, and encrypts the encoding matrix based on a random number to obtain an encrypted matrix. Then, the layout label sequence of the mail blocks corresponding to the encrypted matrix is determined by running the label sequence writing module 506, and the layout label sequence is written into the mail blocks to obtain an intermediate mail. Finally, a specific layout label is written into the intermediate mail by running the label writing module 508 based on the random number and the number of the specific layout label in the intermediate mail to obtain a target mail, so as to improve the communication security of the mail.

[0199] The mail processing device provided in the embodiment can implement each process in the method embodiment and achieve the same functions and effects, which will not be repeated here.

[0200] Figure 6 Another mail processing device provided in the embodiment is shown in FIG. 6, which includes the following components. Figure 6

[0201] The random number calculation module 602 is configured to determine the number of a specific layout label in a target mail, and calculate a random number based on the number.

[0202] The label sequence identification module 604 is configured to identify a layout label sequence of mail blocks in the target mail, and construct a matrix based on the layout label sequence of the mail blocks to obtain an encrypted matrix. ​

[0203] The decryption processing module 606 is configured to decrypt the encrypted matrix according to the random number to obtain a decrypted matrix, and convert the encrypted value of the decrypted matrix to obtain the encrypted value of each mail block.

[0204] The verification processing module 608 is configured to calculate the encrypted value of each mail block after deleting the layout label sequence, and perform verification processing on each mail block according to the encrypted value and the calculated encrypted value.

[0205] The mail processing device provided in the embodiment first determines the number of specific layout labels in the target mail by running the random number calculation module 602, calculates a random number based on the number, runs the label sequence identification module 604 to identify the layout label sequence of each mail block in the target mail, and constructs a matrix based on the layout label sequence of each mail block to obtain an encrypted matrix. Then, the decryption processing module 606 is run to decrypt the encrypted matrix according to the random number to obtain a decrypted matrix, and convert the encrypted value of the decrypted matrix to obtain the encrypted value of each mail block. Finally, the verification processing module 608 is run to calculate the encrypted value of each mail block after deleting the layout label sequence, and perform verification processing on each mail block according to the encrypted value and the calculated encrypted value, so as to improve the convenience and effectiveness of mail verification.

[0206] The mail processing device provided in the embodiment first determines the number of specific layout labels in the target mail by running the random number calculation module 602, calculates a random number based on the number, runs the label sequence identification module 604 to identify the layout label sequence of each mail block in the target mail, and construct a matrix based on the layout label sequence of each mail block to obtain an encrypted matrix. Then, the decryption processing module 606 is run to decrypt the encrypted matrix according to the random number to obtain a decrypted matrix, and convert the encrypted value of the decrypted matrix to obtain the encrypted value of each mail block. Finally, the verification processing module 608 is run to calculate the encrypted value of each mail block after deleting the layout label sequence, and perform verification processing on each mail block according to the encrypted value and the calculated encrypted value, so as to improve the convenience and effectiveness of mail verification.

[0207] Further, one embodiment of the present specification also provides a mail processing device, Figure 7 The structure diagram of the mail processing device provided in one embodiment of the present specification is shown in the figure, Figure 7 The device includes a memory 701, a processor 702, a bus 703 and a communication interface 704. The memory 701, the processor 702 and the communication interface 704 communicate through the bus 703. The communication interface 704 can include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0208] Figure 7 In the embodiment, the memory 701 stores computer executable instructions executable on the processor 702. When the computer executable instructions are executed by the processor 702, the following processes are implemented:

[0209] The encrypted value of each mail block of the initial mail is calculated to obtain the encrypted value of each mail block.

[0210] constructing a matrix based on the encoding values of the mail blocks to obtain an encoding matrix, and encrypting the encoding matrix based on a random number generated in advance to obtain an encrypted matrix;

[0211] determining a layout label sequence of the mail blocks corresponding to the encrypted matrix, and writing the layout label sequence into the mail blocks to obtain an intermediate mail;

[0212] performing writing processing of a specific layout label in the intermediate mail based on the random number and a number of the specific layout label in the intermediate mail to obtain a target mail.

[0213] The mail processing device provided in the embodiment can calculate encoding values of a plurality of mail blocks of an initial mail through the cooperation of the memory 701, the processor 702, the bus 703 and the communication interface 704, convert the encoding values of the mail blocks into an encoding matrix, encrypt the encoding matrix based on a random number generated in advance to obtain an encrypted matrix, write a layout label sequence of the mail blocks corresponding to the encrypted matrix into the mail blocks to obtain an intermediate mail, and perform writing processing of a specific layout label in the intermediate mail based on the random number and a number of the specific layout label in the intermediate mail to obtain a target mail, so as to improve the communication security of the mail.

[0214] The mail processing device provided in the embodiment of the present specification can implement each process in the foregoing method embodiment and achieve the same functions and effects, which are not repeated here.

[0215] The present specification also provides another mail processing device, Figure 8 A structural schematic diagram of the mail processing device provided in the embodiment of the present specification is shown in Figure 8 The device includes a memory 801, a processor 802, a bus 803 and a communication interface 804. The memory 801, the processor 802 and the communication interface 804 communicate through the bus 803. The communication interface 804 can include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0216] Figure 8 The memory 801 stores computer executable instructions executable on the processor 802. The computer executable instructions are executed by the processor 802 to implement the following processes:

[0217] determining a number of a specific layout label in the target mail, and calculating a random number based on the number;

[0218] identify a layout tag sequence of each mail block in the target mail, and perform matrix construction based on the layout tag sequence of each mail block to obtain an encryption matrix;

[0219] perform decryption processing on the encryption matrix based on the random number to obtain a decryption matrix, and perform code value conversion on the decryption matrix to obtain the code value of each mail block;

[0220] perform code value calculation on each mail block after deleting the layout tag sequence, and perform check processing on each mail block based on the code value and the calculated code value.

[0221] The mail processing device provided in the embodiment calculates a random number based on the number of specific layout tags in a target mail, identifies a layout tag sequence of each mail block in the target mail, performs matrix construction based on the layout tag sequence of each mail block to obtain an encryption matrix, performs decryption processing on the encryption matrix based on the random number to obtain a decryption matrix, then converts the decryption matrix into the code value of each mail block, performs code value calculation on each mail block after deleting the layout tag sequence, and performs check processing on each mail block based on the code value of each mail block and the calculated code value, thereby improving the convenience and effectiveness of mail check.

[0222] Another mail processing device provided in an embodiment of the present specification can implement each process in the foregoing another method embodiment and achieve the same functions and effects, which are not repeated here.

[0223] Further, another embodiment of the present specification also provides a computer readable storage medium for storing computer executable instructions, wherein the computer executable instructions are executed by a processor to implement the following processes:

[0224] perform code value calculation on a plurality of mail blocks of an initial mail to obtain the code value of each mail block;

[0225] perform matrix construction based on the code value of each mail block to obtain an encryption matrix, and perform encryption processing on the encryption matrix based on a pre-generated random number to obtain an encryption matrix;

[0226] determine a layout tag sequence of each mail block corresponding to the encryption matrix, and write the layout tag sequence into each mail block to obtain an intermediate mail;

[0227] obtain a target mail by performing write processing of specific layout tags in the intermediate mail based on the random number and the number of specific layout tags in the intermediate mail.

[0228] The computer readable storage medium provided by the embodiment encodes the plurality of mail blocks of the initial mail to obtain the encoding values of the mail blocks in the plurality of mail blocks, converts the encoding values of the mail blocks into an encoding matrix, encrypts the encoding matrix by using a random number generated in advance to obtain an encrypted matrix, writes the layout label sequence of each mail block corresponding to the encrypted matrix into each mail block to obtain an intermediate mail, writes the specific layout label in the intermediate mail according to the random number and the number of the specific layout label in the intermediate mail, and obtains a target mail, so as to improve the communication security of the mail.

[0229] The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

[0230] The computer readable storage medium provided by the embodiment of the present specification can realize each process in the foregoing method embodiment and achieve the same functions and effects, which are not repeated here.

[0231] Another embodiment of the present specification also provides another computer readable storage medium for storing computer executable instructions, which are executed by a processor to implement the following processes:

[0232] Determine the number of specific layout labels in the target mail, and calculate a random number based on the number;

[0233] Identify the layout label sequence of each mail block in the target mail, and construct a matrix based on the layout label sequence of each mail block to obtain an encrypted matrix;

[0234] Decrypt the encrypted matrix according to the random number to obtain a decrypted matrix, and convert the decrypted matrix to obtain the encoding values of the mail blocks;

[0235] Calculate the encoding values of each mail block after deleting the layout label sequence, and perform a verification process on each mail block according to the encoding values and the calculated encoding values.

[0236] The computer readable storage medium provided by the embodiment calculates a random number based on the number of specific layout tags in the target email, identifies the layout tag sequence of each email block in the target email, constructs a matrix from the layout tag sequence of each email block to obtain an encryption matrix, decrypts the encryption matrix according to the random number to obtain a decryption matrix, then converts the decryption matrix into the encoding value of each email block, calculates the encoding value of each email block after deleting the layout tag sequence, and checks each email block according to the encoding value of each email block and the calculated encoding value, thereby improving the convenience and effectiveness of email checking.

[0237] The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0238] The other computer readable storage medium provided by an embodiment of the present specification can implement each process in the foregoing another method embodiment and achieve the same functions and effects, which are not repeated here.

[0239] Further, another embodiment of the present specification also provides a computer program product, which, when executed by a processor, implements the following flow:

[0240] The encoding value of each email block is calculated to obtain the encoding value of each email block.

[0241] The encoding matrix is constructed based on the encoding value of each email block to obtain an encoding matrix, and the encoding matrix is encrypted according to the pre-generated random number to obtain an encryption matrix.

[0242] The layout tag sequence corresponding to each email block of the encryption matrix is determined, and the layout tag sequence is written into each email block to obtain an intermediate email.

[0243] According to the number of specific layout tags in the intermediate email and the random number, the writing process of the specific layout tags in the intermediate email is performed to obtain a target email.

[0244] The computer program product provided in the embodiment performs encoding value calculation on a plurality of mail blocks of an initial mail, obtains an encoding value of each mail block in the plurality of mail blocks, converts the encoding value of each mail block into an encoding matrix, encrypts the encoding matrix by using a random number generated in advance to obtain an encrypted matrix, writes a layout label sequence of each mail block corresponding to the encrypted matrix into each mail block to obtain an intermediate mail, and performs writing processing of a specific layout label in the intermediate mail according to the random number and the number of the specific layout label in the intermediate mail to obtain a target mail, thereby improving the communication security of the mail.

[0245] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0246] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0247] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0248] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0249] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0250] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0251] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0252] The computer program product provided in the embodiment can implement each process in the foregoing method embodiment and achieve the same functions and effects, which will not be repeated here.

[0253] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0254] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0255] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0256] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0257] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0258] The memory can include non-persistent memory, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory, etc. in a computer readable storage medium. The memory is an example of computer readable storage media.

[0259] Computer-readable storage media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable storage media does not include transitory media, such as modulated data signals and carrier waves.

[0260] It should also be noted that the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusions, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed, or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0261] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0262] The above only describes the embodiments of the present application and is not intended to limit the present application. Various modifications and changes can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of the claims of the present application.

Claims

1. A mail piece processing method, characterized by, The method comprises: The method comprises: The method comprises: The method comprises: The method comprises:

2. The mail piece processing method of claim 1 wherein, The method comprises: The method comprises: The method comprises:

3. The mail piece processing method of claim 2 wherein, The method comprises: The method comprises: The method comprises:

4. The mail piece processing method of claim 1 wherein, The method comprises: The method comprises: The method comprises:

5. The mail piece processing method of claim 4 wherein, The method comprises: The method comprises: The method comprises:

6. The mail piece processing method of claim 1 wherein, The method comprises: The method comprises: The method comprises:

7. The mail piece processing method of claim 6 wherein, The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises:

8. The mail piece processing method of claim 7 wherein, The generated combined label is written into the intermediate mail to obtain the target mail, comprising: determining the writing position of the generated combined label in the intermediate mail; writing the generated combined label into the intermediate mail according to the writing position to obtain the target mail.

9. The mail piece processing method of claim 1 wherein, The plurality of mail blocks of the initial mail is obtained by: obtaining a to-be-processed mail and identifying the empty layout label in the to-be-processed mail; deleting the empty layout label in the to-be-processed mail to obtain the initial mail, and performing block processing on the initial mail to obtain the plurality of mail blocks.

10. A mail piece processing method, characterized by, The method comprises: determining the number of specific layout labels in the target mail, and calculating a random number based on the number; identifying the layout label sequence of each mail block in the target mail, and constructing a matrix based on the layout label sequence of each mail block to obtain an encrypted matrix; decrypting the encrypted matrix according to the random number to obtain a decrypted matrix, and performing encoding value conversion on the decrypted matrix to obtain the encoding value of each mail block; performing encoding value calculation on each mail block after deleting the layout label sequence, and performing check processing on each mail block according to the encoding value and the calculated encoding value.

11. A mail piece processing apparatus, characterized by: The device comprises: an encoding value calculation module for performing encoding value calculation on the plurality of mail blocks of the initial mail to obtain the encoding value of each mail block; a matrix construction module for constructing a matrix based on the encoding value of each mail block to obtain an encoding matrix, and performing encryption processing on the encoding matrix according to a pre-generated random number to obtain an encrypted matrix; a label sequence writing module for determining the layout label sequence of each mail block corresponding to the encrypted matrix, and writing the layout label sequence into each mail block to obtain an intermediate mail; a label writing module for performing writing processing of specific layout labels in the intermediate mail according to the random number and the number of specific layout labels in the intermediate mail to obtain a target mail.

12. A mail piece processing apparatus, characterized by: The device comprises: a random number calculation module for determining the number of specific layout labels in the target mail, and calculating a random number based on the number; a label sequence identification module for identifying the layout label sequence of each mail block in the target mail, and constructing a matrix based on the layout label sequence of each mail block to obtain an encrypted matrix; a decryption processing module for decrypting the encrypted matrix according to the random number to obtain a decrypted matrix, and performing encoding value conversion on the decrypted matrix to obtain the encoding value of each mail block; a check processing module for performing encoding value calculation on each mail block after deleting the layout label sequence, and performing check processing on each mail block according to the encoding value and the calculated encoding value.

13. A mail piece processing apparatus, characterized by: The device comprises a memory and a processor, and the memory stores computer executable instructions, which, when executed on the processor, can implement the steps of the method of any one of claims 1-9.

14. A mail piece processing apparatus, characterized by: The device comprises a memory and a processor, the memory has computer executable instructions stored thereon, the computer executable instructions, when executed on the processor, can implement the steps of the method of claim 10.

15. A computer-readable storage medium having stored computer-executable instructions, the computer-executable instructions including the following steps: The computer executable instructions, when executed on the processor, can implement the steps of the method of any one of claims 1-9.

16. A computer-readable storage medium having stored computer-executable instructions, the computer-executable instructions including the following steps: The computer executable instructions, when executed on the processor, can implement the steps of the method of claim 10.

17. A computer program product, characterised in that, The computer program product comprises a mail processing program, the mail processing program, when executed on the processor, can implement the steps of the method of any one of claims 1-9.

18. A computer program product, characterised in that, The computer program product comprises a mail processing program, the mail processing program, when executed on the processor, can implement the steps of the method of claim 10. The computer program product comprises a mail processing program, the mail processing program, when executed on the processor, can implement the steps of the method of claim 10.

Citation Information

Patent Citations

  • Identity-encrypted secure E-mail transmission method and system

    CN117155670A

  • Tag generation apparatus, tag verification apparatus, communication system, tag generation method, tag verification method, and recording medium

    US20120057702A1