CN114070901A - Data sending and receiving method, device and equipment based on multi-data alignment - Google Patents

Data sending and receiving method, device and equipment based on multi-data alignment Download PDF

Info

Publication number
CN114070901A
CN114070901A CN202111169005.3A CN202111169005A CN114070901A CN 114070901 A CN114070901 A CN 114070901A CN 202111169005 A CN202111169005 A CN 202111169005A CN 114070901 A CN114070901 A CN 114070901A
Authority
CN
China
Prior art keywords
data
matrix
character
binary data
strings
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111169005.3A
Other languages
Chinese (zh)
Other versions
CN114070901B (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.)
Shenzhen Zhihuilin Network Technology Co ltd
Original Assignee
Shenzhen Zhihuilin Network 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 Shenzhen Zhihuilin Network Technology Co ltd filed Critical Shenzhen Zhihuilin Network Technology Co ltd
Priority to CN202111169005.3A priority Critical patent/CN114070901B/en
Publication of CN114070901A publication Critical patent/CN114070901A/en
Priority to PCT/CN2022/119921 priority patent/WO2023051319A1/en
Application granted granted Critical
Publication of CN114070901B publication Critical patent/CN114070901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses a method, a device and equipment for sending and receiving data based on multi-data alignment, wherein the method for sending the data comprises the following steps: acquiring t data to be sent; performing binary conversion on each data to be transmitted in the t data to be transmitted to obtain t first binary data strings; vertically stacking the t first binary data strings to obtain a first matrix; performing multiple row displacement processing on the first matrix to obtain a second matrix; splitting the second matrix according to columns to obtain r second binary data strings; respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one; longitudinally splicing r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string; and sending the target data string to a data receiving end.

Description

