CN109190394B - Mail transmission method based on encryption technology and terminal equipment - Google Patents

Mail transmission method based on encryption technology and terminal equipment Download PDF

Info

Publication number
CN109190394B
CN109190394B CN201810946846.2A CN201810946846A CN109190394B CN 109190394 B CN109190394 B CN 109190394B CN 201810946846 A CN201810946846 A CN 201810946846A CN 109190394 B CN109190394 B CN 109190394B
Authority
CN
China
Prior art keywords
mail
data
encrypted
trigger instruction
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810946846.2A
Other languages
Chinese (zh)
Other versions
CN109190394A (en
Inventor
吴泽鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810946846.2A priority Critical patent/CN109190394B/en
Publication of CN109190394A publication Critical patent/CN109190394A/en
Application granted granted Critical
Publication of CN109190394B publication Critical patent/CN109190394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/522Barrier synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The application is applicable to the technical field of information safety, and provides a mail transmission method and terminal equipment based on an encryption technology, wherein a data calling thread corresponding to a trigger instruction is operated based on a preset concurrency control rule through the trigger instruction input by a user, and data of the mail is called from an application server through the data calling thread, and the concurrency control rule is limited to only operate one data calling thread at one moment; when the data of all the mail corresponding to the trigger instruction is received, encrypting and compressing the received data of all the mail to generate an encrypted mail data packet; and sending the encrypted mail data packet to a distribution center server to decompress and decrypt the encrypted mail data packet and then performing printing operation so as to reduce the calling abnormality of the mail in the calling process, improve the safety of mail transmission through encryption and ensure the information safety.

Description

Mail transmission method based on encryption technology and terminal equipment
Technical Field
The application belongs to the technical field of information security, and particularly relates to a mail transmission method and terminal equipment based on encryption technology.
Background
It is often desirable to transfer mail between multiple places, whether it is business or government, that can be used to communicate data such as instructions, business information, and help information. In the conventional mail transmission process, a logistics system generally obtains mail data from databases of various institutions, classifies and sorts the mail data, and then forwards the mail data to various target users through a data transmission system.
However, in the conventional mail transfer process, in the stage of acquiring mail data, at one moment, the logistics system may start multiple threads to call data of different databases, so there may be a problem of concurrency exception. When forwarding mail data, if the data volume of the mail data transferred by the logistics system at one time is too large, the problem of slower data transfer can also be caused.
Disclosure of Invention
In view of the above, the embodiment of the application provides a mail transmission method and terminal equipment based on encryption technology, so as to solve the problems of abnormal concurrent processing and slower transmission rate in the mail transmission process in the prior art.
A first aspect of an embodiment of the present application provides a mail transmission method based on encryption technology, including:
receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of a mail from an application server;
operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment;
when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet;
and sending the encrypted mail data packet to a distribution center server, wherein the encrypted mail data packet is used by the distribution center server for printing operation after decompression and decryption so as to finish the electronic data transmission of the mail.
A second aspect of an embodiment of the present application provides a terminal device, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the processor executes the computer program, the processor implements the following steps:
receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of a mail from an application server;
operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment;
when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet;
and sending the encrypted mail data packet to a distribution center server, wherein the encrypted mail data packet is used by the distribution center server for printing operation after decompression and decryption so as to finish the electronic data transmission of the mail.
A third aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which when executed by a processor performs the steps of:
receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of a mail from an application server; operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment; when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet; and sending the encrypted mail data packet to a distribution center server, wherein the encrypted mail data packet is used by the distribution center server for printing operation after decompression and decryption so as to finish the electronic data transmission of the mail.
Optionally, the running the data calling thread corresponding to the trigger instruction based on the preset concurrency control rule includes:
adding more than one data calling thread corresponding to the trigger instruction into a waiting queue, controlling the data calling thread in the waiting queue to compete for a database line lock, running the data calling thread competing for the database line lock, and removing the data calling thread from the waiting queue; and controlling the data calling thread which does not compete for the database line lock to execute interrupt.
Optionally, the mail transmission method based on encryption technology further comprises:
calculating the average duration of the line lock of the database in a preset time period; if the average duration is smaller than a first preset time threshold, starting a lock monitoring thread, and determining a blocking parameter of a database row lock according to the number of threads in a waiting queue by the lock monitoring thread, wherein the blocking parameter is used for indicating the blocking degree of the waiting queue; if the average time length is larger than a second preset time threshold, judging that the database line lock is in a deadlock state, and starting an alarm prompt, wherein the second preset time threshold is larger than the first preset time threshold.
Optionally, the encrypting the received data of all the mail to generate an encrypted mail data set includes:
extracting a mail identification code of a mail corresponding to the trigger instruction; dividing the mail identification code into a plurality of groups according to the preset character number of each group; determining the calculation sequence of the grouping according to the position of the grouping in the mail identification code; taking a preset character string as an initial abstract of the grouping with the calculation sequence as the head; taking the abstract of the last group as the initial abstract of the next group according to the calculation sequence; sequentially executing operations of taking characters contained in the packet and an initial digest of the packet as input values, calculating the digest of the packet through an MD5 digest algorithm until the digest of the last packet is calculated, and taking the digest of the last packet as an encryption key corresponding to the mail; and encrypting all the mail corresponding to the trigger instruction through the encryption key corresponding to each mail to generate more than one encrypted mail, and combining the encrypted mails to generate an encrypted mail data set.
Optionally, the compressing the encrypted mail data set to generate an encrypted mail data packet includes:
compressing each encrypted mail in the encrypted mail data set in parallel to generate more than one compressed mail; detecting the number of the compressed mails and the cyclic redundancy check CRC value of each encrypted mail; combining the compressed mail, generating a compressed mail package, adding the number of the compressed mail and the CRC value of all the encrypted mail to an expansion option for performing the header of the compressed mail package, so as to convert the compressed mail package into the encrypted mail data package.
In the embodiment of the application, through a trigger instruction input by a user, a data calling thread corresponding to the trigger instruction is operated based on a preset concurrency control rule, and the data of the mail is called from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment; when the data of all the mail corresponding to the trigger instruction is received, encrypting and compressing the received data of all the mail to generate an encrypted mail data packet; and sending the encrypted mail data packet to a distribution center server to decompress and decrypt the encrypted mail data packet and then performing printing operation so as to reduce the calling abnormality of the mail in the calling process and improve the security of mail transmission.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an implementation of a mail transmission method based on encryption technology provided by an embodiment of the present application;
FIG. 2 is an encryption flow chart provided by an embodiment of the present application;
FIG. 3 is a compression flow chart provided by an embodiment of the present application;
fig. 4 is a block diagram of a mail transmission device based on encryption technology according to an embodiment of the present application;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
Fig. 1 shows a flow of implementation of a mail transmission method based on encryption technology according to an embodiment of the present application, where the flow of the method includes steps S101 to S104. The specific implementation principle of each step is as follows.
S101: and receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of one mail from an application server.
Notably, mail is a carrier used in business or government activities to communicate data such as instructions, business information, and help information. In the embodiment of the application, a large logistics system is composed of a plurality of internal systems, and each internal system comprises a central server which can call the electronic data of the mail from a plurality of application servers. The central server of an internal system then sends the electronic data of the mail to the distribution central server of the logistics system, which in real life may be the server of the post office, which distributes and forwards the electronic data of the mail to the individual users after printing it as paper mail.
In the embodiment of the application, because the system is deployed by adopting multiple instances, a plurality of application program servers are operated at the same time, after the central server of the internal system receives a trigger instruction input by a user, the central server can send an instruction for calling data to more than one application program server based on the trigger instruction, and each application program server feeds back related data to the central server according to the instruction for sending the data to the central server of the internal system.
In the embodiment of the application, the central server of the internal system can run a plurality of data calling threads, but each data calling thread can only call the data of one mail from one application server.
It will be appreciated that in order for a user to invoke a type of mail and transfer the mail to the associated receiving method, a trigger is first entered into the internal system, where the trigger includes mail description information, and data such as the address of the recipient, where one mail description information may correspond to a plurality of mail.
S102: and operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment.
In the embodiment of the application, since one data calling thread can only call the data of one function from the application server, when the trigger instruction corresponds to a plurality of functions, a plurality of data calling threads need to be operated.
Notably, in order to avoid the problem of multiple concurrency when multiple data calling threads are simultaneously operated, the embodiment of the application adopts the database line lock to limit the operation of the multiple data calling threads, and specifically only allows one data calling thread to be operated at one moment.
Optionally, adding more than one data calling thread corresponding to the trigger instruction into a waiting queue, controlling the data calling thread in the waiting queue to compete for a database line lock, running the data calling thread competing for the database line lock, and removing the data calling thread from the waiting queue.
Optionally, controlling the data call thread which does not compete to the database line lock to execute the interrupt.
It can be appreciated that through the above-mentioned limiting process, multiple concurrency problems can be effectively avoided, and in addition, since the actual running time of each data calling thread is multipolar short, the running time is not significantly prolonged in the actual running process.
Notably, since various execution anomalies may occur during execution of the database row lock, the embodiment of the present application also provides a coping method, which is specifically as follows:
and calculating the average duration of the held database row lock in a preset time period.
Optionally, if the average duration is smaller than a first preset time threshold, starting a lock monitoring thread, where the lock monitoring thread determines a blocking parameter of a database line lock according to the number of threads in a waiting queue, and the blocking parameter is used to represent the blocking degree of the waiting queue.
Alternatively, the formula may be:and calculating the blocking parameter of the database row lock, wherein par represents the blocking parameter, num represents the thread number of the waiting queue, and t represents the average duration of the database row lock in a preset time period. It will be appreciated that the greater t, the greater par. When the blocking parameter is larger than a preset parameter threshold, the blocking parameter is proved to be too large, and in the embodiment of the application, the user is prompted with too many functions.
Optionally, if the average time length is greater than a second preset time threshold, determining that the database line lock is in a deadlock state, and starting an alarm prompt, wherein the second preset time threshold is greater than the first preset time threshold.
And S103, when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet.
In the embodiment of the application, only after the central server of one internal system receives the data of all the mail corresponding to the trigger instruction through the data calling thread, two processing procedures of encryption and compression are started.
Fig. 2 shows an encryption flowchart provided by an embodiment of the present application, and is described in detail below:
s201, extracting a mail identification code of the mail corresponding to the trigger instruction.
It will be appreciated that in the embodiment of the application, the mail description information in the trigger instruction contains the mail identification code of more than one mail, since the trigger instruction is required to accurately deliver which mail needs to be invoked. The mail identification code is used to uniquely identify one mail, and the mail identification codes of different mail are also different.
S202, dividing the mail identification code into a plurality of groups according to the preset character number of each group.
Illustratively, assuming a fixed number of characters per packet of 5 and a mail identification code of 27, the mail identification code can be divided into 6 packets, with the last packet ending 3 being complemented by 0.
S203, determining the calculation sequence of the grouping according to the position of the grouping in the mail identification code.
In the embodiment of the application, starting from the leftmost side of the mail identification code, according to the position of the packet in the mail identification code, the packet digest of each packet is calculated sequentially from left to right, and the specific calculation method is described in detail below.
S204, taking the preset character string as an initial abstract of the grouping with the calculation sequence as the head.
S205, taking the abstract of the previous grouping as the initial abstract of the next grouping according to the calculation sequence; and sequentially executing operations of taking characters contained in the packet and an initial digest of the packet as input values, calculating the digest of the packet through an MD5 digest algorithm until the digest of the last packet is calculated, and taking the digest of the last packet as an encryption key corresponding to the mail.
S206, encrypting all the mails corresponding to the trigger instruction through the encryption keys corresponding to the mails to generate more than one encrypted mail, and combining the encrypted mails to generate an encrypted mail data set.
It can be appreciated that through the encryption process described above, the problem of disclosure of the data of the mail during the electronic transmission stage can be effectively solved.
Fig. 3 shows a compression flow chart provided by an embodiment of the present application, which is described in detail below:
s301, compressing each encrypted mail in the encrypted mail data set in parallel to generate more than one compressed mail.
S302, detecting the number of the compressed mails and the cyclic redundancy check CRC value of each encrypted mail.
Notably, since the embodiment of the present application adopts parallel compression, the data sets of the encrypted mail need to be compressed by multiple compression engines in the central server of the internal system, so in order to check whether each data is correct after decompression, the embodiment of the present application detects the number of the compressed mail and the cyclic redundancy check CRC value of each encrypted mail during compression.
S303, combining the compressed mail, generating a compressed mail packet, adding the number of the compressed mail and the CRC value of all the encrypted mail to an expansion option of the header of the compressed mail packet, so as to convert the compressed mail packet into the encrypted mail data packet.
It can be appreciated that in the embodiment of the present application, the data amount of the mail data in the electronic transmission stage can be reduced by the above-mentioned compression process, which is beneficial to saving the transmission bandwidth.
S104, the encrypted mail data packet is sent to a distribution center server, and the encrypted mail data packet is used by the distribution center server to perform printing operation after decompression and decryption so as to end the electronic data transmission of the mail.
In the embodiment of the application, the distribution center server can print the mail data in electronic form, generate paper mail and send the mail to the corresponding receiver address contained in the trigger instruction.
It can be understood that, by a trigger instruction input by a user, a data calling thread corresponding to the trigger instruction is operated based on a preset concurrency control rule, and the data of the mail is called from the application server by the data calling thread, and the concurrency control rule limits that only one data calling thread is operated at a moment; when the data of all the mail corresponding to the trigger instruction is received, encrypting and compressing the received data of all the mail to generate an encrypted mail data packet; and sending the encrypted mail data packet to a distribution center server to decompress and decrypt the encrypted mail data packet and then performing printing operation so as to reduce the calling abnormality of the mail in the calling process and improve the mail transmission security based on the encryption technology.
Fig. 4 shows a block diagram of a mail transmission device based on encryption technology according to an embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
Referring to fig. 4, the apparatus includes:
a receiving module 401, configured to receive a trigger instruction input by a user, where the trigger instruction corresponds to more than one data calling thread, and each data calling thread is configured to call data of one mail from an application server;
an operation module 402, configured to operate a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and call data of the mail from the application server through the data calling thread, where the concurrency control rule limits only one data calling thread to operate at a time;
a processing module 403, configured to encrypt the received data of all the mail when the data of all the mail corresponding to the trigger instruction is received, generate an encrypted mail data set, and compress the encrypted mail data set to generate an encrypted mail data packet;
a transmission module 404, configured to send the encrypted mail data packet to a distribution center server, where the encrypted mail data packet is used by the distribution center server to perform a printing operation after decompression and decryption to end the electronic data transmission of the mail.
Optionally, the running the data calling thread corresponding to the trigger instruction based on the preset concurrency control rule includes:
adding more than one data calling thread corresponding to the trigger instruction into a waiting queue, controlling the data calling thread in the waiting queue to compete for a database line lock, running the data calling thread competing for the database line lock, and removing the data calling thread from the waiting queue;
and controlling the data calling thread which does not compete for the database line lock to execute interrupt.
Optionally, the apparatus further comprises:
the calculation module is used for calculating the average duration of the database row lock in a preset time period;
the first execution module is used for starting a lock monitoring thread if the average duration is smaller than a first preset time threshold, and determining a blocking parameter of a database row lock according to the number of threads in a waiting queue, wherein the blocking parameter is used for indicating the blocking degree of the waiting queue;
and the second execution module is used for judging that the database line lock is in a deadlock state and starting an alarm prompt if the average time length is larger than a second preset time threshold value, wherein the second preset time threshold value is larger than the first preset time threshold value.
Optionally, the encrypting the received data of all the mail to generate an encrypted mail data set includes:
extracting a mail identification code of a mail corresponding to the trigger instruction;
dividing the mail identification code into a plurality of groups according to the preset character number of each group;
determining the calculation sequence of the grouping according to the position of the grouping in the mail identification code;
taking a preset character string as an initial abstract of the grouping with the calculation sequence as the head;
taking the abstract of the last group as the initial abstract of the next group according to the calculation sequence; sequentially executing operations of taking characters contained in the packet and an initial digest of the packet as input values, calculating the digest of the packet through an MD5 digest algorithm until the digest of the last packet is calculated, and taking the digest of the last packet as an encryption key corresponding to the mail;
and encrypting all the mail corresponding to the trigger instruction through the encryption key corresponding to each mail to generate more than one encrypted mail, and combining the encrypted mails to generate an encrypted mail data set.
Optionally, the compressing the encrypted mail data set to generate an encrypted mail data packet includes:
compressing each encrypted mail in the encrypted mail data set in parallel to generate more than one compressed mail;
detecting the number of the compressed mails and the cyclic redundancy check CRC value of each encrypted mail;
combining the compressed mail, generating a compressed mail package, adding the number of the compressed mail and the CRC value of all the encrypted mail to an expansion option for performing the header of the compressed mail package, so as to convert the compressed mail package into the encrypted mail data package.
It can be understood that, by a trigger instruction input by a user, a data calling thread corresponding to the trigger instruction is operated based on a preset concurrency control rule, and the data of the mail is called from the application server by the data calling thread, and the concurrency control rule limits that only one data calling thread is operated at a moment; when the data of all the mail corresponding to the trigger instruction is received, encrypting and compressing the received data of all the mail to generate an encrypted mail data packet; and sending the encrypted mail data packet to a distribution center server to decompress and decrypt the encrypted mail data packet and then performing printing operation so as to reduce the calling abnormality of the mail in the calling process and improve the mail transmission security based on the encryption technology.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50, for example a mail transfer program based on encryption technology. The processor 50, when executing the computer program 52, implements the steps of the various embodiments of the mail transfer method described above based on encryption techniques, such as steps 101 to 104 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, performs the functions of the modules/units of the apparatus embodiments described above, e.g., the functions of the units 401 to 404 shown in fig. 4.
By way of example, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 52 in the terminal device 5.
The terminal device 5 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the terminal device 5 and does not constitute a limitation of the terminal device 5, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 50 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program as well as other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (8)

1. A mail transmission method based on encryption technology, comprising:
receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of a mail from an application server;
operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment;
when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet;
sending the encrypted mail data packet to a distribution center server, the encrypted mail data packet being used by the distribution center server to perform a printing operation after decompression and decryption to end the electronic data transmission of the mail;
encrypting the received data of all the mail to generate an encrypted mail data set, which comprises the following steps:
extracting a mail identification code of a mail corresponding to the trigger instruction;
dividing the mail identification code into a plurality of groups according to the preset character number of each group;
determining the calculation sequence of the grouping according to the position of the grouping in the mail identification code;
taking a preset character string as an initial abstract of the grouping with the calculation sequence as the head;
taking the abstract of the last group as the initial abstract of the next group according to the calculation sequence; sequentially executing operations of taking characters contained in the packet and an initial digest of the packet as input values, calculating the digest of the packet through an MD5 digest algorithm until the digest of the last packet is calculated, and taking the digest of the last packet as an encryption key corresponding to the mail;
and encrypting all the mail corresponding to the trigger instruction through the encryption key corresponding to each mail to generate more than one encrypted mail, and combining the encrypted mails to generate an encrypted mail data set.
2. The mail transmission method based on encryption technology as set forth in claim 1, wherein the running the data call thread corresponding to the trigger instruction based on the preset concurrency control rule includes:
adding more than one data calling thread corresponding to the trigger instruction into a waiting queue, controlling the data calling thread in the waiting queue to compete for a database line lock, running the data calling thread competing for the database line lock, and removing the data calling thread from the waiting queue;
and controlling the data calling thread which does not compete for the database line lock to execute interrupt.
3. The mail transmission method based on encryption technology of claim 2, further comprising:
calculating the average duration of the line lock of the database in a preset time period;
if the average duration is smaller than a first preset time threshold, starting a lock monitoring thread, and determining a blocking parameter of a database row lock according to the number of threads in a waiting queue by the lock monitoring thread, wherein the blocking parameter is used for indicating the blocking degree of the waiting queue;
if the average time length is larger than a second preset time threshold, judging that the database line lock is in a deadlock state, and starting an alarm prompt, wherein the second preset time threshold is larger than the first preset time threshold.
4. The encryption technology based mail transfer method of claim 1 wherein the compressing the encrypted mail data set to generate an encrypted mail data packet comprises:
compressing each encrypted mail in the encrypted mail data set in parallel to generate more than one compressed mail;
detecting the number of the compressed mails and the cyclic redundancy check CRC value of each encrypted mail;
combining the compressed mail, generating a compressed mail package, adding the number of the compressed mail and the CRC value of all the encrypted mail to an expansion option for performing the header of the compressed mail package, so as to convert the compressed mail package into the encrypted mail data package.
5. A terminal device comprising a memory and a processor, said memory storing a computer program executable on said processor, characterized in that said processor, when executing said computer program, performs the steps of:
receiving a trigger instruction input by a user, wherein the trigger instruction corresponds to more than one data calling thread, and each data calling thread is used for calling data of a mail from an application server;
operating a data calling thread corresponding to the trigger instruction based on a preset concurrency control rule, and calling the data of the mail from the application server through the data calling thread, wherein the concurrency control rule limits that only one data calling thread is operated at one moment;
when the data of all the mails corresponding to the trigger instruction are received, encrypting the received data of all the mails to generate an encrypted mail data set, and compressing the encrypted mail data set to generate an encrypted mail data packet;
sending the encrypted mail data packet to a distribution center server, the encrypted mail data packet being used by the distribution center server to perform a printing operation after decompression and decryption to end the electronic data transmission of the mail;
encrypting the received data of all the mail to generate an encrypted mail data set, which comprises the following steps:
extracting a mail identification code of a mail corresponding to the trigger instruction;
dividing the mail identification code into a plurality of groups according to the preset character number of each group;
determining the calculation sequence of the grouping according to the position of the grouping in the mail identification code;
taking a preset character string as an initial abstract of the grouping with the calculation sequence as the head;
taking the abstract of the last group as the initial abstract of the next group according to the calculation sequence; sequentially executing operations of taking characters contained in the packet and an initial digest of the packet as input values, calculating the digest of the packet through an MD5 digest algorithm until the digest of the last packet is calculated, and taking the digest of the last packet as an encryption key corresponding to the mail;
and encrypting all the mail corresponding to the trigger instruction through the encryption key corresponding to each mail to generate more than one encrypted mail, and combining the encrypted mails to generate an encrypted mail data set.
6. The terminal device of claim 5, wherein the running the data call thread corresponding to the trigger instruction based on the preset concurrency control rule includes:
adding more than one data calling thread corresponding to the trigger instruction into a waiting queue, controlling the data calling thread in the waiting queue to compete for a database line lock, running the data calling thread competing for the database line lock, and removing the data calling thread from the waiting queue;
and controlling the data calling thread which does not compete for the database line lock to execute interrupt.
7. The terminal device of claim 5, wherein the compressing the encrypted mail data set to generate an encrypted mail data packet comprises:
compressing each encrypted mail in the encrypted mail data set in parallel to generate more than one compressed mail;
detecting the number of the compressed mails and the cyclic redundancy check CRC value of each encrypted mail;
combining the compressed mail, generating a compressed mail package, adding the number of the compressed mail and the CRC value of all the encrypted mail to an expansion option for performing the header of the compressed mail package, so as to convert the compressed mail package into the encrypted mail data package.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 4.
CN201810946846.2A 2018-08-20 2018-08-20 Mail transmission method based on encryption technology and terminal equipment Active CN109190394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810946846.2A CN109190394B (en) 2018-08-20 2018-08-20 Mail transmission method based on encryption technology and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810946846.2A CN109190394B (en) 2018-08-20 2018-08-20 Mail transmission method based on encryption technology and terminal equipment

Publications (2)

Publication Number Publication Date
CN109190394A CN109190394A (en) 2019-01-11
CN109190394B true CN109190394B (en) 2023-10-20

Family

ID=64918858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810946846.2A Active CN109190394B (en) 2018-08-20 2018-08-20 Mail transmission method based on encryption technology and terminal equipment

Country Status (1)

Country Link
CN (1) CN109190394B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004046709A1 (en) * 2004-09-25 2006-04-13 Graficon Gmbh & Co. Kg Paper letter writing method for computer, involves electronically transmitting clearance to server, adding handwritten signature of person to letter in electronic form, and printing electronic letter together with signature as paper letter
JP2011097480A (en) * 2009-10-30 2011-05-12 Canon It Solutions Inc Device for controlling encryption/decryption of e-mail, method of controlling the same, and program
CN103164273A (en) * 2012-09-06 2013-06-19 佳都新太科技股份有限公司 Method for changing synchronous service call to asynchronous parallel call with self-expanding choking algorithm

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102012222995B3 (en) * 2012-12-12 2013-10-02 Deutsche Post Ag Method for the secure transmission of a digital message
WO2015177819A1 (en) * 2014-05-20 2015-11-26 Pancari Massimiliano Antonio Digitized postal service system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004046709A1 (en) * 2004-09-25 2006-04-13 Graficon Gmbh & Co. Kg Paper letter writing method for computer, involves electronically transmitting clearance to server, adding handwritten signature of person to letter in electronic form, and printing electronic letter together with signature as paper letter
JP2011097480A (en) * 2009-10-30 2011-05-12 Canon It Solutions Inc Device for controlling encryption/decryption of e-mail, method of controlling the same, and program
CN103164273A (en) * 2012-09-06 2013-06-19 佳都新太科技股份有限公司 Method for changing synchronous service call to asynchronous parallel call with self-expanding choking algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪强 等.新型网络函件系统的设计.计算机应用研究.2004,(第05期),第229-231页. *

Also Published As

Publication number Publication date
CN109190394A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US11687375B2 (en) Technologies for hybrid field-programmable gate array application-specific integrated circuit code acceleration
US9792229B2 (en) Protecting a memory
US20160094347A1 (en) Method and system for secure management of computer applications
CN105531713A (en) Generating multiple secure hashes from a single data buffer
CN105743610B (en) The technology of data integrity for Multi net voting division operation
US9953184B2 (en) Customized trusted computer for secure data processing and storage
CN107113180B (en) Packet transmission device, packet reception device, and storage medium
CN110932892B (en) Block chain based information early warning method and device, related nodes and storage medium
CN109614789B (en) Terminal equipment verification method and equipment
CN113452527A (en) Robust state synchronization for stateful hash-based signatures
EP3044678A1 (en) Failure recovery of a task state in batch-based stream processing
CN114035987A (en) Data transmission method and device based on message queue, electronic equipment and medium
US9559838B2 (en) Method of processing data protected against fault injection attacks and associated device
CN111338688A (en) Long-acting data caching method and device, computer system and readable storage medium
CN114048201A (en) Distributed stream computing engine Flink-based key field real-time deduplication method
CN109190394B (en) Mail transmission method based on encryption technology and terminal equipment
CN110234082B (en) Addressing method and device of mobile terminal, storage medium and server
US20220345292A1 (en) Method and device for encryption of video stream, communication equipment, and storage medium
CN110585727B (en) Resource acquisition method and device
CN115909560A (en) Data encryption method, data decryption method and door lock system
EP3588841A1 (en) Method and device for executing an authentication scheme
CN113765651A (en) Safety communication method suitable for chips in vehicle-mounted ECU
CN113742071A (en) Task processing method and electronic equipment
WO2023216077A1 (en) Attestation method, apparatus and system
Tanygin et al. The Method for Reducing Memory Costs for Messages Processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant