CN111064697A - Data transmission method, device, storage medium and terminal - Google Patents

Data transmission method, device, storage medium and terminal Download PDF

Info

Publication number
CN111064697A
CN111064697A CN201911002969.1A CN201911002969A CN111064697A CN 111064697 A CN111064697 A CN 111064697A CN 201911002969 A CN201911002969 A CN 201911002969A CN 111064697 A CN111064697 A CN 111064697A
Authority
CN
China
Prior art keywords
data
character string
sub
preset
rule
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.)
Granted
Application number
CN201911002969.1A
Other languages
Chinese (zh)
Other versions
CN111064697B (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.)
Shanghai Bestone Information Technology Co ltd
Original Assignee
Shanghai Bestone Information Technology Co 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 Shanghai Bestone Information Technology Co ltd filed Critical Shanghai Bestone Information Technology Co ltd
Priority to CN201911002969.1A priority Critical patent/CN111064697B/en
Publication of CN111064697A publication Critical patent/CN111064697A/en
Application granted granted Critical
Publication of CN111064697B publication Critical patent/CN111064697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a data transmission method, a data transmission device, a storage medium and a terminal, wherein the data transmission method comprises the following steps: adding a sending time stamp and user information data to the original data to obtain a second character string simultaneously carrying the sending time stamp and the user information data; intercepting at least two substrings from the second string; rearranging the intercepted sub character strings to obtain rearranged sub character strings; a data receiver receives the sent encrypted data; decrypting the substrings in the rearranged substrings to obtain the substrings intercepted by the data provider again; intercepting at least two substrings from the received second string; and comparing the substring intercepted by the data receiver with the substring intercepted by the data provider and received by the data receiver. The method and the device have the advantages that the encrypted data content is subjected to data interception and rearrangement, and the data receiver is verified, so that the data is not easy to crack and forge, and the risk that the data content is attacked and embezzled by a third party is reduced.

Description

