WO2023051319A1 - 基于多数据对齐的数据发送和接收方法、装置和设备 - Google Patents

基于多数据对齐的数据发送和接收方法、装置和设备 Download PDF

Info

Publication number
WO2023051319A1
WO2023051319A1 PCT/CN2022/119921 CN2022119921W WO2023051319A1 WO 2023051319 A1 WO2023051319 A1 WO 2023051319A1 CN 2022119921 W CN2022119921 W CN 2022119921W WO 2023051319 A1 WO2023051319 A1 WO 2023051319A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
matrix
character
strings
binary data
Prior art date
Application number
PCT/CN2022/119921
Other languages
English (en)
French (fr)
Inventor
白志得
哈米德
白智德
丁晓端
殷燕
黄坤
Original Assignee
深圳智慧林网络科技有限公司
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 深圳智慧林网络科技有限公司 filed Critical 深圳智慧林网络科技有限公司
Publication of WO2023051319A1 publication Critical patent/WO2023051319A1/zh

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

Definitions

  • the present invention relates to the technical field of data transmission, in particular to a data sending and receiving method, device and equipment based on multiple data alignment.
  • the data when transmitting data, in order to obtain higher transmission efficiency, the data is usually compressed or split into multiple sub-data of the same size for transmission.
  • compression technology compresses data by performing a large number of calculations that consume a lot of computer resources, and due to the increased bandwidth of modern routers, it usually takes longer to send data directly without compression than to send the data after compressing it. few.
  • the existing data splitting method usually splits the data into several sub-data of equal size according to the specific requirements of transmission, sends them separately, and then combines them at the receiving end.
  • due to problems such as disk writing and indexing of the split sub-data in the disk cluster not only does it not help data transmission on the network, but it reduces the data transmission speed on the network. Therefore, current methods of sending data based on compression and splitting often fail to increase the speed of data transfer over the network, and instead result in slower data transfer speeds.
  • the embodiments of the present application provide a data sending and receiving method, device and device based on multiple data alignment, which can improve the data transmission speed on the network.
  • the embodiment of the present application provides a data sending method based on multiple data alignment, including:
  • Each of the r second binary data strings is subjected to multiple character scanning processes to obtain r simplified data strings, wherein r simplified data strings and r second binary data strings are obtained One-to-one correspondence of data strings;
  • the r simplified data strings are vertically spliced to obtain the target data string
  • the embodiment of the present application provides a data receiving method based on multiple data alignment, including:
  • each third binary data string the x vertical data strings are spliced horizontally to obtain the third matrix
  • the third matrix is restored by multiple row displacements to obtain the fourth matrix
  • Data restoration is performed 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.
  • the embodiment of the present application provides a data sending device based on multiple data alignment, including:
  • the first receiving module, the first processing module and the sending module wherein,
  • the first receiving module is used to obtain t pieces of 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 of the t data to be sent to obtain t first binary data strings, wherein the t first binary data strings are the same as the t to-be-sent data strings One-to-one correspondence of the sent data; stacking t first binary data strings vertically to obtain the first matrix; performing row displacement processing on the first matrix multiple times to obtain the second matrix; splitting the second matrix by column, To obtain r second binary data strings, wherein r is a positive integer greater than 0; performing multiple character scanning processes on each second binary data string in the r second binary data strings, Obtain r simplified data strings, wherein, obtain r simplified data strings and r second binary data strings in one-to-one correspondence; according to the arrangement position of each second binary data string in the second matrix, r A simplified data string is spliced vertically to obtain the target data string;
  • the sending module is used to send the target data string to the data receiving end.
  • the embodiment of the present application provides a data receiving device based on multiple data alignment, including:
  • the second receiving module, the second processing module and the restoring module wherein,
  • the second receiving module is used to receive the data to be restored from the data sending end, wherein the data to be restored includes: a target data string and a description file;
  • the second processing module is used to perform data splitting on the target data string according to the description file to obtain x simplified data strings; according to the description file and a preset conversion table, perform each simplified data string in the x simplified data strings Data conversion, to obtain x third binary data strings, wherein, the x third binary data strings correspond to x simplified data strings one by one; each of the x third binary data strings
  • the elements in the three binary data strings are arranged sequentially from top to bottom according to the arrangement position in each third binary data string, to obtain x vertical data strings, wherein, x vertical data strings and x One-to-one correspondence of the third binary data strings; according to the label of each third binary data string, splicing x vertical data strings horizontally to obtain the third matrix; performing multiple rows on the third matrix according to the description file Displacement restoration to obtain the fourth matrix; according to the order from top to bottom, split the fourth matrix by row to obtain y fourth binary data strings;
  • a restoration module configured to perform data restoration on each of 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 .
  • the embodiment of the present application provides a data sending device based on multiple data alignment, including: a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to The electronic device is made to execute the method as in the first aspect.
  • the embodiment of the present application provides a data receiving device based on multiple data alignment, including: a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to Make the electronic device execute the method as in the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program causes a computer to execute the method of the first aspect and/or the second aspect.
  • the embodiment of the present application provides a computer program product
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program
  • the computer is operable to cause the computer to perform the first aspect and/or the second aspect Methods.
  • the first matrix is obtained by binarizing t pieces of data to be sent and stacking them vertically. Then perform row displacement processing on the first matrix multiple times to obtain a second matrix whose number of columns with identical elements is greater than or equal to the first threshold. Then split the second matrix by columns to obtain r second binary data strings, and finally send the r second binary data strings to the data receiving end. Therefore, due to the multiple displacement processing, there will be a large number of redundant bits of the same type in the obtained second matrix, and there will also be columns with identical elements. Based on this, after splitting the second matrix by column, the data structure of the r second binary data strings obtained is simpler and more regular, which can effectively improve the data processing efficiency during the sending process, and then improve the network transfer speed.
  • a storage unit such as a memory unit (RAM)
  • RAM memory unit
  • FIG. 1 is a schematic diagram of the hardware structure of a data sending device based on multiple data alignment or a data receiving device based on multiple data alignment provided in an embodiment of the present application;
  • FIG. 2 is a schematic flowchart of a data sending method based on multiple data alignment provided in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for obtaining a second matrix by performing multiple row displacement processing on the first matrix according to an embodiment of the present application
  • FIG. 4 is a schematic flow diagram of another method for performing multiple row displacement processing on the first matrix to obtain the second matrix provided by the embodiment of the present application;
  • Fig. 5 is a schematic flowchart of a method for obtaining r simplified data strings by performing character scanning processing on each of r second binary data strings for multiple times provided by 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 provided in an embodiment of the present application
  • FIG. 7 is a schematic flowchart of a data receiving method based on multiple data alignment provided in an embodiment of the present application.
  • FIG. 8 is a block diagram of functional modules of a data sending device based on multiple data alignment provided in an embodiment of the present application
  • FIG. 9 is a block diagram of functional modules of a multi-data alignment-based data receiving device provided in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a data sending device based on multiple data alignment provided in an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a data receiving device based on multiple data alignment provided in an embodiment of the present application.
  • 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 present application.
  • the occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are independent or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
  • FIG. 1 is a schematic diagram of a hardware structure of a data sending device based on multiple data alignment or a data receiving device based on multiple data alignment provided in an embodiment of the present application.
  • the data sending device based on multiple data alignment or the data receiving device 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 .
  • the processor 101 may be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, a specific application integrated circuit (application-specific integrated circuit, ASIC), or one or more An integrated circuit that controls the program execution of the program of this application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communication line 102 which may include a path, transmits information between the aforementioned components.
  • the communication interface 104 may be any device such as a transceiver (such as an antenna) for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (wireless local area networks, WLAN) and the like.
  • a transceiver such as an antenna
  • WLAN wireless local area networks
  • Memory 103 may be read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions
  • Type of dynamic storage device also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), read-only disc (compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other medium accessed by a computer, but not limited to.
  • the memory 103 may exist independently and be connected to the processor 101 through the communication line 102 .
  • the memory 103 can also be integrated with the processor 101 .
  • the memory 103 provided in this embodiment of the present application may generally be non-volatile.
  • the memory 103 is used to store computer-executed instructions for implementing the solutions of the present application, and the execution is controlled by the processor 101 .
  • the processor 101 is configured to execute computer-executed instructions stored in the memory 103, so as to implement the methods provided in the following embodiments of the present application.
  • computer-executed instructions may also be referred to as application code, which is not specifically limited in the present application.
  • the processor 101 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 1 .
  • the device for sending data based on multiple data alignment or the device for receiving data based on multiple data alignment may also include multiple processors, such as processor 101 and processor 107 in FIG. 1 .
  • 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 (eg, computer program instructions).
  • the data sending device based on multiple data alignment or the data receiving device based on multiple data alignment may also include output device 105 and input device 106 .
  • Output device 105 is in communication with processor 101 and may display information in a variety of ways.
  • the output device 105 may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector) wait.
  • the input device 106 communicates with the processor 101 and can receive user input in various ways.
  • the input device 106 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
  • the above-mentioned device for sending data based on multiple data alignment or the device for receiving data based on multiple data alignment may be a general-purpose device or a special-purpose device.
  • the embodiment of the present application does not limit the device type of the data sending device based on multiple data alignment or the data receiving device based on multiple data alignment.
  • FIG. 2 is a schematic flowchart of a data sending method based on multiple data alignment provided in an embodiment of the present application.
  • the data sending method based on multiple data alignment includes the following steps:
  • t is a positive integer greater than 0.
  • t pieces of data there is no requirement for the t pieces of data to be sent, that is, any data can be sent through the data sending method based on multiple data alignment provided in this application.
  • the t first binary data strings are in one-to-one correspondence with the t data to be sent.
  • a method for performing multiple row displacement processing on the first matrix to obtain the second matrix includes:
  • the first threshold is now set to be 4, following the above example, after shifting each row in the first matrix, the following matrix can be obtained:
  • R represents a right shift.
  • the target column is a matrix column in the displacement matrix D in which the number of consecutive identical elements is greater than the second threshold.
  • the largest consecutive identical elements are: [00, 111, 0, 11, 00000, 11, 0, 1, 0, 1], and the corresponding numbers are: [ 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 and greater than the second threshold, this column can be regarded as a target column that meets the requirements.
  • r is a positive integer greater than 0.
  • 10 second binary data strings can be obtained, specifically as follows: [0, 00, 111, 000, 111, 010, 000, 101, 11 ,1 ⁇ .
  • each second binary data string is simplified to further increase the network transmission speed.
  • this embodiment provides a method for performing multiple character scans on each of the r second binary data strings to obtain r simplified data strings, as shown in the figure 5, the method includes:
  • the obtained 10 second binary data strings are: [0, 00, 111,000, 111, 010,000, 101, 11, 1].
  • the initial character E of the first character scanning process is the first character "0”
  • the first character "0” is the last character, therefore,
  • the simplified data string corresponding to the first second binary data string "0" is recorded as "1".
  • the initial character E of the first character scanning process is the first character "0", and after traversing to the right in turn, the first and last character is not found.
  • Different characters of the start character E, then the second character "0" is used as the end character F, and the simplified data string corresponding to the second second binary data string "00" is recorded as "2" (the first character and The number of characters between the second characters plus two, that is, 0+2).
  • the initial character E of the first character scanning process is the first character "1", and after traversing to the right in sequence until the last character, the first character with the same character is not found.
  • Different characters of the start character E, then the third character "1” is used as the end character F, and the simplified data string corresponding to the first second binary data string "111" is recorded simultaneously as "3" (the first character and The number of characters between the third characters plus two, that is, 1+2).
  • the 10 second binary data strings can be simplified in turn to obtain 10 simplified data strings: [1, 2, 3, 3, 3, 111, 3, 111, 2, 1].
  • the 10 simplified data strings [1, 2, 3, 3, 3, 111, 3, 111, 2, 1] are spliced vertically to obtain the target data string "12333111311121".
  • the data can be greatly compressed, and the compression does not need to be complicated.
  • the compression calculation greatly reduces the consumption of computing resources and compression time. Moreover, the corresponding data content cannot be directly restored through each compressed fragment, which improves data security.
  • every 256 data can be sent as a group, thus, when the second binary data string composed of the same elements appears, that is, the second binary data string composed of 0 or 1
  • the simplified result is 256. This simplified result only needs to occupy 1 byte in the network, which greatly reduces the bandwidth requirement of the network and further improves the network transmission speed.
  • a method for sending the target data string to the data receiving end includes:
  • 601 Perform data segmentation on the target data string to obtain at least one data segment.
  • the number of division bits q may be determined, and then, the target data string is divided into at least one data fragment with equal number of bits according to the number of division bits q.
  • q can be any integer greater than 1. In this embodiment, the case where q is equal to 2 will be taken as an example to describe the method for sending the target data string to the data receiving end provided by this application.
  • the target data string can be divided into groups of 2 bits for data splitting.
  • the target data string is "12333111311121", and when the number of division digits is 2, it can be divided into [12, 33, 31, 11, 31, 11, 21].
  • the number of split digits may also be a dynamic, cyclic value.
  • the number of split digits can be regarded as a split sequence [m, x, y], and then when splitting binary data, you can first split m bits, then split x bits, then split y bits, and then split m bits again , the binary data has been cyclically set to be divided. Specifically, when the sequence [1, 2, 3] is segmented and the target data string is "321332133312", the segmented result [3, 21, 332, 1, 33, 312] can be obtained.
  • 602 Determine at least one sending frequency according to the number of bits in each data segment in the data segment.
  • the number of required sending frequencies may be determined according to the number of bits of each data fragment.
  • the first number may be the same as the number of bits of each data slice, that is, the first number is q.
  • the relationship between the first number l and the number of bits q of each data slice The relationship between can be expressed by formula 1:
  • the case where the first quantity is q will be taken as an example to describe the multi-frequency-based data sending method provided by the present application. Based on this, following the above example where q is equal to 2, it can be determined that the first number is also 2, therefore, 2 transmission frequencies can be randomly selected from the preset transmission frequency library as the at least one transmission frequency.
  • 603 Determine 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.
  • the at least one transmission frequency obtained in step 602 may be randomly sorted, so that each data fragment is sequentially selected cyclically from the at least one sorted transmission frequency according to the arrangement position in the target data string.
  • a sending frequency is used as its corresponding sending frequency.
  • q is equal to 2.
  • two sending frequencies are selected, named sending frequency A and sending frequency B respectively, and after sorting them, the sequence [sending frequency A, sending frequency B].
  • the target data string is "12333111311121”, and the corresponding data slice sequence is [12, 33, 31, 11, 31, 11, 21].
  • the first data fragment "12" corresponds to the transmission frequency A
  • the second data fragment "33” corresponds to the transmission frequency B
  • the third data fragment "31” corresponds to the transmission frequency A
  • the fourth data fragment "31” corresponds to the transmission frequency A.
  • Fragment "11” corresponds to sending frequency B
  • the fifth data fragment "31” corresponds to sending frequency A
  • the sixth data fragment "11” corresponds to sending frequency B
  • the fifth data fragment "21” corresponds to sending frequency a.
  • 604 Perform data conversion on each data segment respectively according to a preset conversion table and the first sending frequency corresponding to each data segment, to obtain at least one conversion result.
  • the conversion table records conversion results corresponding to different data fragments at different sending frequencies, and at least one conversion result is in one-to-one correspondence with at least one data fragment.
  • the r second binary data strings may not be simplified, and the r second binary data strings are directly divided according to the number of each second binary data string in the first matrix. arranging the positions, splicing the r second binary data strings vertically to obtain the target data string. In the method according to the above steps 601-605, the target data string is sent to the data receiving end.
  • FIG. 7 is a schematic flowchart of a data receiving method based on multiple data alignment provided in an embodiment of the present application.
  • the data receiving method based on multiple data alignment includes the following steps:
  • the data to be restored may include: a target data string and a description file.
  • the x third binary data strings are in one-to-one correspondence with the x simplified data strings.
  • the x vertical data strings are in one-to-one correspondence with the x third binary data strings.
  • y pieces of original data are in one-to-one correspondence with y pieces of binary data.
  • the first matrix is obtained by binarizing t pieces of data to be sent and stacking them vertically. Then perform row displacement processing on the first matrix multiple times to obtain a second matrix whose number of columns with identical elements is greater than or equal to the first threshold. Then split the second matrix by columns to obtain r second binary data strings, and finally send the r second binary data strings to the data receiving end. Therefore, due to the multiple displacement processes, there will be a large number of redundant bits of the same type in the obtained second matrix, and at the same time, there will be columns with identical elements.
  • the data structure of the r second binary data strings obtained is simpler and more regular, which can effectively improve the data processing efficiency during the sending process, and then improve the network transfer speed.
  • a storage unit such as a memory unit (RAM)
  • RAM memory unit
  • the alignment operation of the data is realized, so that neither the sending end nor the receiving end needs to occupy additional memory, and the disk writing of data segmentation in the disk cluster is avoided. , indexing and other issues, and then further improve the network transmission speed.
  • FIG. 8 is a block diagram of functional modules of a data sending device based on multiple data alignment provided in an embodiment of the present application.
  • the data sending device 800 based on multiple data alignment includes: a first receiving module 801, a first processing module 802, and a sending module 803; wherein:
  • the first receiving module 801 is configured to acquire t pieces of data to be sent, where t is a positive integer greater than 1;
  • the first processing module 802 is configured to perform binary conversion on each of the t data to be sent to obtain t first binary data strings, wherein the t first binary data strings are the same as the t One-to-one correspondence of the data to be sent; stacking t first binary data strings vertically to obtain the first matrix; performing row displacement processing on the first matrix multiple times to obtain the second matrix; splitting the second matrix by columns , to obtain r second binary data strings, wherein, r is a positive integer greater than 0; performing multiple character scanning processes 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 are in one-to-one correspondence with r second binary data strings; according to the arrangement position of each second binary data string in the second matrix, the The r simplified data strings are spliced vertically to obtain the target data string;
  • a sending module 803, configured to send the target data string to the data receiving end.
  • the first processing module 802 is specifically used for:
  • the displacement matrix B is used as the second matrix
  • the displacement matrix B is used as the starting matrix for the i+1th row displacement processing to perform the i+1th row displacement processing until multiple rows are performed After displacement processing, the second matrix is obtained.
  • the first processing module 802 is specifically used for:
  • the displacement matrix D is used as the second matrix
  • the displacement matrix D is used as the starting matrix for the j+1th row displacement processing to perform the j+1th row displacement processing until multiple row displacement processing is performed After that, the second matrix is obtained.
  • the first processing module 802 in terms of performing multiple character scanning processes on each of the r second binary data strings to obtain r simplified data strings, the first processing module 802 , specifically for:
  • the scanning result of the kth character scanning process is set to 1, and the processing results of multiple character scanning processes are processed according to multiple character scans
  • the processing sequence is sorted, and the simplified data string corresponding to each second binary data string is obtained;
  • the scan result of the kth character scanning process is set to be the number of characters between the start character E and the end character F plus two, and
  • the processing results of the multiple character scanning processes are sorted according to the processing sequence of the multiple character scanning processes, and a simplified data string corresponding to each second binary data string is obtained.
  • the multi-data alignment-based data receiving device 900 includes: a second receiving module 901, a second processing module 902, and a restoring module 903; wherein:
  • the second receiving module 901 is configured to receive the data to be restored from the data sending end, wherein the data to be restored includes: a target data string and a description file;
  • the second processing module 902 is used to perform data splitting on the target data string according to the description file to obtain x simplified data strings; according to the description file and the preset conversion table, each simplified data string in the x simplified data strings Perform data conversion to obtain x third binary data strings, wherein the x third binary data strings correspond to x simplified data strings one by one; each of the x third binary data strings The elements in the third binary data string are arranged sequentially from top to bottom according to the arrangement position in each third binary data string, to obtain x vertical data strings, wherein, x vertical data strings are related to x A one-to-one correspondence of the third binary data strings; according to the label of each third binary data string, the x vertical data strings are horizontally spliced to obtain the third matrix; according to the description file, the third matrix is performed multiple times Row displacement restoration to obtain the fourth matrix; according to the order from top to bottom, split the fourth matrix by row to obtain y fourth binary data strings;
  • Restoration module 903 for performing data restoration on each fourth binary data string in y fourth binary data strings to obtain y original data, wherein, y original data and y binary data are one by one correspond.
  • FIG. 10 is a schematic structural diagram of a data sending device based on multiple data alignment provided in an embodiment of the present application.
  • the data sending device 1000 based on multiple data alignment includes a transceiver 1001 , a processor 1002 and a memory 1003 . They are connected through a bus 1004 .
  • the memory 1003 is used to store computer programs and data, and can transmit the data stored in the memory 1003 to the processor 1002 .
  • the processor 1002 is used to read the computer program in the memory 1003 to perform the following operations:
  • Each of the r second binary data strings is subjected to multiple character scanning processes to obtain r simplified data strings, wherein r simplified data strings and r second binary data strings are obtained One-to-one correspondence of data strings;
  • the r simplified data strings are vertically spliced to obtain the target data string
  • the processor 1002 in terms of performing multiple row displacement processing on the first matrix to obtain the second matrix, is specifically configured to perform the following operations:
  • the displacement matrix B is used as the second matrix
  • the displacement matrix B is used as the starting matrix for the i+1th row displacement processing to perform the i+1th row displacement processing until multiple rows are performed After displacement processing, the second matrix is obtained.
  • the processor 1002 in performing multiple row displacement processing on the first matrix to obtain the second matrix, is specifically configured to perform the following operations:
  • the displacement matrix D is used as the second matrix
  • the displacement matrix D is used as the starting matrix for the j+1th row displacement processing to perform the j+1th row displacement processing until multiple row displacement processing is performed After that, the second matrix is obtained.
  • the processor 1002 in terms of performing multiple character scanning processes on each of the r second binary data strings to obtain r simplified data strings, the processor 1002, specifically Used to do the following:
  • the scanning result of the kth character scanning process is set to 1, and the processing results of multiple character scanning processes are processed according to multiple character scans
  • the processing sequence is sorted, and the simplified data string corresponding to each second binary data string is obtained;
  • the scan result of the kth character scanning process is set to be the number of characters between the start character E and the end character F plus two, and
  • the processing results of the multiple character scanning processes are sorted according to the processing sequence of the multiple character scanning processes, and a simplified data string corresponding to each second binary data string is obtained.
  • FIG. 11 is a schematic structural diagram of a data receiving device based on multiple data alignment provided in an embodiment of the present application.
  • the data receiving device 1100 based on multiple data alignment includes a transceiver 1101 , a processor 1102 and a memory 1103 . They are connected through a bus 1104 .
  • the memory 1103 is used to store computer programs and data, and can transmit the data stored in the memory 1103 to the processor 1102.
  • the processor 1102 is used to read the computer program in the memory 1103 to perform the following operations:
  • each third binary data string the x vertical data strings are spliced horizontally to obtain the third matrix
  • the third matrix is restored by multiple row displacements to obtain the fourth matrix
  • Data restoration is performed 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.
  • the data sending device based on multiple data alignment and the data receiving device based on multiple data alignment in the present application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, palmtop computers, notebook computers , Mobile Internet Devices MID (Mobile Internet Devices, MID for short), robots or wearable devices, etc.
  • smart phones such as Android phones, iOS phones, Windows Phone phones, etc.
  • tablet computers palmtop computers
  • notebook computers Mobile Internet Devices MID (Mobile Internet Devices, MID for short)
  • robots or wearable devices etc.
  • the above-mentioned data sending device based on multiple data alignment and data receiving device based on multiple data alignment are examples, not exhaustive, including but not limited to the above-mentioned data sending device based on multiple data alignment and data receiving device based on multiple data alignment.
  • the data sending device based on multiple data alignment and the data receiving device based on multiple data alignment may also include: intelligent vehicle-mounted terminals, computer equipment, and the like.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement any one of the above-mentioned method implementations based on Part or all of the steps of the data sending method based on multiple data alignment and the data receiving method based on multiple data alignment.
  • 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.
  • the embodiments of the present application also provide a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause the computer to execute the method as described in the above-mentioned method embodiment.
  • the disclosed device may be implemented in other ways.
  • the device implementation described above is only illustrative.
  • the division of the units is only a logical function division.
  • multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented not only in the form of hardware, but also in the form of software program modules.
  • the integrated units may be stored in a computer-readable memory if implemented in the form of a software program module and sold or used as an independent product.
  • the technical solution of the present application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the aforementioned memory includes: various media that can store program codes such as U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk.

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

一种基于多数据对齐的数据发送和接收方法、装置和设备,其中,数据发送方法包括:获取t个待发送数据;对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串;将t个第一二进制数据串竖向堆叠,得到第一矩阵;对第一矩阵进行多次行位移处理,得到第二矩阵;将第二矩阵按列拆分,以得到r个第二二进制数据串;分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,其中,得到的r个简化数据串与r个第二二进制数据串一一对应;根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串;将目标数据串发送至数据接收端。

Description

基于多数据对齐的数据发送和接收方法、装置和设备
本申请要求于2021年09月30日提交中国专利局、申请号为202111169005.3、申请名称为“基于多数据对齐的数据发送和接收方法、装置和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据传输技术领域,具体涉及一种基于多数据对齐的数据发送和接收方法、装置和设备。
背景技术
目前,在传输数据时,为了获取更高的传输效率,通常会将数据进行压缩或拆分为多个大小相同的子数据进行传输。但是,压缩技术通过会消耗大量的计算机资源进行大量计算来压缩数据,同时,由于现代路由器的带宽增加,在不压缩的情况下直接进行数据发送通常比将数据进行压缩后再发送花费的时间更少。而现有的数据拆分方式通常是根据传输的特定需求将数据拆分为等大小的若干个子数据分别发送,再在接收端进行组合。但是,实际上由于拆分后的子数据在磁盘集群中的磁盘写入、索引等问题,不仅对网络上的数据传输没有任何帮助,反而降低了网络上的数据传输速度。因此,当前基于压缩和拆分的数据发送方法通常无法提高网络上的数据传输速度,反而会导致数据传输速度变慢。
发明内容
为了解决现有技术中存在的上述问题,本申请实施方式提供了一种基于多数据对齐的数据发送和接收方法、装置和设备,可以提高网络上的数据传输速度。
第一方面,本申请的实施方式提供了一种基于多数据对齐的数据发送方法,包括:
获取t个待发送数据,其中,t为大于1的正整数;
对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,t个第一二进制数据串与t个待发送数据一一对应;
将t个第一二进制数据串竖向堆叠,得到第一矩阵;
对第一矩阵进行多次行位移处理,得到第二矩阵;
将第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;
分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到 r个简化数据串,其中,得到r个简化数据串与r个第二二进制数据串一一对应;
根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串;
将目标数据串发送至数据接收端。
第二方面,本申请的实施方式提供了一种基于多数据对齐的数据接收方法,包括:
从数据发送端接收待还原数据,其中,待还原数据包括:目标数据串和描述文件;
根据描述文件对目标数据串进行数据拆分,得到x个简化数据串;
根据描述文件和预设的转化表,将x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,x个第三二进制数据串与x个简化数据串一一对应;
将x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,x个竖向数据串与x个第三二进制数据串一一对应;
根据每个第三二进制数据串的标号,将x个竖向数据串横向拼接,得到第三矩阵;
根据描述文件对第三矩阵进行多次行位移还原,得到第四矩阵;
按照从上到下的顺序,将第四矩阵按行拆分,得到y个第四二进制数据串;
对y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,y个原始数据与y个二进制数据一一对应。
第三方面,本申请的实施方式提供了一种基于多数据对齐的数据发送装置,包括:
第一接收模块、第一处理模块和发送模块;其中,
第一接收模块,用于获取t个待发送数据,其中,t为大于1的正整数;
第一处理模块,用于对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,t个第一二进制数据串与t个待发送数据一一对应;将t个第一二进制数据串竖向堆叠,得到第一矩阵;对第一矩阵进行多次行位移处理,得到第二矩阵;将第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,其中,得到r个简化数据串与r个第二二进制数据串一一对应;根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串;
发送模块,用于将目标数据串发送至数据接收端。
第四方面,本申请的实施方式提供了一种基于多数据对齐的数据接收装置,包括:
第二接收模块、第二处理模块和还原模块;其中,
第二接收模块,用于从数据发送端接收待还原数据,其中,待还原数据包括:目标数据串和描述文件;
第二处理模块,用于根据描述文件对目标数据串进行数据拆分,得到x个简化数据串;根据描述文件和预设的转化表,将x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,x个第三二进制数据串与x个简化数据串一一对应;将x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,x个竖向数据串与x个第三二进制数据串一一对应;根据每个第三二进制数据串的标号,将x个竖向数据串横向拼接,得到第三矩阵;根据描述文件对第三矩阵进行多次行位移还原,得到第四矩阵;按照从上到下的顺序,将第四矩阵按行拆分,得到y个第四二进制数据串;
还原模块,用于对y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,y个原始数据与y个二进制数据一一对应。
第五方面,本申请实施方式提供一种基于多数据对齐的数据发送设备,包括:处理器,处理器与存储器相连,存储器用于存储计算机程序,处理器用于执行存储器中存储的计算机程序,以使得电子设备执行如第一方面的方法。
第六方面,本申请实施方式提供一种基于多数据对齐的数据接收设备,包括:处理器,处理器与存储器相连,存储器用于存储计算机程序,处理器用于执行存储器中存储的计算机程序,以使得电子设备执行如第二方面的方法。
第七方面,本申请实施方式提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序使得计算机执行如第一方面和/或第二方面的方法。
第八方面,本申请实施方式提供一种计算机程序产品,计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,计算机可操作来使计算机执行如第一方面和/或第二方面的方法。
实施本申请实施方式,具有如下有益效果:
在本申请实施方式中,通过将t个待发送数据二进制化后竖向堆叠,得到第一矩阵。再对第一矩阵进行多次行位移处理,得到元素完全相同的列的数量大于或等于第一阈值的第二矩阵。继而将第二矩阵按列拆分,以得到r个第二二进制数据串,最后将r个第二二进制数据串发送至数据接收端。由此,由于通过多次位移处理,使得得到的第二矩阵中会 存在大量的同类冗余位,且同时也会存在元素完全相同的列。基于此,将第二矩阵按列拆分后,得到的r个第二二进制数据串的数据结构更为简单,规律性强,可以有效提升发送过程中对数据的处理效率,继而提升网络传输速度。此外,由于数据传输过程中,存储单元,例如内存单元(RAM)能够以原始大小处理位,因此,通常是通过发送端和接收端的存储单元完成。而在本申请中,通过将待发送数据转化为二进制数据,实现了数据的对位操作,从而在发送端和接收端都不必占用额外的内存,避免了数据分割在磁盘集群中的磁盘写入、索引等问题,继而进一步提升了网络传输速度。
附图说明
为了更清楚地说明本申请实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施方式提供的一种基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置的硬件结构示意图;
图2为本申请实施方式提供的一种基于多数据对齐的数据发送方法的流程示意图;
图3为本申请实施方式提供的一种对第一矩阵进行多次行位移处理,得到第二矩阵的方法的流程示意图;
图4为本申请实施方式提供的另一种对第一矩阵进行多次行位移处理,得到第二矩阵的方法的流程示意图;
图5为本申请实施方式提供的一种分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串的方法的流程示意图;
图6为本申请实施方式提供的一种将目标数据串发送至数据接收端的方法的流程示意图;
图7为本申请实施方式提供的一种基于多数据对齐的数据接收方法的流程示意图;
图8为本申请实施方式提供的一种基于多数据对齐的数据发送装置的功能模块组成框图;
图9为本申请实施方式提供的一种基于多数据对齐的数据接收装置的功能模块组成框图;
图10为本申请实施方式提供的一种基于多数据对齐的数据发送设备的结构示意图。
图11为本申请实施方式提供的一种基于多数据对齐的数据接收设备的结构示意图。
具体实施方式
下面将结合本申请实施方式中的附图,对本申请实施方式中的技术方案进行清楚、完整地描述,显然,所描述的实施方式是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施方式”意味着,结合实施方式描述的特定特征、结果或特性可以包含在本申请的至少一个实施方式中。在说明书中的各个位置出现该短语并不一定均是指相同的实施方式,也不是与其它实施方式互斥的独立的或备选的实施方式。本领域技术人员显式地和隐式地理解的是,本文所描述的实施方式可以与其它实施方式相结合。
首先,参阅图1,图1为本申请实施方式提供的一种基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置的硬件结构示意图。该基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置包括至少一个处理器101,通信线路102,存储器103以及至少一个通信接口104。
在本实施方式中,处理器101,可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路102,可以包括一通路,在上述组件之间传送信息。
通信接口104,可以是任何收发器一类的装置(如天线等),用于与其他设备或通信网络通信,例如以太网,RAN,无线局域网(wireless local area networks,WLAN)等。
存储器103,可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储 信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
在本实施方式中,存储器103可以独立存在,通过通信线路102与处理器101相连接。存储器103也可以和处理器101集成在一起。本申请实施方式提供的存储器103通常可以具有非易失性。其中,存储器103用于存储执行本申请方案的计算机执行指令,并由处理器101来控制执行。处理器101用于执行存储器103中存储的计算机执行指令,从而实现本申请下述实施方式中提供的方法。
在可选的实施方式中,计算机执行指令也可以称之为应用程序代码,本申请对此不作具体限定。
在可选的实施方式中,处理器101可以包括一个或多个CPU,例如图1中的CPU0和CPU1。
在可选的实施方式中,基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置也可以包括多个处理器,例如图1中的处理器101和处理器107。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在可选的实施方式中,若基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置为服务器,则基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置还可以包括输出设备105和输入设备106。输出设备105和处理器101通信,可以以多种方式来显示信息。例如,输出设备105可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备106和处理器101通信,可以以多种方式接收用户的输入。例如,输入设备106可以是鼠标、键盘、触摸屏设备或传感设备等。
上述的基于多数据对齐的数据发送装置或基于多数据对齐的数据接收装置可以是一个通用设备或者是一个专用设备。本申请实施方式不限定基于多数据对齐的数据发送装置 或基于多数据对齐的数据接收装置的装置类型。
以下,将对本申请所公开的基于多数据对齐的数据发送方法进行说明:
参阅图2,图2为本申请实施方式提供的一种基于多数据对齐的数据发送方法的流程示意图。该基于多数据对齐的数据发送方法包括以下步骤:
201:获取t个待发送数据。
在本实施方式中,t为大于0的正整数。简单而言,在本实施方式中,对该t个待发送数据没有任何要求,即,任意数据均可通过本申请所提供的基于多数据对齐的数据发送方法进行发送。
202:对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串。
在本实施方式中,该t个第一二进制数据串与t个待发送数据一一对应。
203:将t个第一二进制数据串竖向堆叠,得到第一矩阵。
在本实施方式中,将以t等于3的情况为例,对本申请所提供的基于多数据对齐的数据发送方法进行说明。示例性的,现有3个待发送数据DCM、MP4和PDF,分别对其进行二进制化后,得到如下所示的3个第一二进制数据串:
DCM=>01010011;
MP4=>10110011;
PDF=>00101001;
将该3个第一二进制数据串进行竖向堆叠后,可以得到如下所示的第一矩阵:
Figure PCTCN2022119921-appb-000001
204:对第一矩阵进行多次行位移处理,得到第二矩阵。
在本实施方式中,提供了一种对第一矩阵进行多次行位移处理,得到第二矩阵的方法,如图3所示,该方法包括:
301:确定第i次行位移处理的起始矩阵A,将起始矩阵A中的任意一行向左或向右位移一位,得到位移矩阵B。
在本实施方式中,起始矩阵A中元素完全相同的列的数量小于第一阈值,i为大于或等于1的整数,且当i=1时,起始矩阵A为第一矩阵。
302:确定位移矩阵B中元素完全相同的列的数量。
303:当位移矩阵B中元素完全相同的列的数量大于或等于第一阈值时,将位移矩阵B作为第二矩阵。
304:当位移矩阵B中元素完全相同的列的数量小于第一阈值时,将位移矩阵B作为第i+1次行位移处理的起始矩阵进行第i+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
示例性的,现定第一阈值为4,沿用上述示例,对第一矩阵中的每一行进行位移后,可以得到如下矩阵:
Figure PCTCN2022119921-appb-000002
其中,R表示右移一位。
可见,其中元素完全相同的列有第三列“111”、第四列“000”、第五列“111”和第七列“000”共4列。
在可选的实施方式中,还提供了另一种对第一矩阵进行多次行位移处理,得到第二矩阵的方法,如图4所示,该方法包括:
401:确定第j次行位移处理的起始矩阵C,将起始矩阵C中的任意一行向左或向右位移一位,得到位移矩阵D。
在本实施方式中,起始矩阵C中元素完全相同的列的数量小于第一阈值,j为大于或等于1的整数,且当j=1时,起始矩阵C为第一矩阵。
402:在位移矩阵D中确定目标列的数量。
在本实施方式中,目标列为位移矩阵D中,矩阵列中连续相同的元素的个数大于第二阈值的矩阵列。
示例性的,对于列“0011101100000110101”,其最大的连续的相同元素分别为:【00,111,0,11,00000,11,0,1,0,1】,对应的个数分别为:【2,3,1,2,5,2,1,1,1,1】。因此,当第二阈值为4时,由于列“0011101100000110101”中包含连续的相同元素“00000”,其个数为5大于第二阈值,因此,该列可以视为符合要求的目标列。
403:当位移矩阵D中的目标列的数量大于或等于第一阈值时,将位移矩阵D作为第二矩阵。
404:当位移矩阵D中的目标列的数量小于第一阈值时,将位移矩阵D作为第j+1次 行位移处理的起始矩阵进行第j+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
205:将第二矩阵按列拆分,以得到r个第二二进制数据串。
在本实施方式中,r为大于0的正整数。示例性的,沿用上述示例,对第二矩阵按列拆分后可以得到10个第二二进制数据串,具体如下:【0,00,111,000,111,010,000,101,11,1】。
206:分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到与r个第二二进制数据串一一对应的r个简化数据串。
在本实施方式中,由于,位移操作,使得拆分所得的r个第二二进制数据串中每个第二二进制数据串中会存在大量的同类冗余位,且同时也会存在由相同元素组成的第二二进制数据串,例如:111或000。基于此,得到的r个第二二进制数据串的数据结构更为简单,规律性强。因此,将原本的发送t个待发送数据,转化为发送r个第二二进制数据串,可以有效提升发送过程中对数据的处理效率,继而提升网络传输速度。
基于此,在本实施方式中,可以针对每个第二二进制数据串中会存在大量的同类冗余位,且同时也会存在由相同元素组成的第二二进制数据串的特性,对每个第二二进制数据串进行简化处理,以进一步的提升网络传输速度。
具体而言,本实施方式提供了一种分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串的方法,如图5所示,该方法包括:
501:从第k次字符扫描处理的起始字符E开始,依次向右遍历每个第二二进制数据串,直至确定出结束字符F。
在本实施方式中,结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符,或结束字符F为每个第二二进制数据串的最后一个字符,k为大于或等于1的整数,且当k=1时,起始字符E为每个第二二进制数据串的第一字符;
502:当结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加一,并将结束字符F作为第k+1次字符扫描处理的开始字符进行第k+1次字符扫描处理,直至进行多次字符扫描处理后,得到每个第二二进制数据串对应的简化数据串。
503:当起始字符E为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为1,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理 顺序排序,得到每个第二二进制数据串对应的简化数据串。
504:当结束字符F为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加二,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到每个第二二进制数据串对应的简化数据串。
示例性的,沿用上述n等于3的示例,得到的10个第二二进制数据串为:【0,00,111,000,111,010,000,101,11,1】。对于第一个第二二进制数据串“0”,第1次字符扫描处理的起始字符E为第一字符“0”,同时,第一字符“0”又是最后一个字符,因此,记录第一个第二二进制数据串“0”对应的简化数据串为“1”。
对于第二个第二二进制数据串“00”,第1次字符扫描处理的起始字符E为第一字符“0”,依次向右遍历后直到最后一个字符也未发现第一个与起始字符E不同的字符,则将第二字符“0”作为结束字符F,同时记录第二个第二二进制数据串“00”对应的简化数据串为“2”(第一字符与第二字符之间的字符数加二,即0+2)。
对于第三个第二二进制数据串“111”,第1次字符扫描处理的起始字符E为第一字符“1”,依次向右遍历后直到最后一个字符也未发现第一个与起始字符E不同的字符,则将第三字符“1”作为结束字符F,同时记录第一个第二二进制数据串“111”对应的简化数据串为“3”(第一字符与第三字符之间的字符数加二,即1+2)。
通过上述方法,可以依次对该10个第二二进制数据串进行简化,得到10个简化数据串:【1,2,3,3,3,111,3,111,2,1】。
207:根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串。
示例性的,沿用上述示例,将10个简化数据串:【1,2,3,3,3,111,3,111,2,1】纵向拼接,即可得到目标数据串“12333111311121”。
由此,当t为数百甚至数千时,即在同时发送数百或数千个符合要求的数据时,通过上述的拆分转化,可以对数据进行极大的压缩,且该压缩无需复杂的压缩计算,极大的降低了计算资源的消耗和压缩时间。且通过每个压缩分片也无法直接还原出对应的数据内容,提升了数据的安全性。
在可选的实施方式中,可以将每256个数据设为一组进行发送,由此,当出现由相同元素组成的第二二进制数据串,即全由0或1组成的第二二进制数据串时,其简化结果为 256,该简化结果只需占用网络中的1个字节,极大的降低了对网络的带宽需求,进一步的提升了网络传输速度。
208:将目标数据串发送至数据接收端。
在本实施方式中,提供了一种将目标数据串发送至数据接收端的方法,如图6所示,该方法包括:
601:将目标数据串进行数据分割,得到至少一个数据分片。
在本实施方式中,首先,可以确定分割位数q,然后,将该目标数据串按照分割位数q分割为位数相等的至少一个数据分片。示例性的,q可以为任意大于1的整数,在本实施方式中,将以q等于2的情况为例,对本申请所提供的将目标数据串发送至数据接收端的方法进行说明。
具体而言,当q等于2时,说明分割位数设置为2,此时,可以将目标数据串每2位分成一组,进行数据拆分。例如,沿用上述示例,目标数据串为“12333111311121”,在分割位数为2的情况下,可以分割为【12,33,31,11,31,11,21】。
在可选的实施方式中,分割位数也可以是一个动态的、循环的数值。例如,可以将分割位数视为一个分割序列【m,x,y】,继而对二进制数据进行数据分割时,可以先分割m位,再分割x位,再分割y位,然后再次分割m位,一直循环置该二进制数据被分割完成。具体而言,当分割序列【1,2,3】,目标数据串为“321332133312”时,可以得到分割结果【3,21,332,1,33,312】。
602:根据数据分片中每个数据分片的位数,确定至少一个发送频率。
在本实施方式中,首先可以根据每个数据分片的位数,确定需要的发送频率的数量,即第一数量。示例性的,该第一数量可以与每个数据分片的位数相同,即第一数量为q。当然,该第一数量和每个数据分片的位数之间也可以是其他函数关系,例如,在一种可能的实施方式中,第一数量l与每个数据分片的位数q之间的关系可以通过公式①表示:
l=2 q.........①
在本实施方式中,将以第一数量为q的情况为例,对本申请所提供的基于多频率的数据发送方法进行说明。基于此,沿用上述q等于2的示例,可以确定第一数量也为2,因此,可以在预设的发送频率库中随机选择2个发送频率,作为该至少一个发送频率。
603:根据每个数据分片在目标数据串中的排列位置,在至少一个发送频率中确定每个数据分片对应的第一发送频率。
在本实施方式中,可以将通过步骤602得到的至少一个发送频率进行随机排序,从而令每个数据分片按照在目标数据串中的排列位置,依次循环选取排序后的至少一个发送频率中的一个发送频率作为自身对应的发送频率。
具体而言,沿用上述q等于2的示例,在该示例中,选出了2个发送频率,分别命名为发送频率A和发送频率B,对其进行排序后得到序列【发送频率A,发送频率B】。目标数据串“12333111311121”,对应的数据分片序列为【12,33,31,11,31,11,21】。基于此,确定第一个数据分片“12”对应发送频率A,第二个数据分片“33”对应发送频率B,第三个数据分片“31”对应发送频率A,第四个数据分片“11”对应发送频率B,第五个数据分片“31”对应发送频率A,第六个数据分片“11”对应发送频率B,第五个数据分片“21”对应发送频率A。
604:根据预设的转化表,以及每个数据分片对应的第一发送频率,分别对每个数据分片进行数据转换,得到至少一个转化结果。
在本实施方式中,转化表记录了不同的数据分片在不同的发送频率下对应的转化结果,至少一个转化结果与至少一个数据分片一一对应。
605:将至少一个转化结果中的每个转化结果按照每个转化结果对应的第一发送频率依次发送至数据接收端。
在可选的实施方式中,也可以不对r个第二二进制数据串进行简化,直接将r个第二二进制数据串根据每个第二二进制数据串在第一矩阵中的排列位置,将r个第二二进制数据串串纵向拼接,得到目标数据串。在根据上述步骤601-605的方法将目标数据串发送至数据接收端。
此外,参阅图7,图7为本申请实施方式提供的一种基于多数据对齐的数据接收方法的流程示意图。该基于多数据对齐的数据接收方法包括以下步骤:
701:从数据发送端接收待还原数据。
在本实施方式中,待还原数据可以包括:目标数据串和描述文件。
702:根据描述文件对目标数据串进行数据拆分,得到x个简化数据串。
703:根据描述文件和预设的转化表,将x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串。
在本实施方式中,x个第三二进制数据串与x个简化数据串一一对应。
704:将x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在每个第 三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串。
在本实施方式中,x个竖向数据串与x个第三二进制数据串一一对应。
705:根据每个第三二进制数据串的标号,将x个竖向数据串横向拼接,得到第三矩阵。
706:根据描述文件对第三矩阵进行多次行位移还原,得到第四矩阵。
707:按照从上到下的顺序,将第四矩阵按行拆分,得到y个第四二进制数据串。
708:对y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据。
在本实施方式中,y个原始数据与y个二进制数据一一对应。
综上所述,本发明所提供的基于多数据对齐的数据发送方法中,通过将t个待发送数据二进制化后竖向堆叠,得到第一矩阵。再对第一矩阵进行多次行位移处理,得到元素完全相同的列的数量大于或等于第一阈值的第二矩阵。继而将第二矩阵按列拆分,以得到r个第二二进制数据串,最后将r个第二二进制数据串发送至数据接收端。由此,由于通过多次位移处理,使得得到的第二矩阵中会存在大量的同类冗余位,且同时也会存在元素完全相同的列。基于此,将第二矩阵按列拆分后,得到的r个第二二进制数据串的数据结构更为简单,规律性强,可以有效提升发送过程中对数据的处理效率,继而提升网络传输速度。此外,由于数据传输过程中,存储单元,例如内存单元(RAM)能够以原始大小处理位,因此,通常是通过发送端和接收端的存储单元完成。而在本申请中,通过将待发送数据转化为二进制数据,实现了数据的对位操作,从而在发送端和接收端都不必占用额外的内存,避免了数据分割在磁盘集群中的磁盘写入、索引等问题,继而进一步提升了网络传输速度。
参阅图8,图8为本申请实施方式提供的一种基于多数据对齐的数据发送装置的功能模块组成框图。如图8所示,该基于多数据对齐的数据发送装置800包括:第一接收模块801、第一处理模块802和发送模块803;其中:
第一接收模块801,用于获取t个待发送数据,其中,t为大于1的正整数;
第一处理模块802,用于对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,t个第一二进制数据串与t个待发送数据一一对应;将t个第一二进制数据串竖向堆叠,得到第一矩阵;对第一矩阵进行多次行位移处理,得到第 二矩阵;将第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,其中,得到r个简化数据串与r个第二二进制数据串一一对应;根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串;
发送模块803,用于将目标数据串发送至数据接收端。
在本发明的实施方式中,在对第一矩阵进行多次行位移处理,得到第二矩阵方面,第一处理模块802,具体用于:
确定第i次行位移处理的起始矩阵A,将起始矩阵A中的任意一行向左或向右位移一位,得到位移矩阵B,其中,起始矩阵A中元素完全相同的列的数量小于第一阈值,i为大于或等于1的整数,且当i=1时,起始矩阵A为第一矩阵;
确定位移矩阵B中元素完全相同的列的数量;
当位移矩阵B中元素完全相同的列的数量大于或等于第一阈值时,将位移矩阵B作为第二矩阵;
当位移矩阵B中元素完全相同的列的数量小于第一阈值时,将位移矩阵B作为第i+1次行位移处理的起始矩阵进行第i+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
在本发明的实施方式中,在对第一矩阵进行多次行位移处理,得到第二矩阵方面,第一处理模块802,具体用于:
确定第j次行位移处理的起始矩阵C,将起始矩阵C中的任意一行向左或向右位移一位,得到位移矩阵D,其中,起始矩阵C中元素完全相同的列的数量小于第一阈值,j为大于或等于1的整数,且当j=1时,起始矩阵C为第一矩阵;
在位移矩阵D中确定目标列的数量,其中,目标列为位移矩阵D中,矩阵列中连续相同的元素的个数大于第二阈值的矩阵列;
当位移矩阵D中的目标列的数量大于或等于第一阈值时,将位移矩阵D作为第二矩阵;
当位移矩阵D中的目标列的数量小于第一阈值时,将位移矩阵D作为第j+1次行位移处理的起始矩阵进行第j+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
在本发明的实施方式中,在分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串方面,第一处理模块802,具体用于:
从第k次字符扫描处理的起始字符E开始,依次向右遍历每个第二二进制数据串,直 至确定出结束字符F,其中,结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符,或结束字符F为每个第二二进制数据串的最后一个字符,k为大于或等于1的整数,且当k=1时,起始字符E为每个第二二进制数据串的第一字符;
当结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加一,并将结束字符F作为第k+1次字符扫描处理的开始字符进行第k+1次字符扫描处理,直至进行多次字符扫描处理后,得到每个第二二进制数据串对应的简化数据串;
当起始字符E为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为1,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到每个第二二进制数据串对应的简化数据串;
当结束字符F为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加二,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到每个第二二进制数据串对应的简化数据串。
同时,参阅图9,图9为本申请实施方式提供的一种基于多数据对齐的数据接收装置的功能模块组成框图。如图9所示,该基于多数据对齐的数据接收装置900包括:第二接收模块901、第二处理模块902和还原模块903;其中:
第二接收模块901,用于从数据发送端接收待还原数据,其中,待还原数据包括:目标数据串和描述文件;
第二处理模块902,用于根据描述文件对目标数据串进行数据拆分,得到x个简化数据串;根据描述文件和预设的转化表,将x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,x个第三二进制数据串与x个简化数据串一一对应;将x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,x个竖向数据串与x个第三二进制数据串一一对应;根据每个第三二进制数据串的标号,将x个竖向数据串横向拼接,得到第三矩阵;根据描述文件对第三矩阵进行多次行位移还原,得到第四矩阵;按照从上到下的顺序,将第四矩阵按行拆分,得到y个第四二进制数据串;
还原模块903,用于对y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,y个原始数据与y个二进制数据一一对应。
参阅图10,图10为本申请实施方式提供的一种基于多数据对齐的数据发送设备的结构示意图。如图10所示,该基于多数据对齐的数据发送设备1000包括收发器1001、处理器1002和存储器1003。它们之间通过总线1004连接。存储器1003用于存储计算机程序和数据,并可以将存储器1003存储的数据传输给处理器1002。
处理器1002用于读取存储器1003中的计算机程序执行以下操作:
获取t个待发送数据,其中,t为大于1的正整数;
对t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,t个第一二进制数据串与t个待发送数据一一对应;
将t个第一二进制数据串竖向堆叠,得到第一矩阵;
对第一矩阵进行多次行位移处理,得到第二矩阵;
将第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;
分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,其中,得到r个简化数据串与r个第二二进制数据串一一对应;
根据每个第二二进制数据串在第二矩阵中的排列位置,将r个简化数据串纵向拼接,得到目标数据串;
将目标数据串发送至数据接收端。
在本发明的实施方式中,在对第一矩阵进行多次行位移处理,得到第二矩阵方面,处理器1002,具体用于执行以下操作:
确定第i次行位移处理的起始矩阵A,将起始矩阵A中的任意一行向左或向右位移一位,得到位移矩阵B,其中,起始矩阵A中元素完全相同的列的数量小于第一阈值,i为大于或等于1的整数,且当i=1时,起始矩阵A为第一矩阵;
确定位移矩阵B中元素完全相同的列的数量;
当位移矩阵B中元素完全相同的列的数量大于或等于第一阈值时,将位移矩阵B作为第二矩阵;
当位移矩阵B中元素完全相同的列的数量小于第一阈值时,将位移矩阵B作为第i+1次行位移处理的起始矩阵进行第i+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
在本发明的实施方式中,在对第一矩阵进行多次行位移处理,得到第二矩阵方面,处 理器1002,具体用于执行以下操作:
确定第j次行位移处理的起始矩阵C,将起始矩阵C中的任意一行向左或向右位移一位,得到位移矩阵D,其中,起始矩阵C中元素完全相同的列的数量小于第一阈值,j为大于或等于1的整数,且当j=1时,起始矩阵C为第一矩阵;
在位移矩阵D中确定目标列的数量,其中,目标列为位移矩阵D中,矩阵列中连续相同的元素的个数大于第二阈值的矩阵列;
当位移矩阵D中的目标列的数量大于或等于第一阈值时,将位移矩阵D作为第二矩阵;
当位移矩阵D中的目标列的数量小于第一阈值时,将位移矩阵D作为第j+1次行位移处理的起始矩阵进行第j+1次行位移处理,直至进行多次行位移处理后,得到第二矩阵。
在本发明的实施方式中,在分别对r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串方面,处理器1002,具体用于执行以下操作:
从第k次字符扫描处理的起始字符E开始,依次向右遍历每个第二二进制数据串,直至确定出结束字符F,其中,结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符,或结束字符F为每个第二二进制数据串的最后一个字符,k为大于或等于1的整数,且当k=1时,起始字符E为每个第二二进制数据串的第一字符;
当结束字符F为第k次字符扫描处理过程中第一个取值与起始字符E不同的字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加一,并将结束字符F作为第k+1次字符扫描处理的开始字符进行第k+1次字符扫描处理,直至进行多次字符扫描处理后,得到每个第二二进制数据串对应的简化数据串;
当起始字符E为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为1,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到每个第二二进制数据串对应的简化数据串;
当结束字符F为每个第二二进制数据串的最后一个字符时,设置第k次字符扫描处理的扫描结果为,起始字符E与结束字符F之间的字符数加二,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到每个第二二进制数据串对应的简化数据串。
同时,参阅图11,图11为本申请实施方式提供的一种基于多数据对齐的数据接收设备的结构示意图。如图11所示,该基于多数据对齐的数据接收设备1100包括收发器1101、处理器1102和存储器1103。它们之间通过总线1104连接。存储器1103用于存储计算机 程序和数据,并可以将存储器1103存储的数据传输给处理器1102。
处理器1102用于读取存储器1103中的计算机程序执行以下操作:
从数据发送端接收待还原数据,其中,待还原数据包括:目标数据串和描述文件;
根据描述文件对目标数据串进行数据拆分,得到x个简化数据串;
根据描述文件和预设的转化表,将x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,x个第三二进制数据串与x个简化数据串一一对应;
将x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,x个竖向数据串与x个第三二进制数据串一一对应;
根据每个第三二进制数据串的标号,将x个竖向数据串横向拼接,得到第三矩阵;
根据描述文件对第三矩阵进行多次行位移还原,得到第四矩阵;
按照从上到下的顺序,将第四矩阵按行拆分,得到y个第四二进制数据串;
对y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,y个原始数据与y个二进制数据一一对应。
应理解,本申请中的基于多数据对齐的数据发送装置和基于多数据对齐的数据接收装置可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备MID(Mobile Internet Devices,简称:MID)、机器人或穿戴式设备等。上述基于多数据对齐的数据发送装置和基于多数据对齐的数据接收装置仅是举例,而非穷举,包含但不限于上述基于多数据对齐的数据发送装置和基于多数据对齐的数据接收装置。在实际应用中,基于多数据对齐的数据发送装置和基于多数据对齐的数据接收装置还可以包括:智能车载终端、计算机设备等等。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件结合硬件平台的方式来实现。基于这样的理解,本发明的技术方案对背景技术做出贡献的全部或者部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施方式或者实施方式的某些部分所述的方法。
因此,本申请实施方式还提供一种计算机可读存储介质,所述计算机可读存储介质存 储有计算机程序,所述计算机程序被处理器执行以实现如上述方法实施方式中记载的任何一种基于多数据对齐的数据发送方法和基于多数据对齐的数据接收方法的部分或全部步骤。例如,所述存储介质可以包括硬盘、软盘、光盘、磁带、磁盘、优盘、闪存等。
本申请实施方式还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施方式中记载的任何一种基于多数据对齐的数据发送方法和基于多数据对齐的数据接收方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施方式,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施方式均属于可选的实施方式,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施方式中,对各个实施方式的描述都各有侧重,某个实施方式中没有详述的部分,可以参见其他实施方式的相关描述。
在本申请所提供的几个实施方式中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。
另外,在本申请各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出 来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施方式的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。
以上对本申请实施方式进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施方式的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (10)

  1. 一种基于多数据对齐的数据发送方法,其特征在于,所述方法应用于数据发送端,所述方法包括:
    获取t个待发送数据,其中,t为大于1的正整数;
    对所述t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,所述t个第一二进制数据串与所述t个待发送数据一一对应;
    将所述t个第一二进制数据串竖向堆叠,得到第一矩阵;
    对所述第一矩阵进行多次行位移处理,得到第二矩阵;
    将所述第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;
    分别对所述r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,其中,所述得到r个简化数据串与所述r个第二二进制数据串一一对应;
    根据所述每个第二二进制数据串在所述第二矩阵中的排列位置,将所述r个简化数据串纵向拼接,得到目标数据串;
    将所述目标数据串发送至所述数据接收端。
  2. 根据权利要求1所述的方法,其特征在于,所述对所述第一矩阵进行多次行位移处理,得到第二矩阵,包括:
    确定第i次行位移处理的起始矩阵A,将所述起始矩阵A中的任意一行向左或向右位移一位,得到位移矩阵B,其中,所述起始矩阵A中元素完全相同的列的数量小于第一阈值,i为大于或等于1的整数,且当i=1时,所述起始矩阵A为所述第一矩阵;
    确定所述位移矩阵B中元素完全相同的列的数量;
    当所述位移矩阵B中元素完全相同的列的数量大于或等于所述第一阈值时,将所述位移矩阵B作为所述第二矩阵;
    当所述位移矩阵B中元素完全相同的列的数量小于所述第一阈值时,将所述位移矩阵B作为第i+1次行位移处理的起始矩阵进行所述第i+1次行位移处理,直至进行多次行位移处理后,得到所述第二矩阵。
  3. 根据权利要求1所述的方法,其特征在于,所述对所述第一矩阵进行多次行位移 处理,得到第二矩阵,包括:
    确定第j次行位移处理的起始矩阵C,将所述起始矩阵C中的任意一行向左或向右位移一位,得到位移矩阵D,其中,所述起始矩阵C中元素完全相同的列的数量小于第一阈值,j为大于或等于1的整数,且当j=1时,所述起始矩阵C为所述第一矩阵;
    在所述位移矩阵D中确定目标列的数量,其中,所述目标列为所述位移矩阵D中,矩阵列中连续相同的元素的个数大于第二阈值的矩阵列;
    当所述位移矩阵D中的目标列的数量大于或等于所述第一阈值时,将所述位移矩阵D作为所述第二矩阵;
    当所述位移矩阵D中的目标列的数量小于所述第一阈值时,将所述位移矩阵D作为第j+1次行位移处理的起始矩阵进行所述第j+1次行位移处理,直至进行多次行位移处理后,得到所述第二矩阵。
  4. 根据权利要求1-3中任意一项所述的方法,其特征在于,所述分别对所述r个第二二进制数据串中每个第二二进制数据串进行多次字符扫描处理,得到r个简化数据串,包括:
    从第k次字符扫描处理的起始字符E开始,依次向右遍历所述每个第二二进制数据串,直至确定出结束字符F,其中,所述结束字符F为所述第k次字符扫描处理过程中第一个取值与所述起始字符E不同的字符,或所述结束字符F为所述每个第二二进制数据串的最后一个字符,k为大于或等于1的整数,且当k=1时,所述起始字符E为所述每个第二二进制数据串的第一字符;
    当所述结束字符F为所述第k次字符扫描处理过程中第一个取值与所述起始字符E不同的字符时,设置所述第k次字符扫描处理的扫描结果为,所述起始字符E与所述结束字符F之间的字符数加一,并将所述结束字符F作为第k+1次字符扫描处理的开始字符进行所述第k+1次字符扫描处理,直至进行多次字符扫描处理后,得到所述每个第二二进制数据串对应的简化数据串;
    当所述起始字符E为所述每个第二二进制数据串的最后一个字符时,设置所述第k次字符扫描处理的扫描结果为1,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到所述每个第二二进制数据串对应的简化数据串;
    当所述结束字符F为所述每个第二二进制数据串的最后一个字符时,设置所述第k次 字符扫描处理的扫描结果为,所述起始字符E与所述结束字符F之间的字符数加二,并将多次字符扫描处理的处理结果按照多次字符扫描处理的处理顺序排序,得到所述每个第二二进制数据串对应的简化数据串。
  5. 一种基于多数据对齐的数据接收方法,其特征在于,所述方法应用于数据接收端,所述方法包括:
    从数据发送端接收待还原数据,其中,所述待还原数据包括:目标数据串和描述文件;
    根据所述描述文件对所述目标数据串进行数据拆分,得到x个简化数据串;
    根据所述描述文件和预设的转化表,将所述x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,所述x个第三二进制数据串与所述x个简化数据串一一对应;
    将所述x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在所述每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,所述x个竖向数据串与所述x个第三二进制数据串一一对应;
    根据所述每个第三二进制数据串的标号,将所述x个竖向数据串横向拼接,得到第三矩阵;
    根据所述描述文件对所述第三矩阵进行多次行位移还原,得到第四矩阵;
    按照从上到下的顺序,将所述第四矩阵按行拆分,得到y个第四二进制数据串;
    对所述y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,所述y个原始数据与所述y个二进制数据一一对应。
  6. 一种基于多数据对齐的数据发送装置,其特征在于,
    所述装置包括:第一接收模块、第一处理模块和发送模块;其中
    所述第一接收模块,用于获取t个待发送数据,其中,t为大于1的正整数;
    所述第一处理模块,用于对所述t个待发送数据中的每个待发送数据进行二进制转化,得到t个第一二进制数据串,其中,所述t个第一二进制数据串与所述t个待发送数据一一对应;将所述t个第一二进制数据串竖向堆叠,得到第一矩阵;对所述第一矩阵进行多次行位移处理,得到第二矩阵;将所述第二矩阵按列拆分,以得到r个第二二进制数据串,其中,r为大于0的正整数;分别对所述r个第二二进制数据串中每个第二二进制数据串进 行多次字符扫描处理,得到r个简化数据串,其中,所述得到r个简化数据串与所述r个第二二进制数据串一一对应;根据所述每个第二二进制数据串在所述第二矩阵中的排列位置,将所述r个简化数据串纵向拼接,得到目标数据串;
    所述发送模块,用于将所述目标数据串发送至所述数据接收端。
  7. 一种基于多数据对齐的数据接收装置,其特征在于,
    所述装置包括:第二接收模块、第二处理模块和还原模块;其中
    所述第二接收模块,用于从数据发送端接收待还原数据,其中,所述待还原数据包括:目标数据串和描述文件;
    所述第二处理模块,用于根据所述描述文件对所述目标数据串进行数据拆分,得到x个简化数据串;根据所述描述文件和预设的转化表,将所述x个简化数据串中的每个简化数据串进行数据转化,得到x个第三二进制数据串,其中,所述x个第三二进制数据串与所述x个简化数据串一一对应;将所述x个第三二进制数据串中的每个第三二进制数据串中的元素,按照在所述每个第三二进制数据串中排列位置从上到下依次排列,得到x个竖向数据串,其中,所述x个竖向数据串与所述x个第三二进制数据串一一对应;根据所述每个第三二进制数据串的标号,将所述x个竖向数据串横向拼接,得到第三矩阵;根据所述描述文件对所述第三矩阵进行多次行位移还原,得到第四矩阵;按照从上到下的顺序,将所述第四矩阵按行拆分,得到y个第四二进制数据串;
    所述还原模块,用于对所述y个第四二进制数据串中的每个第四二进制数据串进行数据还原,得到y个原始数据,其中,所述y个原始数据与所述y个二进制数据一一对应。
  8. 一种基于多数据对齐的数据发送设备,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述一个或多个程序包括用于执行权利要求1-4任一项所述的方法中的步骤的指令。
  9. 一种基于多数据对齐的数据接收设备,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述一个或多个程序包括用于执行权利要求5中的步骤的指令。
  10. 一种可读计算机存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-5任一项所述的方法。
PCT/CN2022/119921 2021-09-30 2022-09-20 基于多数据对齐的数据发送和接收方法、装置和设备 WO2023051319A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111169005.3 2021-09-30
CN202111169005.3A CN114070901B (zh) 2021-09-30 2021-09-30 基于多数据对齐的数据发送和接收方法、装置和设备

Publications (1)

Publication Number Publication Date
WO2023051319A1 true WO2023051319A1 (zh) 2023-04-06

Family

ID=80234146

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119921 WO2023051319A1 (zh) 2021-09-30 2022-09-20 基于多数据对齐的数据发送和接收方法、装置和设备

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114070901B (zh) * 2021-09-30 2024-01-02 深圳智慧林网络科技有限公司 基于多数据对齐的数据发送和接收方法、装置和设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190197084A1 (en) * 2017-01-17 2019-06-27 Fujitsu Limited Data compression apparatus and data compression method and storage medium
CN111222306A (zh) * 2020-01-06 2020-06-02 广州虎牙科技有限公司 数据处理方法和装置、电子设备和存储介质
CN112506880A (zh) * 2020-12-18 2021-03-16 深圳智慧林网络科技有限公司 数据处理方法及相关设备
CN112861475A (zh) * 2020-11-03 2021-05-28 深圳市和讯华谷信息技术有限公司 编码、解码处理方法、装置、设备及存储介质
CN114070901A (zh) * 2021-09-30 2022-02-18 深圳智慧林网络科技有限公司 基于多数据对齐的数据发送和接收方法、装置和设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365814B (zh) * 2013-06-27 2016-08-17 深圳市汇顶科技股份有限公司 一种串行数据传输方法及其系统
CN105703782B (zh) * 2016-03-11 2019-08-06 深圳大学 一种基于递增移位矩阵的网络编码方法及系统
CN110233626B (zh) * 2019-07-05 2022-10-25 重庆邮电大学 基于二维自适应量化的机械振动信号边缘数据无损压缩方法
US11120101B2 (en) * 2019-09-27 2021-09-14 Arm Limited Matrix multiplication system and method
CN111881115A (zh) * 2020-08-01 2020-11-03 江苏哩咕信息科技有限公司 一种基于大数据动态规划的数据库协调优化方法
CN112364294B (zh) * 2020-10-27 2022-12-27 中国核动力研究设计院 堆芯数值计算矩阵的自动转换方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190197084A1 (en) * 2017-01-17 2019-06-27 Fujitsu Limited Data compression apparatus and data compression method and storage medium
CN111222306A (zh) * 2020-01-06 2020-06-02 广州虎牙科技有限公司 数据处理方法和装置、电子设备和存储介质
CN112861475A (zh) * 2020-11-03 2021-05-28 深圳市和讯华谷信息技术有限公司 编码、解码处理方法、装置、设备及存储介质
CN112506880A (zh) * 2020-12-18 2021-03-16 深圳智慧林网络科技有限公司 数据处理方法及相关设备
CN114070901A (zh) * 2021-09-30 2022-02-18 深圳智慧林网络科技有限公司 基于多数据对齐的数据发送和接收方法、装置和设备

Also Published As

Publication number Publication date
CN114070901B (zh) 2024-01-02
CN114070901A (zh) 2022-02-18

Similar Documents

Publication Publication Date Title
WO2023061177A1 (zh) 基于列式数据扫描的多数据发送和接收方法、装置和设备
US10554220B1 (en) Managing compression and storage of genomic data
KR20190040886A (ko) 브리지 장치를 이용한 스토리지 인접 연산 제공 시스템 및 방법
US11429566B2 (en) Approach for a controllable trade-off between cost and availability of indexed data in a cloud log aggregation solution such as splunk or sumo
CN110263277B (zh) 页面数据的显示方法、更新方法、装置、设备及存储介质
CN108197324B (zh) 用于存储数据的方法和装置
US11977567B2 (en) Method of retrieving query, electronic device and medium
WO2020207410A1 (zh) 一种数据压缩方法、电子设备及存储介质
WO2023051319A1 (zh) 基于多数据对齐的数据发送和接收方法、装置和设备
US11954084B2 (en) Method and apparatus for processing table, device, and storage medium
CN111241108A (zh) 基于键值对kv系统的索引方法、装置、电子设备和介质
US20220005546A1 (en) Non-redundant gene set clustering method and system, and electronic device
WO2021027331A1 (zh) 基于图数据的全量关系计算方法、装置、设备及存储介质
CN114742000B (zh) 基于FPGA集群的SoC芯片验证系统、验证方法、装置
WO2023061180A1 (zh) 基于多频率的数据发送和接收方法、装置和设备
WO2022007596A1 (zh) 图像检索系统、方法和装置
US20190327342A1 (en) Methods and electronic devices for data transmission and reception
CN103197920B (zh) 一种并发控制方法、控制节点及系统
CN113485951B (zh) 一种基于fpga的dma读操作实现方法、fpga设备以及通信系统
CN116562373A (zh) 数据挖掘方法、装置、设备和介质
CN111949648A (zh) 内存缓存数据系统和数据索引方法
WO2021042993A1 (zh) 一种基于Redis协议的KV数据存储方法及装置
CN112711588A (zh) 多表连接的方法和装置
CN115210694A (zh) 数据传输方法及装置
CN116708480B (zh) 一种基于Datax框架的数据同步方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22874706

Country of ref document: EP

Kind code of ref document: A1