A data sorting method, apparatus and related device

CN122614922APending Publication Date: 2026-08-21CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510156802.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

但是,在数据表较大时,CPU排序的效率较低

Benefits of technology

[0024] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122614922A_ABST
    Figure CN122614922A_ABST
Patent Text Reader

Abstract

The application provides a data sorting method for efficiently sorting data and avoiding resource waste. The method comprises the following steps: obtaining a first data table, the first data table being an m-row-n-column table, m and n being positive integers greater than 1; calling a heterogeneous computing power module to sort x data columns to be sorted in the first data table respectively, and obtaining x sorting results, x being a positive integer greater than 1 and not greater than n; and obtaining a sorting result of the first data table according to a priority order of the x data columns and the x sorting results. In addition, the application also provides corresponding devices, computing device clusters, computer readable storage media and computer program products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data sorting method, apparatus and related equipment. Background Technology

[0002] Data sorting is a common step in data processing, referring to determining the order of data according to one (or more) rules. In the context of data tables, data sorting refers to arranging multiple rows of data in the table. For example, multiple rows of data in a data table can be sorted according to the size of a particular column.

[0003] Multi-column priority sorting refers to sorting data according to the order of multiple columns. These columns can have varying priorities. During sorting, data is first sorted according to the columns with the highest priority. If rows with the same priority are found within the high-priority column sorting results, they are then sorted according to the next highest priority column.

[0004] Currently, data sorting is mostly implemented by the Central Processing Unit (CPU). However, CPU sorting is inefficient when dealing with large data tables. In particular, for multi-column priority sorting, the CPU needs to sort each column of data one by one, further reducing efficiency. Summary of the Invention

[0005] In view of this, this application provides a data sorting method for efficiently sorting data. This application also provides corresponding apparatus, computing device clusters, computer-readable storage media, and computer program products.

[0006] Firstly, this application provides a data sorting method. This method can invoke a heterogeneous computing power module to sort multiple data columns separately, thereby reducing resource waste and improving efficiency. Specifically, if the obtained first data table to be sorted is an m-row, n-column table (where m and n are both positive integers greater than 1), and multi-priority sorting requires sorting according to the priority of x data columns in the first data table (x is a positive integer not greater than n), then the x data columns referenced for sorting the first data table can be separated, and the heterogeneous computing power module can be invoked to sort the x data columns to be sorted in the first data table separately, obtaining the sorting result of each of the x data columns. Based on the x sorting results returned by the heterogeneous computing power module, combined with the priority order of the x data columns and the x sorting results, the sorting result of the first data table can be obtained, completing the multi-priority sorting of the first data table. In other words, during multi-priority sorting, the x data columns to be sorted are sorted through a single invocation of the heterogeneous computing power module. In this process, the heterogeneous computing power module can sort the x data columns in parallel. Compared to the approach of sorting a single data column on a separate basis using heterogeneous computing modules, sorting all data columns at once improves sorting efficiency. The CPU waiting time during sorting by heterogeneous computing modules is significantly reduced, minimizing CPU resource waste and increasing sorting efficiency. Furthermore, reduced data interaction with heterogeneous computing modules also decreases resource overhead.

[0007] In some possible implementations, the sorting results of x data columns can be summarized in descending order of priority. Specifically, the first data table can be sorted first according to the sorting results of the highest priority data column, resulting in an intermediate data table. Then, the intermediate data table can be used to determine if the sorting is complete. If no duplicate data items exist in the highest priority data column of the intermediate data table, the order of all data rows is determined, and the sorting is complete. If duplicate data items exist in the highest priority data column of the intermediate data table, the sorting of these duplicate data items is not yet complete. Therefore, the sorting results of the second highest priority data column can be searched, and the data rows containing the duplicate data items can be sorted according to the sorting results of the second highest priority data column. In this way, by searching in descending order of priority, the sorting results of multiple data columns can be summarized into the sorting result of the first data table.

[0008] Specifically, assuming that the data items in row j of the highest priority column in the intermediate data table are the same up to row i+j, then during sorting, we can first determine j+1 target data rows from the intermediate data table. These j+1 target data rows are rows i to i+j in the intermediate data table. The highest priority data items in these target data rows are the same. We can then find the order of these j+1 target data rows by searching the sorting results of the second highest priority column. Based on the order of the target data rows, we adjust the order of the data items in row j to row i+j in the intermediate data table. In this way, by querying the sorting results of the next priority based on the data rows to which the same data items belong, and through multiple iterations, we can complete the multi-priority sorting of the first data table.

[0009] In some possible implementations, the first data table is obtained by splitting the original data table to be sorted. Specifically, the original data table obtained by the data sorting device may have a large number of data items. To improve sorting efficiency, the original data table can be split into multiple first data tables, and then each of the multiple first data tables can be sorted separately. This reduces the size of the data table being sorted each time, thereby improving the efficiency of data sorting.

[0010] In some possible implementations, the original data table can be split according to a preset number of rows. Specifically, the number of rows *m* in the first data table can be pre-configured. When splitting the original data table, the *m* rows of the original data table can be used as a first data table, splitting the original data table into *y* data tables. Furthermore, the total number of rows in the original data table is no greater than *y*m. That is, among the *y* first data tables split from the original data table, the last first data table may have fewer than *m* rows.

[0011] In some possible implementations, the data columns to be sorted can be sent serially to the heterogeneous us case module. Specifically, after splitting into y first data tables, x data columns to be sorted can be determined from each first data table, resulting in a total of x*y data columns. Then, these x*y data columns to be sorted can be sent serially to the heterogeneous computing power module, which then sorts them. Because the data columns are sent serially to the heterogeneous computing power module, the sorting of the x*y data columns by the heterogeneous computing power module has a specific order. After obtaining the first sorting result, the heterogeneous computing power module returns the sorting result to the data sorting device. The data sorting device then begins to summarize the sorting results of the data columns.

