CN116827661A - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN116827661A
CN116827661A CN202310907019.3A CN202310907019A CN116827661A CN 116827661 A CN116827661 A CN 116827661A CN 202310907019 A CN202310907019 A CN 202310907019A CN 116827661 A CN116827661 A CN 116827661A
Authority
CN
China
Prior art keywords
data
data processing
processing result
random time
string
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.)
Pending
Application number
CN202310907019.3A
Other languages
Chinese (zh)
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.)
Shencai Technology Co ltd
Original Assignee
Shencai 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 Shencai Technology Co ltd filed Critical Shencai Technology Co ltd
Priority to CN202310907019.3A priority Critical patent/CN116827661A/en
Publication of CN116827661A publication Critical patent/CN116827661A/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

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

Abstract

The invention discloses a data processing method, a device, equipment and a medium, and relates to the technical field of data processing. The method comprises the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result; and sending the data processing result to the receiving device so that the receiving device decrypts the data processing result. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid or not according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.

Description

Data processing method, device, equipment and medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and medium.
Background
In the process of generation, transfer and use of data, it is often necessary to ensure the credibility of the data, such as session maintenance of an information system, data transfer between two systems, and the like.
In the prior art, a sending device encrypts an original text by adopting a secret key agreed with a receiving device, and the receiving device decrypts the received data ciphertext by adopting the secret key agreed with the receiving device.
Disclosure of Invention
The invention provides a data processing method, a device, equipment and a medium, which are used for improving the efficiency of data processing and the safety of data texts.
According to an aspect of the present invention, there is provided a data processing method performed by a transmitting apparatus, the method comprising:
generating a random time string according to the current time;
encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext;
adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
and sending the data processing result to the receiving device so that the receiving device decrypts the data processing result.
According to another aspect of the present invention, there is provided a data processing method performed by a receiving apparatus, the method comprising:
receiving a data processing result from the transmitting device; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
splitting the data processing result to obtain a random time string and a data ciphertext;
and decrypting the data ciphertext according to the random time string to obtain a data original text.
According to another aspect of the present invention, there is provided a data processing apparatus configured to a transmitting device, the apparatus comprising:
the time string generation module is used for generating a random time string according to the current time;
the original text encryption module is used for encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext;
the processing result determining module is used for adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
and the processing result transmitting module is used for transmitting the data processing result to the receiving equipment so as to enable the receiving equipment to decrypt the data processing result.
According to another aspect of the present invention, there is provided a data processing apparatus configured to a receiving device, the apparatus comprising:
the processing result receiving module is used for receiving the data processing result from the transmitting equipment; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
the processing result splitting module is used for splitting the data processing result to obtain a random time string and a data ciphertext;
and the data ciphertext decrypting module is used for decrypting the data ciphertext according to the random time string to obtain a data original text.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of the embodiments of the present invention.
According to another aspect of the present invention there is provided a computer readable storage medium storing computer instructions for causing a processor to perform a data processing method of any of the embodiments of the present invention.
According to the technical scheme, a random time string is generated according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result; and sending the data processing result to the receiving device so that the receiving device decrypts the data processing result. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, the receiving equipment can receive correct and valid data, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a data processing apparatus according to a third embodiment of the present invention;
fig. 4 is a block diagram of a data processing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a data processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations 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.
In addition, it should be noted that, in the technical solution of the embodiment of the present invention, the acquisition, storage, application, etc. of the related data original text and the current time all conform to the rules of the related laws and regulations, and do not violate the popular regulations of the public order.
Example 1
Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present invention. The embodiment of the invention can be applied to the case of encrypting and decrypting data, and the method can be executed by a data processing device, wherein the data processing device can be realized in the form of hardware and/or software, and the data processing device can be configured in an electronic device, such as a transmitting device.
Referring to the data processing method shown in fig. 1, executed by a transmitting apparatus, includes:
s101, generating a random time string according to the current time.
In this embodiment, the current time may refer to a real current time, i.e. a local real current time. The random time string may be a character string, where the characters may include, but are not limited to, a current time character and a character that is different from the current time, etc.
In an alternative embodiment, the current time includes at least two types of time, and connectors exist between the different types of time; generating a random time string according to the current time, including: and replacing the connector in the current time with a character different from the current time to obtain a random time string.
The time type may include, but is not limited to, year, month, day, hour, minute, second, etc. The character different from the current time is a character of a character type different from the current time. For example, if the character type at the current time is a digital character, the character different from the current time may be a randomly generated character, including but not limited to alphabetic characters, symbolic characters, and the like; wherein the alphabetic symbols are, for example, "A", "b", and "J", etc.; the symbolic character is for example "+|! "," @ "and" # ", etc. It should be noted that the connectors of different types of time may be set by the skilled person according to the actual requirement or practical experience, and the present invention is not limited thereto, and for example, the connectors may be "-", "/", etc. Illustratively, if the type of time in the current time includes year, month, and day, the current time is "2023-05-18", the random string generated may be "2023E05B18".
Further, before obtaining the random time string, the method further comprises: characters different from the current time are added at the start position and the end position of the current time. For example, if the type of time in the current time includes year, month and day, the current time is "2023-05-18", the generated random string may be "D2023E05B18C".
It can be appreciated that by adopting the technical scheme, a random time string with higher data complexity can be obtained under the condition that the current time is unchanged, so that the complexity of the data ciphertext obtained according to the random time string is improved, and the cracking difficulty of the data ciphertext is increased; the complexity of the data processing result can be increased, and meanwhile, the value and the format of the current time are kept unchanged, so that the efficiency of the receiving device for acquiring the corresponding current time from the random time string is improved.
S102, encrypting the data original text to be encrypted according to the random time string to obtain the data ciphertext.
In this embodiment, the data primitive to be encrypted may be an unencrypted data string to be currently transmitted; the data ciphertext is a data character string obtained by encrypting the data original text to be encrypted according to the random time string.
Optionally, encrypting the data original text to be encrypted according to the random time string to obtain the data ciphertext, including: determining a target key according to the random time string and a preset key; and encrypting the data original text to be encrypted by adopting the target key to obtain the data ciphertext.
The preset key can be set by a technician according to actual requirements or practical experience, and the invention is not limited to the preset key. The target key may be a key for encrypting the data original to be encrypted.
Specifically, fusing the random time string with a preset key to obtain a target key; and encrypting the data original text to be encrypted according to the target key and a preset encryption algorithm to obtain the data ciphertext. It should be noted that the preset encryption algorithm is not limited in the present invention, and for example, the preset encryption algorithm may be DES (Data Encryption Standard ) algorithm, AES (Advanced Encryption Standard, advanced encryption standard) algorithm, IDEA (International Data Encryption Algorithm ) algorithm, and the like.
It can be understood that by adopting the technical scheme and adopting the random time string to obtain the target key, the complexity of the target key can be increased, so that the decoding device cannot correctly decrypt the data ciphertext under the condition that only the original key is obtained, and the security of the data ciphertext is improved.
In an alternative embodiment, a preset fusion mode is used to fuse the random time string and the preset secret key, and the preset fusion mode can be, for example, an insertion mode, an alternative mode, a splicing mode, a splitting combination mode and the like. The inserting method is to insert the random time string into the preset key. The alternative is to add a random time string to the preset key in a way of replacing the character strings with the same length in the preset key. The splicing mode is to splice the random time string with the preset key. The splitting method is to split the random time string into a plurality of sub-random time strings and insert the sub-random time strings into different positions of the preset key.
Taking an insertion mode as an example for illustration, the determining process of the target key comprises the following steps: inquiring a numerical value corresponding to a character which is different from the current time in the random time string; determining a first numerical sum among numerical values corresponding to characters different from the current time in the random time string; taking the modulus of the first numerical value and the length of the preset key, and taking the modulus result as first position information; and inserting the random time string into the preset key according to the first position information to obtain the target key. For example, if the random time string is "D2023E05B18C", the preset key is "5E2E065869260hc8f1830E9abb ac52", and the values corresponding to "D", "E", "B", and "C" in the query random time string are 4, 5, 2, and 3, respectively, the first sum is 14, and the length of the preset key is 32; taking the modulus of the first numerical value sum 14 and the length 32 of the preset key to obtain a modulus taking result 14; taking the modulus result 14 as first position information; after inserting the random time string in the 14 th character in the preset key, the target key "5E2E065869260hD2023E05B18Cc8f1830E9abb ac52" is obtained.
By way of example, the first location information may be determined by the following formula:
N=M mod KL;
wherein N represents first location information; m represents a first numerical sum; KL denotes the length of the preset key.
S103, adding the random time string at a preset position of the data ciphertext to obtain a data processing result.
In this embodiment, the preset position may be set by a technician according to an actual requirement or practical experience, which is not limited in the present invention. The data processing result may be a data string obtained by adding a random time string to the data key.
And S104, sending the data processing result to the receiving equipment so that the receiving equipment decrypts the data processing result.
In this embodiment, the receiving device may be a device communicatively connected to the transmitting device. Specifically, the receiving device determines a random time string and a data ciphertext from the data processing result according to the data processing result; and decrypting the data ciphertext according to the random time string to obtain a data original text.
According to the embodiment of the invention, a random time string is generated according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result; and sending the data processing result to the receiving device so that the receiving device decrypts the data processing result. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, the receiving equipment can receive correct and valid data, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.
Example two
Fig. 2 is a flowchart of a data processing method according to a second embodiment of the present invention. The embodiment of the invention can be applied to the case of encrypting and decrypting data, and the method can be executed by a data processing device, wherein the data processing device can be realized in the form of hardware and/or software, and the data processing device can be configured in an electronic device, such as a receiving device.
In the embodiments of the present invention, the descriptions of other embodiments may be referred to in the portions not described in detail.
Referring to the data processing method shown in fig. 2, executed by a receiving apparatus, includes:
s201, receiving a data processing result from a transmitting device; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; and adding the random time string at a preset position of the data ciphertext to obtain a data processing result.
In this embodiment, the transmitting device may be a device communicatively connected to the receiving device. The current time may refer to the actual current time, i.e. the local actual current time. The random time string may be a character string, where the characters may include, but are not limited to, a current time character and a character that is different from the current time, etc. The data primitive to be encrypted may be an unencrypted data string currently waiting to be transmitted. The data ciphertext is a data character string obtained by encrypting the data original text to be encrypted according to the random time string. The preset position can be set by a technician according to actual requirements or practical experience, and the invention is not limited to the preset position. The data processing result may be a data string obtained by adding a random time string to the data key.
S202, splitting the data processing result to obtain a random time string and a data ciphertext.
Specifically, a certain algorithm is adopted to split the data processing result, so that a data ciphertext of a random time string is obtained.
Optionally, splitting the data processing result to obtain a random time string and a data ciphertext, including: splitting the data processing result into a random time string and a data ciphertext from a preset position of the data processing result.
It can be understood that by adopting the technical scheme, the cracking equipment can not accurately split the data processing result to obtain an accurate random time string and a data ciphertext under the condition that the preset position is not obtained, so that the safety of the random time string and the data ciphertext is improved; the receiving device can split the data processing result according to the preset position appointed by the encryption device, and the efficiency of splitting the data processing result is improved under the condition of ensuring correct splitting.
S203, decrypting the data ciphertext according to the random time string to obtain a data original text.
Specifically, a certain algorithm is adopted, and the data ciphertext is decrypted according to the random time string, so that the data original text is obtained.
Optionally, decrypting the data ciphertext according to the random time string to obtain the data original text, including: determining a time difference value between the time when the receiving device receives the data processing result and the time corresponding to the random time string; checking whether the time difference value is within the validity period; and if the time difference value is within the validity period, determining a target key according to the random time string and the preset key, and decrypting the data ciphertext by adopting the target key.
The time corresponding to the random time string may be the current time in the step of generating the random time string according to the current time. The validity period can be the effective time length of the characterization data processing result, and can be set by a technician according to actual demands or practical experience, for example, one year, one month, one day and the like. The preset key can be set by the technician according to the actual requirement or practical experience, and the invention is not limited to this. The target key may be a key for encrypting the data original to be encrypted. It should be noted that, the preset decryption algorithm for decrypting the data ciphertext and the preset encryption algorithm for encrypting the data original are inverse algorithms, so the target key can also be used for decrypting the data ciphertext.
Specifically, characters among different types of time in the random time string are replaced by connectors, and/or characters at the starting position and the ending position of the random time string are removed, so that time corresponding to the random time string is obtained; determining a time difference value between the time when the receiving device receives the data processing result and the time corresponding to the random time string; if the time difference is greater than the valid period, discarding the data processing result if the time difference exceeds the valid period; if the time difference is smaller than or equal to the validity period, fusing the random time string with a preset key to obtain a target key; and decrypting the data ciphertext according to the target key and a preset decryption algorithm to obtain a data original text.
Illustratively, if the random time string is "D2023E05B18C", then the time corresponding to the random time string is "2023-05-18"; the time of receiving the data processing result by the receiving equipment is 2023-06-18, and the time difference is 31 days; if the validity period is 365 days, the time difference value is smaller than the validity period, a target key is determined according to the random time string and the preset key, and the target key is adopted to decrypt the data ciphertext.
In an alternative embodiment, a preset fusion mode is used to fuse the random time string and the preset secret key, and the preset fusion mode can be, for example, an insertion mode, an alternative mode, a splicing mode, a splitting combination mode and the like. The inserting method is to insert the random time string into the preset key. The alternative is to add a random time string to the preset key in a way of replacing the character strings with the same length in the preset key. The splicing mode is to splice the random time string with the preset key. The splitting method is to split the random time string into a plurality of sub-random time strings and insert the sub-random time strings into different positions of the preset key.
Taking an insertion mode as an example for illustration, the determining process of the target key comprises the following steps: inquiring a numerical value corresponding to a character which is different from the current time in the random time string; determining a first numerical sum among numerical values corresponding to characters different from the current time in the random time string; taking the modulus of the first numerical value and the length of the preset key, and taking the modulus result as first position information; and inserting the random time string into the preset key according to the first position information to obtain the target key. For example, if the random time string is "D2023E05B18C", the preset key is "5E2E065869260hc8f1830E9abb ac52", and the values corresponding to "D", "E", "B", and "C" in the query random time string are 4, 5, 2, and 3, respectively, the first sum is 14, and the length of the preset key is 32; taking the modulus of the first numerical value sum 14 and the length 32 of the preset key to obtain a modulus taking result 14; taking the modulus result 14 as first position information; after inserting the random time string in the 14 th character in the preset key, the target key "5E2E065869260hD2023E05B18Cc8f1830E9abb ac52" is obtained.
It can be appreciated that by adopting the technical scheme, whether the time difference value is within the validity period can be checked before the data ciphertext is decrypted, so that the data ciphertext is still decrypted under the condition that the time difference value exceeds the validity period, and the data processing efficiency is improved.
The embodiment of the invention receives the data processing result from the sending equipment; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result; splitting the data processing result to obtain a random time string and a data ciphertext; and decrypting the data ciphertext according to the random time string to obtain a data original text. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, the receiving equipment can receive correct and valid data, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.
Example III
Fig. 3 is a schematic structural diagram of a data processing apparatus according to a third embodiment of the present invention. The embodiment of the invention is applicable to the situation of encrypting and decrypting data, the device can execute a data processing method, the device can be realized in the form of hardware and/or software, and the device can be configured in electronic equipment, such as a transmitting equipment.
Referring to the data processing apparatus shown in fig. 3, comprising: a time string generation module 301, an original text encryption module 302, a processing result determination module 303, and a processing result transmission module 304, wherein,
a time string generation module 301, configured to generate a random time string according to the current time;
the original text encryption module 302 is configured to encrypt an original text of data to be encrypted according to a random time string to obtain a data ciphertext;
the processing result determining module 303 is configured to add a random time string at a preset position of the data ciphertext, so as to obtain a data processing result;
and the processing result sending module 304 is configured to send the data processing result to the receiving device, so that the receiving device decrypts the data processing result.
According to the embodiment of the invention, a random time string is generated according to the current time by a time string generation module; encrypting the data original text to be encrypted according to the random time string by an original text encryption module to obtain a data ciphertext; the random time string is added at a preset position of the data ciphertext through a processing result determining module, so that a data processing result is obtained; and the processing result sending module is used for sending the data processing result to the receiving equipment so as to enable the receiving equipment to decrypt the data processing result. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, the receiving equipment can receive correct and valid data, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.
Optionally, the original text encryption module 302 includes:
a key determining unit for determining a target key according to the random time string and a preset key;
and the original encryption unit is used for encrypting the data original to be encrypted by adopting the target key to obtain the data ciphertext.
Optionally, the data processing device at least includes two types of time in the current time, and connectors exist between the different types of time;
a time string generation module comprising:
and the time string generating unit is used for replacing the connector in the current time with a character different from the current time to obtain a random time string.
The data processing device provided by the embodiment of the invention can execute the data processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the data processing method.
Example IV
Fig. 4 is a schematic structural diagram of a data processing apparatus according to a fourth embodiment of the present invention. The embodiment of the invention is applicable to the situation of encrypting and decrypting data, the device can execute a data processing method, the device can be realized in the form of hardware and/or software, and the device can be configured in electronic equipment, such as receiving equipment.
Referring to the data processing apparatus shown in fig. 4, comprising: a processing result receiving module 401, a processing result splitting module 402, and a data ciphertext decrypting module 403, wherein,
a processing result receiving module 401, configured to receive a data processing result from the transmitting device; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
the processing result splitting module 402 is configured to split the data processing result to obtain a random time string and a data ciphertext;
the data ciphertext decrypting module 403 is configured to decrypt the data ciphertext according to the random time string, and obtain a data original text.
The embodiment of the invention receives the data processing result from the sending equipment through the processing result receiving module; the data processing result is generated by the following steps: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result; splitting the data processing result through a processing result splitting module to obtain a random time string and a data ciphertext; and decrypting the data ciphertext according to the random time string by a data ciphertext decryption module to obtain a data original text. According to the technical scheme provided by the embodiment of the invention, the receiving equipment can determine whether the data processing result is valid according to the corresponding time of the random time string in the data processing result, so that the data text can be obtained only when the data processing result is valid, the receiving equipment can receive correct and valid data, and the data processing efficiency is improved; if the random time string in the data processing result is tampered, the receiving device cannot acquire the correct data original text from the data processing result, so that the safety of the data original text is improved.
Optionally, the processing result splitting module 402 includes:
the processing result splitting unit is used for splitting the data processing result into a random time string and a data ciphertext from a preset position of the data processing result.
Optionally, the data ciphertext decrypting module 403 includes:
a time difference value determining unit for determining a time difference value between a time when the receiving device receives the data processing result and a time corresponding to the random time string;
the time difference checking unit is used for checking whether the time difference is within the valid period;
and the data ciphertext decrypting unit is used for determining a target key according to the random time string and the preset key if the time difference value is within the validity period, and decrypting the data ciphertext by adopting the target key.
The data processing device provided by the embodiment of the invention can execute the data processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the data processing method.
Example five
Fig. 5 shows a schematic diagram of an electronic device 500 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes at least one processor 501, and a memory communicatively connected to the at least one processor 501, such as a Read Only Memory (ROM) 502, a Random Access Memory (RAM) 503, etc., where the memory stores computer programs executable by the at least one processor, and the processor 501 may perform various suitable actions and processes according to the computer programs stored in the Read Only Memory (ROM) 502 or the computer programs loaded from the storage unit 508 into the Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The processor 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 501 performs the various methods and processes described above, such as a power distribution network route planning method.
In some embodiments, the power distribution network line planning method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the power distribution network route planning method described above may be performed. Alternatively, in other embodiments, the processor 501 may be configured to perform the power distribution network route planning method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS (Virtual Private Server ) service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A data processing method, performed by a transmitting device, the method comprising:
generating a random time string according to the current time;
encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext;
adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
and sending the data processing result to a receiving device so that the receiving device decrypts the data processing result.
2. The method according to claim 1, wherein encrypting the data original to be encrypted according to the random time string to obtain the data ciphertext comprises:
determining a target key according to the random time string and a preset key;
and encrypting the data original text to be encrypted by adopting the target key to obtain the data ciphertext.
3. The method of claim 1, wherein the current time includes at least two types of time, and wherein there are connectors between different types of time;
the generating a random time string according to the current time comprises the following steps:
and replacing the connector in the current time with a character different from the current time to obtain a random time string.
4. A data processing method, performed by a receiving device, the method comprising:
receiving a data processing result from the transmitting device; wherein, the data processing result is generated by the following way: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
splitting the data processing result to obtain the random time string and the data ciphertext;
and decrypting the data ciphertext according to the random time string to obtain the data original text.
5. The method of claim 4, wherein splitting the data processing result to obtain the random time string and the data ciphertext comprises:
splitting the data processing result into a random time string and a data ciphertext from a preset position of the data processing result.
6. The method of claim 4, wherein decrypting the data ciphertext according to the random time string results in the data ciphertext, comprising:
determining a time difference value between the time when the receiving device receives the data processing result and the time corresponding to the random time string;
checking whether the time difference value is within a valid period;
and if the time difference value is within the validity period, determining a target key according to the random time string and a preset key, and decrypting the data ciphertext by adopting the target key.
7. A data processing apparatus, configured to a transmitting device, the apparatus comprising:
the time string generation module is used for generating a random time string according to the current time;
the original text encryption module is used for encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext;
the processing result determining module is used for adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
and the processing result sending module is used for sending the data processing result to the receiving equipment so as to enable the receiving equipment to decrypt the data processing result.
8. A data processing apparatus configured to a receiving device, the apparatus comprising:
the processing result receiving module is used for receiving the data processing result from the transmitting equipment; wherein, the data processing result is generated by the following way: generating a random time string according to the current time; encrypting the data original text to be encrypted according to the random time string to obtain a data ciphertext; adding the random time string at a preset position of the data ciphertext to obtain a data processing result;
the processing result splitting module is used for splitting the data processing result to obtain the random time string and the data ciphertext;
and the data ciphertext decrypting module is used for decrypting the data ciphertext according to the random time string to obtain the data original text.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to implement the data processing method of any one of claims 1-3 and/or to implement the data processing method of any one of claims 4-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the data processing method according to any one of claims 1-3 and/or the data processing method according to any one of claims 4-6 when executed.
CN202310907019.3A 2023-07-24 2023-07-24 Data processing method, device, equipment and medium Pending CN116827661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310907019.3A CN116827661A (en) 2023-07-24 2023-07-24 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310907019.3A CN116827661A (en) 2023-07-24 2023-07-24 Data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116827661A true CN116827661A (en) 2023-09-29

