CN110247912B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN110247912B
CN110247912B CN201910523924.2A CN201910523924A CN110247912B CN 110247912 B CN110247912 B CN 110247912B CN 201910523924 A CN201910523924 A CN 201910523924A CN 110247912 B CN110247912 B CN 110247912B
Authority
CN
China
Prior art keywords
data
data group
shifting
bits
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910523924.2A
Other languages
Chinese (zh)
Other versions
CN110247912A (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.)
Guangzhou Sinosec Electrical High Technology Co ltd
Original Assignee
Guangzhou Sinosec Electrical High 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 Guangzhou Sinosec Electrical High Technology Co ltd filed Critical Guangzhou Sinosec Electrical High Technology Co ltd
Priority to CN201910523924.2A priority Critical patent/CN110247912B/en
Publication of CN110247912A publication Critical patent/CN110247912A/en
Application granted granted Critical
Publication of CN110247912B publication Critical patent/CN110247912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • 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

Abstract

The embodiment of the application provides a data processing method and a data processing device, wherein the data processing method comprises the following steps: arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1; randomly generating a byte; and shifting the N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group. According to the data processing method and device, simple data shifting processing is carried out on the data group through the randomly generated bytes and the preset shifting rule, the processed data group is obtained, the processed data group can be used for data communication, the safety and reliability of the data communication are improved, and the data communication mode is simpler and more efficient.

Description