[0012] In some possible implementations, the sorting results can be aggregated after the first sorting result returned by the heterogeneous computing power module is received. That is, after receiving the first sorting result, the mechanism for aggregating sorting results in the data sorting device module is activated, and the data sorting device begins the step of sorting the original data table according to the sorting result. Thus, the data sorting device begins aggregating sorting results after the heterogeneous computing power module receives the first sorting result. The waiting time for the data sorting device is then the time between sending the first column of data to be sorted and receiving the first sorting result. Since the amount of data in the column to be sorted is relatively small, the heterogeneous computing power module can quickly obtain the sorting result. Therefore, the waiting time for the data sorting device is short, resulting in less resource waste.

[0013] Secondly, this application provides a data sorting apparatus, the apparatus comprising: an acquisition unit, configured to acquire a first data table, the first data table being a table with m rows and n columns, wherein m and n are positive integers greater than 1; a calling unit, configured to call a heterogeneous computing power module to sort x data columns to be sorted in the first data table respectively, obtaining x sorting results, wherein x is a positive integer greater than 1 and not greater than n; and a summarizing unit, configured to obtain a sorting result of the first data table according to the priority order of the x data columns and the x sorting results.

[0014] In some possible implementations, the summarizing unit is specifically used to sort the first data table according to the sorting result corresponding to the data column with the highest priority to obtain an intermediate data table; if there are identical data items in the data column with the highest priority in the intermediate data table, the data rows to which the identical data items belong are sorted according to the sorting result corresponding to the data column with the second highest priority.

[0015] In some possible implementations, the data items in the i-th row to the (i+j-th)-th row of the highest priority data column in the intermediate data table are the same; the summarizing unit is specifically used to determine j+1 target data rows to be sorted, the j+1 data rows being the data rows to which the data items in the i-th row to the (i+j-th)-th row belong; to search the sorting results corresponding to the second highest priority data column to determine the order relationship of the j+1 target data rows; and to sort the i-th to (i+j-th)-th data rows in the intermediate data table according to the order relationship of the j+1 target data rows; wherein i is a positive integer less than m, and i+j is a positive integer not greater than m.

[0016] In some possible implementations, the acquisition unit is specifically used to acquire the original data table and split the original data table into multiple first data tables.

[0017] In some possible implementations, the original data table is a table with p rows and x columns; the acquisition unit is specifically used to split the original data table into y first data tables according to a preset number of rows; where y*m≥p>(y-1)*m.

[0018] In some possible implementations, the calling unit is specifically used to determine x data columns to be sorted from each of the first data tables, and to determine x*y data columns to be sorted; to serially send the x*y data columns to be sorted to the heterogeneous computing power module; and to receive the x*y sorting results returned by the heterogeneous computing power module.

[0019] In some possible implementations, the aggregation unit is specifically used to initiate a step of sorting the original data table according to the sorting result in response to obtaining the first sorting result returned by the heterogeneous computing power module.

[0020] Thirdly, this application provides a computing device, the computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device to perform the method in the first aspect or any possible implementation thereof. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0021] Fourthly, this application provides a computing device cluster, the computing device including at least one computing device, the at least one computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0022] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0023] In a sixth aspect, this application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0024] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0026] Figure 1a A schematic diagram illustrating an application scenario provided in this application embodiment;

[0027] Figure 1b A schematic diagram illustrating an application scenario provided in this application embodiment;

[0028] Figure 2 A flowchart illustrating a data sorting method provided in an embodiment of this application;

[0029] Figure 3 Another flowchart illustrating the data sorting method provided in this application embodiment;

[0030] Figure 4 A schematic diagram of the structure of a data sorting device provided in an embodiment of this application;

[0031] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of a computing device cluster provided in an embodiment of this application;

[0033] Figure 7 This is a schematic diagram illustrating one implementation of a computing device cluster provided in an embodiment of this application. Detailed Implementation

[0034] The solutions in the embodiments provided in this application will now be described with reference to the accompanying drawings.

[0035] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0036] First, let me introduce some of the terms used in this application.

[0037] Data Tables: Data tables are used to store data in a tabular format. When storing data in a data table, data can be filled in according to its attributes. For example, data with the same attributes can be filled in the same row or column of the data table. For instance, when analyzing multiple attributes of an object, the multiple attributes of the same object can be filled in the same row, and the same attribute information from different objects can be filled in the same column. Similarly, when analyzing personnel information, the information of different personnel can be filled in different rows, and different types of information (such as name, gender, date of birth, etc.) can be filled in different columns.

[0038] Data Item: A data table consists of multiple data items. Each piece of data stored in a data table can be called a data item. The data row and column containing a data item represent the attributes of the data item. When sorting, data items in the same data column can be sorted, and the order of the data rows to which the data items belong can be adjusted according to the order of the data items. A data item can be uniquely identified from a data table based on its data row and data column.

[0039] Multi-priority sorting: Multi-priority sorting refers to sorting based on the priorities of multiple factors. In multi-priority sorting, the highest priority data column is determined first, and sorting is performed according to this column. If rows with the same order exist after sorting, the next highest priority data column is used for further sorting, until the lowest priority data column is reached.

[0040] Heterogeneous computing power modules: Heterogeneous computing power modules refer to modules that process data using two or more computing resources. If the data sorting method is executed by the CPU, then the heterogeneous computing power module can include computing resources provided by modules other than the CPU. For example, a heterogeneous computing power module can include any non-CPU module such as a Graphics Processing Unit (GPU), a Data Processing Unit (DPU), and a Field-Programmable Gate Array (FPGA). When performing multi-priority sorting, the CPU can call one or more of the GPU, DPU, and FPGA in the heterogeneous computing power to sort the data column.

[0041] Multi-priority sorting allows data to be sorted according to multiple dimensions, a common application scenario in data processing. For example, in record management, it may be necessary to sort individuals based on multiple dimensions such as date of birth, gender, and educational background. In e-commerce, products may need to be sorted based on multiple dimensions such as price, sales volume, and positive review rate.

[0042] Currently, most sorting operations use CPUs for multiple priority levels. However, the parallel computing capabilities of CPUs are relatively limited, making them unsuitable for multi-priority sorting applications. In particular, with large datasets, the CPU's processing power becomes more constrained by sorting efficiency due to the significantly increased recursion depth.