Data transmission method, device, storage medium and terminal
Technical Field
The invention relates to the technical field of data communication, in particular to a data transmission method, a data transmission device, a data transmission storage medium and a data transmission terminal.
Background
The rapid development of network technology makes data transmission go deep into the aspect of life, and the network security problem therewith becomes the focus of attention. For example, in data transmission, an illegal person steals a character string and directly sends a random character string to a server, so that the risk of stealing user data exists.
Today, many techniques have been proposed for data transmission methods, such as performing operations such as shifting, xor, etc. on plaintext data through a key to encrypt the data, and if the plaintext data cannot be decrypted correctly, only an unknown character string (i.e., a garbled code) can be obtained. However, since the length of the key is fixed, the time for breaking by the exhaustion method is shorter and shorter, and the security of the data becomes lower and lower. Especially, under the condition that many encryption principles are well known, a new encryption method is urgently needed for carrying out the safe transmission of data.
Disclosure of Invention
The application provides a data transmission method, a data transmission device, a storage medium and a terminal, which can ensure the safety of user data transmission in a convenient mode and reduce the risk of attack, embezzlement or tampering.
In order to achieve the purpose, the invention adopts the following technical scheme:
a first aspect of the present application provides a data transmission method, at a data provider, including:
the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data;
intercepting at least two sub character strings from the second character string according to a preset first rule;
rearranging the intercepted sub character strings according to a preset second rule to obtain rearranged sub character strings; the second character string and the rearranged sub-character string are assembled according to a preset format to form encrypted data which are sent to a data receiving party;
at a data receiving side, the method comprises the following steps:
-receiving the encrypted data sent by the data provider;
according to a second preset rule, decrypting the substrings in the rearranged substrings to obtain the substrings intercepted by the data provider again;
-intercepting at least two substrings from the received second string according to a preset first rule;
comparing the sub-character string intercepted by the data receiver with the sub-character string intercepted by the data provider and received by the data receiver to obtain a comparison result;
when the comparison result shows that the sub-character string intercepted by the data receiving party is matched with the sub-character string intercepted by the data providing party and received by the data receiving party, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
In a preferred embodiment, the second string comprises at least three portions, each portion being separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third part is 18-bit user information data.
In a preferred embodiment, the user information data comprises a unique identification of the user at the data provider, which may be a unique application identification, such as an AppID; and/or the user information data comprises an identification number of the user.
Preferably, the method further comprises: receiving a response sent by the data receiver for encrypted data, the response comprising:
and receiving error information sent by a data receiving party when the encrypted data is processed and verified and the verification is failed.
In a preferred embodiment, after intercepting the sub-character string, the characters in the sub-character string are rearranged according to a preset third rule, and then, according to a preset second rule, the sub-character strings rearranged according to the preset third rule are rearranged to obtain a rearranged sub-character string.
Therefore, the data receiving party decrypts the sub-character strings in the rearranged sub-character strings according to the preset second rule and the preset third rule, and obtains the sub-character strings intercepted by the data providing party again.
Preferably, the method further comprises: and when the comparison result shows that the substring intercepted by the data receiver is not matched with the substring intercepted by the data provider received by the data receiver, the verification is failed, and the second string is not decrypted or error information is sent to the data provider.
A second aspect of the present application provides a data transmission apparatus, including: a data providing terminal and a data receiving terminal; wherein,
the data providing terminal includes:
a counter configured to generate a transmission time stamp for the raw data;
the encryption unit is configured to add a sending time stamp to original data to obtain an encrypted first character string based on an agreed algorithm, and then add the first character string to user information data to obtain a second character string simultaneously carrying the sending time stamp and the user information data; intercepting at least two sub character strings from the second character string according to a preset first rule, and rearranging the intercepted sub character strings according to a preset second rule to obtain a rearranged sub character string; and
the first communication unit is configured to transmit the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to the data receiving terminal so that the data receiving terminal can check the data;
the data receiving terminal includes:
the second communication unit is configured to acquire data which is transmitted by the data providing terminal and is generated by assembling the second character string and the rearranged sub-character string according to a predetermined format;
the processing unit is configured to decrypt the substring in the rearranged substring according to a preset second rule, and obtain the substring intercepted by the data provider again; intercepting at least two sub-character strings from the received second character string according to a preset first rule;
the verification unit is configured to compare the substring intercepted by the data receiving party with the substring intercepted by the data providing party and received by the data receiving party, so as to obtain a comparison result;
the decryption unit is configured to decrypt the second character string based on an agreed algorithm when the verification passes, calculate an insertion position of the user information data, and remove the user information data from the second character string to obtain the first character string; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
In a preferred embodiment, the second string comprises at least three portions, each portion being separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third part is 18-bit user information data.
In a preferred embodiment, the user information data comprises a unique identification of the user at the data provider, which may be a unique application identification, such as an AppID; and/or the user information data comprises an identification number of the user.
Preferably, the data providing terminal receives a response sent by the data receiving terminal to the encrypted data, the response including:
and receiving error information sent by the data receiving terminal when the encrypted data is processed and verified and the verification is failed.
In a preferred embodiment, after intercepting the sub-character string, the characters in the sub-character string are rearranged according to a preset third rule, and then, according to a preset second rule, the sub-character strings rearranged according to the preset third rule are rearranged to obtain a rearranged sub-character string.
Therefore, the data receiving terminal decrypts the sub-character strings in the rearranged sub-character strings according to the preset second rule and the preset third rule, and obtains the sub-character strings intercepted by the data providing terminal again.
Preferably, the data transmission apparatus further includes:
and the response triggering unit is configured to not decrypt the second character string or send error information to the data providing terminal when the comparison result obtained by the verification unit indicates that the verification is failed.
Preferably, the first rule comprises: and intercepting characters with preset length from the second character string according to a preset position as a sub-character string according to a preset direction.
More preferably, the preset direction includes: a direction from the head end to the tail end of the second character string, a direction from the tail end to the head end of the second character string, a direction from both ends of the second character string to the middle of the second character string, or a direction from a preset position of the second character string to both ends of the second character string.
More preferably, according to a preset direction, intercepting a character with a preset length from the second character string according to a preset position as a sub-character string, including: and calling a character string intercepting function by taking the preset position as a parameter according to the preset direction, and intercepting the second character string to obtain at least two sub-character strings.
More preferably, the preset position is m bits, the preset length is n bits, and the preset direction is from the head end to the tail end, then n characters are cut back from the m-th character of the second character string, that is, the m-th bit is cut to the (m + n-1) -th bit.
More preferably, the preset position is m bits, the preset length is n bits, m is greater than or equal to n, the preset direction is from the preset position to both ends, then starting from the m-th character of the second character string (without the m-th character), n characters are respectively intercepted for the character string before the m-th character and the character string after the m-th character, namely, the (m +1) th bit is intercepted to the (m + n) th bit, and the (m-1) th bit is intercepted to the (m-n) th bit, so that two character strings can be obtained.
In the above aspect of the present invention, m and n are each independently a natural number.
Preferably, the substring may be at least 20 bytes, preferably at least 25 bytes.
Preferably, the substring is preferably no more than 100 bytes.
Preferably, the second rule comprises: and sequentially connecting the sub character strings from front to back to generate a rearranged sub character string.
For example, two extracted substrings, string1 and string2, are connected in the order from front to back to obtain string1string2, which is the rearranged substring.
Preferably, the second rule comprises: and sequentially connecting the sub character strings from back to front to generate a rearranged sub character string.
For example, two extracted substrings, string1 and string2, are connected in the order from back to front to obtain string2string1, which is the rearranged substring.
Preferably, the second rule comprises:
sequentially connecting the sub-character strings from front to back;
and arranging the character strings which are sequentially connected in an ascending order, and generating a rearranged sub character string by the letters with the numbers in front or the numbers with the letters in front.
For example, two intercepted substrings, namely string1 and string2, are connected in the order from front to back to obtain string1string 2; arranging string1string2 in ascending order, setting the number as the first letter and the letter as the last letter, and obtaining the string 12 ggiinnrssrsstt after arrangement, wherein the string is the rearranged sub-string.
Preferably, the second rule comprises:
sequentially connecting the sub-character strings from front to back;
and arranging the character strings which are sequentially connected in a descending order, and generating a rearranged sub character string by the letters with the numbers in front or the numbers with the letters in front.
For example, two intercepted substrings, namely string1 and string2, are connected in the order from front to back to obtain string1string 2; the character string1string2 is arranged according to descending order, and the number is set as the first letter, and the character string 12 ttssrnnniig is obtained after arrangement, and the character string is the rearranged sub-character string.
Preferably, the second rule comprises:
sequentially connecting the sub-character strings from back to front;
and arranging the character strings which are sequentially connected in an ascending order, and generating a rearranged sub character string by the letters with the numbers in front or the numbers with the letters in front.
Preferably, the second rule comprises:
sequentially connecting the sub-character strings from back to front;
and arranging the character strings which are sequentially connected in a descending order, and generating a rearranged sub character string by the letters with the numbers in front or the numbers with the letters in front.
In a preferred embodiment, the third rule comprises:
the characters of each substring are arranged independently in descending order with the first letter followed by the number or the first letter followed by the number.
In a preferred embodiment, the third rule comprises:
the characters of each substring are arranged independently in ascending order with the first letter followed by the number or the first letter followed by the number.
A third aspect of the present application provides a data transmission medium having stored thereon computer instructions which, when executed, perform the steps of the data transmission method as described above.
A fourth aspect of the present application provides a terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, the processor executing the computer instructions to perform the steps of the data transmission method as described above.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
the data transmission method provided by the application is characterized in that in the data transmission process of a data provider and a data receiver, the data content is encrypted by utilizing timestamp information and user information data, the encrypted data content is subjected to data interception and rearrangement, the data receiver is verified, the data is difficult to crack and forge, the data transmission method has good safety, and any data stream can be encrypted and transmitted quickly.
Detailed Description
The present invention provides a data transmission method, apparatus, storage medium and terminal, and in order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail by referring to examples below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It is to be understood that the terms "first," "second," and the like in the description and in the claims of the present invention are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, it being understood that the data so used may be interchanged under appropriate circumstances. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The first embodiment is as follows:
the data transmission method of the embodiment comprises the following steps:
at the data provider:
s01: the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data;
wherein the second string comprises at least two portions, each portion separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third part is 18-bit user information data.
The user information data may include, for example, a unique identification of the user at the data provider, which may be stored in association with login information, digital resources, profile information, etc. of the user at the data provider.
S02: intercepting two sub-character strings from the second character string according to a preset first rule; the method comprises the following specific steps: starting from the 50 th character of the second character string, 25 characters are cut back, namely the 50 th bit to the 74 th bit, to form the first substring string 1. 25 characters are cut back from the 100 th character of the second character string to obtain a second substring string 2;
s03: rearranging the intercepted sub character strings according to a preset second rule to obtain rearranged sub character strings; the method comprises the following specific steps: string1 and string2 are connected in the order from front to back to obtain string1string2 of the rearranged sub-character string;
s04: and transmitting the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to a data receiver.
At the data receiving side:
s05: receiving encrypted data sent by a data provider;
s06: decrypting the substrings in the rearranged substring string1string2 according to a preset second rule, and obtaining the substrings string1 and string2 intercepted by the data provider again;
intercepting two substrings string1 'and string 2' from the first string according to a preset first rule;
s07: comparing string1 'with string1, and comparing string 2' with string2 to obtain a comparison result;
s08: when the comparison result shows that string1 'is matched with string1, string 2' is matched with string2 one by one, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
In this embodiment, the data provider may be an owner of the user data, and the data receiver may be a user of the user data. For example, the data consumer may be one server and the data provider may be another server, both operated by different operators. As another example, the data consumer may be an application installed on the user terminal, the application being connected to an application server of the data consumer, and the data provider may be another server and communicate with the data consumer.
In the embodiment, the data provider encrypts the data by adopting the timestamp based on the appointed algorithm, extracts the sub-character strings, rearranges and encrypts the data, and processes the sub-character strings to obtain the encrypted data, so that the safety of the user data is effectively ensured. When the scheme of the embodiment of the invention is applied to third-party login, even if a lawbreaker intercepts user data, the original data of the user cannot be obtained through decryption, and the user data cannot be tampered or counterfeited.
Example two:
the data transmission method of the embodiment comprises the following steps:
at the data provider:
s01: the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data;
wherein the second string comprises at least three portions, each portion being separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third portion is 18 bits of user information data, which may include, for example, a second generation identification number of the user.
S02: intercepting two substrings string1 and string2 from the second string according to a preset first rule;
s03: rearranging the intercepted sub character strings according to a preset second rule to obtain rearranged sub character strings; the method comprises the following specific steps: string1 and string2 are connected in sequence from back to front to obtain string2string1 of the rearranged sub-character string;
s04: and transmitting the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to a data receiver.
At the data receiving side:
s05: receiving encrypted data sent by a data provider;
s06: decrypting the substrings in the rearranged substring string2string1 according to a preset second rule, and obtaining the substrings string1 and string2 intercepted by the data provider again;
intercepting two substrings string1 'and string 2' from the second string according to a preset first rule;
s07: comparing string1 'with string1, and comparing string 2' with string2 to obtain a comparison result;
s08: when the comparison result shows that string1 'is matched with string1, string 2' is matched with string2 one by one, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
Example three:
the data transmission method of the embodiment comprises the following steps:
at the data provider:
s01: the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data;
wherein the second string comprises at least three portions, each portion being separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third portion is 18 bits of user information data, which may include, for example, a second generation identification number of the user.
S02: intercepting two substrings string1 and string2 from the second string according to a preset first rule;
s03: rearranging the intercepted sub character strings according to a preset second rule to obtain rearranged sub character strings, which specifically comprises the following steps: string1 and string2 are connected in sequence from front to back to obtain string1string 2; arranging string1string2 in ascending order, setting the number as the first letter and the letter as the last letter, and obtaining the string 12 ggiinnrssrsstt after arrangement, wherein the string is the rearranged sub-string.
S04: and transmitting the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to a data receiver.
At the data receiving side:
s05: receiving encrypted data sent by a data provider;
s06: decrypting the substrings in the rearranged substrings according to a preset second rule, and obtaining substrings string1 and string2 intercepted by a data provider again;
intercepting two substrings string1 'and string 2' from the second string according to a preset first rule;
s07: comparing string1 'with string1, and comparing string 2' with string2 to obtain a comparison result;
s08: when the comparison result shows that string1 'is matched with string1, string 2' is matched with string2 one by one, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
Example four:
the data transmission method of the embodiment comprises the following steps:
at the data provider:
s01: the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data;
wherein the second string comprises at least three portions, each portion being separated by an 8-bit hexadecimal number FF: the first part is a 17-bit transmission time stamp, which is the current time of original data transmission, arranged in the order of yearly (YYYY) monthly (MM) daily (DD) time (HH) in (MM) seconds (ss) milliseconds (SSS); the second part is the length of the original data; the third portion is 18 bits of user information data, which may include, for example, a second generation identification number of the user.
S02: intercepting two sub-strings string1 and string2 from the first string according to a preset first rule;
s021: according to a preset third rule, the substrings are respectively and independently rearranged into respective characters, specifically, the characters of the two substrings string1 and string2 are respectively and independently arranged in descending order, and the number is before the letter or the number is before the letter, so as to obtain string11、string21
S03: rearranging the character among the rearranged sub character strings according to a preset second rule to obtain a rearranged sub character string, which specifically comprises the following steps: string11、string21Concatenated in front-to-back order to obtain a rearranged string11string21
S04: and transmitting the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to a data receiver.
At the data receiving side:
s05: receiving encrypted data sent by a data provider;
s06: decrypting and rearranging the substrings according to a preset second rule and a preset third rule to obtain string1 and string 2;
intercepting two substrings string1 'and string 2' from the second string according to a preset first rule;
s07: comparing string1 'with string1, and comparing string 2' with string2 to obtain a comparison result;
s08: when the comparison result shows that string1 'is matched with string1, string 2' is matched with string2 one by one, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
Further, the embodiment of the present invention further discloses a storage medium, on which a computer instruction is stored, and when the computer instruction runs, the technical solution of the data transmission method described in the above illustrated embodiment is executed. Preferably, the storage medium may include a computer-readable storage medium such as a non-volatile (non-volatile) memory or a non-transitory (non-transient) memory. The storage medium may include ROM, RAM, magnetic or optical disks, etc.
Further, the embodiment of the present invention further discloses a terminal, which includes a memory and a processor, where the memory stores a computer instruction capable of running on the processor, and the processor executes the technical solution of the data transmission method in the above-described embodiment when running the computer instruction. Preferably, the terminal may be a User Equipment (UE).
The embodiments of the present invention have been described in detail, but the embodiments are merely examples, and the present invention is not limited to the embodiments described above. Any equivalent modifications and substitutions to those skilled in the art are also within the scope of the present invention. Accordingly, equivalent changes and modifications made without departing from the spirit and scope of the present invention should be covered by the present invention.