Data sending and receiving method, device and equipment based on multi-data alignment
Technical Field
The invention relates to the technical field of data transmission, in particular to a method, a device and equipment for sending and receiving data based on multi-data alignment.
Background
At present, when data is transmitted, in order to obtain higher transmission efficiency, data is usually compressed or split into a plurality of sub-data with the same size for transmission. However, compression techniques compress data by doing a lot of calculations, which can consume a lot of computer resources, while, due to the increased bandwidth of modern routers, it usually takes less time to send data directly without compression than to send it after compression. In the existing data splitting method, data is split into a plurality of sub-data with equal size according to specific requirements of transmission, and the sub-data is sent respectively and then combined at a receiving end. However, actually, due to the problems of writing, indexing, and the like of the split sub-data in the disk cluster, not only is there no help for data transmission on the network, but also the data transmission speed on the network is reduced. Therefore, the current data transmission method based on compression and splitting generally cannot improve the data transmission speed on the network, and instead, the data transmission speed is slowed down.
Disclosure of Invention
In order to solve the above problems in the prior art, embodiments of the present application provide a method, an apparatus, and a device for transmitting and receiving data based on multiple data alignments, which can improve data transmission speed on a network.
In a first aspect, an embodiment of the present application provides a data sending method based on multiple data alignments, including:
acquiring t data to be transmitted, wherein t is a positive integer greater than 1;
performing binary conversion on each data to be sent in t data to be sent to obtain t first binary data strings, wherein the t first binary data strings correspond to the t data to be sent one by one;
vertically stacking the t first binary data strings to obtain a first matrix;
performing multiple row displacement processing on the first matrix to obtain a second matrix;
splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0;
respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one;
longitudinally splicing r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
and sending the target data string to a data receiving end.
In a second aspect, an embodiment of the present application provides a data receiving method based on multiple data alignments, including:
receiving data to be restored from a data sending end, wherein the data to be restored comprises: a target data string and a description file;
carrying out data splitting on the target data string according to the description file to obtain x simplified data strings;
performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one by one;
sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings correspond to the x third binary data strings one by one;
according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix;
performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix;
splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
and performing data reduction on each fourth binary data string in the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data one by one.
In a third aspect, an embodiment of the present application provides a data transmitting apparatus based on multiple data alignments, including:
the device comprises a first receiving module, a first processing module and a sending module; wherein the content of the first and second substances,
the first receiving module is used for acquiring t data to be sent, wherein t is a positive integer greater than 1;
the first processing module is used for performing binary conversion on each data to be sent in the t data to be sent to obtain t first binary data strings, wherein the t first binary data strings correspond to the t data to be sent one by one; vertically stacking the t first binary data strings to obtain a first matrix; performing multiple row displacement processing on the first matrix to obtain a second matrix; splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0; respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one; longitudinally splicing r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
and the sending module is used for sending the target data string to a data receiving end.
In a fourth aspect, an embodiment of the present application provides a data receiving apparatus based on multiple data alignments, including:
the device comprises a second receiving module, a second processing module and a restoring module; wherein the content of the first and second substances,
a second receiving module, configured to receive data to be restored from a data sending end, where the data to be restored includes: a target data string and a description file;
the second processing module is used for carrying out data splitting on the target data string according to the description file to obtain x simplified data strings; performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one by one; sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings correspond to the x third binary data strings one by one; according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix; performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix; splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
and the restoring module is used for carrying out data restoration on each fourth binary data string in the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data one by one.
In a fifth aspect, an embodiment of the present application provides a data transmission device based on multiple data alignments, including: a processor coupled to the memory, the memory for storing a computer program, the processor for executing the computer program stored in the memory to cause the electronic device to perform the method of the first aspect.
In a sixth aspect, an embodiment of the present application provides a data receiving device based on multiple data alignments, including: a processor coupled to the memory, the memory for storing a computer program, the processor for executing the computer program stored in the memory to cause the electronic device to perform the method of the second aspect.
In a seventh aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program makes a computer execute the method according to the first aspect and/or the second aspect.
In an eighth aspect, embodiments of the present application provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program, the computer operable to cause the computer to perform a method according to the first and/or second aspect.
The implementation of the embodiment of the application has the following beneficial effects:
in the embodiment of the application, t data to be sent are binarized and then vertically stacked to obtain a first matrix. And performing row displacement processing on the first matrix for multiple times to obtain a second matrix with the number of columns with completely same elements being greater than or equal to a first threshold value. And then splitting the second matrix according to columns to obtain r second binary data strings, and finally sending the r second binary data strings to a data receiving end. Therefore, due to the fact that the second matrix is subjected to displacement processing for multiple times, a large number of homogeneous redundant bits exist in the obtained second matrix, and columns with identical elements exist at the same time. Based on this, after splitting the second matrix according to the columns, the data structure of the r second binary data strings is simpler, the regularity is strong, the processing efficiency of the data in the sending process can be effectively improved, and then the network transmission speed is improved. Furthermore, since during data transmission, a memory unit, such as a memory unit (RAM), can process bits in an original size, it is usually done by memory units at the transmitting end and the receiving end. In the application, the data to be sent is converted into binary data, so that the alignment operation of the data is realized, additional memory does not need to be occupied at the sending end and the receiving end, the problems of disk writing, indexing and the like of data division in a disk cluster are avoided, and the network transmission speed is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic hardware structure diagram of a data transmitting apparatus based on multiple data alignments or a data receiving apparatus based on multiple data alignments according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data transmission method based on multiple data alignments according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for performing multiple row displacement processing on a first matrix to obtain a second matrix according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another method for performing multiple row displacement processing on a first matrix to obtain a second matrix according to an embodiment of the present disclosure;
fig. 5 is a schematic flow chart of a method for performing multiple character scanning processes on each of r second binary data strings to obtain r simplified data strings according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for sending a target data string to a data receiving end according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of a data receiving method based on multiple data alignments according to an embodiment of the present application;
fig. 8 is a block diagram illustrating functional modules of a data transmission apparatus based on multiple data alignments according to an embodiment of the present application;
fig. 9 is a block diagram illustrating functional modules of a data receiving apparatus based on multiple data alignments according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a data transmission device based on multiple data alignments according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a data receiving device based on multiple data alignments according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art without any inventive work based on the embodiments in the present application are within the scope of protection of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, result, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
First, referring to fig. 1, fig. 1 is a schematic diagram illustrating a hardware structure of a data transmitting apparatus based on multiple data alignments or a data receiving apparatus based on multiple data alignments according to an embodiment of the present application. The data transmitting apparatus based on multiple data alignment or the data receiving apparatus based on multiple data alignment includes at least one processor 101, a communication line 102, a memory 103, and at least one communication interface 104.
In this embodiment, the processor 101 may be a general processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more ics for controlling the execution of programs according to the present disclosure.
The communication link 102, which may include a path, carries information between the aforementioned components.
The communication interface 104 may be any transceiver or other device (e.g., an antenna, etc.) for communicating with other devices or communication networks, such as an ethernet, RAN, Wireless Local Area Network (WLAN), etc.
The memory 103 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In this embodiment, the memory 103 may be independent and connected to the processor 101 through the communication line 102. The memory 103 may also be integrated with the processor 101. The memory 103 provided in the embodiments of the present application may generally have a nonvolatile property. The memory 103 is used for storing computer-executable instructions for executing the scheme of the application, and is controlled by the processor 101 to execute. The processor 101 is configured to execute computer-executable instructions stored in the memory 103, thereby implementing the methods provided in the embodiments of the present application described below.
In alternative embodiments, computer-executable instructions may also be referred to as application code, which is not specifically limited in this application.
In alternative embodiments, processor 101 may include one or more CPUs, such as CPU0 and CPU1 of FIG. 1.
In alternative embodiments, the data transmitting apparatus based on multiple data alignment or the data receiving apparatus based on multiple data alignment may also include multiple processors, such as the processor 101 and the processor 107 in fig. 1. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In an alternative embodiment, if the multiple data alignment-based data transmitting apparatus or the multiple data alignment-based data receiving apparatus is a server, the multiple data alignment-based data transmitting apparatus or the multiple data alignment-based data receiving apparatus may further include an output device 105 and an input device 106. The output device 105 is in communication with the processor 101 and may display information in a variety of ways. For example, the output device 105 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 106 is in communication with the processor 101 and may receive user input in a variety of ways. For example, the input device 106 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
The data transmitting apparatus based on multiple data alignments or the data receiving apparatus based on multiple data alignments may be a general-purpose device or a special-purpose device. The embodiments of the present application do not limit the types of data transmission devices based on multiple data alignment or data reception devices based on multiple data alignment.
Hereinafter, a data transmission method based on multiple data alignments disclosed in the present application will be described:
referring to fig. 2, fig. 2 is a schematic flowchart of a data transmission method based on multiple data alignments according to an embodiment of the present disclosure. The data transmission method based on multi-data alignment comprises the following steps:
201: t data to be sent are obtained.
In the present embodiment, t is a positive integer greater than 0. In brief, in this embodiment, there is no requirement for the t data to be transmitted, that is, any data can be transmitted by the data transmission method based on multiple data alignments provided in this application.
202: and performing binary conversion on each data to be transmitted in the t data to be transmitted to obtain t first binary data strings.
In this embodiment, the t first binary data strings correspond to t data to be transmitted one by one.
203: and vertically stacking the t first binary data strings to obtain a first matrix.
In this embodiment, a data transmission method based on multiple data alignments provided by the present application will be described by taking a case where t is equal to 3 as an example. For example, there are 3 data to be transmitted, DCM, MP4 and PDF, which are binarized respectively to obtain 3 first binary data strings as shown below:
DCM=>01010011;
MP4=>10110011;
PDF=>00101001;
after the 3 first binary data strings are vertically stacked, a first matrix shown as follows can be obtained:
Figure BDA0003291178330000081
204: and performing multiple row displacement processing on the first matrix to obtain a second matrix.
In this embodiment, a method for performing row shift processing on a first matrix a plurality of times to obtain a second matrix is provided, as shown in fig. 3, the method includes:
301: and determining an initial matrix A of the ith row displacement processing, and displacing any row in the initial matrix A by one bit leftwards or rightwards to obtain a displacement matrix B.
In the present embodiment, the number of columns in the starting matrix a having identical elements is less than a first threshold value, i is an integer greater than or equal to 1, and when i is 1, the starting matrix a is the first matrix.
302: the number of columns in the displacement matrix B where the elements are identical is determined.
303: and when the number of columns with identical elements in the displacement matrix B is greater than or equal to a first threshold value, taking the displacement matrix B as a second matrix.
304: and when the number of columns with completely same elements in the displacement matrix B is smaller than a first threshold value, performing row displacement processing for the (i + 1) th time by taking the displacement matrix B as an initial matrix of row displacement processing for the (i + 1) th time until row displacement processing is performed for multiple times, and obtaining a second matrix.
For example, given that the first threshold is 4, following the above example, after shifting each row in the first matrix, the following matrix can be obtained:
Figure BDA0003291178330000091
wherein R represents a right shift by one bit.
It can be seen that the columns in which the elements are identical have 4 columns, namely, the third column "111", the fourth column "000", the fifth column "111" and the seventh column "000".
In an alternative embodiment, another method for performing multiple row shift processing on a first matrix to obtain a second matrix is further provided, as shown in fig. 4, the method includes:
401: and determining an initial matrix C for the jth row displacement processing, and displacing any row in the initial matrix C by one bit leftwards or rightwards to obtain a displacement matrix D.
In the present embodiment, the number of columns in the starting matrix C having identical elements is less than a first threshold, j is an integer greater than or equal to 1, and when j is 1, the starting matrix C is the first matrix.
402: the number of target columns is determined in the displacement matrix D.
In the present embodiment, the target column is a matrix column in which the number of consecutive identical elements in the matrix column is greater than the second threshold value in the displacement matrix D.
Illustratively, for the column "0011101100000110101," the largest consecutive identical elements thereof are: [ 00, 111, 0, 11, 00000, 11, 0, 1, 0, 1 ], the corresponding numbers are respectively: [ 2, 3, 1, 2, 5, 2, 1, 1, 1, 1 ]. Therefore, when the second threshold is 4, since the column "0011101100000110101" contains consecutive identical elements "00000", the number of which is 5, which is greater than the second threshold, the column can be regarded as a target column meeting the requirement.
403: and when the number of the target columns in the displacement matrix D is greater than or equal to a first threshold value, taking the displacement matrix D as a second matrix.
404: and when the number of the target columns in the displacement matrix D is smaller than a first threshold value, performing row displacement processing for the (j + 1) th time by taking the displacement matrix D as an initial matrix of the (j + 1) th row displacement processing until multiple row displacement processing is performed, and obtaining a second matrix.
205: the second matrix is split by columns to obtain r second binary data strings.
In the present embodiment, r is a positive integer greater than 0. Illustratively, following the above example, the splitting of the second matrix by columns may obtain 10 second binary data strings, which is as follows: [ 0, 00, 111, 000, 111, 010, 000, 101, 11, 1 ].
206: and respectively carrying out multiple times of character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings corresponding to the r second binary data strings one by one.
In this embodiment, due to the shift operation, there will be a large number of like redundant bits in each of the r second binary data strings obtained by splitting, and there will also be a second binary data string composed of the same elements, for example: 111 or 000. Based on this, the data structure of the obtained r second binary data strings is simpler and has strong regularity. Therefore, the original t data to be sent are converted into r second binary data strings, the data processing efficiency in the sending process can be effectively improved, and the network transmission speed is further improved.
Based on this, in this embodiment, a simplified processing may be performed on each second binary data string to further increase the network transmission speed, according to the characteristics that a large number of similar redundant bits may exist in each second binary data string, and at the same time, a second binary data string composed of the same elements may also exist.
Specifically, the present embodiment provides a method for performing a plurality of character scanning processes on each of r second binary data strings to obtain r simplified data strings, as shown in fig. 5, the method including:
501: and traversing each second binary data string to the right in sequence from the initial character E of the k-th character scanning processing until an end character F is determined.
In this embodiment, the end character F is a character whose first value is different from that of the start character E in the kth character scanning process, or the end character F is the last character of each second binary data string, k is an integer greater than or equal to 1, and when k is equal to 1, the start character E is the first character of each second binary data string;
502: and when the ending character F is a character with a first value different from that of the starting character E in the k-th character scanning processing process, setting the scanning result of the k-th character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by one, and performing (k + 1) -th character scanning processing on the ending character F as the starting character of the (k + 1) -th character scanning processing until a plurality of times of character scanning processing are performed to obtain the simplified data string corresponding to each second binary data string.
503: and when the initial character E is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be 1, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain the simplified data string corresponding to each second binary data string.
504: and when the ending character F is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by two, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain the simplified data string corresponding to each second binary data string.
Illustratively, following the above example where n is equal to 3, the obtained 10 second binary data strings are: [ 0, 00, 111, 000, 111, 010, 000, 101, 11, 1 ]. For the first second binary data string "0", the initial character E of the 1 st character scanning process is the first character "0", and at the same time, the first character "0" is the last character, so that the simplified data string corresponding to the first second binary data string "0" is recorded as "1".
For the second binary data string "00", the starting character E of the 1 st character scanning process is the first character "0", and after the first character is not found to be different from the starting character E after the first character is traversed to the right in sequence, the second character "0" is taken as the ending character F, and simultaneously, the simplified data string corresponding to the second binary data string "00" is recorded to be "2" (the number of characters between the first character and the second character is increased by two, namely 0+ 2).
Regarding the third second binary data string "111", the starting character E of the 1 st character scanning process is the first character "1", and after traversing to the right in sequence until the last character does not find the first character different from the starting character E, the third character "1" is taken as the ending character F, and the simplified data string corresponding to the first second binary data string "111" is recorded as "3" (the number of characters between the first character and the third character is increased by two, namely 1+ 2).
Through the above method, the 10 second binary data strings can be simplified in sequence, and 10 simplified data strings are obtained: [ 1, 2, 3, 3, 3, 111, 3, 111, 2, 1 ].
207: and longitudinally splicing the r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string.
Illustratively, following the above example, 10 simplified data strings are: and (1, 2, 3, 3, 3, 111, 3, 111, 2, 1) longitudinally splicing to obtain a target data string '12333111311121'.
Therefore, when t is hundreds or even thousands, namely hundreds or thousands of data meeting requirements are sent at the same time, the data can be greatly compressed through the splitting and converting, and the compression does not need complex compression calculation, so that the consumption of computing resources and the compression time are greatly reduced. And the corresponding data content cannot be directly restored through each compressed fragment, so that the data security is improved.
In an alternative embodiment, every 256 pieces of data may be set as a group to be transmitted, so that when a second binary data string composed of the same elements, that is, a second binary data string composed of all 0 s or 1 s, appears, the simplified result is 256, and the simplified result only needs to occupy 1 byte in the network, thereby greatly reducing the bandwidth requirement on the network and further increasing the network transmission speed.
208: and sending the target data string to a data receiving end.
In this embodiment, a method for transmitting a target data string to a data receiving end is provided, as shown in fig. 6, the method includes:
601: and carrying out data segmentation on the target data string to obtain at least one data fragment.
In this embodiment, first, the number of division bits q may be determined, and then the target data string may be divided into at least one data slice having the same number of bits according to the number of division bits q. For example, q may be any integer greater than 1, and in this embodiment, a method for transmitting a target data string to a data receiving end provided in this application will be described by taking a case where q is equal to 2 as an example.
Specifically, when q is equal to 2, it is described that the number of division bits is set to 2, and at this time, the target data string may be divided into one group every 2 bits to perform data division. For example, following the above example, the target data string is "12333111311121", and in the case where the number of division bits is 2, the target data string may be divided into [ 12, 33, 31, 11, 31, 11, 21 ].
In an alternative embodiment, the split bit number may also be a dynamic, cyclic value. For example, the number of division bits may be regarded as a division sequence [ m, x, y ], and when data division is performed on binary data, m bits may be divided, x bits may be divided, y bits may be divided, m bits may be divided again, and then m bits may be divided again, and the binary data may be cyclically divided. Specifically, when the segmentation sequence [ 1, 2, 3 ] is "321332133312" and the target data string is "321332133312", the segmentation result [ 3, 21, 332, 1, 33, 312 ] can be obtained.
602: at least one transmission frequency is determined based on the number of bits per data slice in the data slices.
In this embodiment, the number of required transmission frequencies, i.e. the first number, may be determined first based on the number of bits per data slice. Illustratively, the first number may be the same as the number of bits per data slice, i.e., the first number is q. Of course, other functional relationships between the first number and the number of bits per data slice are possible, for example, in one possible embodiment, the relationship between the first number l and the number of bits per data slice q may be represented by formula (r):
l=2q.........①
in this embodiment, a data transmission method based on multiple frequencies according to the present application will be described by taking a case where the first number is q as an example. Based on this, following the example where q is equal to 2 described above, it can be determined that the first number is also 2, and therefore, 2 transmission frequencies can be randomly selected in a preset transmission frequency library as the at least one transmission frequency.
603: and determining a first sending frequency corresponding to each data fragment in at least one sending frequency according to the arrangement position of each data fragment in the target data string.
In this embodiment, the at least one sending frequency obtained in step 602 may be randomly ordered, so that each data slice sequentially and cyclically selects one sending frequency of the ordered at least one sending frequency as its corresponding sending frequency according to the arrangement position in the target data string.
Specifically, following the example where q is equal to 2, in this example, 2 transmission frequencies are selected, named transmission frequency a and transmission frequency B, and are sorted to obtain a sequence [ transmission frequency a, transmission frequency B ]. The target data string "12333111311121" corresponds to a data slicing sequence [ 12, 33, 31, 11, 31, 11, 21 ]. Based on this, it is determined that the first data slice "12" corresponds to the transmission frequency a, the second data slice "33" corresponds to the transmission frequency B, the third data slice "31" corresponds to the transmission frequency a, the fourth data slice "11" corresponds to the transmission frequency B, the fifth data slice "31" corresponds to the transmission frequency a, the sixth data slice "11" corresponds to the transmission frequency B, and the fifth data slice "21" corresponds to the transmission frequency a.
604: and respectively carrying out data conversion on each data fragment according to a preset conversion table and the first sending frequency corresponding to each data fragment to obtain at least one conversion result.
In this embodiment, the conversion table records conversion results corresponding to different data fragments at different transmission frequencies, and at least one conversion result corresponds to at least one data fragment one to one.
605: and sequentially sending each conversion result in the at least one conversion result to a data receiving end according to the first sending frequency corresponding to each conversion result.
In an optional implementation manner, the r second binary data strings may also be spliced longitudinally according to the arrangement position of each second binary data string in the first matrix without simplifying the r second binary data strings, so as to obtain the target data string. The target data string is sent to the data receiving end in the method according to step 601-605.
In addition, referring to fig. 7, fig. 7 is a schematic flowchart of a data receiving method based on multiple data alignments according to an embodiment of the present disclosure. The data receiving method based on multi-data alignment comprises the following steps:
701: and receiving the data to be restored from the data transmitting end.
In this embodiment, the data to be restored may include: a target data string and a description file.
702: and carrying out data splitting on the target data string according to the description file to obtain x simplified data strings.
703: and performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings.
In the present embodiment, x third binary data strings correspond one-to-one to x simplified data strings.
704: and sequentially arranging the elements in each of the x third binary data strings from top to bottom according to the arrangement positions in each third binary data string to obtain x vertical data strings.
In the present embodiment, x vertical data strings correspond to x third binary data strings one to one.
705: and according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix.
706: and performing row displacement reduction on the third matrix for multiple times according to the description file to obtain a fourth matrix.
707: and splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings.
708: and performing data reduction on each fourth binary data string in the y fourth binary data strings to obtain y original data.
In the present embodiment, y pieces of original data correspond to y pieces of binary data one to one.
In summary, in the data transmission method based on multiple data alignment provided by the present invention, a first matrix is obtained by binarizing t data to be transmitted and then vertically stacking the data. And performing row displacement processing on the first matrix for multiple times to obtain a second matrix with the number of columns with completely same elements being greater than or equal to a first threshold value. And then splitting the second matrix according to columns to obtain r second binary data strings, and finally sending the r second binary data strings to a data receiving end. Therefore, due to the fact that the second matrix is subjected to displacement processing for multiple times, a large number of homogeneous redundant bits exist in the obtained second matrix, and columns with identical elements exist at the same time. Based on this, after splitting the second matrix according to the columns, the data structure of the r second binary data strings is simpler, the regularity is strong, the processing efficiency of the data in the sending process can be effectively improved, and then the network transmission speed is improved. Furthermore, since during data transmission, a memory unit, such as a memory unit (RAM), can process bits in an original size, it is usually done by memory units at the transmitting end and the receiving end. In the application, the data to be sent is converted into binary data, so that the alignment operation of the data is realized, additional memory does not need to be occupied at the sending end and the receiving end, the problems of disk writing, indexing and the like of data division in a disk cluster are avoided, and the network transmission speed is further improved.
Referring to fig. 8, fig. 8 is a block diagram illustrating functional modules of a data transmission apparatus based on multiple data alignments according to an embodiment of the present disclosure. As shown in fig. 8, the data transmission apparatus 800 based on multiple data alignments includes: a first receiving module 801, a first processing module 802 and a sending module 803; wherein:
a first receiving module 801, configured to obtain t pieces of data to be sent, where t is a positive integer greater than 1;
a first processing module 802, configured to perform binary conversion on each to-be-transmitted data in t to-be-transmitted data to obtain t first binary data strings, where the t first binary data strings correspond to the t to-be-transmitted data one to one; vertically stacking the t first binary data strings to obtain a first matrix; performing multiple row displacement processing on the first matrix to obtain a second matrix; splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0; respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one; longitudinally splicing r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
a sending module 803, configured to send the target data string to a data receiving end.
In an embodiment of the present invention, in terms of performing row displacement processing on the first matrix for multiple times to obtain a second matrix, the first processing module 802 is specifically configured to:
determining an initial matrix A of the ith row displacement processing, and displacing any row in the initial matrix A by one bit to the left or the right to obtain a displacement matrix B, wherein the number of columns with completely identical elements in the initial matrix A is less than a first threshold, i is an integer greater than or equal to 1, and when i is equal to 1, the initial matrix A is a first matrix;
determining the number of columns with completely identical elements in the displacement matrix B;
when the number of columns with completely identical elements in the displacement matrix B is greater than or equal to a first threshold value, taking the displacement matrix B as a second matrix;
and when the number of columns with completely same elements in the displacement matrix B is smaller than a first threshold value, performing row displacement processing for the (i + 1) th time by taking the displacement matrix B as an initial matrix of row displacement processing for the (i + 1) th time until row displacement processing is performed for multiple times, and obtaining a second matrix.
In an embodiment of the present invention, in terms of performing row displacement processing on the first matrix for multiple times to obtain a second matrix, the first processing module 802 is specifically configured to:
determining a starting matrix C for the jth row displacement processing, and displacing any row in the starting matrix C by one bit to the left or right to obtain a displacement matrix D, wherein the number of columns with completely identical elements in the starting matrix C is less than a first threshold, j is an integer greater than or equal to 1, and when j is 1, the starting matrix C is a first matrix;
determining the number of target columns in the displacement matrix D, wherein the target columns are matrix columns in the displacement matrix D, and the number of continuous same elements in the matrix columns is larger than a second threshold value;
when the number of the target columns in the displacement matrix D is larger than or equal to a first threshold value, taking the displacement matrix D as a second matrix;
and when the number of the target columns in the displacement matrix D is smaller than a first threshold value, performing row displacement processing for the (j + 1) th time by taking the displacement matrix D as an initial matrix of the (j + 1) th row displacement processing until multiple row displacement processing is performed, and obtaining a second matrix.
In the embodiment of the present invention, in terms of performing multiple character scanning processes on each of r second binary data strings to obtain r simplified data strings, the first processing module 802 is specifically configured to:
sequentially traversing each second binary data string from the beginning character E of the k-th character scanning processing to the right until an ending character F is determined, wherein the ending character F is a character with a first value different from that of the beginning character E in the k-th character scanning processing process, or the ending character F is the last character of each second binary data string, k is an integer greater than or equal to 1, and when k is equal to 1, the beginning character E is the first character of each second binary data string;
when the ending character F is a character with a first value different from that of the starting character E in the k-th character scanning processing process, setting the scanning result of the k-th character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by one, and performing the (k + 1) -th character scanning processing on the ending character F as the starting character of the (k + 1) -th character scanning processing until a plurality of times of character scanning processing are performed to obtain a simplified data string corresponding to each second binary data string;
when the initial character E is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be 1, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain a simplified data string corresponding to each second binary data string;
and when the ending character F is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by two, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain the simplified data string corresponding to each second binary data string.
Meanwhile, referring to fig. 9, fig. 9 is a block diagram illustrating functional modules of a data receiving apparatus based on multiple data alignments according to an embodiment of the present disclosure. As shown in fig. 9, the multiple data alignment-based data receiving apparatus 900 includes: a second receiving module 901, a second processing module 902 and a restoring module 903; wherein:
a second receiving module 901, configured to receive data to be restored from a data sending end, where the data to be restored includes: a target data string and a description file;
a second processing module 902, configured to perform data splitting on the target data string according to the description file, to obtain x simplified data strings; performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one by one; sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings correspond to the x third binary data strings one by one; according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix; performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix; splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
the restoring module 903 is configured to perform data restoration on each of the y fourth binary data strings to obtain y original data, where the y original data corresponds to the y binary data one to one.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a data transmitting apparatus based on multiple data alignments according to an embodiment of the present application. As shown in fig. 10, the data transmission apparatus 1000 based on multiple data alignment includes a transceiver 1001, a processor 1002, and a memory 1003. Connected to each other by a bus 1004. The memory 1003 is used to store computer programs and data, and may transmit data stored in the memory 1003 to the processor 1002.
The processor 1002 is configured to read the computer program in the memory 1003 to perform the following operations:
acquiring t data to be transmitted, wherein t is a positive integer greater than 1;
performing binary conversion on each data to be sent in t data to be sent to obtain t first binary data strings, wherein the t first binary data strings correspond to the t data to be sent one by one;
vertically stacking the t first binary data strings to obtain a first matrix;
performing multiple row displacement processing on the first matrix to obtain a second matrix;
splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0;
respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one;
longitudinally splicing r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
and sending the target data string to a data receiving end.
In an embodiment of the present invention, in terms of performing a plurality of row shifting processes on the first matrix to obtain the second matrix, the processor 1002 is specifically configured to perform the following operations:
determining an initial matrix A of the ith row displacement processing, and displacing any row in the initial matrix A by one bit to the left or the right to obtain a displacement matrix B, wherein the number of columns with completely identical elements in the initial matrix A is less than a first threshold, i is an integer greater than or equal to 1, and when i is equal to 1, the initial matrix A is a first matrix;
determining the number of columns with completely identical elements in the displacement matrix B;
when the number of columns with completely identical elements in the displacement matrix B is greater than or equal to a first threshold value, taking the displacement matrix B as a second matrix;
and when the number of columns with completely same elements in the displacement matrix B is smaller than a first threshold value, performing row displacement processing for the (i + 1) th time by taking the displacement matrix B as an initial matrix of row displacement processing for the (i + 1) th time until row displacement processing is performed for multiple times, and obtaining a second matrix.
In an embodiment of the present invention, in terms of performing a plurality of row shifting processes on the first matrix to obtain the second matrix, the processor 1002 is specifically configured to perform the following operations:
determining a starting matrix C for the jth row displacement processing, and displacing any row in the starting matrix C by one bit to the left or right to obtain a displacement matrix D, wherein the number of columns with completely identical elements in the starting matrix C is less than a first threshold, j is an integer greater than or equal to 1, and when j is 1, the starting matrix C is a first matrix;
determining the number of target columns in the displacement matrix D, wherein the target columns are matrix columns in the displacement matrix D, and the number of continuous same elements in the matrix columns is larger than a second threshold value;
when the number of the target columns in the displacement matrix D is larger than or equal to a first threshold value, taking the displacement matrix D as a second matrix;
and when the number of the target columns in the displacement matrix D is smaller than a first threshold value, performing row displacement processing for the (j + 1) th time by taking the displacement matrix D as an initial matrix of the (j + 1) th row displacement processing until multiple row displacement processing is performed, and obtaining a second matrix.
In the embodiment of the present invention, in terms of performing character scanning processing on each of the r second binary data strings for multiple times to obtain r simplified data strings, the processor 1002 is specifically configured to perform the following operations:
sequentially traversing each second binary data string from the beginning character E of the k-th character scanning processing to the right until an ending character F is determined, wherein the ending character F is a character with a first value different from that of the beginning character E in the k-th character scanning processing process, or the ending character F is the last character of each second binary data string, k is an integer greater than or equal to 1, and when k is equal to 1, the beginning character E is the first character of each second binary data string;
when the ending character F is a character with a first value different from that of the starting character E in the k-th character scanning processing process, setting the scanning result of the k-th character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by one, and performing the (k + 1) -th character scanning processing on the ending character F as the starting character of the (k + 1) -th character scanning processing until a plurality of times of character scanning processing are performed to obtain a simplified data string corresponding to each second binary data string;
when the initial character E is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be 1, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain a simplified data string corresponding to each second binary data string;
and when the ending character F is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by two, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain the simplified data string corresponding to each second binary data string.
Meanwhile, referring to fig. 11, fig. 11 is a schematic structural diagram of a data receiving device based on multiple data alignments according to an embodiment of the present application. As shown in fig. 11, the multiple data alignment based data receiving apparatus 1100 includes a transceiver 1101, a processor 1102, and a memory 1103. Connected to each other by a bus 1104. The memory 1103 is used to store computer programs and data, and may transmit the data stored in the memory 1103 to the processor 1102.
The processor 1102 is configured to read the computer program in the memory 1103 to perform the following operations:
receiving data to be restored from a data sending end, wherein the data to be restored comprises: a target data string and a description file;
carrying out data splitting on the target data string according to the description file to obtain x simplified data strings;
performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one by one;
sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings correspond to the x third binary data strings one by one;
according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix;
performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix;
splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
and performing data reduction on each fourth binary data string in the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data one by one.
It should be understood that the data transmitting device based on multiple data alignment and the data receiving device based on multiple data alignment in the present application may include a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palm computer, a notebook computer, a Mobile Internet device MID (Mobile Internet Devices, abbreviated as MID), a robot, a wearable device, or the like. The data transmitting apparatus based on multiple data alignment and the data receiving apparatus based on multiple data alignment are only examples and are not exhaustive, and include, but not limited to, the data transmitting apparatus based on multiple data alignment and the data receiving apparatus based on multiple data alignment. In practical applications, the data transmitting apparatus based on multiple data alignments and the data receiving apparatus based on multiple data alignments may further include: intelligent vehicle-mounted terminal, computer equipment and the like.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention can be implemented by combining software and a hardware platform. With this understanding in mind, all or part of the technical solutions of the present invention that contribute to the background can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments or some parts of the embodiments.
Accordingly, the present application also provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement part or all of the steps of any one of the multiple data alignment-based data transmission method and the multiple data alignment-based data reception method as set forth in the above method embodiments. For example, the storage medium may include a hard disk, a floppy disk, an optical disk, a magnetic tape, a magnetic disk, a flash memory, and the like.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the multiple data alignment based data transmission method and the multiple data alignment based data reception method as set forth in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are all alternative embodiments and that the acts and modules referred to are not necessarily required by the application.
In the above embodiments, the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference may be made to the description of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is merely a logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several 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 described in the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, and the memory may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the methods and their core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data transmission method based on multiple data alignment is characterized in that the method is applied to a data transmitting end, and the method comprises the following steps:
acquiring t data to be transmitted, wherein t is a positive integer greater than 1;
performing binary conversion on each data to be sent in the t data to be sent to obtain t first binary data strings, wherein the t first binary data strings correspond to the t data to be sent one by one;
vertically stacking the t first binary data strings to obtain a first matrix;
performing multiple row displacement processing on the first matrix to obtain a second matrix;
splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0;
respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one;
longitudinally splicing the r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
and sending the target data string to the data receiving end.
2. The method of claim 1, wherein performing a plurality of row shifting operations on the first matrix to obtain a second matrix comprises:
determining an initial matrix A of the ith row displacement processing, and shifting any row in the initial matrix A by one bit to the left or the right to obtain a displacement matrix B, wherein the number of columns with completely identical elements in the initial matrix A is less than a first threshold, i is an integer greater than or equal to 1, and when i is equal to 1, the initial matrix A is the first matrix;
determining the number of columns with identical elements in the displacement matrix B;
when the number of columns with completely identical elements in the displacement matrix B is greater than or equal to the first threshold value, taking the displacement matrix B as the second matrix;
and when the number of columns with completely same elements in the displacement matrix B is smaller than the first threshold value, performing the row displacement processing for the (i + 1) th time by taking the displacement matrix B as an initial matrix of the row displacement processing for the (i + 1) th time until the row displacement processing is performed for multiple times, and obtaining the second matrix.
3. The method of claim 1, wherein performing a plurality of row shifting operations on the first matrix to obtain a second matrix comprises:
determining a starting matrix C for the jth row displacement processing, and shifting any row in the starting matrix C by one bit to the left or right to obtain a displacement matrix D, wherein the number of columns with completely identical elements in the starting matrix C is less than a first threshold, j is an integer greater than or equal to 1, and when j is 1, the starting matrix C is the first matrix;
determining the number of target columns in the displacement matrix D, wherein the target columns are matrix columns in the displacement matrix D, and the number of continuous same elements in the matrix columns is larger than a second threshold value;
when the number of target columns in the displacement matrix D is larger than or equal to the first threshold value, taking the displacement matrix D as the second matrix;
and when the number of the target columns in the displacement matrix D is smaller than the first threshold value, performing the j +1 th row displacement processing on the displacement matrix D as an initial matrix of the j +1 th row displacement processing until the second matrix is obtained after the row displacement processing is performed for multiple times.
4. The method according to any one of claims 1 to 3, wherein the performing a plurality of character scanning processes on each of the r second binary data strings to obtain r simplified data strings respectively comprises:
traversing each second binary data string from the beginning character E of the kth character scanning process to the right in sequence until an ending character F is determined, wherein the ending character F is a character with a first value different from that of the beginning character E in the kth character scanning process, or the ending character F is a last character of each second binary data string, k is an integer greater than or equal to 1, and when k is equal to 1, the beginning character E is a first character of each second binary data string;
when the end character F is a character with a first value different from that of the start character E in the k-th character scanning process, setting the scanning result of the k-th character scanning process to be that the number of characters between the start character E and the end character F is increased by one, and performing the (k + 1) -th character scanning process on the end character F as the start character of the (k + 1) -th character scanning process until a plurality of character scanning processes are performed, so as to obtain a simplified data string corresponding to each second binary data string;
when the initial character E is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be 1, and sequencing the processing results of the multiple times of character scanning processing according to the processing sequence of the multiple times of character scanning processing to obtain a simplified data string corresponding to each second binary data string;
and when the ending character F is the last character of each second binary data string, setting the scanning result of the kth character scanning processing to be that the number of characters between the starting character E and the ending character F is increased by two, and sequencing the processing results of the multiple character scanning processing according to the processing sequence of the multiple character scanning processing to obtain the simplified data string corresponding to each second binary data string.
5. A data receiving method based on multiple data alignments, wherein the method is applied to a data receiving end, and the method comprises:
receiving data to be restored from a data sending end, wherein the data to be restored comprises: a target data string and a description file;
carrying out data splitting on the target data string according to the description file to obtain x simplified data strings;
performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one to one;
sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings are in one-to-one correspondence with the x third binary data strings;
according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix;
performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix;
splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
and performing data reduction on each fourth binary data string in the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data one to one.
6. A data transmission apparatus based on multiple data alignments,
the device comprises: the device comprises a first receiving module, a first processing module and a sending module; wherein
The first receiving module is configured to obtain t data to be sent, where t is a positive integer greater than 1;
the first processing module is configured to perform binary conversion on each to-be-transmitted data in the t to-be-transmitted data to obtain t first binary data strings, where the t first binary data strings correspond to the t to-be-transmitted data one to one; vertically stacking the t first binary data strings to obtain a first matrix; performing multiple row displacement processing on the first matrix to obtain a second matrix; splitting the second matrix according to columns to obtain r second binary data strings, wherein r is a positive integer greater than 0; respectively carrying out multiple character scanning processing on each second binary data string in the r second binary data strings to obtain r simplified data strings, wherein the obtained r simplified data strings correspond to the r second binary data strings one by one; longitudinally splicing the r simplified data strings according to the arrangement position of each second binary data string in the second matrix to obtain a target data string;
and the sending module is used for sending the target data string to the data receiving end.
7. A data receiving apparatus based on multiple data alignments,
the device comprises: the device comprises a second receiving module, a second processing module and a restoring module; wherein
The second receiving module is configured to receive data to be restored from a data sending end, where the data to be restored includes: a target data string and a description file;
the second processing module is used for carrying out data splitting on the target data string according to the description file to obtain x simplified data strings; performing data conversion on each simplified data string in the x simplified data strings according to the description file and a preset conversion table to obtain x third binary data strings, wherein the x third binary data strings correspond to the x simplified data strings one to one; sequentially arranging elements in each of the x third binary data strings from top to bottom according to arrangement positions in each of the x third binary data strings to obtain x vertical data strings, wherein the x vertical data strings are in one-to-one correspondence with the x third binary data strings; according to the label of each third binary data string, transversely splicing the x vertical data strings to obtain a third matrix; performing multiple row displacement reduction on the third matrix according to the description file to obtain a fourth matrix; splitting the fourth matrix according to rows from top to bottom to obtain y fourth binary data strings;
the restoring module is configured to perform data restoration on each of the y fourth binary data strings to obtain y original data, where the y original data correspond to the y binary data one to one.
8. A data transmission device based on multiple data alignments, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the one or more programs including instructions for performing the steps of the method of any of claims 1-4.
9. A data receiving device based on multiple data alignments, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the one or more programs comprising instructions for performing the steps of claim 5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method according to any one of claims 1-5.
CN202111169005.3A 2021-09-30 2021-09-30 Data transmitting and receiving method, device and equipment based on multi-data alignment Active CN114070901B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111169005.3A CN114070901B (en) 2021-09-30 2021-09-30 Data transmitting and receiving method, device and equipment based on multi-data alignment
PCT/CN2022/119921 WO2023051319A1 (en) 2021-09-30 2022-09-20 Data sending method, apparatus and device based on multi-data alignment, data receiving method, apparatus and device based on multi-data alignment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111169005.3A CN114070901B (en) 2021-09-30 2021-09-30 Data transmitting and receiving method, device and equipment based on multi-data alignment