[0043] Therefore, in some implementations, sorting can be assisted by modules such as GPUs. In other words, the CPU can call upon modules with strong parallel computing capabilities, such as GPUs, to perform the sorting. This leverages the advantages of GPUs and other such modules, which can improve the efficiency of data sorting to some extent.

[0044] Specifically, when using the GPU for sorting, a corresponding global index can be configured for each data row. The CPU can first call the GPU to sort the data table based on the highest priority data column and update the global index according to the sorting result. Next, the CPU can determine whether there are duplicate data items in the highest priority data row. If so, the CPU can call the GPU again to sort. In this way, by calling the GPU multiple times to sort, multiple data columns with different priorities can be sorted to obtain a multi-priority sorting result.

[0045] The above implementation method utilizes the strong parallel computing capabilities of GPUs, which can improve the efficiency of multi-priority sorting to a certain extent.

[0046] However, the inventors of this application have found that existing sorting methods still have the problem of wasting resources and there is still room for improvement in efficiency.

[0047] Specifically, in the above implementation, each time the CPU calls the GPU, it sorts a single data column, and the CPU enters a blocked state while the GPU is sorting. Furthermore, if it's determined that the existing sorting result is insufficient, the CPU calls the GPU again to sort the next priority data column. Thus, the sorting process is: "CPU sends a sorting request → GPU sorts → CPU judges based on sorting result → GPU sorts → CPU judges again based on sorting result → ... → CPU determines the sorting result." This is a serial process, repeatedly calling both the CPU and GPU. Following this process, the CPU enters a blocked state multiple times. Each time it enters a blocked state, the CPU's resources are not utilized, resulting in resource waste. Furthermore, the serial execution of this process also reduces efficiency.

[0048] Based on this, this application provides a data sorting method. This method can call a heterogeneous computing power module to sort multiple data columns separately to reduce resource waste and improve efficiency. Specifically, if the obtained first data table to be sorted is an m-row, n-column table (m and n are both positive integers greater than 1), and multi-priority sorting requires sorting according to the priority of x data columns in the first data table (x is a positive integer not greater than n), then the x data columns referenced for sorting the first data table can be separated, and the heterogeneous computing power module can be called to sort the x data columns to be sorted in the first data table separately, obtaining the sorting result of each of the x data columns. Based on the x sorting results returned by the heterogeneous computing power module, combined with the priority order of the x data columns and the x sorting results, the sorting result of the first data table can be obtained, completing the multi-priority sorting of the first data table. In other words, during multi-priority sorting, the x data columns to be sorted are sorted through a single call to the heterogeneous computing power module. In this process, the heterogeneous computing power module can sort the x data columns in parallel. Compared to the approach of sorting a single data column on a separate basis using heterogeneous computing modules, sorting all data columns at once improves sorting efficiency. The CPU waiting time during sorting by heterogeneous computing modules is significantly reduced, minimizing CPU resource waste and increasing sorting efficiency. Furthermore, reduced data interaction with heterogeneous computing modules also decreases resource overhead.

[0049] Next, various non-limiting implementation methods of the data sorting process will be described in detail.

[0050] First, an exemplary application scenario is introduced. The data sorting method provided in this application can be applied to the server side, which can be the server side of a language generation model system.

[0051] See Figure 1a , Figure 1a This is a schematic diagram illustrating an application scenario of the data sorting method provided in this application embodiment. Figure 1a The application scenario shown includes a client 10 and a server 20. The server 20 includes a processing module 21 and a heterogeneous computing power module 22. The processing module 21 includes a data sorting device 211. The data sorting device 211 includes an acquisition unit 2111, a calling unit 2112, and a summarizing unit 2113.

[0052] The heterogeneous computing module 22 provides heterogeneous computing power. Heterogeneous computing power refers to computing power that differs from that of the processing module 21. For example, assuming the processing module 21 is based on a CPU, it uses the computing resources provided by the CPU to process data. The computing resources provided by the heterogeneous computing module 22 can come from any one or more modules different from the CPU, such as GPUs, DPUs, and FPGAs. Furthermore, the heterogeneous computing power provided by the heterogeneous computing module 22 significantly outperforms the computing power provided by the CPU in terms of parallel sorting and recursion speed.

[0053] For example, client 10 can be a client processing a cluster, and server 20 can be a server processing a cluster. A user can trigger a sorting task using client 10. Based on the sorting task, client 10 can send the data table to be sorted and other information for data sorting to server 20, such as the data columns referenced in the sorting and the priority information of the data columns. Acquisition unit 2111 can acquire the data table and forward it to calling unit 2112. Calling unit 2112 can call heterogeneous computing power module 22 to sort the data table and receive the sorting results of multiple data columns returned by the heterogeneous computing power module. Summarization unit 2113 can determine the sorting result of the data table based on the sorting results of the multiple data columns.

[0054] Optionally, the server 20 also includes an intermediate storage module (not shown in the figure). When the heterogeneous computing power module 22 is invoked to sort the data column, the data column to be sorted can be stored in the intermediate storage module. The heterogeneous computing power module 22 can read data from the intermediate storage module to sort the data column. Optionally, the intermediate storage module can be implemented using dynamic random access memory (DRAM).

[0055] exist Figure 1a The application scenarios shown include the following: Figure 1bIn the application scenario shown, the heterogeneous computing module 22 and the processing module 21 correspond to the same server 20. That is, the processing module 21 and the heterogeneous computing module 22 can belong to the same processing cluster. However, in some other possible implementations, the processing module and the heterogeneous computing module can belong to different clusters. In other words, after receiving a multi-priority sorting task, the processing cluster can call the heterogeneous computing resources of other processing clusters to sort the data columns to be sorted in the table.

[0056] It should be noted that the above application scenarios are only examples, and the data sorting method provided in this application embodiment can be applied to any application scenario that performs multi-priority sorting of data tables.

[0057] The following section provides a detailed introduction to the specific implementation methods of the data sorting process.

[0058] See Figure 2 , Figure 2 A flowchart illustrating the data sorting method provided in this application. This method can be applied to... Figure 1a The application scenarios shown can also be applied to other applicable application scenarios.

[0059] Specifically, Figure 2 The data sorting methods shown may specifically include:

[0060] S201: Get the first data table.

