A method and device for secure data transmission

By performing dual encryption processing based on the information acquisition time and type matching encryption algorithm in data transmission, and performing data compression and format conversion, data security problems in cross-system or cross-platform data transmission are solved, ensuring that data is between different systems. Safe transmission.

CN114422134BActive Publication Date: 2024-11-19浪潮工业互联网股份有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111591053.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-11-19
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

In the process of enterprise informatization, cross-system or cross-platform data transmission is easily acquired by unauthorized users, resulting in data leakage and low security.

Method used

By obtaining the information acquisition time and data type of information to be transmitted, matching the corresponding encryption algorithm for dual encryption processing, and compressing and converting the encrypted data to ensure the security of the data during transmission.

Benefits of technology

Effectively prevent unauthorized users from obtaining and viewing data, ensuring the data security of enterprises during data interaction between different systems and platforms, and preventing data leakage and illegal utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114422134B_ABST
    Figure CN114422134B_ABST
Patent Text Reader

Abstract

The present application provides a data security transmission method and device, and the present application belongs to the field of computer technology. The method obtains the information to be transmitted of the file stream; matches the corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted. Generate the first encrypted ciphertext corresponding to the information to be transmitted through the first encryption algorithm. Based on the information length of the first encrypted ciphertext, match the second encryption algorithm, and encrypt the first encrypted ciphertext according to the second encryption algorithm to obtain the second encrypted ciphertext. Compress the second encrypted ciphertext, add the compressed second encrypted ciphertext to the file stream, and send the file stream with the second encrypted ciphertext added to the transmission destination system. The above method ensures the data security of the enterprise during the data interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for secure data transmission. Background Art

[0002] At present, enterprise informatization is developing at a high speed. In the process of enterprise informatization transformation, it is inevitable to purchase multiple sets of different systems or platform products related to procurement, production, sales, etc.

[0003] Since data transmission needs to be carried out across systems and platforms, data can be easily obtained by unauthorized users during the process of cross-system or cross-platform data transmission, causing data leakage, or even obtained and used by criminals to obtain illegal profits.

[0004] Based on this, there is an urgent need for a technical solution that can ensure the data security of enterprises during data interaction between different systems and platforms. Summary of the invention

[0005] The embodiments of the present application provide a data security transmission method and device for ensuring the data security of an enterprise during data interaction between different systems and platforms.

[0006] On the one hand, an embodiment of the present application provides a method for secure data transmission, the method comprising:

[0007] Obtain information to be transmitted from a file stream. Match a corresponding first encryption algorithm according to the information acquisition time and the data type of the information to be transmitted. Generate a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm. Match a second encryption algorithm based on the information length of the first encrypted ciphertext, and encrypt the first encrypted ciphertext according to the second encryption algorithm to obtain a second encrypted ciphertext. Compress the second encrypted ciphertext, add the compressed second encrypted ciphertext to the file stream, and send the file stream with the second encrypted ciphertext added to the transmission destination system.

[0008] In one implementation of the present application, a number of random numbers are generated according to the information acquisition time of the information to be transmitted. Among them, the random number is a number of at least two digits. Determine whether each random number and the serial number of each encryption algorithm in the encryption algorithm set meet a preset condition. Among them, the preset condition is used to determine whether the digital pool corresponding to each random number and the serial number of each encryption algorithm in the encryption algorithm set meets the preset rule. The preset rule is that the number of matches between each random number and the number in the digital pool is greater than the preset value. The units digit of each number in the digital pool is the serial number. When each random number and the serial number of each encryption algorithm in the encryption algorithm set meet the preset condition, determine the corresponding sequence group. Among them, the sequence group includes at least two sequence numbers. Determine the first encryption algorithm based on the sequence group and the data type of the information to be transmitted.