Claims (12)

1. A data transmission method, at a data provider, comprising:
the data provider adds a sending time stamp to the original data based on an agreed algorithm to obtain a first character string carrying the sending time stamp; adding user information data to the first character string to obtain a second character string simultaneously carrying a sending time stamp and the user information data, wherein the user information data comprises a unique identification of a user at a data provider and/or an identity card number of the user;
intercepting at least two sub character strings from the second character string according to a preset first rule;
rearranging the intercepted sub character strings according to a preset second rule to obtain rearranged sub character strings;
the second character string and the rearranged sub-character string are assembled according to a preset format to form encrypted data which are sent to a data receiving party;
at a data receiving side, the method comprises the following steps:
-receiving the encrypted data sent by the data provider;
according to a second preset rule, decrypting the substrings in the rearranged substrings to obtain the substrings intercepted by the data provider again;
-intercepting at least two substrings from the received second string according to a preset first rule;
comparing the sub-character string intercepted by the data receiver with the sub-character string intercepted by the data provider and received by the data receiver to obtain a comparison result;
when the comparison result shows that the sub-character string intercepted by the data receiving party is matched with the sub-character string intercepted by the data providing party and received by the data receiving party, the verification is passed, the second character string is decrypted based on an agreed algorithm, the insertion position of the user information data is calculated, the user information data is removed from the second character string, and the first character string is obtained; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
2. The data transmission method of claim 1, further comprising: the data receiver receives a response sent by the data receiver for the encrypted data, wherein the response comprises:
and receiving error information sent by a data receiving party when the encrypted data is processed and verified and the verification is failed.
3. The data transmission method according to claim 1, wherein when the comparison result indicates that the substring intercepted by the data receiver does not match the substring intercepted by the data provider and received by the data receiver, the check fails, and the second string is not decrypted or an error message is sent to the data provider.
4. The data transmission method according to claim 1, wherein after intercepting the substrings, the characters in the substrings are rearranged according to a preset third rule, and then according to a preset second rule, the respective substrings rearranged according to the preset third rule are rearranged to obtain rearranged substrings.
5. The data transmission method according to claim 4, wherein the data receiving side decrypts the sub-character strings in the rearranged sub-character strings according to a preset second rule and a preset third rule, and obtains the sub-character strings intercepted by the data providing side again.
6. A data transmission apparatus, comprising: a data providing terminal and a data receiving terminal; wherein the data providing terminal includes:
a counter configured to generate a transmission time stamp for the raw data;
the encryption unit is configured to add a sending time stamp to original data to obtain an encrypted first character string based on an agreed algorithm, and then add the first character string to user information data to obtain a second character string simultaneously carrying the sending time stamp and the user information data; intercepting at least two sub character strings from the second character string according to a preset first rule, and rearranging the intercepted sub character strings according to a preset second rule to obtain a rearranged sub character string; and
the first communication unit is configured to transmit the encrypted data formed by assembling the second character string and the rearranged sub-character string according to a preset format to the data receiving terminal so that the data receiving terminal can check the data;
the data receiving terminal includes:
the second communication unit is configured to acquire data which is transmitted by the data providing terminal and is generated by assembling the second character string and the rearranged sub-character string according to a predetermined format;
the processing unit is configured to decrypt the substring in the rearranged substring according to a preset second rule, and obtain the substring intercepted by the data provider again; intercepting at least two sub-character strings from the received second character string according to a preset first rule;
the verification unit is configured to compare the substring intercepted by the data receiving party with the substring intercepted by the data providing party and received by the data receiving party, so as to obtain a comparison result;
the decryption unit is configured to decrypt the second character string based on an agreed algorithm when the verification passes, calculate an insertion position of the user information data, and remove the user information data from the second character string to obtain the first character string; then, the insertion position of the transmission time stamp is calculated, and the transmission time stamp is removed from the first character string to obtain the initial original data.
7. The data transmission apparatus according to claim 6, wherein the data providing terminal receives a response sent by the data receiving terminal for the encrypted data, the response including:
and receiving error information sent by the data receiving terminal when the encrypted data is processed and verified and the verification is failed.
8. The data transmission apparatus according to claim 6, wherein after intercepting the sub-character string, the characters in the sub-character string are rearranged according to a preset third rule, and then according to a preset second rule, the respective sub-character strings rearranged according to the preset third rule are rearranged to obtain a rearranged sub-character string.
9. The data transmission apparatus according to claim 8, wherein the data receiving terminal decrypts the sub-character string in the rearranged sub-character string according to a second rule and a third rule, and retrieves the sub-character string intercepted by the data providing terminal.
10. The data transmission apparatus according to claim 9, wherein the data transmission apparatus further comprises:
and the response triggering unit is configured to not decrypt the second character string or send error information to the data providing terminal when the comparison result obtained by the verification unit indicates that the verification is failed.
11. A storage medium having stored thereon computer instructions, wherein said computer instructions are operable to perform the steps of the data transmission method of any one of claims 1 to 5.
12. A terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the data transmission method according to any one of claims 1 to 5.
CN201911002969.1A 2019-10-21 2019-10-21 Data transmission method, device, storage medium and terminal Active CN111064697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911002969.1A CN111064697B (en) 2019-10-21 2019-10-21 Data transmission method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911002969.1A CN111064697B (en) 2019-10-21 2019-10-21 Data transmission method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111064697A true CN111064697A (en) 2020-04-24
CN111064697B CN111064697B (en) 2023-04-28