[0061] Before performing multi-priority sorting, we first need to obtain the first data table to be sorted. For ease of explanation, we will refer to the number of rows in the first data table as m and the number of columns as n; that is, the first data table is a data table with m rows and n columns. Considering the requirements of multi-priority sorting, if m or n equals 1, no sorting is needed, so m and n are positive integers greater than 1. It can be understood that the first data table includes m data rows, n data columns, and m*n data items.

[0062] In the first data table, there are n columns of data that need to be sorted. These columns are those that need to be used as a reference during multi-priority sorting processes. In other words, when sorting the first data table, the order of the data items in the columns to be sorted needs to be considered to adjust the order of the data rows in the first data table.

[0063] Optionally, all data columns in the first data table can be columns to be sorted. That is, the data sorting device needs to refer to all data columns for sorting. Alternatively, the data columns to be sorted in the first data table can be only a subset of the data columns in the first data table. In this case, the first data table also includes unsorted data columns. Unsorted data columns are those that are not used to determine the order of data rows during the sorting process.

[0064] For ease of explanation, the following description uses a first data table containing x columns of data to be sorted as an example. Here, x can be a positive integer greater than 1 and not greater than n. If x equals n, then all data columns in the first data table are columns of data to be sorted.

[0065] The first data table has been introduced above; the method for retrieving the first data table will be described below.

[0066] In some possible implementations, the first data table can be a data table from the client. For example, if a user needs to sort a certain data table, the user can upload the data table to the server through the client. The server receives the data table and uses it as the first data table for multi-priority sorting. In this implementation, the first data table can be a data table received by the server over the network.

[0067] In some other possible implementations, the first data table can be obtained by splitting the original data table. Specifically, if the data table to be sorted is large, it can be split into multiple data tables, and each data table can be sorted separately. Accordingly, the first data table can be one of the split data tables. For a more detailed explanation of this, please refer to [link to relevant documentation]. Figure 3 The description of the corresponding embodiments will not be repeated here.

[0068] S202: Call the heterogeneous computing power module to sort the x data columns to be sorted in the first data table and obtain x sorting results.

[0069] After obtaining the first data table to be sorted, the data sorting device can call the first heterogeneous computing power module to sort the data columns to be sorted in the first data table, thereby obtaining the sorting result of each data column.

[0070] Optionally, the data sorting device can separate the data columns to be sorted in the first data table into x sub-tables. Each sub-table corresponds to one column of data. The number of rows in the sub-tables is the same as that in the first data table, which is m rows. Then, the data sorting device can call the heterogeneous computing power module to sort the x sub-tables respectively, and obtain the sorting results of the x sub-tables, that is, the sorting results of the x data columns.

[0071] When invoking a heterogeneous computing module, the data sorting device can send x data columns to be sorted to the module via an internal connection or network connection. Alternatively, if the heterogeneous computing module has permission to read data stored in a certain storage space, the data sorting device can also store the x data columns to be sorted in that storage space. The heterogeneous computing module can then read the x data columns to be sorted from the storage space and sort them. For example, in some implementations, the data sorting device can store x sub-tables to be sorted in DRAM. The heterogeneous computing module can then read the x sub-tables to be sorted from the DRAM.

[0072] In addition to the data column to be sorted, the data sorting device can also send sorting rules to the heterogeneous computing power modules. The sorting rules represent the rules followed when sorting the data column. For example, if all data items in the data column to be sorted are numbers, the sorting rules can instruct the heterogeneous computing power modules to sort the data items in the data column according to the size of the numbers, such as from largest to smallest or smallest to largest. As another example, if all data items in the data column to be sorted are not numbers, the sorting rules can instruct the heterogeneous computing power modules to sort the data column to be sorted in alphabetical order or other similar manner. Optionally, the sorting rules can be selected by the user who triggers the data sorting or can be pre-configured. This application embodiment does not limit the specific sorting rules.

[0073] After obtaining the data columns to be sorted, the heterogeneous computing module can sort multiple data columns, obtain the sorting result for each data column, and return it to the data sorting device. Optionally, the heterogeneous computing module can sort multiple data columns in parallel. For example, the heterogeneous computing module can sort x data columns simultaneously in parallel. Alternatively, the heterogeneous computing module can sort y data columns out of x data columns in parallel. Through multiple parallel sorting operations, x sorting results are obtained. y is a positive integer greater than 1 and less than x.

[0074] Similar to the x columns of data before sorting, the sorting results obtained by the heterogeneous computing power module can be sent to the data sorting device via a network connection or internal connection. Alternatively, the heterogeneous computing power module can also store the sorting results in a storage space that the data sorting device has read access to, so that the data sorting device can read the x sorting results from the storage space.

[0075] The sorting result represents the order of the data rows in a data column. Optionally, the order of the data rows can be represented by sequence identifiers. For example, the sorting result of the 'a'-th data column can be a table with m rows and 2 columns, where the m data items in the first column are the m data items in the 'a'-th column of the first data table, and the m data items in the second column are the sequence identifiers of the corresponding data items in the first column. For example, if the data item in the 'b'-th row and 'a'-th column of the first data table is sorted in column 'a' with the order 'c', then the data item in the 'b'-th row and '2'-th column of the sorting result of the 'a'-th data column can be 'c'.

[0076] S203: Based on the priority order of x data columns and x sorting results, obtain the sorting result of the first data table.

[0077] After obtaining x sorting results, the data sorting device can use these x results, combined with the priority of x data columns, to obtain the sorting result of the first data table. The sorting result of the first data table can be an m-row, n-column data table, where the order of the m data rows matches the sorting results. In the sorting result of the first data table, the m data rows are arranged in order according to the instructions of the x sorting results.

[0078] Here, the priority of the x data columns refers to their priority in a multi-priority sorting process. It refers to the priority between data columns, not the priority between data items within a column. That is, if the priority of the i-th data column is higher than the priority of the j-th data column, then when determining the sorting result of the first data table, the sorting result of the i-th data column must be considered first, followed by the sorting result of the j-th data column.