[0009] In one implementation of the present application, according to the data type of the information to be transmitted, a pending encryption algorithm matching the data type in the preset comparison table is determined, and an encryption algorithm matching each encryption algorithm corresponding to the sequence group and the pending encryption algorithm is determined as the first encryption algorithm.

[0010] In one implementation of the present application, a corresponding verification code list is determined according to the information acquisition time of the information to be transmitted. The verification codes in the verification code list correspond to each preset encryption algorithm. The preset encryption algorithm includes a first encryption algorithm. The preset encryption algorithm includes at least one or more of the following: BASE64, a symmetric encryption algorithm, an asymmetric encryption algorithm, a digital signature algorithm, and a digital certificate based on 64 printable characters to represent binary data. According to the first encryption algorithm, the corresponding ciphertext verification code in the verification code list is determined. The ciphertext verification code is spliced ​​to the information to be transmitted encrypted by the first encryption algorithm to generate a first encrypted ciphertext.

[0011] In one implementation of the present application, the first encrypted ciphertext is cut at preset intervals in a preset order to obtain a ciphertext block sequence. A ciphertext block whose character length is less than a preset threshold in the ciphertext block sequence is determined as a ciphertext block to be spliced. The ratio of the character length of the ciphertext block to be spliced ​​to the character length of the information to be transmitted is determined. Based on the ratio, a corresponding second encryption algorithm is determined from a preset matching algorithm table. The matching algorithm table is used to indicate the corresponding relationship between the ratio and each preset encryption algorithm.

[0012] In one implementation of the present application, according to the data type of the information to be transmitted and the transmission destination system, a corresponding matching compression method is determined from preset pending compression methods. The pending compression method includes at least one or more of the following: lossless data compression algorithm DEFLATE, GNU free software file compression program, snappy, xz. By matching the compression method, the second encrypted ciphertext is compressed, and the compressed second encrypted ciphertext is added to the file stream.

[0013] In one implementation of the present application, an identifier of the second encryption algorithm is determined, and the identifier is encrypted by transmitting the public key of the destination system. The first encrypted ciphertext is encrypted by the second encryption algorithm, and the encrypted identifier is combined with the encrypted first encrypted ciphertext to obtain the second encrypted ciphertext.

[0014] In one implementation of the present application, a transmission destination system of the information to be transmitted is determined. According to the supported data format of the transmission destination system, a corresponding format conversion module is matched to perform a format conversion operation on the information to be transmitted through the format conversion module. The format conversion operation includes at least one or more of the following: data splicing, data twisting, data substitution, and data transcoding.

[0015] In one implementation of the present application, a preset data processing mode is matched according to the reflection mechanism and the transmission source system of the information to be transmitted. The data processing modes include: full acquisition, incremental acquisition, data modification, and data deletion. Based on the data screening instructions obtained in real time, the information to be transmitted of the file stream is obtained through the matched data processing mode.

[0016] On the other hand, an embodiment of the present application further provides a data security transmission device, the device comprising:

[0017] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0018] Obtain information to be transmitted from a file stream. Match a corresponding first encryption algorithm according to the information acquisition time and the data type of the information to be transmitted. Generate a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm. Match a second encryption algorithm based on the information length of the first encrypted ciphertext, and encrypt the first encrypted ciphertext according to the second encryption algorithm to obtain a second encrypted ciphertext. Compress the second encrypted ciphertext, add the compressed second encrypted ciphertext to the file stream, and send the file stream with the second encrypted ciphertext added to the transmission destination system.

[0019] Through the above solution, the information to be transmitted across systems can be encrypted twice and sent to the transmission destination system, thereby ensuring the data security of the enterprise during data interaction between different systems and platforms, and preventing unauthorized users from obtaining and viewing data and damaging the legitimate interests of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A schematic diagram of a flow chart of a data security transmission method in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a data security transmission method in an embodiment of the present application;

[0023] Figure 3 Another schematic diagram of a flow chart of a data security transmission method in an embodiment of the present application;