Family

ID=70297594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911002969.1A Active CN111064697B (en) 2019-10-21 2019-10-21 Data transmission method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111064697B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117396A1 (en) * 2002-12-12 2004-06-17 Microsoft Corporation System and method for using a compressed trie to estimate like predicates
CN105591737A (en) * 2016-01-27 2016-05-18 浪潮(北京)电子信息产业有限公司 Data encryption, decryption and transmission methods and systems
CN105933303A (en) * 2016-04-15 2016-09-07 浪潮集团有限公司 File tempering detection method and device
CN107483199A (en) * 2017-10-10 2017-12-15 重庆浩品峰电子商务有限公司 Information Authentication method and device
US20180343238A1 (en) * 2012-05-24 2018-11-29 Smart Security Systems Llc System and method for protecting communications
CN109635256A (en) * 2018-12-20 2019-04-16 上海掌门科技有限公司 Method and apparatus for verifying data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117396A1 (en) * 2002-12-12 2004-06-17 Microsoft Corporation System and method for using a compressed trie to estimate like predicates
US20180343238A1 (en) * 2012-05-24 2018-11-29 Smart Security Systems Llc System and method for protecting communications
CN105591737A (en) * 2016-01-27 2016-05-18 浪潮(北京)电子信息产业有限公司 Data encryption, decryption and transmission methods and systems
CN105933303A (en) * 2016-04-15 2016-09-07 浪潮集团有限公司 File tempering detection method and device
CN107483199A (en) * 2017-10-10 2017-12-15 重庆浩品峰电子商务有限公司 Information Authentication method and device
CN109635256A (en) * 2018-12-20 2019-04-16 上海掌门科技有限公司 Method and apparatus for verifying data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XU CHEN: "A type of sorting based on homomorphic encryption", 《2013 IEEE 4TH INTERNATIONAL CONFERENCE ON ELECTRONICS INFORMATION AND EMERGENCY COMMUNICATION》 *
吴荣海等: "基于大随机数的字符串加密算法设计与实现", 《电脑编程技巧与维护》 *