[0079] Optionally, the priority of the x data columns can be configured by the user. For example, a user requesting sorting of the first data table can configure the priority of the x data columns on the client. Alternatively, if the user does not configure the priority of the data columns, the priority of the x data columns can be determined according to their order in the first data table. For example, the leftmost data column in the first data table can be designated as the highest priority data column, and the rightmost data column in the first data table as the lowest priority data column.

[0080] The following describes one method for determining the sorting result.

[0081] In this implementation, the sorting results can be retrieved according to the priority order of the data columns to obtain the order of the data rows. That is, the first data table (m rows) can be sorted according to the sorting results of the highest priority data column to obtain an intermediate data table. Next, it can be determined whether there are identical and adjacent data items in the highest priority data column of the intermediate data table. If so, it means the data sorting is not yet complete, and the data rows containing the same data items can be sorted again according to the sorting results of the second highest priority data column. Thus, if the currently queried data column is not the lowest priority data column, and there are identical and adjacent data items in the currently queried data column of the intermediate data table, the search continues with the sorting results of the next priority data column until the sorting results of the lowest priority data column are found and / or no identical and adjacent data rows exist in the currently queried data column of the intermediate data table.

[0082] In other words, assuming that among x data columns, the first data column has the highest priority, the second highest priority, and the xth lowest priority, then when determining the sorting result of the first data table, we can first sort the m rows of data in the first data table according to the sorting result of the first data column, obtaining the first intermediate data table. Next, we can determine whether there are multiple identical and adjacent data items in the first column of the first intermediate data table. Since the first intermediate data table has already been sorted according to the sorting result of the first column, multiple identical and adjacent data items in the first column indicate that the order between these data items cannot be determined based on the sorting result of the first data column. Therefore, we can refer to the sorting result of the second data column to continue sorting.

[0083] If the data items in the first column of the first intermediate data table are the same from row i to row i+j, then the sorting result of the second data column can be used to sort rows i to i+j.

[0084] Optionally, the data items from row i to row i+j in the first intermediate data table can be identified as target data items, resulting in j+1 target data items. Next, these j+1 data items can be sorted according to the sorting result of the second data column, yielding an intermediate sorting result. This intermediate sorting result represents the sequential order of the j+1 data items. Mapping the sequential order of these j+1 data items to data rows is equivalent to sorting the first intermediate data table according to the sorting result of the second data column. In other words, the sequential order of the first data table from row i to row i+j can be adjusted based on the sequential order of the (i+1)th target data item in the intermediate sorting result. The sequential order of the data rows matches the sequential order of the data items.

[0085] Alternatively, if the sorting result includes the sequence identifiers of m data rows, then the sequence identifiers of the i-th to i+j-th data rows can be found from the sorting result of the data column with the second highest priority, and the i-th to i+j-th data rows can be re-sorted according to the sequence identifiers in descending order.

[0086] Following the above implementation, sorting any multiple identical and adjacent data items in the first intermediate data table yields the second intermediate data table. Next, it can be determined whether any identical and adjacent data items exist among the m data items in the second column of the second intermediate data table. If not, it means that sorting m rows of data according to the first and second data columns has been completed, and the second intermediate data table can be used as the sorting result of the first data table. If so, it means that sorting m rows of data according to the sorting results of the first and second data columns has not yet been completed. Therefore, sorting can continue based on the identical and adjacent data items in the second data column, referring to the sorting result of the third highest priority data column.

[0087] In other words, after obtaining an intermediate data table by referring to the sorting result of the k-th highest priority data column, it can be determined whether there are identical and adjacent data items in the k-th highest priority data column of the obtained intermediate data table. If so, the data rows to which the identical and adjacent data items belong can be sorted by referring to the sorting result of the (k+1)-th highest priority data column, thus obtaining the (k+1)-th intermediate data table.

[0088] The concept of "identical and adjacent" data items includes not only data items being identical and adjacent in their respective data columns, but also data items with higher priority within the same data row being identical. In other words, if two data items belong to the same data row and all data items are identical from the highest priority column to the k-th highest priority column, then these two data items can be considered identical and adjacent. Conversely, for two identical data items, if all data items are identical from the 1st highest priority column to the (k-2nd highest priority column), but different in the (k-1th highest priority column), then these two data items are not considered identical and adjacent.

[0089] Thus, by sorting the rows of data with the same data items column by column according to the priority order of the data columns, the sorting result of the first data table can be obtained.

[0090] Where i is a positive integer, i+j is a positive integer less than m, and k is a positive integer greater than 2 and less than x.

[0091] In the above implementation, if the obtained first data table to be sorted is an m-row, n-column table (where m and n are both positive integers greater than 1), and multi-priority sorting requires sorting according to the priority of x data columns in the first data table (where x is a positive integer not greater than n), then the x data columns referenced for sorting the first data table can be separated. The heterogeneous computing power module can then be called to sort each of the x data columns in the first data table, obtaining the sorting result for each of the x data columns. Based on the x sorting results returned by the heterogeneous computing power module, combined with the priority order of the x data columns and the x sorting results, the sorting result of the first data table can be obtained, completing the multi-priority sorting of the first data table. In other words, during multi-priority sorting, the x data columns to be sorted are sorted through a single call to the heterogeneous computing power module. In this process, the heterogeneous computing power module can sort the x data columns in parallel. Compared to the approach of sorting a single data column on a separate basis using heterogeneous computing modules, sorting all data columns at once improves sorting efficiency. The CPU waiting time during sorting by heterogeneous computing modules is significantly reduced, minimizing CPU resource waste and increasing sorting efficiency. Furthermore, reduced data interaction with heterogeneous computing modules also decreases resource overhead.

[0092] The above text combined Figure 2 This paper introduces several implementation methods for multi-priority sorting of the first data table. In the methods described above, the data sorting device can send the data columns to be sorted to the heterogeneous computing power module, which then sorts each data column individually. When sorting a single data column, the data rows to which the column belongs can be sorted based on each data item within the column.

[0093] However, the number of rows in the data table to be sorted may be large, resulting in a large number of data items in each column. In real-world applications, the number of rows in the data table can reach millions or even more. Even for heterogeneous computing modules, sorting all the data items at once will take a considerable amount of time. Furthermore, while the heterogeneous computing modules are sorting the data columns, the data sorting device remains in a waiting state, resulting in wasted resources.