[0024] Figure 4 This is a structural diagram of a data security transmission device in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0026] With the advent of enterprise informatization, data application scenarios are becoming more and more extensive, and cross-system and cross-platform data interactions are becoming more and more common. During data transmission, data is easily obtained by unauthorized users and extracted by the user, resulting in low data security.

[0027] Based on this, the embodiments of the present application provide a data security transmission method and device to ensure the data security of an enterprise during data interaction between different systems and platforms.

[0028] The following describes in detail various embodiments of the present application in conjunction with the accompanying drawings.

[0029] The present application embodiment provides a data security transmission method, such as Figure 1 As shown, the method may include steps S101-S105:

[0030] S101: The server obtains information of a file stream to be transmitted.

[0031] The file stream is inherited from the input and output stream iostream. The file stream, iostream, and string stream sstream together constitute the input / output (IO) standard library as header files. The information to be transmitted is the information in the file stream transmitted by the first system and the second system. The information to be transmitted is the information transmitted across systems or platforms, such as Figure 2 As shown, the first system 201 transmits information 202 to the second system 204 via the server 203 .

[0032] It should be noted that the server, as the executor of the data security transmission method, is only an example. The executor is not limited to the server, and this application does not make any specific limitations on this.

[0033] In the embodiment of the present application, the server obtains the information to be transmitted of the file stream, specifically including:

[0034] First, the server matches the preset data processing mode according to the reflection mechanism and the transmission source system of the information to be transmitted.

[0035] Among them, data processing modes include: full acquisition, incremental acquisition, data modification, and data deletion.

[0036] Reflection mechanism mainly refers to the ability of a program to access, detect and modify its own state or behavior. The server accesses the information to be transmitted according to the reflection mechanism and determines the transmission source system of the information to be transmitted, such as Figure 2 The first system 201 in the embodiment. The server determines the data processing mode corresponding to the transmission source system through the reflection mechanism. Each transmission source system may correspond to different types of data processing modes, which may be set or selected during actual use. The present application does not specifically limit the specific manner in which the transmission source system corresponds to different data processing modes through the reflection mechanism.

[0037] Then, the server obtains the information to be transmitted of the file stream based on the data screening instructions obtained in real time and through the matching data processing mode.

[0038] In an embodiment of the present application, the server can communicate with an external user terminal or management terminal in real time, and the content of the communication can be a data screening instruction. For example, if the information to be transmitted is the result of a physical examination of middle school students in a class, the data screening instruction of the server can be to screen the physical examination results of male students in the information to be transmitted, or the data screening instruction can be to screen a certain data in the physical examination results in the information to be transmitted, such as height and weight data. User terminals and management terminals can be terminal devices such as mobile phones and computers, and the present application does not specifically limit the type of this terminal device.

[0039] In the embodiment of the present application, after the server obtains the information to be transmitted of the file stream, it can also execute the following method:

[0040] First, the server determines the destination system for the information to be transmitted.

[0041] The server can determine the transmission destination system corresponding to the information to be transmitted through the information to be transmitted. The transmission destination system is as follows: Figure 2 The second system 204 in.

[0042] Then, the server matches the corresponding format conversion module according to the supported data format of the transmission destination system, so as to perform format conversion operation on the information to be transmitted through the format conversion module.

[0043] The format conversion operation includes at least one or more of the following: data splicing, data twisting, data substitution, and data transcoding.

[0044] The server can determine the data format supported by the transmission destination system. For example, if the transmission destination system supports binary format, and the current information to be transmitted is in character format, then the format conversion module matched by the server is a character-to-binary format conversion module. Among them, the format conversion module can support operations such as data splicing, data twisting, data substitution, and data transcoding.

[0045] S102: The server matches a corresponding first encryption algorithm according to the information acquisition time and the data type of the information to be transmitted.

[0046] In the embodiment of the present application, the server matches the corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted, such as Figure 3 As shown, the specific steps include:

[0047] S301, the server generates several random numbers according to the information acquisition time of the information to be transmitted.

[0048] The random number is a number of at least two digits.

[0049] In an embodiment of the present application, the server generates a number of random numbers based on the information acquisition time of the information to be transmitted, which can be a number of at least two digits generated by randomly combining the time digits in the time when the information to be transmitted was acquired.

[0050] For example, the time when the information to be transmitted is acquired is the Coordinated Universal Time: 2021010101010101, then the random number can be a combination of at least two digits formed by each number in the Coordinated Universal Time: 01, 11, 12, 21, 10...

[0051] S302, the server determines whether each random number and the serial number of each encryption algorithm in the encryption algorithm set meet a preset condition.

[0052] The preset condition is used to determine whether each random number and the digital pool corresponding to the serial number of each encryption algorithm in the encryption algorithm set meet the preset rule. The preset rule is that the number of matches between each random number and the numbers in the digital pool is greater than the preset value. The units digit of each number in the digital pool is the serial number.

[0053] In the embodiment of the present application, after obtaining the random number corresponding to the acquisition time, the server can determine whether the random number and the serial number of the encryption algorithm in the encryption algorithm set meet the preset conditions. The encryption algorithm set includes a number of encryption algorithms. When generating the encryption algorithm set, each encryption algorithm can be sorted, and the serial number of the encryption algorithm can be determined after sorting. The serial number is, for example: 1, 2, 3... The units digit of each number in the digital pool is the serial number, that is, if the serial number is 1, then the numbers with the serial number as the units digit are 11, 21, 31..., if the serial number is 3, then the numbers with the serial number as the units digit are 13, 23, 33...

[0054] After the server obtains the digital pool corresponding to the serial number, it can match the numbers in the digital pool with the random number, that is, determine whether the random number is equal to the numbers in the digital pool, and regard the equal numbers and random numbers as a successful match. The server counts the number of successful matches as the number of matches. The server can calculate the numbers and random numbers in the number of matches that are greater than the preset value. The preset value can be set during actual use, and the specific setting value is not specifically limited in this application.

[0055] S303: When each random number and the serial number of each encryption algorithm in the encryption algorithm set meet a preset condition, the server determines a corresponding sequence group.

[0056] The sequence group includes at least two sequence numbers.

[0057] The server determines a random number and a sequence number that meet a preset condition, and generates a sequence group using the determined sequence number.

[0058] In the above embodiment, if the sequence group includes one or no sequence number, the server will modify the preset value and reduce the value of the preset value until the sequence group includes at least two sequence numbers.

[0059] S304: The server determines a first encryption algorithm according to the sequence group and the data type of the information to be transmitted.

[0060] The server can determine the encryption algorithm corresponding to the sequence group according to the obtained sequence group, for example, the sequence number in the sequence group corresponds to encryption algorithm 2 and encryption algorithm 3. The server can further screen multiple encryption algorithms corresponding to the sequence number according to the data type of the information to be transmitted, and determine an encryption algorithm as the first encryption algorithm. The details are as follows S305-S306.

[0061] S305: The server determines, according to the data type of the information to be transmitted, a pending encryption algorithm that matches the data type in a preset comparison table.

[0062] The server can determine a preset comparison table for storing the correspondence between data types and encryption algorithms based on the operation of the user or administrator. For example, the user operates the user terminal, selects the correspondence between each data type and the encryption algorithm, sends the correspondence to the server, and the server generates a preset comparison table for the correspondence. Then, the server compares the data type of the information to be transmitted with the data in the preset comparison table to determine the pending encryption algorithm corresponding to the data type. In the embodiment of the present application, each data type can correspond to multiple encryption algorithms.

[0063] S306: The server determines an encryption algorithm that matches each encryption algorithm corresponding to the sequence group and the to-be-determined encryption algorithm as the first encryption algorithm.