Data processing method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method and apparatus.
Background
At present, in the process of data communication, if data encryption or data processing is not carried out, data is communicated in a clear text.
However, the data communication adopts a plaintext communication mode, and on some occasions or scenes with high requirements on data communication safety (for example, password transmission of a safe or a password lock), since the plaintext communication is not subjected to data encryption or data processing, the plaintext communication is easily cracked and decrypted to obtain communication information, so that the plaintext communication data communication mode has high potential safety hazard and unreliability.
For data communication, a ciphertext communication mode is adopted, data needs to be encrypted or correspondingly processed so as to obtain a ciphertext, and most of data encryption or data processing modes are complex nowadays, so that complex and lengthy calculation needs to be performed during data communication, and the data communication mode of ciphertext communication is not simple and efficient.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data processing method and apparatus, where simple data shift processing is performed on a data set through randomly generated bytes and a preset shift rule to obtain a processed data set, and the processed data set can be used for data communication, so as to improve the security and reliability of the data communication, and make the data communication mode simpler and more efficient.
In a first aspect, an embodiment of the present application provides a data processing method, including:
arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1;
randomly generating a byte;
and shifting the N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group.
In the implementation process, arranging N (N >1) data according to a preset arrangement mode to obtain a first data group; randomly generating a byte; according to the data processing method, simple data shifting processing is carried out on the data group through randomly generated bytes and the preset shifting rule to obtain a processed data group, the processed data group can be used for data communication, the safety and the reliability of the data communication are improved, and in addition, complex and tedious calculation is not needed during the data communication, so that the data communication mode becomes simpler and more efficient; in addition, the processed data set can be used for data storage and other purposes, and the safety and reliability of data storage are improved.
Further, the byte is a binary number of eight bits;
the shifting the N data in the first data group according to the byte and a preset shifting rule to obtain a second data group includes:
determining a shift direction of the N data in the first data group according to a first bit of the binary number of the eight bits;
determining the shifting times of N data in the first data group in the shifting direction according to the last seven bits of the binary number of eight bits;
and shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group.
In the implementation process, the byte is a binary number of eight bits; when N data in a first data group are subjected to shift processing according to bytes and a preset shift rule to obtain a second data group, the shift direction of the N data in the first data group is determined according to the first bit of an eight-bit binary number, the shift times of the N data in the first data group in the shift direction are determined according to the last seven bits of the eight-bit binary number, and finally the N data in the first data group are subjected to shift processing according to the shift direction and the shift times to obtain the second data group.
Further, the determining the number of shifts of the N data in the first data group in the shift direction according to the last seven bits of the eight-bit binary number includes:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of the eight bits;
and calculating to obtain a remainder R of dividing the decimal number by N, wherein the remainder R is the shifting times of the N data in the first data group in the shifting direction.
In the implementation process, when the shifting times of the N data in the first data group in the shifting direction are determined according to the last seven bits of the eight-bit binary number, the decimal number corresponding to the last seven bits of the eight-bit binary number is obtained through calculation, the decimal number divided by N is obtained through calculation, and the remainder R is the shifting times of the N data in the first data group in the shifting direction, for example, the remainder R is 3, that is, the shifting times of the N data in the first data group in the shifting direction is 3.
Further, the first data group and the second data group are both annular data groups connected end to end.
In the implementation process, the first data group and the second data group are annular data groups connected end to end, the data arrangement mode of the data groups is not common, the difficulty of decryption can be improved, and the safety and the reliability of data communication are further improved.
Further, after the shifting the N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group, the method further includes:
and sending the second data group and the bytes to a receiving terminal.
In the implementation process, after the N data in the first data group are subjected to shift processing according to the bytes and the preset shift rule to obtain the second data group, the second data group and the bytes are sent to the receiving terminal, that is, the processed data group is used for data communication, and when the data communication is performed, the bytes are sent to the receiving terminal, so that the decryption processing of the receiving terminal can be facilitated, and the communication information can be quickly acquired.
Further, before the arranging the N data according to a preset arrangement manner to obtain the first data group, the method further includes:
receiving a data communication request sent by a receiving terminal;
acquiring a data communication protocol corresponding to the receiving terminal according to the basic information of the receiving terminal;
and acquiring N data according to the data communication protocol.
In the implementation process, before the N data are arranged according to a preset arrangement mode to obtain the first data group, the data communication request sent by the receiving terminal is received, the data communication protocol corresponding to the receiving terminal is obtained according to the basic information of the receiving terminal, and then the N data are obtained according to the data communication protocol, wherein the obtaining basis of the N data in the data group can enable the receiving terminal to effectively and accurately obtain the data to be obtained, so that the effectiveness, the accuracy and the efficiency of data communication are improved.
In a second aspect, an embodiment of the present application provides a data processing apparatus, including:
the data arrangement module is used for arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1;
the byte generating module is used for randomly generating a byte;
and the data shifting module is used for shifting the N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group.
In the implementation process, the data arrangement module arranges N (N >1) data according to a preset arrangement mode to obtain a first data group; the byte generating module randomly generates a byte; the data processing device of the embodiment of the application performs simple data shift processing on the data group through randomly generated bytes and a preset shift rule to obtain a processed data group, the processed data group can be used for data communication, the safety and reliability of the data communication are improved, and in addition, complex and lengthy calculation is not needed during the data communication, so that the data communication mode becomes simpler and more efficient; in addition, the processed data set can be used for data storage and other purposes, and the safety and reliability of data storage are improved.
Further, the byte is a binary number of eight bits;
the data shifting module comprises:
a first determining submodule, configured to determine a shift direction of the N data in the first data group according to a first bit of the eight-bit binary number;
a second determining submodule, configured to determine, according to the last seven bits of the eight-bit binary number, the number of shifts of the N data in the first data group in the shift direction;
and the data shifting submodule is used for shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group.
In the implementation process, the byte is a binary number of eight bits; a data shifting module comprising: a first determining submodule for determining a shift direction of the N data in the first data group according to a first bit of the eight-bit binary number; the second determining submodule determines the shifting times of the N data in the first data group in the shifting direction according to the last seven bits of the binary number of eight bits; and the data shifting submodule is used for shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group.
In a third aspect, an embodiment of the present application provides a processing device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the processing device execute the above data processing method.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program used in the processing device described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a first data set according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a data processing method according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of a data processing apparatus according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of a data shifting module in a data processing apparatus according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus according to a fourth embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The data processing method and the data processing device perform simple data shift processing on a data group through randomly generated bytes and preset shift rules to obtain a processed data group, and the processed data group can be used for data communication, so that the safety and reliability of data communication are improved, and the data communication mode is simpler and more efficient.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present application.
The data processing method of the embodiment of the application comprises the following steps:
step S101, arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1.
As an alternative embodiment, each of the N data may be represented by one byte, i.e. a binary number of eight bits, e.g. 01110111.
As an alternative, the preset arrangement may be that N data are arranged in the same row, and arranged from left to right, that is, the structure of the first data group may be in the form of "data 1| data 2| data 3| … data N".
As another alternative, the preset arrangement may be that N data are arranged in a ring shape and are connected first, that is, the structure of the first data group may be the structure of the data group shown in fig. 2.
In this embodiment, the structure of the first data group may be in other forms, and the other structural forms of the first data group are not listed here.
In step S102, one byte is randomly generated.
Byte (Byte) is a unit of measure used by computer information technology to measure storage capacity, and typically a Byte is equal to eight bits.
In the present embodiment, the byte is a binary number of eight bits, for example, the randomly generated byte may be 10010110.
Step S103, shift N data in the first data group according to the bytes and a preset shift rule to obtain a second data group.
It should be noted that, in this embodiment, only the arrangement positions of the N data in the first data group are changed by the shift processing, and the structure of the data group is not changed, that is, after the shift processing is performed on the first data group, the structure of the first data group is consistent with the structure of the second data group.
As an alternative embodiment, in step S103, performing shift processing on N data in the first data group according to the bytes and a preset shift rule to obtain a second data group, including:
determining the shift direction of N data in the first data group according to the first bit of the binary number of eight bits;
determining the shifting times of the N data in the first data group in the shifting direction according to the last seven bits of the binary number of eight bits;
and shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group.
Alternatively, if the structure of the first data group is in the form of "data 1| data 2| data 3| … data N", the first bit of the binary number of eight bits is 1, that is, when the first data group is subjected to data shift processing, N data are shifted to the right; on the contrary, when the first bit of the binary number of eight bits is 0, that is, the first data group is subjected to data shift processing, the N data are shifted to the left; if the first data group is an annular data group structure connected end to end as shown in fig. 2, the first bit of the binary number of eight bits is 1, that is, when the first data group is subjected to data shift processing, N data move clockwise; on the contrary, when the first bit of the binary number of eight bits is 0, that is, the first data group is subjected to the data shift processing, the N data are shifted counterclockwise.
Optionally, determining the number of shifts of the N data in the first data group in the shift direction according to the last seven bits of the binary number of eight bits includes:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of eight bits;
and calculating to obtain a remainder R of dividing the decimal number by N, wherein the remainder R is the shifting times of the N data in the first data group in the shifting direction.
For example, the eight-bit binary number is exemplified by the above-mentioned "10010110", and the last seven bits of the eight-bit binary number are "0010110", which is converted to decimal number, i.e. 22; if the first data group contains 5 data, i.e. N is 5, the remainder of dividing 22 by 5 is 2, i.e. N data in the first data group is shifted 2 times in the shift direction, assuming that the first data group is "data 1| data 2| data 3| data 4| data 5, and after data shift processing, the obtained second data group is" data 4| data 5| data 1| data 2| data 3 "; it is assumed that the first data group is an annular data group connected end to end, and the data shift processing manner refers to the above contents, and will not be described herein again.
In the implementation process, the determination mode of the number of shifting times of the N data in the shifting direction is simple and efficient, and is not easy to think, so that the difficulty of decryption is further improved, and the safety and the reliability of data communication are further improved.
Optionally, determining the number of shifts of the N data in the first data group in the shift direction according to the last seven bits of the binary number of eight bits includes:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of eight bits;
and determining the shift times of the N data in the first data group in the shift direction by the last digit of the decimal number.
For example, the binary number of eight bits is "10010110" as an example, the last seven bits of the binary number of eight bits are "0010110", and the binary number is converted into a decimal number, i.e. 22, the last bit is 2, i.e. N data in the first data group is shifted 2 times in the shifting direction, and assuming that the first data group is "data 1| data 2| data 3| data 4| data 5, the second data group obtained after the data shifting process is" data 4| data 5| data 1| data 2| data 3 ".
It should be noted that, in this embodiment, the number of shifts of the N data in the first data group in the shift direction is determined according to the last seven bits of the binary number of eight bits, and other manners may also be adopted, and this is not illustrated here.
In the implementation process, the data shifting processing mode is simple and efficient, is not easy to think, and can improve the difficulty of decryption, thereby better improving the safety and reliability of data communication.
If the first data group and the second data group are both annular data groups connected end to end, the data arrangement mode of the data groups is not common, so that the difficulty of decryption can be improved, and the safety and the reliability of data communication are improved.
In the data processing method of the embodiment of the application, N (N >1) data are arranged according to a preset arrangement mode to obtain a first data group; randomly generating a byte; according to the data processing method, simple data shifting processing is carried out on the data group through randomly generated bytes and the preset shifting rule to obtain a processed data group, the processed data group can be used for data communication, the safety and the reliability of the data communication are improved, and in addition, complex and tedious calculation is not needed during the data communication, so that the data communication mode becomes simpler and more efficient; in addition, the processed data set can be used for data storage and other purposes, and the safety and reliability of data storage are improved.
As an optional implementation manner, the data processing method according to the embodiment of the application can be applied to the smart socket, for example, the first data group may include data such as the usage power of the smart socket, the usage temperature of the smart socket, and the duration of the smart socket, the first data group is subjected to data shift processing to obtain a second data group, the second data group and bytes may be sent to the power consumption management device, the power consumption management device receives the second data group and bytes, and then performs data decryption processing on the second data group by combining the bytes to obtain the first data group, thereby obtaining the communication information, determining the usage condition of the smart socket according to the usage parameters of the smart socket included in the communication information, and then continuously supplying power to the smart socket or stopping supplying power to the smart socket according to the usage condition of the smart socket.
As another optional implementation, the data processing method according to the embodiment of the present application can be applied to a smart jack, that is, a data processing method applied to a smart jack, where the data processing method applied to a smart jack includes the above-mentioned steps S101 to S103, and in addition, the data processing method applied to a smart jack may further include the following steps:
storing the second data set and the bytes;
receiving a use report output request sent by a user terminal;
calling the second data group and the bytes, and decrypting the second data group and the bytes to obtain the first data group;
generating a use report of the intelligent socket according to the first data group;
and outputting the use report to the user terminal.
In practical application, a user sends an output request of a usage report to a smart jack through a handheld user terminal (for example, a mobile phone or a tablet computer, etc.), the smart jack receives the output request of the usage report, calls a stored second data set and bytes, and decrypts the second data set and bytes to obtain a first data set, the first data set can include data such as voltage of the smart jack, current of the smart jack, power used by the smart jack, usage temperature of the smart jack, and duration of usage of the smart jack, and further generates a usage report of the smart jack according to the usage parameters of the smart jack included in the first data set, and outputs the usage report to the user terminal, the usage report of the smart jack can include basic information of the smart jack, the usage parameters of the smart jack, and related evaluation and analysis results, and the user can know the usage condition of the smart jack through the usage report of the smart jack, and judging whether the intelligent socket needs to be maintained or replaced and the like.
The data processing method applied to the intelligent socket performs simple data shift processing on the data group, can improve the difficulty of obtaining the stored information by cracking and decrypting the stored data group, and further improves the safety and reliability of data storage.
In this embodiment, the data processing method according to the embodiment of the present application may also be applied to other specific scenes or situations, and is not described here.
Example two
Referring to fig. 3, fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application.
The data processing method of the embodiment of the application comprises the following steps:
step S201, arranging N data according to a preset arrangement manner to obtain a first data set, where N is greater than 1.
As an optional implementation manner, before arranging the N data according to a preset arrangement manner to obtain the first data group in step S201, the data processing method according to the embodiment of the present application further includes:
receiving a data communication request sent by a receiving terminal;
acquiring a data communication protocol corresponding to the receiving terminal according to the basic information of the receiving terminal;
according to the data communication protocol, N data are obtained.
Optionally, the receiving terminal may be an electronic device such as a handheld user terminal, a desktop computer, a server, and a power management device.
Optionally, the basic information of the receiving terminal may include information such as a name, a model, and an identification code of the receiving terminal.
Optionally, different data communication protocols may exist between different receiving terminals and devices for performing the data processing method according to the embodiment of the present application, and the content of data communication may be different under different data communication protocols, that is, the actual content or specific meaning of the N data may be different.
For example, the device performing the data processing method of the embodiment of the present application may obtain T data in total, where T > N, T data are data 1, data 2, data 3, …, data N, …, and data T, where different data may represent different specific meanings, and if the receiving terminal a and the device performing the data processing method of the embodiment of the present application use data communication protocol 1, the obtained N data may be data 1, data 3, data 5, …, and data 15; if the receiving terminal B and the device executing the data processing method of the embodiment of the present application use the data communication protocol 2, the acquired N data may be data 2, data 5, data 8, …, and data 20.
In the implementation process, the receiving terminal can effectively and accurately acquire the data to be acquired according to the acquisition basis of the N data in the data group, so that the effectiveness, the accuracy and the efficiency of data communication are improved.
In step S202, one byte is randomly generated.
Step S203, shift N data in the first data group according to the bytes and a preset shift rule to obtain a second data group.
Step S204, sending the second data group and the bytes to the receiving terminal.
In the implementation process, the processed data set is used for data communication, and when the data communication is carried out, the bytes are sent to the receiving terminal, so that the decryption processing of the receiving terminal can be facilitated, and the communication information can be quickly acquired.
The rest of the embodiments of the present application may refer to the contents of the first embodiment, and in this embodiment, details are not repeated.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
The data processing device of the embodiment of the application comprises:
the data arrangement module 310 is configured to arrange N data according to a preset arrangement manner to obtain a first data group, where N is greater than 1.
As an alternative embodiment, each of the N data may be represented by one byte, i.e. a binary number of eight bits, e.g. 01110111.
A byte generation module 320 for randomly generating a byte.
Byte (Byte) is a unit of measure used by computer information technology to measure storage capacity, and typically a Byte is equal to eight bits.
In the present embodiment, the byte is a binary number of eight bits, for example, the randomly generated byte may be 10010110.
And the data shifting module 330 is configured to shift N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group.
It should be noted that, in this embodiment, only the arrangement positions of the N data in the first data group are changed by the shift processing, and the structure of the data group is not changed, that is, after the shift processing is performed on the first data group, the structure of the first data group is consistent with the structure of the second data group.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data shifting module 330 in the data processing apparatus according to the embodiment of the present application.
As an optional implementation manner, the data shifting module 330 includes:
a first determining submodule 331 for determining a shift direction of the N data in the first data group according to a first bit of the eight-bit binary number;
a second determining submodule 332, configured to determine, according to the last seven bits of the eight-bit binary number, the number of shifts of the N data in the first data group in the shift direction;
the data shifting sub-module 333 is configured to shift N data in the first data group according to the shift direction and the shift frequency to obtain a second data group.
In the implementation process, the data shifting processing mode is simple and efficient, is not easy to think, and can improve the difficulty of decryption, thereby better improving the safety and reliability of data communication.
Optionally, the second determining submodule 332 is specifically configured to:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of eight bits;
and calculating to obtain a remainder R of dividing the decimal number by N, wherein the remainder R is the shifting times of the N data in the first data group in the shifting direction.
In the implementation process, the determination mode of the number of shifting times of the N data in the shifting direction is simple and efficient, and is not easy to think, so that the difficulty of decryption is further improved, and the safety and the reliability of data communication are further improved.
As an alternative implementation, the first data set and the second data set are both circular data sets connected end to end.
In the implementation process, the data arrangement mode of the data group is not common, the difficulty of decryption can be improved, and the safety and the reliability of data communication are further improved.
In the data processing device of the embodiment of the application, the data arrangement module arranges N (N >1) data according to a preset arrangement mode to obtain a first data group; the byte generating module randomly generates a byte; the data processing device of the embodiment of the application performs simple data shift processing on the data group through randomly generated bytes and a preset shift rule to obtain a processed data group, the processed data group can be used for data communication, the safety and reliability of the data communication are improved, and in addition, complex and lengthy calculation is not needed during the data communication, so that the data communication mode becomes simpler and more efficient; in addition, the processed data set can be used for data storage and other purposes, and the safety and reliability of data storage are improved.
The data processing apparatus can implement the data processing method of the first embodiment. The alternatives in the first embodiment are also applicable to the present embodiment, and are not described in detail here.
The rest of the embodiments of the present application may refer to the contents of the first embodiment, and in this embodiment, details are not repeated.
Example four
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
The data processing device of the embodiment of the application comprises:
the data arrangement module 310 is configured to arrange N data according to a preset arrangement manner to obtain a first data group, where N is greater than 1.
A byte generation module 320 for randomly generating a byte.
And the data shifting module 330 is configured to shift N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group.
The sending module 340 is configured to send the second data group and the bytes to the receiving terminal.
In the implementation process, the processed data set is used for data communication, and when the data communication is carried out, the bytes are sent to the receiving terminal, so that the decryption processing of the receiving terminal can be facilitated, and the communication information can be quickly acquired.
As an optional implementation manner, the data processing apparatus according to the embodiment of the present application further includes:
a receiving module 350, configured to receive a data communication request sent by a receiving terminal;
an obtaining module 360, configured to obtain a data communication protocol corresponding to the receiving terminal according to the basic information of the receiving terminal; and obtaining N data according to the data communication protocol.
In the implementation process, the receiving terminal can effectively and accurately acquire the data to be acquired according to the acquisition basis of the N data in the data group, so that the effectiveness, the accuracy and the efficiency of data communication are improved.
The data processing apparatus can implement the data processing methods of the first and second embodiments. The options in the first embodiment, the second embodiment and the third embodiment are also applicable to the present embodiment, and are not described in detail here.
The rest of the embodiments of the present application may refer to the contents of the first embodiment, the second embodiment and the third embodiment, and are not described again in this embodiment.
EXAMPLE five
An embodiment of the present application provides a processing device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the processing device execute the above data processing method.
In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program used in the processing device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (6)