[0094] Therefore, in some possible implementations, the data table to be sorted can be split into multiple sub-tables. The sub-tables have fewer rows, allowing the heterogeneous computing module to quickly obtain the sorting results of the data columns, thus reducing the waiting time for the data sorting device.

[0095] Let's combine the following... Figure 1b This application scenario will be introduced.

[0096] See Figure 1b ,exist Figure 1a Based on the application scenarios shown, Figure 1b In the application scenario shown, the data sorting device 211 also includes a splitting unit 2114.

[0097] exist Figure 1b In the implementation shown, the user sends the original data table to be sorted to the server 20 through the client 10. The acquisition unit 2111 acquires the original data table and sends it to the splitting unit 2114. The splitting unit 2114 splits the original data table into multiple first data tables. The calling unit 2112 calls the heterogeneous computing power module to sort each first data table, thereby obtaining the sorting result of each unsorted data row in each first data table. The summarizing unit 2113 determines the sorting result of each first data table based on the sorting result.

[0098] In this way, the original data table to be sorted is split into multiple first data tables, and the data columns in the first data tables are sorted by the heterogeneous computing power module. This can improve the time for the heterogeneous computing power module to obtain the sorting results, thereby reducing the waiting time of the data sorting device and improving the sorting efficiency.

[0099] exist Figure 1b In the implementation shown, the summarization unit 2113 first sorts each first data table, and then summarizes the results. In some other possible implementations, the sorting results of the first data tables can be directly obtained by summarizing the sorting results of the data columns. That is, after calling the heterogeneous computing power module to obtain the sorting results of multiple data columns from multiple first data tables, the summarization unit can summarize the multiple sorting results according to the priority order of the data columns, directly merging the sorting results of the same data column from different first data tables into the final sorting result to improve sorting efficiency. In this implementation, the data sorting device 211 may not include the summarization unit.

[0100] The following is combined with Figure 3 A detailed introduction is provided. See also... Figure 3 , Figure 3 This is a flowchart illustrating a data sorting method provided in an embodiment of this application. This method can be applied to... Figure 1b The application scenarios shown can also be applied to other applicable application scenarios.

[0101] Specifically, Figure 3 The data sorting methods shown may specifically include:

[0102] S301: Retrieve the original data table.

[0103] exist Figure 3In the implementation shown, users can upload the original data table through the client. Since the original data table has a large number of rows, it needs to be split before sorting to improve data sorting efficiency.

[0104] The original data table is a p-row, n-column table, where p is a positive integer greater than 1.

[0105] S302: Split the original data table into y first data tables.

[0106] After obtaining the original data table, it can be split into y first data tables. Each first data table includes n data columns, where y is a positive integer greater than 2. Optionally, the original data table can be split according to the target number of rows, which can be m. Thus, the original data table can be split into y data tables with m rows and n columns.

[0107] Specifically, after obtaining the original data table, it is split into multiple first data tables, with each split occurring every m rows. By splitting the original data table, a total of y first data tables can be obtained. It can be understood that if y*m > p, then the last first data table may have fewer than m rows. Correspondingly, y*m ≥ p > (y-1)*m.

[0108] In other words, if y*m equals p, then the original data table can be split into y first data tables. Each of these y first data tables has m rows and n columns. If y*m is less than p, then the original data table can be split into y-1 first data tables with m rows and n columns, and one first data table with (y*m-p+m) rows and n columns. For ease of explanation, the following description uses a table where each of the y first data tables has m rows and n columns as an example.

[0109] S303: Call the heterogeneous computing power module to sort the x data columns to be sorted in each of the first data tables, and obtain x*y sorting results.

[0110] After obtaining y first data tables, the heterogeneous computing power module can be invoked for sorting. Specifically, the data sorting device can invoke the heterogeneous computing power module to sort the x data columns to be sorted in each first data table to obtain the sorting result. Each time the heterogeneous computing power module obtains the sorting result for a data column, it returns the sorting result for that data column to the data sorting device.

[0111] In step S302 above, the target data table is split into y first data tables, resulting in a total of y*x sorting results. Each sorting result corresponds to a data column in one of the first data tables that needs to be sorted.

[0112] In some implementations, the data sorting module can call upon heterogeneous computing power modules to sort y*x data columns in parallel. This fully utilizes the parallel computing capabilities of the heterogeneous computing power modules, sorting all data columns simultaneously. The data loading device only needs to wait for the time required to sort one data column to obtain the complete sorting results.

[0113] Understandably, the above implementation method places high demands on the parallelism capabilities of the heterogeneous computing power modules. However, in some practical applications, the heterogeneous computing power modules may not have sufficient parallelism capabilities, or may not provide enough computing power to sort all data columns in parallel. Therefore, the data sorting device can serially send one or more data columns to be sorted to the heterogeneous computing power modules. Some specific implementation methods are described below.

[0114] In the first implementation, the data sorting device can send z data columns to be sorted to the heterogeneous computing power module at a time, where z is a positive integer. Thus, after obtaining z data columns, the heterogeneous computing power module can send these z data columns to be sorted in parallel. After sorting is complete, the heterogeneous computing power module can return the sorting result of the z data columns to the data sorting device, and the data sorting device continues to send z data columns to be sorted to the heterogeneous computing power module.

[0115] In the second implementation, the data sorting device can send one data column to be sorted to the heterogeneous computing power module at a time. If the heterogeneous computing power module still has spare computing power allocated to the data sorting device for parallel sorting, the heterogeneous computing power module can request new data columns from the data sorting device until the spare computing power allocated to the data sorting device is fully utilized.

[0116] In the third implementation, the data sorting device can send data columns to be sorted to the heterogeneous computing power module at preset time intervals. Each transmission can send one or more data columns to be sorted. If the heterogeneous computing power module does not have spare computing power allocated to the data sorting device, the data sorting device can stop sending data columns to be sorted to the heterogeneous computing power module.