[0064] In an embodiment of the present application, based on the obtained sequence group and the pending encryption algorithm corresponding to the data type, the encryption algorithm corresponding to the sequence group is matched with the pending encryption algorithm to obtain a first encryption algorithm.

[0065] In one embodiment of the present application, during the process of matching the encryption algorithm corresponding to the sequence group with the pending encryption algorithm, if there is no matching encryption algorithm, the server selects one of the pending encryption algorithms as the first encryption algorithm.

[0066] In another embodiment of the present application, in the process of matching the encryption algorithm corresponding to the sequence group with the pending encryption algorithm, if there are multiple matching encryption algorithms, the server can select multiple matching encryption algorithms and prioritize them. The priority can be obtained through the frequency of use of each encryption algorithm through Internet data, or the identifiers of multiple encryption algorithms can be sent to a user terminal or a management terminal, and the first encryption algorithm among the multiple encryption algorithms can be determined based on the user's operation on the user terminal or the management terminal.

[0067] Through the above scheme, the first encryption algorithm can be determined from multiple encryption algorithms. Since the determination of the encryption algorithm is related to the information acquisition time and data type of the information to be transmitted, unauthorized users cannot obtain the type of encryption algorithm and cannot easily know the specific content of the information to be transmitted, thereby ensuring data security.

[0068] S103, the server generates a first encrypted ciphertext corresponding to the information to be transmitted by using a first encryption algorithm.

[0069] After obtaining the first encryption algorithm, the server encrypts the information to be transmitted and generates a first encrypted ciphertext corresponding to the information to be transmitted through the first encryption algorithm, specifically including:

[0070] First, the server determines a corresponding verification code list according to the information acquisition time of the information to be transmitted.

[0071] The verification codes in the verification code list correspond to various preset encryption algorithms. The preset encryption algorithms include a first encryption algorithm. The preset encryption algorithms include at least one or more of the following: BASE64, which represents binary data based on 64 printable characters, a symmetric encryption algorithm, an asymmetric encryption algorithm, a digital signature algorithm, and a digital certificate.

[0072] The server can determine the current information acquisition time period according to the information acquisition time of the information to be transmitted, and the server determines the verification code list corresponding to the current information acquisition time period. That is, each information acquisition time period corresponds to a different verification code list. Specifically, from 7 to 8 o'clock, the verification code list is the first verification code list, and from 8 to 9 o'clock, the verification code list is the second verification code list. In the embodiment of the present application, in addition to the encryption algorithm exemplified above, the preset encryption algorithm may also include other encryption algorithms, and the encryption algorithm may be supplemented according to the actual use process.

[0073] Then, the server determines the corresponding ciphertext verification code in the verification code list according to the first encryption algorithm.

[0074] The server may determine the verification code corresponding to the first encryption algorithm according to the obtained first encryption algorithm, and use the verification code corresponding to the first encryption algorithm as the ciphertext verification code.

[0075] Finally, the server concatenates the ciphertext verification code to the information to be transmitted that has been encrypted by the first encryption algorithm to generate a first encrypted ciphertext.

[0076] The server can concatenate the ciphertext verification code with the encrypted information to be transmitted. For example, if the information to be concatenated is "Buy me a water cup", the encrypted information to be transmitted is "01 02 03 04 05 06", and the ciphertext verification code is "001", then the concatenated information is "01 02 03 04 05 06 001", and the concatenated information is the first encrypted ciphertext.

[0077] Through the above scheme, the verification code corresponding to the first encryption algorithm can be determined, and the verification code and the encrypted information to be transmitted can be spliced ​​into the first encrypted ciphertext. When the transmission destination system receives the first encrypted ciphertext, it can obtain the first encryption algorithm by determining the verification code, and then obtain the specific content of the information to be transmitted. The above scheme generates the first encrypted ciphertext through the ciphertext verification code, which can not only ensure data security, but also enable the transmission destination system to perform decryption operations, improve user experience, and further ensure data security.