Family

ID=88122119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310907019.3A Pending CN116827661A (en) 2023-07-24 2023-07-24 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116827661A (en)

Similar Documents

Publication Publication Date Title
CN109743161B (en) Information encryption method, electronic device and computer readable medium
CN110312054B (en) Image encryption and decryption method, related device and storage medium
CN104463012A (en) Virtual machine image file exporting and importing method and device
CN108549824A (en) A kind of data desensitization method and device
CN111246407B (en) Data encryption and decryption method and device for short message transmission
CN113630412B (en) Resource downloading method, resource downloading device, electronic equipment and storage medium
CN109711178B (en) Key value pair storage method, device, equipment and storage medium
CN113794706A (en) Data processing method and device, electronic equipment and readable storage medium
CN116781425B (en) Service data acquisition method, device, equipment and storage medium
CN117725598A (en) An Zhuoduan data encryption and decryption method, device, equipment and medium
CN113422832A (en) File transmission method, device, equipment and storage medium
CN116405199A (en) Encryption method, device, equipment and medium based on NTRU algorithm and SM2 algorithm
CN115883199A (en) File transmission method and device, electronic equipment and storage medium
CN114036364B (en) Method, apparatus, device, medium, and system for identifying crawlers
CN114785583B (en) Encryption sending and checking method, device, equipment and medium of interface request
CN114363094B (en) Data sharing method, device, equipment and storage medium
CN116827661A (en) Data processing method, device, equipment and medium
CN114239014A (en) File processing method and device based on offline device and electronic device
CN110071793B (en) Random number generation method and system based on BMC
CN113626848A (en) Sample data generation method and device, electronic equipment and computer readable medium
CN115580489B (en) Data transmission method, device, equipment and storage medium
CN117640083A (en) Data transmission method, device, equipment and storage medium
CN114499829B (en) Key management method and device, electronic equipment and storage medium
CN117421752A (en) Laboratory data processing method, device, system, equipment and medium
CN115543392B (en) Trusted program upgrading method, device, equipment and storage medium

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