[0117] Through the above implementation, the data sorting device can send data columns to be sorted to the heterogeneous computing power modules on a small scale. The size of each heterogeneous data column to be sorted is also relatively small. Therefore, the heterogeneous computing power modules can quickly return the sorting results of the data columns to the data sorting module. After obtaining the sorting results of the data columns, the data sorting device can summarize the sorting results of the original data table based on the sorting results. In other words, after sending the data columns to be sorted, the data sorting device can receive the sorting results after a short time interval and begin the step of summarizing the sorting results. In this way, the data sorting device only needs to wait a short time to proceed to step S304, reducing the waiting time of the data sorting device and reducing resource waste.

[0118] S304: Based on x*y sorting results, obtain the sorting result of the original data table.

[0119] After obtaining x*y sorting results, the sorting results can be summarized to obtain the sorting result of the original data table, thus completing the sorting of the original data table. Specifically, following the steps in S203 above, the sorting results of x*y data columns can be summarized according to the priority order of the data columns to obtain the sorted original data table.

[0120] As described above, the heterogeneous computing module can send the sorting results back to the data loading device after obtaining the sorting results of each data column. Accordingly, after obtaining the first sorting result, the data loading module can begin sorting the original data table.

[0121] In other words, after obtaining the first sorting result, the mechanism for aggregating the sorting results in the data sorting device module is activated, and the data sorting device begins the step of sorting the original data table according to the sorting results. Thus, after the heterogeneous computing power module obtains the first sorting result, the data sorting device begins to aggregate the sorting results. Therefore, the waiting time of the data sorting device is the time between sending the first column of data to be sorted and receiving the first sorting result. Since the amount of data in the column to be sorted is relatively small, the heterogeneous computing power module can quickly obtain the sorting results. Therefore, the waiting time of the data sorting device is short, resulting in less waste of resources.

[0122] Specifically, the data loading module can sort the data rows with records based on the content recorded in the sorting results. If a new sorting result is obtained, the data loading module can adjust the obtained sorting result accordingly. If the new sorting result includes unsorted data rows, the data loading module can insert the new data rows into the already sorted data rows, updating the sorting result. Thus, as the heterogeneous computing power modules send sorting results back to the data loading device, the data loading module continuously adjusts the sorting result, ultimately completing the sorting of the original data table. During this process, the data loading module can quickly begin summarizing the sorting results, reducing the waiting time of the data sorting device and minimizing resource waste.

[0123] In the above Figure 3In the implementation shown, the original data table is split according to data rows. Correspondingly, the number of columns in the split first data table is the same as the original data table. It is understandable that in other possible implementations, the original data table can also be split according to data columns. Alternatively, it can be split according to both data rows and data columns simultaneously. For example, assuming the original data table is a p-row, q-column table, where p is a positive integer greater than m and q is a positive integer greater than n, then the original data table can be split into y1*y2 first data tables. Where y1*m ≥ p > (y1-1)*m, y2*n ≥ q > (y2-1)*n. Specific details will not be elaborated here.

[0124] This application also provides a data sorting apparatus, which can be applied to the server 20 in the implementation shown in FIG1 to achieve... Figure 2 The implementation shown describes the function of the data sorting device. Specifically, as... Figure 4 As shown, the data sorting device 400 includes:

[0125] The acquisition unit 410 is used to acquire a first data table, which is a table with m rows and n columns, where m and n are positive integers greater than 1;

[0126] Calling unit 420 is used to call the heterogeneous computing power module to sort the x data columns to be sorted in the first data table respectively, and obtain x sorting results, where x is a positive integer greater than 1 and not greater than n;

[0127] The summarization unit 430 is used to obtain the sorting result of the first data table based on the priority order of the x data columns and the x sorting results.

[0128] The acquisition unit 410, the invocation unit 420, and the summarization unit 430 can all be implemented in software or in hardware. For example, the implementation of the summarization unit 430 will be described below. Similarly, the implementation of the acquisition unit 410 and the invocation unit 420 can refer to the implementation of the summarization unit 430.

[0129] As an example of a software functional unit, the aggregation unit 430 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, the aforementioned computing instance may be one or more. For example, the aggregation unit 430 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0130] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0131] As an example of a hardware functional unit, the aggregation unit 430 may include at least one computing device, such as a server. Alternatively, the aggregation unit 430 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0132] The aggregation unit 430 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the aggregation unit 430 includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the invocation unit 420 includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0133] It should be noted that, in other embodiments, the acquisition unit 410, the calling unit 420, and the summarizing unit 430 can all be used to execute any step in the data sorting method. The steps implemented by the acquisition unit 410, the calling unit 420, and the summarizing unit 430 can be specified as needed. By implementing different steps in the data sorting method through the acquisition unit 410, the calling unit 420, and the summarizing unit 430, all functions of the data sorting device can be achieved.

[0134] This application also provides a computing device 100. For example... Figure 5 As shown, the computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 100.

[0135] Bus 102 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus 102 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (e.g., memory 106, processor 104, communication interface 108).

[0136] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0137] Memory 106 may include volatile memory, such as random access memory (RAM). Processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0138] The memory 106 stores executable program code, which the processor 104 executes to implement the functions of the aforementioned acquisition unit 410, calling unit 420, and summarizing unit 430, thereby realizing the data sorting method. In other words, the memory 106 stores instructions for executing this data sorting method.

[0139] Alternatively, the memory 106 stores executable code, which the processor 104 executes to implement the functions of the aforementioned data sorting device, thereby implementing the data sorting method. That is, the memory 106 stores instructions for executing the data sorting method.

[0140] The communication interface 108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 100 and other devices or communication networks.

[0141] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0142] like Figure 6 As shown, the computing device cluster includes at least one computing device 100. The memory 106 of one or more computing devices 100 in the computing device cluster may store the same instructions for executing data sorting methods.

[0143] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the data sorting method. In other words, a combination of one or more computing devices 100 can jointly execute the instructions for executing the data sorting method.

[0144] It should be noted that the memory 106 in different computing devices 100 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data sorting device. That is, the instructions stored in the memory 106 of different computing devices 100 can implement the functions of one or more modules in the acquisition unit 410, the calling unit 420, and the summarizing unit 430.

[0145] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 7 One possible implementation is shown. For example... Figure 7 As shown, the two computing devices 100A and 100B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this possible implementation, the memory 106 in computing device 100A stores instructions for executing the functions of the acquisition unit 410 and the aggregation unit 430. Meanwhile, the memory 106 in computing device 100B stores instructions for executing the functions of the calling unit 420.