[0078] S104, the server matches the second encryption algorithm based on the information length of the first encrypted ciphertext, and encrypts the first encrypted ciphertext according to the second encryption algorithm to obtain a second encrypted ciphertext.

[0079] In the embodiment of the present application, the server matches the second encryption algorithm based on the information length of the first encrypted ciphertext, specifically including:

[0080] First, the server performs a cutting process on the first encrypted ciphertext at preset intervals according to a preset order to obtain a ciphertext block sequence.

[0081] The server can perform a cutting process at a preset interval in the order of the first encrypted ciphertext, for example, from the start character of the first encrypted ciphertext to the end character of the first encrypted ciphertext. In an embodiment of the present application, the preset interval can be set during actual use, for example, setting the preset interval to 10 bytes, 64 bytes, etc. After the cutting is completed, the server obtains a ciphertext block sequence of the first encrypted ciphertext, which is generated by arranging in the order of the first encrypted ciphertext, that is, from the start character to the end character.

[0082] Secondly, the server determines the ciphertext blocks whose character lengths in the ciphertext block sequence are less than a preset threshold as the ciphertext blocks to be concatenated.

[0083] The server may calculate the ciphertext blocks whose character length is less than a preset threshold in the ciphertext block sequence. For example, if the preset threshold is 10 characters, the ciphertext block sequence with less than 10 characters is used as the ciphertext block to be spliced.

[0084] Then, the server determines the ratio of the character length of the ciphertext block to be concatenated to the character length of the information to be transmitted.

[0085] Furthermore, based on the ratio, a corresponding second encryption algorithm is determined from a preset matching algorithm table.

[0086] The matching algorithm table is used to indicate the corresponding relationship between the ratio and each preset encryption algorithm.

[0087] The server calculates the ratio of the character length of the ciphertext block to be spliced ​​and the character length of the information to be transmitted. For example, if the character length of the ciphertext block to be spliced ​​is 3 and the character length of the information to be transmitted is 23, then the ratio is 3 / 23. The server can obtain the second encryption algorithm corresponding to the ratio 3 / 23 from the preset matching algorithm table.

[0088] In one embodiment of the present application, the specific matching rule may be that the preset encryption algorithms in the preset matching algorithm table all correspond to a ratio interval, the server determines the ratio interval in which the ratio is located, and then obtains the second encryption algorithm based on the corresponding ratio interval.

[0089] Next, the server determines an identifier of the second encryption algorithm and encrypts the identifier by transmitting the public key of the destination system.

[0090] The server may determine the identifier of the second encryption algorithm, for example, the identifier is BASE64, a symmetric encryption algorithm, an asymmetric encryption algorithm, a digital signature algorithm, a digital certificate, etc., which is based on 64 printable characters to represent binary data. The server may encrypt the identifier of the second encryption algorithm by using the public key of the transmission destination system, and the encryption algorithm may adopt an encryption algorithm that is unified with the transmission destination system.

[0091] Finally, the server encrypts the first encrypted ciphertext using a second encryption algorithm, and merges the encrypted identifier with the encrypted first encrypted ciphertext to obtain a second encrypted ciphertext.

[0092] The server re-encrypts the first encrypted ciphertext using a second encryption algorithm, and then merges the re-encrypted first encrypted ciphertext with the identifier encrypted using the public key, thereby obtaining a second encrypted ciphertext.

[0093] Through the above scheme, the first encrypted ciphertext can be encrypted twice to further ensure the security of data transmission.

[0094] S105, the server performs data compression on the second encrypted ciphertext, adds the compressed second encrypted ciphertext to the file stream, and sends the file stream with the second encrypted ciphertext to the transmission destination system.

[0095] In the embodiment of the present application, the server compresses the second encrypted ciphertext and inputs the compressed second encrypted ciphertext into the file stream, specifically including:

[0096] The server determines a corresponding matching compression method from preset pending compression methods according to the data type of the information to be transmitted and the transmission destination system.

[0097] The compression methods to be determined include at least one or more of the following: lossless data compression algorithm DEFLATE, GNU free software file compression program, snappy, and xz.

[0098] In an embodiment of the present application, a compression method matching list corresponding to the data type and the transmission destination system may be preset, and a matching compression method may be obtained through the matching list.

[0099] The server performs data compression on the second encrypted ciphertext by matching the compression method, and adds the compressed second encrypted ciphertext to the file stream.

[0100] Through the above scheme, this application realizes double encryption of the transmitted information and compresses the encrypted information to ensure the transmission speed. It can ensure data transmission security and data transmission speed, and ensure data transmission security in the process of cross-system and cross-platform data transmission, and prevent data from being obtained by unauthorized users, causing unnecessary losses to the enterprise.

[0101] Figure 4 A data security transmission device provided in an embodiment of the present application, such as Figure 4 As shown, the device includes:

[0102] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0103] Obtain information to be transmitted from a file stream. Match a corresponding first encryption algorithm according to the information acquisition time and the data type of the information to be transmitted. Generate a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm. Match a second encryption algorithm based on the information length of the first encrypted ciphertext, and encrypt the first encrypted ciphertext according to the second encryption algorithm to obtain a second encrypted ciphertext. Compress the second encrypted ciphertext, add the compressed second encrypted ciphertext to the file stream, and send the file stream with the second encrypted ciphertext added to the transmission destination system.

[0104] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0105] The device and method provided in the embodiments of the present application correspond one to one, and therefore, the device also has similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device will not be repeated here.

[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0107] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A data security transmission method, It is characterized in that The method comprises: Get the information to be transmitted of the file stream; Matching a corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted; Generate a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm; Based on the information length of the first encrypted ciphertext, matching the second encryption algorithm, and encrypting the first encrypted ciphertext according to the second encryption algorithm to obtain the second encrypted ciphertext; The second encrypted ciphertext is data compressed, the compressed second encrypted ciphertext is added to the file stream, and the file stream added with the compressed second encrypted ciphertext is sent to the transmission destination system.

2. The method according to claim 1, It is characterized in that Matching a corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted specifically includes: Generate a number of random numbers according to the information acquisition time of the information to be transmitted; wherein the random numbers are numbers of at least two digits; Determine whether each of the random numbers and the serial number of each encryption algorithm in the encryption algorithm set meets a preset condition; wherein the preset condition is used to determine whether the digital pool corresponding to each of the random numbers and the serial number of each encryption algorithm in the encryption algorithm set meets a preset rule; the preset rule is that the number of matches between each of the random numbers and the numbers in the digital pool is greater than a preset value; the units digit of each number in the digital pool is the serial number; the number of matches is the number of successful matches between the numbers in the digital pool and the random number; a successful match means that the random number is equal to the number in the digital pool; When each of the random numbers and the serial number of each of the encryption algorithms in the encryption algorithm set meets a preset condition, a corresponding sequence group is determined; wherein the sequence group includes at least two of the serial numbers; The first encryption algorithm is determined according to the sequence group and the data type of the information to be transmitted.

3. The method according to claim 2, It is characterized in that Matching a corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted specifically includes: According to the data type of the information to be transmitted, determining the pending encryption algorithm that matches the data type in the preset comparison table; An encryption algorithm that matches each of the encryption algorithms corresponding to the sequence group and the to-be-determined encryption algorithm is determined as the first encryption algorithm.