Publications (2)

Publication Number Publication Date
CN114070901A true CN114070901A (en) 2022-02-18
CN114070901B CN114070901B (en) 2024-01-02

Family

ID=80234146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111169005.3A Active CN114070901B (en) 2021-09-30 2021-09-30 Data transmitting and receiving method, device and equipment based on multi-data alignment

Country Status (2)

Country Link
CN (1) CN114070901B (en)
WO (1) WO2023051319A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023051319A1 (en) * 2021-09-30 2023-04-06 深圳智慧林网络科技有限公司 Data sending method, apparatus and device based on multi-data alignment, data receiving method, apparatus and device based on multi-data alignment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365814A (en) * 2013-06-27 2013-10-23 深圳市汇顶科技股份有限公司 Serial data transmission method and system
CN105703782A (en) * 2016-03-11 2016-06-22 深圳大学 Incremental shift matrix construction method, network coding method and system
CN110233626A (en) * 2019-07-05 2019-09-13 重庆邮电大学 Mechanical oscillation signal edge data lossless compression method based on two-dimensional adaptive quantization
CN111881115A (en) * 2020-08-01 2020-11-03 江苏哩咕信息科技有限公司 Database coordination optimization method based on big data dynamic planning
CN112364294A (en) * 2020-10-27 2021-02-12 中国核动力研究设计院 Automatic conversion method, device, equipment and medium for reactor core numerical calculation matrix
US20210097130A1 (en) * 2019-09-27 2021-04-01 Arm Limited Matrix Multiplication System and Method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6740912B2 (en) * 2017-01-17 2020-08-19 富士通株式会社 Data compression device, data compression program, data compression method and program
CN111222306A (en) * 2020-01-06 2020-06-02 广州虎牙科技有限公司 Data processing method and device, electronic equipment and storage medium
CN112861475A (en) * 2020-11-03 2021-05-28 深圳市和讯华谷信息技术有限公司 Encoding and decoding processing method, device, equipment and storage medium
CN112506880B (en) * 2020-12-18 2022-03-08 深圳智慧林网络科技有限公司 Data processing method and related equipment
CN114070901B (en) * 2021-09-30 2024-01-02 深圳智慧林网络科技有限公司 Data transmitting and receiving method, device and equipment based on multi-data alignment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365814A (en) * 2013-06-27 2013-10-23 深圳市汇顶科技股份有限公司 Serial data transmission method and system
CN105703782A (en) * 2016-03-11 2016-06-22 深圳大学 Incremental shift matrix construction method, network coding method and system
CN110233626A (en) * 2019-07-05 2019-09-13 重庆邮电大学 Mechanical oscillation signal edge data lossless compression method based on two-dimensional adaptive quantization
US20210097130A1 (en) * 2019-09-27 2021-04-01 Arm Limited Matrix Multiplication System and Method
CN111881115A (en) * 2020-08-01 2020-11-03 江苏哩咕信息科技有限公司 Database coordination optimization method based on big data dynamic planning
CN112364294A (en) * 2020-10-27 2021-02-12 中国核动力研究设计院 Automatic conversion method, device, equipment and medium for reactor core numerical calculation matrix

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈思伟: ""面向健康智能家居的数据压缩与加密技术研究"", 《中国优秀硕士学位论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023051319A1 (en) * 2021-09-30 2023-04-06 深圳智慧林网络科技有限公司 Data sending method, apparatus and device based on multi-data alignment, data receiving method, apparatus and device based on multi-data alignment

