Multi-data sending and receiving method, device and equipment based on column data scanning
By binaryizing and column-type splitting data with the same data format and similar sizes, the problem of slow data transmission speed in the prior art is solved, and efficient network transmission is achieved.
Patent Information
- Application Number
- CN202111190341.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-12
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-10-12
AI Technical Summary
When the existing data transmission method compresses or splits data, it consumes a large amount of computing resources and reduces the network transmission speed, which cannot effectively improve data transmission efficiency.
Using columnar data scanning method, data with the same data format and similar size are binary and stacked vertically, split into simplified binary data strings by columns, and sent to the receiving end, avoiding data segmentation in Disk write and indexing issues in disk clusters.
It improves processing efficiency and network transmission speed during data transmission, reduces computing resource consumption and compression time, and improves the security and efficiency of data transmission.
Smart Images

Figure CN114064308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method, device and equipment for sending and receiving multiple data based on column data scanning. Background Art
[0002] At present, 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. However, compression technology compresses data by consuming a large amount of computer resources for a large amount of calculations. At the same time, due to the increase in bandwidth of modern routers, it usually takes less time to send data directly without compression than to compress the data before sending it. The existing data splitting method usually splits the data into several sub-data of equal size according to the specific needs of the transmission and sends them separately, and then combines them at the receiving end. However, in fact, due to the problems of disk writing and indexing of the split sub-data in the disk cluster, it not only does not help the data transmission on the network, but also reduces the data transmission speed on the network. Therefore, the current data transmission method based on compression and splitting usually cannot improve the data transmission speed on the network, but will cause the data transmission speed to slow down. Summary of the invention
[0003] In order to solve the above-mentioned problems existing in the prior art, the embodiments of the present application provide a multi-data sending and receiving method, device and equipment based on column data scanning, which can improve the data transmission speed on the network.
[0004] In a first aspect, an embodiment of the present application provides a method for sending multiple data based on column data scanning, including:
[0005] Obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two data to be sent among the n data to be sent is less than a first threshold, and n is a positive integer greater than 0;
[0006] Performing binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one-to-one to the n data to be sent;
[0007] vertically stacking n first binary data strings to obtain a first matrix;
[0008] Splitting the first matrix by columns to obtain m second binary data strings, where m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0;
[0009] The m second binary data strings are sent to a data receiving end.
[0010] In a second aspect, an embodiment of the present application provides a multi-data receiving method based on column data scanning, comprising:
[0011] receiving x third binary data strings from the data transmitting end, where x is an integer greater than or equal to 1;
[0012] Arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings, to obtain x vertical data strings, wherein the x vertical data strings correspond one-to-one to the x third binary data strings;
[0013] According to the label of each third binary data string, the x vertical data strings are horizontally spliced to obtain a second matrix;
[0014] Splitting the second matrix row by row from top to bottom to obtain y fourth binary data strings;
[0015] Data restoration is performed 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 in one-to-one correspondence.
[0016] In a third aspect, an embodiment of the present application provides a multi-data sending device based on column data scanning, including:
[0017] A first receiving module, a first processing module and a sending module; wherein,
[0018] A first receiving module is used to obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two of the n data to be sent is less than a first threshold, and n is a positive integer greater than 0;
[0019] A first processing module is used to perform binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one-to-one to the n data to be sent; vertically stack the n first binary data strings to obtain a first matrix; split the first matrix by column to obtain m second binary data strings, wherein m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0;
[0020] The sending module is used to send m second binary data strings to a data receiving end.
[0021] In a fourth aspect, an embodiment of the present application provides a multi-data receiving device based on column data scanning, comprising:
[0022] A second receiving module, a second processing module and a restoration module; wherein,
[0023] A second receiving module, configured to receive x third binary data strings from a data transmitting end, wherein x is an integer greater than or equal to 1;
[0024] a second processing module, for arranging the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings, to obtain x vertical data strings, wherein the x vertical data strings correspond one to one to the x third binary data strings; according to the label of each third binary data string, horizontally splicing the x vertical data strings to obtain a second matrix; and splitting the second matrix by row in order from top to bottom to obtain y fourth binary data strings;
[0025] The restoration module is used to restore each of the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data in a one-to-one manner.
[0026] In a fifth aspect, an embodiment of the present application provides a multi-data sending device based on column data scanning, comprising: 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, so that the electronic device executes the method of the first aspect.
[0027] In a sixth aspect, an embodiment of the present application provides a multi-data receiving device based on column data scanning, comprising: 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, so that the electronic device executes the method as in the second aspect.
[0028] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method of the first aspect and / or the second aspect.
[0029] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and is computer-operable to cause the computer to execute the method of the first aspect and / or the second aspect.
[0030] The implementation of the present application has the following beneficial effects:
[0031] In the embodiment of the present application, the first matrix is obtained by binarizing n data to be sent with the same data format and similar data size and stacking them vertically. Then the first matrix is split by column to obtain m second binary data strings, and finally the m second binary data strings are sent to the data receiving end. Thus, since the data format of the n data to be sent is the same and the data size is similar, after the binarization result of each data to be sent is stacked vertically, there will be a large number of similar redundant bits in each column, and there will also be columns composed of the same elements at the same time. Based on this, after splitting by column, the data structure of the m second binary data strings obtained is simpler and regular, and the processing efficiency of the data during the sending process can be effectively improved, and then the network transmission speed can be improved. In addition, since the storage unit, such as the memory unit (RAM) can process the bit with the original size during the data transmission process, it is usually completed by the storage unit of the sending end and the receiving end. In the present application, by converting the data to be sent into binary data, bitwise operations on the data are realized, so that no additional memory is required at both the sending and receiving ends, avoiding problems such as disk writing and indexing when data is segmented in a disk cluster, thereby further improving the network transmission speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the implementation modes of the present application, the drawings required for use in the description of the implementation modes will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 A schematic diagram of the hardware structure of a multi-data sending device based on column data scanning or a multi-data receiving device based on column data scanning provided in an embodiment of the present application;
[0034] Figure 2 A flowchart of a multi-data sending method based on column data scanning provided in an embodiment of the present application;
[0035] Figure 3 A flowchart of a method for performing multiple character scanning processes on each of m second binary data strings to obtain m simplified data strings provided in an embodiment of the present application;
[0036] Figure 4 A flowchart of a method for sending a target data string to a data receiving end provided in an embodiment of the present application;
[0037] Figure 5 A flowchart of a multi-data receiving method based on column data scanning provided in an embodiment of the present application;
[0038] Figure 6 A block diagram of the functional modules of a multi-data sending device based on column data scanning provided in an embodiment of the present application;
[0039] Figure 7 A block diagram of the functional modules of a multi-data receiving device based on column data scanning provided in an embodiment of the present application;
[0040] Figure 8 A schematic diagram of the structure of a multi-data sending device based on column data scanning provided in an embodiment of the present application.
[0041] Fig. 9 A schematic diagram of the structure of a multi-data receiving device based on column data scanning provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0044] Reference to "embodiment" herein means that a particular feature, result, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0045] First, see Figure 1 , Figure 1A hardware structure diagram of a multi-data transmission device based on column data scanning or a multi-data reception device based on column data scanning provided in an embodiment of the present application. The multi-data transmission device based on column data scanning or the multi-data reception device based on column data scanning includes at least one processor 101, a communication line 102, a memory 103 and at least one communication interface 104.
[0046] In this embodiment, the processor 101 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0047] The communication link 102 may include a path to transmit information between the above components.
[0048] The communication interface 104 may be any transceiver-like device (eg, antenna, etc.) for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc.
[0049] The memory 103 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0050] In this embodiment, the memory 103 can exist independently and be connected to the processor 101 via the communication line 102. The memory 103 can also be integrated with the processor 101. The memory 103 provided in the embodiment of the present application can generally be non-volatile. Among them, the memory 103 is used to store computer-executable instructions for executing the scheme of the present application, and the execution is controlled by the processor 101. The processor 101 is used to execute the computer-executable instructions stored in the memory 103, so as to implement the method provided in the following embodiment of the present application.
[0051] In an optional implementation, the computer-executable instructions may also be referred to as application code, which is not specifically limited in this application.
[0052] In an optional embodiment, the processor 101 may include one or more CPUs, such as Figure 1 CPU0 and CPU1 in.
[0053] In an optional implementation, the multi-data transmitting device based on column data scanning or the multi-data receiving device based on column data scanning may also include multiple processors, for example Figure 1 1 and 107. Each of these processors may be a single-CPU processor or a 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).
[0054] In an optional embodiment, if the multi-data sending device based on column data scanning or the multi-data receiving device based on column data scanning is a server, the multi-data sending device based on column data scanning or the multi-data receiving device based on column data scanning may also include an output device 105 and an input device 106. The output device 105 communicates with the processor 101 and can display information in a variety of ways. For example, the output device 105 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 106 communicates with the processor 101 and can receive user input in a variety of ways. For example, the input device 106 can be a mouse, a keyboard, a touch screen device, or a sensor device.
[0055] The above-mentioned multi-data sending device based on column data scanning or multi-data receiving device based on column data scanning can be a general device or a dedicated device. The embodiments of the present application do not limit the device type of the multi-data sending device based on column data scanning or multi-data receiving device based on column data scanning.
[0056] The following is an explanation of the multi-data sending method based on column data scanning disclosed in this application:
[0057] See also Figure 2 , Figure 2 A flowchart of a method for sending multiple data based on column-based data scanning provided in an embodiment of the present application. The method for sending multiple data based on column-based data scanning comprises the following steps:
[0058] 201: Get n data to be sent.
[0059] In this embodiment, the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two data to be sent among the n data to be sent is less than the first threshold, and n is a positive integer greater than 0. Exemplarily, the n data to be sent may be n data with the same data format and similar size in the same group of DICOM files.
[0060] 202: Perform binary conversion on each of the n data to be sent to obtain n first binary data strings.
[0061] In this implementation, the n first binary data strings correspond one-to-one to the n data to be sent.
[0062] 203: vertically stack the n first binary data strings to obtain a first matrix.
[0063] In this embodiment, the case where n is equal to 3 is taken as an example to illustrate the multi-data transmission method based on column data scanning provided by the present application. Exemplarily, there are 3 DCM data that meet the requirements in step 201: DCM1, DCM2 and DCM3. After binarization, the following 3 first binary data strings are obtained:
[0064] DCM1=>11010011;
[0065] DCM2=>11010011;
[0066] DCM3=>10011011;
[0067] After stacking the three first binary data strings vertically, a first matrix as shown below can be obtained:
[0068]
[0069] 204: Split the first matrix by columns to obtain m second binary data strings.
[0070] In this embodiment, m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0. Exemplarily, the above example in which n is equal to 3 is used, wherein the maximum number of bits in the three first binary data strings is 8, so eight second binary data strings can be obtained after splitting the first matrix by column, specifically as follows: [111, 110, 000, 111, 001, 000, 111, 111].
[0071] 205: Send m second binary data strings to a data receiving end.
[0072] In this embodiment, since the n data to be sent have the same data format and similar size, the n first binary data strings obtained after the n data to be sent are binarized are also relatively similar. There will be a large number of similar redundant bits in each of the m second binary data strings obtained by vertically stacking and splitting them by columns, and there will also be second binary data strings composed of the same elements, such as 111 or 000. Based on this, the data structure of the m second binary data strings obtained is simpler and has strong regularity. Therefore, converting the original sending of n data to be sent into sending m second binary data strings can effectively improve the data processing efficiency during the sending process, thereby improving the network transmission speed.
[0073] In an optional implementation, each second binary data string may be simplified for the characteristics that there are a large number of similar redundant bits in each second binary data string, and at the same time there are also second binary data strings composed of the same elements, so as to further improve the network transmission speed. Exemplarily, after obtaining m second binary data strings, each second binary data string in the m second binary data strings may be subjected to multiple character scanning processes to obtain m simplified data strings. Thus, according to the arrangement position of each second binary data string in the first matrix, the m simplified data strings are vertically spliced to obtain the target data string. Finally, the target data string is sent to the data receiving end.
[0074] Specifically, this embodiment provides a method for performing multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings, such as Figure 3 As shown, the method includes:
[0075] 301: Starting from the starting character A of the i-th character scanning process, traverse each second binary data string to the right in sequence until the ending character B is determined.
[0076] In this embodiment, the ending character B is the first character whose value is different from the starting character A during the i-th character scanning process, or the ending character B is the last character of each second binary data string, i is an integer greater than or equal to 1, and when i=1, the starting character A is the first character of each second binary data string.
[0077] 302: When the ending character B is the first character whose value is different from the starting character A during the i-th character scanning process, the scanning result of the i-th character scanning process is set to be the number of characters between the starting character A and the ending character B plus one, and the ending character B is used as the starting character of the i+1-th character scanning process to perform the i+1-th character scanning process, until multiple character scanning processes are performed to obtain a simplified data string corresponding to each second binary data string.
[0078] 303: When the starting character A is the last character of each second binary data string, set the scan result of the i-th character scanning process to 1, and sort the processing results of multiple character scanning processes according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
[0079] 304: When the end character B is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to the number of characters between the start character A and the end character B plus two, and the processing results of the multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
[0080] Exemplarily, using the above example where n is equal to 3, the eight second binary data strings obtained are: [111, 110, 000, 111, 001, 000, 111, 111]. For the first second binary data string "111", the starting character A 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 different from the starting character A is not found, then the third character "1" is used as the ending character B, and the simplified data string of the first second binary data string "111" is recorded as "3" (the number of characters between the first character and the third character plus two, that is, 1+2).
[0081] For the second second binary data string "110", the starting character A of the first character scanning process is the first character "1". After traversing to the right in sequence, the first character different from the starting character A is the third character "0". The third character is used as the ending character B of the first character scanning process. At the same time, the scanning result of the first character scanning process is recorded as "2" (the number of characters between the first character and the third character plus one, that is, 1+1); the starting character A of the second character scanning process is the ending character B of the first character scanning process, that is, the third character "0". Since the third character is the last character, the scanning result of the second character scanning process is recorded as "1"; at this time, the scanning results of the first character scanning process and the scanning results of the second character scanning process are sorted in the processing order of multiple character scanning processes, and the simplified data string corresponding to the second second binary data string "110" is obtained as "21".
[0082] Through the above method, the 8 second binary data strings can be simplified in turn to obtain 8 simplified data strings: [3, 21, 3, 3, 21, 3, 3, 3], and then the 8 simplified data strings are vertically spliced to obtain the target data string "3213321333".
[0083] Therefore, when n is hundreds or even thousands, that is, when hundreds or thousands of data that meet the requirements are sent at the same time, the data can be greatly compressed through the above splitting and transformation, and the compression does not require complex compression calculations, which 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 the security of the data.
[0084] In an optional implementation, every 256 data can be set as a group for transmission. Thus, when a second binary data string composed of the same elements appears, that is, a second binary data string composed entirely of 0s or 1s, the simplified result is 256. This simplified result only takes up 1 byte in the network, greatly reducing the bandwidth demand for the network and further improving the network transmission speed.
[0085] In addition, this embodiment also provides a method for sending a target data string to a data receiving end, such as Figure 4 As shown, the method includes:
[0086] 401: Segment the target data string to obtain at least one data fragment.
[0087] In this embodiment, first, the number of splitting bits k can be determined, and then the target data string is split into at least one data fragment with equal number of bits according to the number of splitting bits k. Exemplarily, k can be any integer greater than 1. In this embodiment, the method for sending the target data string to the data receiving end provided by the present application will be described by taking the case where k is equal to 2 as an example.
[0088] Specifically, when k is equal to 2, it means that the number of split bits is set to 2. At this time, the target data string can be divided into groups of 2 bits for data splitting. For example, using the above example, the target data string is "3213321333". When the number of split bits is 2, it can be split into [32, 13, 32, 13, 33].
[0089] In an optional implementation, the number of split bits can also be a dynamic, cyclical value. For example, the number of split bits can be regarded as a split sequence [m, x, y]. When the binary data is split, the m bits can be split first, then the x bits, then the y bits, and then the m bits again, and the cycle continues until the binary data is split. Specifically, when the split sequence is [1, 2, 3] and the target data string is "321332133312", the segmentation result [3, 21, 332, 1, 33, 312] can be obtained.
[0090] 402: Determine at least one sending frequency according to the number of bits of each data fragment in the data fragment.
[0091] In this embodiment, first, the number of required transmission frequencies, i.e., the first number, can be determined according to the number of bits of each data slice. Exemplarily, the first number can be the same as the number of bits of each data slice, i.e., the first number is k. Of course, there can also be other functional relationships between the first number and the number of bits of each data slice. For example, in a possible embodiment, the relationship between the first number l and the number of bits k of each data slice can be expressed by formula ①:
[0092] l=2 k .........①
[0093] In this embodiment, the case where the first number is k is taken as an example to illustrate the multi-frequency data transmission method provided by the present application. Based on this, using the above example where k is equal to 2, it can be determined that the first number is also 2, and therefore, 2 transmission frequencies can be randomly selected from the preset transmission frequency library as the at least one transmission frequency.
[0094] 403: Determine a first transmission frequency corresponding to each data fragment from at least one transmission frequency according to an arrangement position of each data fragment in the target data string.
[0095] In this embodiment, the at least one transmission frequency obtained through step 402 can be randomly sorted, so that each data fragment can cyclically select one of the at least one sorted transmission frequencies as its corresponding transmission frequency according to its arrangement position in the target data string.
[0096] Specifically, following the example where k is equal to 2, two transmission frequencies are selected in this example, named transmission frequency A and transmission frequency B, and the sequence [transmission frequency A, transmission frequency B] is obtained after sorting. The target data string "3213321333" corresponds to the data fragment sequence [32, 13, 32, 13, 33]. Based on this, it is determined that the first data fragment "32" corresponds to transmission frequency A, the second data fragment "13" corresponds to transmission frequency B, the third data fragment "32" corresponds to transmission frequency A, the fourth data fragment "13" corresponds to transmission frequency B, and the fifth data fragment "33" corresponds to transmission frequency A.
[0097] 404: Perform data conversion on each data slice according to a preset conversion table and the first sending frequency corresponding to each data slice to obtain at least one conversion result.
[0098] In this embodiment, the conversion table records the conversion results corresponding to different data slices at different sending frequencies, and at least one conversion result corresponds to at least one data slice.
[0099] 405: Send each conversion result of the at least one conversion result to the data receiving end in sequence according to the first sending frequency corresponding to each conversion result.
[0100] In an optional implementation, the m second binary data strings may not be simplified, and the m second binary data strings may be directly spliced vertically according to the arrangement position of each second binary data string in the first matrix to obtain the target data string. Then, the target data string is sent to the data receiving end according to the method of steps 401-405 above.
[0101] In addition, see Figure 5 , Figure 5 A flowchart of a multi-data receiving method based on column data scanning provided in an embodiment of the present application. The multi-data receiving method based on column data scanning comprises the following steps:
[0102] 501: Receive x third binary data strings from a data transmitting end.
[0103] In this embodiment, x is an integer greater than or equal to 1.
[0104] 502: Arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement positions in each of the third binary data strings to obtain x vertical data strings.
[0105] In this embodiment, the x vertical data strings correspond one-to-one to the x third binary data strings.
[0106] 503: According to the label of each third binary data string, horizontally splice the x vertical data strings to obtain a second matrix.
[0107] 504: Split the second matrix row by row in order from top to bottom to obtain y fourth binary data strings.
[0108] 505: Perform data restoration on each of the y fourth binary data strings to obtain y original data.
[0109] In this embodiment, the y original data correspond to the y binary data in a one-to-one manner.
[0110] In summary, in the multi-data transmission method based on column data scanning provided by the present invention, the first matrix is obtained by binarizing n data to be transmitted with the same data format and similar data size and stacking them vertically. Then the first matrix is split by column to obtain m second binary data strings, and finally the m second binary data strings are sent to the data receiving end. Thus, since the data format of the n data to be transmitted is the same and the data size is similar, after the binarization result of each data to be transmitted is stacked vertically, there will be a large number of similar redundant bits in each column, and there will also be columns composed of the same elements. Based on this, after splitting by column, the data structure of the m second binary data strings obtained is simpler and regular, which can effectively improve the processing efficiency of data during the transmission process, and then improve the network transmission speed. In addition, since the storage unit, such as the memory unit (RAM) can process bits at the original size during the data transmission process, it is usually completed by the storage unit of the transmitting end and the receiving end. In the present application, by converting the data to be sent into binary data, bitwise operations on the data are realized, so that no additional memory is required at both the sending and receiving ends, avoiding problems such as disk writing and indexing when data is segmented in a disk cluster, thereby further improving the network transmission speed.
[0111] See also Figure 6 , Figure 6 This is a functional module block diagram of a multi-data sending device based on column data scanning provided by an embodiment of the present application. Figure 6 As shown, the multi-data sending device 600 based on column data scanning includes: a first receiving module 601, a first processing module 602 and a sending module 603; wherein:
[0112] A first receiving module 601 is configured to obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two of the n data to be sent is less than a first threshold, and n is a positive integer greater than 0;
[0113] The first processing module 602 is used to perform binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one to one to the n data to be sent; stack the n first binary data strings vertically to obtain a first matrix; split the first matrix by column to obtain m second binary data strings, wherein m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0;
[0114] The sending module 603 is used to send m second binary data strings to the data receiving end.
[0115] In an embodiment of the present invention, after splitting the first matrix by columns to obtain m second binary data strings, the first processing module 602 is further used to:
[0116] Performing multiple character scanning processes on each of the m second binary data strings respectively to obtain m simplified data strings, wherein the obtained m simplified data strings correspond one-to-one to the m second binary data strings;
[0117] According to the arrangement position of each second binary data string in the first matrix, the m simplified data strings are vertically spliced to obtain a target data string;
[0118] Sending m second binary data strings to a data receiving end includes:
[0119] Send the target data string to the data receiving end.
[0120] In an embodiment of the present invention, in terms of performing multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings, the first processing module 602 is specifically configured to:
[0121] Starting from the starting character A of the i-th character scanning process, traverse each second binary data string to the right in sequence until the ending character B is determined, wherein the ending character B is the first character whose value is different from the starting character A in the i-th character scanning process, or the ending character B is the last character of each second binary data string, i is an integer greater than or equal to 1, and when i=1, the starting character A is the first character of each second binary data string;
[0122] When the end character B is the first character whose value is different from the start character A during the i-th character scanning process, the scanning result of the i-th character scanning process is set to be the number of characters between the start character A and the end character B plus one, and the end character B is used as the start character of the i+1-th character scanning process to perform the i+1-th character scanning process, until after multiple character scanning processes are performed, a simplified data string corresponding to each second binary data string is obtained;
[0123] When the starting character A is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to 1, and the processing results of the multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string;
[0124] When the ending character B is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to the number of characters between the starting character A and the ending character B plus two, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
[0125] In an embodiment of the present invention, in terms of sending the target data string to the data receiving end, the sending module 603 is specifically used to:
[0126] Segment the target data string to obtain at least one data fragment;
[0127] Determining at least one sending frequency according to the number of bits of each data fragment in the data fragment;
[0128] Determine, according to the arrangement position of each data fragment in the target data string, a first transmission frequency corresponding to each data fragment in at least one transmission frequency;
[0129] According to a preset conversion table and a first sending frequency corresponding to each data slice, data conversion is performed on each data slice to obtain at least one conversion result, wherein the conversion table records the conversion results corresponding to different data slices at different sending frequencies, and at least one conversion result corresponds to at least one data slice in a one-to-one manner;
[0130] Each conversion result of the at least one conversion result is sequentially sent to the data receiving end according to a first sending frequency corresponding to each conversion result.
[0131] Also, see Figure 7 , Figure 7 This is a functional module block diagram of a multi-data receiving device based on column data scanning provided by an embodiment of the present application. Figure 7As shown, the multi-data receiving device 700 based on column data scanning includes: a second receiving module 701, a second processing module 702 and a restoration module 703; wherein:
[0132] The second receiving module 701 is used to receive x third binary data strings from a data transmitting end, where x is an integer greater than or equal to 1;
[0133] The second processing module 702 is used to arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings to obtain x vertical data strings, wherein the x vertical data strings correspond one to one to the x third binary data strings; according to the label of each third binary data string, horizontally splice the x vertical data strings to obtain a second matrix; and split the second matrix by row in order from top to bottom to obtain y fourth binary data strings;
[0134] The restoration module 703 is used to restore each of the y fourth binary data strings to obtain y original data, wherein the y original data correspond to the y binary data in a one-to-one manner.
[0135] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of a multi-data sending device based on column data scanning provided by an embodiment of the present application. Figure 8 As shown, the multi-data transmission device 800 based on column data scanning includes a transceiver 801, a processor 802 and a memory 803. They are connected via a bus 804. The memory 803 is used to store computer programs and data, and can transmit the data stored in the memory 803 to the processor 802.
[0136] The processor 802 is used to read the computer program in the memory 803 and perform the following operations:
[0137] Obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two data to be sent among the n data to be sent is less than a first threshold, and n is a positive integer greater than 0;
[0138] Performing binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one-to-one to the n data to be sent;
[0139] vertically stacking n first binary data strings to obtain a first matrix;
[0140] Splitting the first matrix by columns to obtain m second binary data strings, where m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0;
[0141] The m second binary data strings are sent to a data receiving end.
[0142] In an embodiment of the present invention, after splitting the first matrix by columns to obtain m second binary data strings, the processor 802 is further configured to perform the following operations:
[0143] Performing multiple character scanning processes on each of the m second binary data strings respectively to obtain m simplified data strings, wherein the obtained m simplified data strings correspond one-to-one to the m second binary data strings;
[0144] According to the arrangement position of each second binary data string in the first matrix, the m simplified data strings are vertically spliced to obtain a target data string;
[0145] Sending m second binary data strings to a data receiving end includes:
[0146] Send the target data string to the data receiving end.
[0147] In an embodiment of the present invention, in terms of performing multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings, the processor 802 is specifically configured to perform the following operations:
[0148] Starting from the starting character A of the i-th character scanning process, traverse each second binary data string to the right in sequence until the ending character B is determined, wherein the ending character B is the first character whose value is different from the starting character A in the i-th character scanning process, or the ending character B is the last character of each second binary data string, i is an integer greater than or equal to 1, and when i=1, the starting character A is the first character of each second binary data string;
[0149] When the end character B is the first character whose value is different from the start character A during the i-th character scanning process, the scanning result of the i-th character scanning process is set to be the number of characters between the start character A and the end character B plus one, and the end character B is used as the start character of the i+1-th character scanning process to perform the i+1-th character scanning process, until after multiple character scanning processes are performed, a simplified data string corresponding to each second binary data string is obtained;
[0150] When the starting character A is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to 1, and the processing results of the multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string;
[0151] When the ending character B is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to the number of characters between the starting character A and the ending character B plus two, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
[0152] In an embodiment of the present invention, in terms of sending the target data string to the data receiving end, the processor 802 is specifically configured to perform the following operations:
[0153] Segment the target data string to obtain at least one data fragment;
[0154] Determining at least one sending frequency according to the number of bits of each data fragment in the data fragment;
[0155] Determine, according to the arrangement position of each data fragment in the target data string, a first transmission frequency corresponding to each data fragment in at least one transmission frequency;
[0156] According to a preset conversion table and a first sending frequency corresponding to each data slice, data conversion is performed on each data slice to obtain at least one conversion result, wherein the conversion table records the conversion results corresponding to different data slices at different sending frequencies, and at least one conversion result corresponds to at least one data slice in a one-to-one manner;
[0157] Each conversion result of the at least one conversion result is sequentially sent to the data receiving end according to a first sending frequency corresponding to each conversion result.
[0158] Also, see Fig. 9 , Fig. 9 This is a schematic diagram of the structure of a multi-data receiving device based on column data scanning provided by an embodiment of the present application. Fig. 9 As shown, the multi-data receiving device 900 based on column data scanning includes a transceiver 901, a processor 902 and a memory 903. They are connected via a bus 904. The memory 903 is used to store computer programs and data, and can transmit the data stored in the memory 903 to the processor 902.
[0159] The processor 902 is used to read the computer program in the memory 903 and perform the following operations:
[0160] receiving x third binary data strings from the data transmitting end, where x is an integer greater than or equal to 1;
[0161] Arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings, to obtain x vertical data strings, wherein the x vertical data strings correspond one-to-one to the x third binary data strings;
[0162] According to the label of each third binary data string, the x vertical data strings are horizontally spliced to obtain a second matrix;
[0163] Splitting the second matrix row by row from top to bottom to obtain y fourth binary data strings;
[0164] Data restoration is performed 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 in one-to-one correspondence.
[0165] It should be understood that the multi-data sending device based on column data scanning and the multi-data receiving device based on column data scanning in the present application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, PDAs, laptops, mobile Internet devices MID (Mobile Internet Devices, abbreviated as: MID), robots or wearable devices, etc. The above-mentioned multi-data sending device based on column data scanning and the multi-data receiving device based on column data scanning are only examples, not exhaustive, including but not limited to the above-mentioned multi-data sending device based on column data scanning and the multi-data receiving device based on column data scanning. In actual applications, the multi-data sending device based on column data scanning and the multi-data receiving device based on column data scanning may also include: smart vehicle terminals, computer equipment, etc.
[0166] Through the description of the above implementation modes, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation modes of the present invention or some parts of the implementation modes.
[0167] Therefore, the embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any of the multi-data sending methods based on column data scanning and the multi-data receiving methods based on column data scanning as described in the above method embodiments. For example, the storage medium may include a hard disk, a floppy disk, an optical disk, a tape, a disk, a USB flash drive, a flash memory, etc.
[0168] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the multi-data sending methods based on column data scanning and the multi-data receiving method based on column data scanning as recorded in the above method embodiments.
[0169] It should be noted that, for the sake of simplicity, the aforementioned method implementations are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the implementations described in the specification are all optional implementations, and the actions and modules involved are not necessarily required by the present application.
[0170] In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device implementation described above is only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0172] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0173] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0174] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0175] A person skilled in the art may understand that all or part of the steps in the various methods of the above-mentioned embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0176] The above is a detailed introduction to the implementation methods of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above implementation methods is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A multi-data sending method based on column data scanning, characterized in that: The method is applied to a data sending end, and the method comprises: Obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two data to be sent among the n data to be sent is less than a first threshold, and n is a positive integer greater than 0; Performing binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one-to-one to the n data to be sent; vertically stacking the n first binary data strings to obtain a first matrix; Splitting the first matrix by columns to obtain m second binary data strings, where m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0; Performing multiple character scanning processes on each of the m second binary data strings respectively to obtain m simplified data strings, wherein the m simplified data strings correspond one-to-one to the m second binary data strings; According to the arrangement position of each second binary data string in the first matrix, the m simplified data strings are vertically spliced to obtain a target data string; Sending the target data string to a data receiving end; The step of performing multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings includes: Starting from the starting character A of the i-th character scanning process, traverse each second binary data string to the right in sequence until the ending character B is determined, wherein the ending character B is the first character whose value is different from the starting character A in the i-th character scanning process, or the ending character B is the last character of each second binary data string, i is an integer greater than or equal to 1, and when i=1, the starting character A is the first character of each second binary data string; When the end character B is the first character whose value is different from the start character A during the i-th character scanning process, the scanning result of the i-th character scanning process is set to be the number of characters between the start character A and the end character B plus one, and the end character B is used as the start character of the i+1-th character scanning process to perform the i+1-th character scanning process, until after multiple character scanning processes are performed, a simplified data string corresponding to each second binary data string is obtained; When the starting character A is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to 1, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string; When the ending character B is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to the number of characters between the starting character A and the ending character B plus two, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
2. The method according to claim 1, characterized in that The step of sending the target data string to the data receiving end comprises: Segmenting the target data string to obtain at least one data fragment; Determining at least one sending frequency according to the number of bits of each data slice in the data slice; Determine, according to the arrangement position of each data fragment in the target data string, a first transmission frequency corresponding to each data fragment in the at least one transmission frequency; According to a preset conversion table and a first sending frequency corresponding to each data slice, data conversion is performed on each data slice to obtain at least one conversion result, wherein the conversion table records the conversion results corresponding to different data slices at different sending frequencies, and the at least one conversion result corresponds to the at least one data slice in a one-to-one manner; Each conversion result of the at least one conversion result is sequentially sent to the data receiving end according to the first sending frequency corresponding to each conversion result.
3. A multi-data receiving method based on column data scanning, characterized in that: The method is applied to a data receiving end, and the method comprises: receiving a target data string from a data transmitting end, wherein the target data string is obtained based on the method of claim 1, and the target data string includes x third binary data strings, wherein x is an integer greater than or equal to 1; Arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings, to obtain x vertical data strings, wherein the x vertical data strings correspond one-to-one to the x third binary data strings; According to the label of each third binary data string, horizontally splice the x vertical data strings to obtain a second matrix; Splitting the second matrix row by row in order from top to bottom to obtain y fourth binary data strings; Data restoration is performed on each of the y fourth binary data strings to obtain y original data, wherein the y original data correspond one-to-one to the y fourth binary data.
4. A multi-data sending device based on column data scanning, characterized in that: The device comprises: a first receiving module, a first processing module and a sending module; wherein The first receiving module is used to obtain n data to be sent, wherein the n data to be sent are n data with the same data format, and the absolute value of the difference between the data sizes of any two data to be sent among the n data to be sent is less than a first threshold, and n is a positive integer greater than 0; The first processing module is used to perform binary conversion on each of the n data to be sent to obtain n first binary data strings, wherein the n first binary data strings correspond one-to-one to the n data to be sent; stack the n first binary data strings vertically to obtain a first matrix; split the first matrix by column to obtain m second binary data strings, wherein m is the number of bits of the binary data with the largest median among the n binary data, and m is a positive integer greater than 0; The first processing module is further used to perform multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings, wherein the m simplified data strings correspond to the m second binary data strings one by one; according to the arrangement position of each second binary data string in the first matrix, the m simplified data strings are longitudinally spliced to obtain a target data string; the sending module is used to send the target data string to a data receiving end; Wherein, in the aspect of performing multiple character scanning processes on each of the m second binary data strings to obtain m simplified data strings, the first processing module is specifically used to: Starting from the starting character A of the i-th character scanning process, traverse each second binary data string to the right in sequence until the ending character B is determined, wherein the ending character B is the first character whose value is different from the starting character A in the i-th character scanning process, or the ending character B is the last character of each second binary data string, i is an integer greater than or equal to 1, and when i=1, the starting character A is the first character of each second binary data string; When the end character B is the first character whose value is different from the start character A during the i-th character scanning process, the scanning result of the i-th character scanning process is set to be the number of characters between the start character A and the end character B plus one, and the end character B is used as the start character of the i+1-th character scanning process to perform the i+1-th character scanning process, until after multiple character scanning processes are performed, a simplified data string corresponding to each second binary data string is obtained; When the starting character A is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to 1, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string; When the ending character B is the last character of each second binary data string, the scanning result of the i-th character scanning process is set to the number of characters between the starting character A and the ending character B plus two, and the processing results of multiple character scanning processes are sorted according to the processing order of the multiple character scanning processes to obtain a simplified data string corresponding to each second binary data string.
5. A multi-data receiving device based on column data scanning, characterized in that: The device comprises: a second receiving module, a second processing module and a restoration module; wherein The second receiving module is used to receive a target data string from a data transmitting end, wherein the target data string is obtained based on the method according to claim 1, and the target data string includes x third binary data strings, wherein x is an integer greater than or equal to 1; The second processing module is used to arrange the elements in each of the x third binary data strings in order from top to bottom according to the arrangement position in each of the third binary data strings, to obtain x vertical data strings, wherein the x vertical data strings correspond one to one to the x third binary data strings; according to the label of each of the third binary data strings, horizontally splice the x vertical data strings to obtain a second matrix; and split the second matrix by row in order from top to bottom to obtain y fourth binary data strings; The restoration module is used to restore each of the y fourth binary data strings to obtain y original data, wherein the y original data correspond one-to-one to the y fourth binary data.
6. A multi-data transmission device based on column data scanning, characterized in that: The method comprises 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, and the one or more programs include instructions for executing the steps in any one of the methods of claims 1-2.
7. A multi-data receiving device based on column data scanning, characterized in that: The invention comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the one or more programs include instructions for executing the steps in claim 3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.
Citation Information
Cited By
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
WO2023061177A1