1. A data processing method, comprising:
arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1; the first data group is an annular data group connected end to end;
randomly generating a byte; the byte is a binary number of eight bits;
determining a shift direction of the N data in the first data group according to a first bit of the binary number of the eight bits;
determining the shifting times of N data in the first data group in the shifting direction according to the last seven bits of the binary number of eight bits;
shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group; the second data group is an annular data group connected end to end; wherein the content of the first and second substances,
the determining the number of shifts of the N data in the first data group in the shift direction according to the last seven bits of the eight-bit binary number includes:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of the eight bits;
and calculating to obtain a remainder R of dividing the decimal number by N, wherein the remainder R is the shifting times of the N data in the first data group in the shifting direction.
2. The data processing method according to claim 1, wherein after the shifting the N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group, the method further comprises:
and sending the second data group and the bytes to a receiving terminal.
3. The data processing method according to claim 2, wherein before the arranging the N data in the preset arrangement manner to obtain the first data group, the method further comprises:
receiving a data communication request sent by a receiving terminal;
acquiring a data communication protocol corresponding to the receiving terminal according to the basic information of the receiving terminal;
and acquiring N data according to the data communication protocol.
4. A data processing apparatus, comprising:
the data arrangement module is used for arranging N data according to a preset arrangement mode to obtain a first data group, wherein N is larger than 1; the first data group is an annular data group connected end to end;
the byte generating module is used for randomly generating a byte; the byte is a binary number of eight bits;
the data shifting module is used for shifting N data in the first data group according to the bytes and a preset shifting rule to obtain a second data group; the second data group is an annular data group connected end to end;
the data shifting module comprises:
a first determining submodule, configured to determine a shift direction of the N data in the first data group according to a first bit of the eight-bit binary number;
a second determining submodule, configured to determine, according to the last seven bits of the eight-bit binary number, the number of shifts of the N data in the first data group in the shift direction;
the data shifting submodule is used for shifting N data in the first data group according to the shifting direction and the shifting times to obtain a second data group;
the second determining submodule is specifically configured to:
calculating to obtain a decimal number corresponding to the last seven bits of the binary number of eight bits;
and calculating to obtain a remainder R of dividing the decimal number by N, wherein the remainder R is the shifting times of the N data in the first data group in the shifting direction.
5. A processing device comprising a memory for storing a computer program and a processor for executing the computer program to cause the processing device to perform the data processing method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that it stores a computer program for use in the processing device of claim 5.
CN201910523924.2A 2019-06-14 2019-06-14 Data processing method and device Active CN110247912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910523924.2A CN110247912B (en) 2019-06-14 2019-06-14 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910523924.2A CN110247912B (en) 2019-06-14 2019-06-14 Data processing method and device