Also Published As

Publication number Publication date
WO2023051319A1 (en) 2023-04-06
CN114070901B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
US20150100556A1 (en) Data Compression/Decompression Device
WO2023061177A1 (en) Multi-data sending method, apparatus and device based on columnar data scanning, and multi-data receiving method, apparatus and device based on columnar data scanning
CN108628898B (en) Method, device and equipment for data storage
CN108197324B (en) Method and apparatus for storing data
CN102866954B (en) The method of Memory Allocation and device
CN109993273B (en) Convolution implementation method of convolution neural network and related product
CN106649210B (en) Data conversion method and device
CN114138231B (en) Method, circuit and SOC for executing matrix multiplication operation
CN115525580A (en) Namespace setting method and device and readable storage medium
CN114070901B (en) Data transmitting and receiving method, device and equipment based on multi-data alignment
CN104079623A (en) Method and system for controlling multilevel cloud storage synchrony
CN104572994A (en) Method and device for searching data
CN111353289B (en) Document comparison method and device, storage medium and electronic equipment
WO2023061180A1 (en) Multi frequency-based data sending method and apparatus, multi frequency-based data receiving method and apparatus, and device
CN103036642B (en) A kind of transmission method of data and transmitting terminal and receiving terminal
CN104079368B (en) A kind of the test data transmission method and server of application software
CN113485951B (en) DMA read operation implementation method based on FPGA, FPGA equipment and communication system
CN114745452B (en) Equipment management method and device and electronic equipment
CN113329096B (en) Message transmission method and device, electronic equipment and storage medium
CN112685619A (en) Universal capture method for webpage table data
CN115454356B (en) Data file processing method, device and equipment based on recognition and aggregation algorithm
CN111984202A (en) Data processing method and device, electronic equipment and storage medium
CN105468603A (en) Data selection method and apparatus
CN116708480B (en) Data synchronization method based on Datax frame
CN113076178B (en) Message storage method, device and equipment

Legal Events

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