4. The method according to claim 1, It is characterized in that Generating a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm specifically includes: Determine a corresponding verification code list according to the information acquisition time of the information to be transmitted; wherein the verification codes in the verification code list correspond to each preset encryption algorithm; the preset encryption algorithm includes the first encryption algorithm; the preset encryption algorithm includes at least one or more of the following: BASE64 based on 64 printable characters to represent binary data, symmetric encryption algorithm, asymmetric encryption algorithm, digital signature algorithm, digital certificate; Determine, according to the first encryption algorithm, a corresponding ciphertext verification code in the verification code list; The ciphertext verification code is concatenated to the information to be transmitted that has been encrypted by the first encryption algorithm to generate the first encrypted ciphertext.

5. The method according to claim 1, It is characterized in that Matching a second encryption algorithm based on the information length of the first encrypted ciphertext specifically includes: According to a preset order, the first encrypted ciphertext is cut at preset intervals to obtain a ciphertext block sequence; Determine a ciphertext block whose character length is less than a preset threshold in the ciphertext block sequence as a ciphertext block to be spliced; Determining a ratio of the character length of the ciphertext block to be concatenated to the character length of the information to be transmitted; Based on the ratio, a corresponding second encryption algorithm is determined from a preset matching algorithm table; wherein the matching algorithm table is used to indicate a corresponding relationship between the ratio and each preset encryption algorithm.

6. The method according to claim 1, It is characterized in that Compressing the second encrypted ciphertext and adding the compressed second encrypted ciphertext to the file stream specifically includes: According to the data type of the information to be transmitted and the transmission destination system, a corresponding matching compression method is determined from preset pending compression methods; wherein the pending compression method includes at least one or more of the following: lossless data compression algorithm DEFLATE, GNU free software file compression program, snappy, xz; The second encrypted ciphertext is compressed by the matching compression method, and the compressed second encrypted ciphertext is added to the file stream.

7. The method according to claim 1, It is characterized in that Encrypting the first encrypted ciphertext according to the second encryption algorithm to obtain a second encrypted ciphertext specifically includes: Determining an identifier of the second encryption algorithm, and encrypting the identifier using a public key of the transmission destination system; The first encrypted ciphertext is encrypted by the second encryption algorithm, and the encrypted identifier is combined with the encrypted first encrypted ciphertext to obtain the second encrypted ciphertext.

8. The method according to claim 1, It is characterized in that After obtaining the information to be transmitted of the file stream, the method further includes: Determining a transmission destination system of the information to be transmitted; According to the supported data format of the transmission destination system, a corresponding format conversion module is matched to perform a format conversion operation on the information to be transmitted through the format conversion module; wherein the format conversion operation includes at least one or more of the following: data splicing, data twisting, data substitution, and data transcoding.

9. The method according to claim 1, It is characterized in that Get the information to be transmitted of the file stream, including: According to the reflection mechanism and the transmission source system of the information to be transmitted, a preset data processing mode is matched; wherein the data processing mode includes: full acquisition, incremental acquisition, data modification, and data deletion; Based on the data screening instruction acquired in real time, the information to be transmitted of the file stream is acquired through the matched data processing mode.

10. A data security transmission device, It is characterized in that The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Get the information to be transmitted of the file stream; Matching a corresponding first encryption algorithm according to the information acquisition time of the information to be transmitted and the data type of the information to be transmitted; Generate a first encrypted ciphertext corresponding to the information to be transmitted by using the first encryption algorithm; Based on the information length of the first encrypted ciphertext, matching the second encryption algorithm, and encrypting the first encrypted ciphertext according to the second encryption algorithm to obtain the second encrypted ciphertext; The second encrypted ciphertext is data compressed, the compressed second encrypted ciphertext is added to the file stream, and the file stream added with the compressed second encrypted ciphertext is sent to the transmission destination system.

Citation Information

Patent Citations

  • Data encryption method and system

    CN104579627A

  • Data transmission method and device, computer device and storage medium

    CN112019541A

  • Data transmission method and device, terminal and storage medium

    CN112637166A

  • Equipment information storage method and device, storage medium and electronic device

    CN113486375A

  • Method of encrypting a file and decrypting a file to be encrypted

    KR1020110069910A