Publications (2)

Publication Number Publication Date
CN110247912A CN110247912A (en) 2019-09-17
CN110247912B true CN110247912B (en) 2021-10-26

Family

ID=67887695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910523924.2A Active CN110247912B (en) 2019-06-14 2019-06-14 Data processing method and device

Country Status (1)

Country Link
CN (1) CN110247912B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904711A (en) * 2011-07-25 2013-01-30 深圳市金溢科技有限公司 Information encrypting method
CN104486068A (en) * 2014-12-12 2015-04-01 苏州中科启慧软件技术有限公司 Stream cipher algorithm SNRR based on nonlinear circulating shift register
CN107154851A (en) * 2017-06-30 2017-09-12 上海众人网络安全技术有限公司 A kind of method and device of data encryption and decryption
CN109756231A (en) * 2018-12-27 2019-05-14 北京思朗科技有限责任公司 Cyclic shift processing unit and method
CN110299989A (en) * 2019-06-10 2019-10-01 南通大学 A kind of encryption and decryption method of Chinese and English character string

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030235298A1 (en) * 2002-06-25 2003-12-25 Bedros Hanounik Shifting an encryption key in either a first or second direction via a uni-directional shifting unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904711A (en) * 2011-07-25 2013-01-30 深圳市金溢科技有限公司 Information encrypting method
CN104486068A (en) * 2014-12-12 2015-04-01 苏州中科启慧软件技术有限公司 Stream cipher algorithm SNRR based on nonlinear circulating shift register
CN107154851A (en) * 2017-06-30 2017-09-12 上海众人网络安全技术有限公司 A kind of method and device of data encryption and decryption
CN109756231A (en) * 2018-12-27 2019-05-14 北京思朗科技有限责任公司 Cyclic shift processing unit and method
CN110299989A (en) * 2019-06-10 2019-10-01 南通大学 A kind of encryption and decryption method of Chinese and English character string