[0146] It should be understood that Figure 7 The functions of the computing device 100A shown can also be performed by multiple computing devices 100. Similarly, the functions of the computing device 100B can also be performed by multiple computing devices 100.

[0147] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... Figure 6 and Figure 7 The connection method of the computing device cluster is different in that the memory 106 of one or more computing devices 100A in the computing device cluster can store the same instructions for executing the data sorting method.

[0148] In some possible implementations, the memory of one or more computing devices 100B in the computing device cluster may also store partial instructions for executing the data sorting method. In other words, a combination of one or more computing devices can jointly execute the instructions for executing the data sorting method.

[0149] It should be noted that the memory 106 in different computing devices 100A within the computing device cluster can store different instructions for executing some functions of the data sorting device. That is, the instructions stored in the memory 106 of different computing devices 100A can implement the functions of one or more devices in the cloud service system.

[0150] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a data sorting method.

[0151] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a data sorting method, or instruct the computing device to perform a data sorting method.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data sorting method, characterized in that, The method includes: Obtain a first data table, which is a table with m rows and n columns, where m and n are positive integers greater than 1; The heterogeneous computing power module is invoked to sort the x data columns to be sorted in the first data table, resulting in x sorting results, where x is a positive integer greater than 1 and not greater than n. The sorting result of the first data table is obtained based on the priority order of the x data columns and the x sorting results.

2. The method according to claim 1, characterized in that, The step of obtaining the sorting result of the first data table based on the priority order of the x data columns and the x sorting results includes: The first data table is sorted according to the sorting result corresponding to the data column with the highest priority to obtain the intermediate data table; If there are identical data items in the highest priority data column of the intermediate data table, the data rows to which the identical data items belong are sorted according to the sorting result corresponding to the second highest priority data column.

3. The method according to claim 2, characterized in that, The data items in the i-th row to the i+j-th row of the highest priority data column in the intermediate data table are the same; the sorting of the data rows to which the same and adjacent data items belong according to the sorting result corresponding to the second highest priority data column includes: Determine j+1 target data rows to be sorted, where the j+1 data rows are the data rows to which the data items in the i-th row to the data items in the i+j-th row belong; Search the sorting results corresponding to the second highest priority data column to determine the order relationship of the j+1 target data rows; Based on the order relationship of the j+1 target data rows, sort the i-th to i+j-th data rows in the intermediate data table; Where i is a positive integer less than m, and i+j is a positive integer not greater than m.

4. The method according to any one of claims 1 to 3, characterized in that, The process of obtaining the first data table includes: Obtain the original data table; The original data table is split into multiple first data tables.

5. The method according to claim 4, characterized in that, The original data table is a table with p rows and x columns; splitting the original data table into multiple data tables includes: Based on a preset number of rows, the original data table is split into y first data tables; Where y*m≥p>(y-1)*m.

6. The method according to claim 5, characterized in that, The method further includes: From each of the first data tables, determine x data columns to be sorted, and determine x*y data columns to be sorted; The x*y columns of data to be sorted are serially sent to the heterogeneous computing module; Receive the x*y sorting results returned by the heterogeneous computing power module.

7. The method according to claim 6, characterized in that, The method further includes: In response to receiving the first sorting result returned by the heterogeneous computing power module, the step of sorting the original data table according to the sorting result is initiated.

8. A data sorting device, characterized in that, The device includes: The acquisition unit is used to acquire a first data table, which is a table with m rows and n columns, where m and n are positive integers greater than 1; The calling unit is used to call the heterogeneous computing power module to sort the x data columns to be sorted in the first data table respectively, and obtain x sorting results, where x is a positive integer greater than 1 and not greater than n; The summarization unit is used to obtain the sorting result of the first data table based on the priority order of the x data columns and the x sorting results.

9. The apparatus according to claim 8, characterized in that, The summarizing unit is specifically used to sort the first data table according to the sorting result corresponding to the data column with the highest priority to obtain an intermediate data table; if there are identical data items in the data column with the highest priority in the intermediate data table, the data rows to which the identical data items belong are sorted according to the sorting result corresponding to the data column with the second highest priority.

10. The apparatus according to claim 9, characterized in that, The data items in the i-th row of the highest priority data column in the intermediate data table are the same as the data items in the (i+j)-th row. The summarizing unit is specifically used to determine j+1 target data rows to be sorted, where the j+1 data rows are the data rows to which the data items in the i-th row belong to the data items in the i+j-th row; to search the sorting results corresponding to the second highest priority data column to determine the order relationship of the j+1 target data rows; and to sort the i-th to i+j-th data rows in the intermediate data table according to the order relationship of the j+1 target data rows; wherein i is a positive integer less than m, and i+j is a positive integer not greater than m.

11. The apparatus according to any one of claims 8 to 10, characterized in that, The acquisition unit is specifically used to acquire the original data table and split the original data table into multiple first data tables.

12. The apparatus according to claim 11, characterized in that, The original data table is a table with p rows and x columns; The acquisition unit is specifically used to split the original data table into y first data tables according to a preset number of rows; where y*m≥p>(y-1)*m.

13. The apparatus according to claim 12, characterized in that, The calling unit is specifically configured to determine x data columns to be sorted from each of the first data tables, and determine x*y data columns to be sorted; serially send the x*y data columns to be sorted to the heterogeneous computing power module; and receive the x*y sorting results returned by the heterogeneous computing power module.

14. The apparatus according to claim 13, characterized in that, The aggregation unit is specifically used to initiate the step of sorting the original data table according to the sorting result in response to obtaining the first sorting result returned by the heterogeneous computing power module.

15. A computing device, characterized in that, The computing device includes a processor and memory; The processor is configured to execute instructions stored in the memory to cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 7.

16. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, each computing device including a processor and memory: The memory is used to store instructions; The processor is configured to, according to the instructions, cause the computing device cluster to perform the operational steps of the method according to any one of claims 1 to 7.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computing device, cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 7.

18. A computer program product comprising instructions that, when run on a computing device, cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 7.