Also Published As

Publication number Publication date
CN111064697B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN107294937B (en) Data transmission method based on network communication, client and server
CN104219228B (en) A kind of user's registration, user identification method and system
CN110213195B (en) Login authentication method, server and user terminal
CN106506487A (en) A kind of information Encrypt and Decrypt method and device
CN107294964B (en) Information transmission method
WO2010099603A1 (en) Split key secure access system
CN106411902B (en) Data secure transmission method and system
CN110213247B (en) Method and system for improving safety of pushed information
JP2011135464A (en) Authentication system, authentication apparatus, terminal device, authentication method and program
CN113449338B (en) Information encryption storage method and system based on block chain
CN110868400B (en) Data transmission method, device, storage medium and terminal
CN110830451B (en) Data transmission method, device, storage medium and terminal
CN111988301A (en) Secure communication method for preventing client from hacker violence attack
CN104113410A (en) Method and device for data encryption transmission based on multi-table encryption method
CN114499837A (en) Method, device, system and equipment for preventing leakage of message
CN111262645B (en) Data transmission method, device, storage medium and terminal
CN110881029B (en) Data transmission control method and device, storage medium and terminal
CN113965382A (en) Tamper-proof method for bidding supervision list data encryption algorithm
CN116866029B (en) Random number encryption data transmission method, device, computer equipment and storage medium
CN111064697B (en) Data transmission method, device, storage medium and terminal
CN110881028B (en) Data transmission control method and device, storage medium and terminal
CN108052836B (en) Anti-tampering method and device for patch package and server
CN113595982B (en) Data transmission method and device, electronic equipment and storage medium
CN108337083B (en) Method and device for generating secret key in automatic test process
CN115102768A (en) Data processing method and device and computer equipment

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