Also Published As

Publication number Publication date
CN110247912A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN106599723B (en) File encryption method and device and file decryption method and device
CN107707347B (en) User key backup method and device and user key importing method and device
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN103731258A (en) Method and device for generating secret key
CN106817358B (en) Encryption and decryption method and device for user resources
CN110166423B (en) User credit determination method, device and system and data processing method
CN110266682B (en) Data encryption method and device, mobile terminal and decryption method
CN110933063B (en) Data encryption method, data decryption method and equipment
JP2016526851A (en) System for sharing encryption keys
CN111131282B (en) Request encryption method and device, electronic equipment and storage medium
CN110543778A (en) linear random encryption and decryption algorithm for character data
CN111191255A (en) Information encryption processing method, server, terminal, device and storage medium
CN114443718A (en) Data query method and system
US20200044838A1 (en) Data encryption method and system using device authentication key
WO2017209816A1 (en) Data encryption techniques
CN110247912B (en) Data processing method and device
EP3104548A1 (en) Method and system for facilitating secure communication
CN112580114A (en) Information processing method, device, equipment and storage medium
JP2011198079A (en) System and method for encrypting database
CN115860768A (en) Tracing method and device based on block chain and electronic equipment thereof
CN115603907A (en) Method, device, equipment and storage medium for encrypting storage data
CN112580077B (en) Information processing method, device, equipment and storage medium
CN115442073A (en) Encryption method and decryption method of numeric string, electronic device and storage medium
CN115102686A (en) Semi-homomorphic encryption method and device, electronic equipment and storage medium
CN110458566B (en) Block chain account address generation method, system and device and computer readable 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
GR01 Patent grant
GR01 Patent grant