Data processing method and system

By performing cache partition preprocessing in the distributed big data processing framework of the CPU and sending the data to the deep learning framework of the GPU for training, the problem of separation between the big data processing framework and the deep learning framework during data fusion is solved and the depth is improved. Training efficiency and training time of the learning model.

CN112035261BActive Publication Date: 2024-10-01BEIJING MOMO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010954887.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-11
Publication Date
2024-10-01
Estimated Expiration
2040-09-11

AI Technical Summary

Technical Problem

The existing big data processing framework and deep learning framework are fragmented during data fusion, resulting in low training efficiency of deep learning models, and the big data processing framework lacks deep learning capabilities, and the deep learning framework lacks big data preprocessing capabilities.

Method used

By performing cache partition preprocessing of sample data in the distributed big data processing framework cluster of the CPU, converting the preprocessed data into partition preprocessed data in Apache Arrow format, and sending it to the deep learning framework cluster of the GPU for training. Use multi-threading to store and train deep learning models.

Benefits of technology

It realizes data transmission based on a single cache partition, reduces the performance time of the CPU big data processing framework cluster, improves the training efficiency of the deep learning model, and shortens the training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112035261B_ABST
    Figure CN112035261B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method and system. The CPU-based distributed big data processing framework cluster includes multiple preprocessing processes. Each preprocessing process processes the sample data in the cache partition corresponding to itself. When the sample data processing of any cache partition is completed, the data obtained by preprocessing the cache partition is sent to the GPU-based deep learning framework cluster. The deep learning framework cluster trains the deep learning model immediately after receiving the partition preprocessing data. After each preprocessing of a single cache partition is completed, data transmission is performed, which reduces the performance time consumption caused by the big data processing framework cluster to uniformly collect data distributed in various preprocessing processes. At the same time, the partition preprocessing data that has been preprocessed first can be first transmitted to the deep learning framework cluster for training, which can increase the training efficiency of the deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method and system. Background Art

[0002] At present, big data applications are in the ascendant, and open big data processing frameworks such as Hadoop, Spark, and Flink have emerged. Generally speaking, they are committed to solving problems in the storage of large amounts of data, batch computing, traditional machine learning, and graph computing. On the other hand, artificial intelligence technologies represented by deep learning have shown their prowess in images, videos, voices, and texts, and deep learning frameworks such as TensorFlow and PyTorch have emerged.

[0003] In fact, the storage and computing of structured data are generally completed in big data processing frameworks represented by Hadoop / Spark. There is a natural gap in data fusion between these big data processing frameworks and deep learning frameworks represented by TensoFlow / PyTorch. This is a problem faced by both the big data and deep learning communities.

[0004] Big data processing frameworks represented by Hadoop / Spark have big data processing capabilities, but do not have deep learning capabilities. Deep learning frameworks such as TensorFlow / PyTorch only have deep learning capabilities and weak pre-processing capabilities for big data. Due to the advantages and limitations of the two types of frameworks, in the field of big data intelligence, Figure 1 As shown, two sets of environments are built, one set is used to build a big data processing framework cluster in the CPU environment, and the other set is used to build a deep learning framework cluster in the GPU (Graphics Processing Unit) environment. During the specific operation, the big data processing framework cluster is used to complete the preprocessing of all sample data, and all the preprocessed data obtained are written to the disk. Then all the preprocessed data in the big data processing framework cluster disk is copied to the disk of the deep learning framework cluster. The deep learning framework cluster reads data from the local environment disk and then performs deep learning model training. The deep learning model obtained by training is migrated to the big data processing framework cluster, and the subsequent links are completed based on the deep learning model.

[0005] However, the inventors found in their research that although the above method utilized the respective advantages of the big data processing framework and the deep learning framework, it only simply "added" the two frameworks, and the training efficiency of the deep learning model was still low. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide a data processing method and system to increase the training efficiency of the deep learning model. The specific technical solution is as follows:

[0007] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0008] The CPU-based distributed big data processing framework cluster allocates sample data to be processed to each preprocessing process of the cluster, wherein, for each preprocessing process, the sample data to be processed allocated by the preprocessing process is stored in the cache partition corresponding to the preprocessing process;

[0009] For each preprocessing process, the CPU-based distributed big data processing framework cluster uses the preprocessing process to preprocess the sample data in the corresponding cache partition;

[0010] When any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the CPU-based distributed big data processing framework cluster converts the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, and sends the partition preprocessing data to the GPU-based deep learning framework cluster;

[0011] After receiving the partition preprocessing data, the GPU-based deep learning framework cluster trains a preset deep learning model based on the partition preprocessing data.

[0012] In a possible implementation, when any preprocessing process completes preprocessing of sample data in a cache partition corresponding to itself, the CPU-based distributed big data processing framework cluster converts the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, and sends the partition preprocessing data to the GPU-based deep learning framework cluster, including:

[0013] When any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the CPU-based distributed big data processing framework cluster converts the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes multiple unit data; and sends each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster.

[0014] In a possible implementation, after receiving the partition preprocessing data, the GPU-based deep learning framework cluster trains a preset deep learning model based on the partition preprocessing data, including:

[0015] The GPU-based deep learning framework cluster stores the received unit data in a shared memory using a multi-threaded manner, and simultaneously trains a preset deep learning model using the unit data in the shared memory.

[0016] In a possible implementation, the preset format is the Apache Arrow format, and the unit data is Arrow Record Batch unit data;

[0017] The sending of each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster includes: using a Socket client to send each Arrow Record Batch unit data of the partition preprocessing data to a Socket server in the GPU-based deep learning framework cluster;

[0018] The GPU-based deep learning framework cluster uses a multi-threaded method to store the received unit data in a shared memory, including: the GPU-based deep learning framework cluster uses a multi-threaded method to store the Arrow Record Batch unit data received by its own Socket server in a shared memory.

[0019] In a possible implementation, the CPU-based distributed big data processing framework cluster is a CPU-based Apache Spark framework cluster, and the GPU-based deep learning framework cluster is a GPU-based TensorFlow framework cluster.

[0020] In a second aspect, an embodiment of the present application provides a data processing system, the system comprising:

[0021] A CPU-based distributed big data processing framework cluster and a GPU-based deep learning framework cluster, wherein the CPU-based distributed big data processing framework cluster includes multiple preprocessing processes;

[0022] The CPU-based distributed big data processing framework cluster is used to obtain sample data and allocate sample data to be processed for each preprocessing process, wherein, for each preprocessing process, the sample data allocated to the preprocessing process is stored in the cache partition corresponding to the preprocessing process; each preprocessing process is used to process the sample data in the cache partition corresponding to each preprocessing process; when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the data obtained by preprocessing the cache partition is converted into a preset format to obtain partition preprocessing data, and the partition preprocessing data is sent to the GPU-based deep learning framework cluster;

[0023] The GPU-based deep learning framework cluster is used to train a preset deep learning model based on the partition preprocessing data after receiving the partition preprocessing data.

[0024] In one possible implementation, the CPU-based distributed big data processing framework cluster is specifically used to: when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, convert the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes multiple unit data; and send each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster.

[0025] In a possible implementation, the GPU-based deep learning framework cluster is specifically used to: store the received unit data in a shared memory using a multi-threaded manner, and train a preset deep learning model using the unit data in the shared memory.

[0026] In a possible implementation, the preset format is the Apache Arrow format, and the unit data is Arrow Record Batch unit data;

[0027] The CPU-based distributed big data processing framework cluster is specifically used to: use its own Socket client to send each Arrow Record Batch unit data of the partition pre-processing data to the Socket server in the GPU-based deep learning framework cluster;

[0028] The GPU-based deep learning framework cluster is specifically used to store Arrow Record Batch unit data received by its own Socket server into a shared memory in a multi-threaded manner.

[0029] In a possible implementation, the CPU-based distributed big data processing framework cluster is a CPU-based Apache Spark framework cluster, and the GPU-based deep learning framework cluster is a GPU-based TensorFlow framework cluster.

[0030] The data processing method and system provided by the embodiment of the present application, the CPU-based distributed big data processing framework cluster includes multiple preprocessing processes, each preprocessing process processes the sample data in the cache partition corresponding to itself, and when the sample data processing of any cache partition is completed, the partition preprocessing data obtained by preprocessing the sample data in the cache partition is sent to the GPU-based deep learning framework cluster, and the GPU-based deep learning framework cluster immediately trains the deep learning model after receiving the partition preprocessing data. Compared with all sample data being copied to the GPU-based deep learning framework cluster after all preprocessing is completed, data transmission with a single cache partition as the basic unit can be achieved, reducing the performance time consumption caused by the CPU-based big data processing framework cluster to uniformly collect data distributed in various preprocessing processes, and at the same time, the partition preprocessing data that has been preprocessed first can be first transmitted to the GPU-based deep learning framework cluster for training, which can increase the training efficiency of the deep learning model. Of course, the implementation of any product or method of the present application does not necessarily require all the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A schematic diagram of a deep learning model training method based on big data in the prior art;

[0033] Figure 2 A first schematic diagram of a data processing method according to an embodiment of the present application;

[0034] Figure 3a A schematic diagram of the total training time of a deep learning model in the data processing method of an embodiment of the present application;

[0035] Figure 3b A schematic diagram of the total training time of a deep learning model in the prior art;

[0036] Figure 4 A second schematic diagram of the data processing method according to an embodiment of the present application;

[0037] Figure 5 A third schematic diagram of the data processing method according to an embodiment of the present application;

[0038] Figure 6A schematic diagram of a partition preprocessing data transmission method in a data processing method according to an embodiment of the present application;

[0039] Figure 7 A schematic diagram of a data processing system according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] 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 only 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.

[0041] First, the professional terms in this application are explained.

[0042] Heterogeneous: In this application, heterogeneous computing refers to CPU+GPU collaborative computing.

[0043] Distributed: In this application, it refers to distributed computing, which is a software system built on the Internet. It studies how to divide a problem that requires huge computing power to solve into many small parts, then distribute these small parts to many computers for processing, and finally combine these calculation results to get the final result.

[0044] Big data processing framework: represented by Hadoop / Spark, it aims to complete big data analysis and processing software in a distributed manner.

[0045] Deep learning framework: represented by TensorFlow / PyTorch, it is software designed to implement deep learning algorithm models.

[0046] Apache Spark: A big data processing framework, an open source Hadoop MapReduce-like distributed computing framework from the University of California, Berkeley, that provides functions including SQL, ML, GraphX, etc.

[0047] Apache Arrow: A memory-based columnar storage format that greatly reduces data copying and conversion between upper-level computing frameworks due to its unified data storage function.

[0048] TensorFlow: A deep learning framework that uses data flow graphs, developed, maintained and open sourced by Google Brain.

[0049] The existing training methods of deep learning models based on big data are as follows: Figure 1As shown, the big data processing framework cluster is used to complete the preprocessing of all sample data, and all the preprocessed data is written to the disk. Then all the preprocessed data in the big data processing framework cluster disk is copied to the disk of the deep learning framework cluster. The deep learning framework cluster reads data from the local environment disk and then trains the deep learning model. The trained deep learning model is migrated to the big data processing framework cluster, and the subsequent links are completed based on the deep learning model. However, based on the characteristics of big data itself, the amount of data that needs to be preprocessed is very huge, and the data preprocessing itself will take a lot of time. When the data preprocessing logic is completed, it is very time-consuming to train the deep learning model, resulting in low training efficiency of the deep learning model based on big data.

[0050] In view of this, an embodiment of the present application provides a data processing method, the method comprising:

[0051] The CPU-based distributed big data processing framework cluster allocates sample data to be processed to each preprocessing process of the cluster, wherein, for each preprocessing process, the sample data to be processed allocated by the preprocessing process is stored in the cache partition corresponding to the preprocessing process;

[0052] For each preprocessing process, the CPU-based distributed big data processing framework cluster uses the preprocessing process to preprocess the sample data in the corresponding cache partition;

[0053] When any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the CPU-based distributed big data processing framework cluster converts the preprocessed data for the cache partition into a preset format to obtain partition preprocessed data, and sends the partition preprocessed data to the GPU-based deep learning framework cluster;

[0054] After receiving the partition preprocessing data, the GPU-based deep learning framework cluster trains a preset deep learning model based on the partition preprocessing data.

[0055] In an embodiment of the present application, a CPU-based distributed big data processing framework cluster includes multiple preprocessing processes, each preprocessing process processes the sample data in its corresponding cache partition respectively, and when the sample data processing of any cache partition is completed, the partition preprocessing data obtained by preprocessing the sample data in the cache partition is sent to a GPU-based deep learning framework cluster, and the GPU-based deep learning framework cluster immediately trains the deep learning model after receiving the partition preprocessing data. Compared with all sample data being copied to a GPU-based deep learning framework cluster after all preprocessing is completed, data transmission with a single cache partition as the basic unit can be achieved, reducing the performance time consumption caused by the CPU-based big data processing framework cluster to uniformly collect data distributed in various preprocessing processes, and at the same time, the partition preprocessing data that has been preprocessed first can be first transmitted to the GPU-based deep learning framework cluster for training, which can increase the training efficiency of the deep learning model.

[0056] The following is a detailed description, see Figure 2 , Figure 2 A schematic diagram of a data processing method according to an embodiment of the present application includes:

[0057] S11, the CPU-based distributed big data processing framework cluster allocates sample data to be processed to each preprocessing process of itself, wherein, for each preprocessing process, the sample data to be processed allocated by the preprocessing process is stored in the cache partition corresponding to the preprocessing process.

[0058] The CPU-based distributed big data processing framework cluster in the embodiment of the present application can be a cluster of any distributed big data processing architecture built on the CPU. In addition to the CPU, the distributed big data processing framework cluster can also include hardware such as memory and network card. The specific construction process of the distributed big data processing framework cluster can refer to the construction process in the relevant technology. In a possible implementation, the above-mentioned CPU-based distributed big data processing framework cluster is a CPU-based Apache Spark framework cluster.

[0059] The CPU-based distributed big data processing framework cluster includes multiple preprocessing processes. The preprocessing process is a preprocessing program allowed by hardware resources such as CPU and memory, which is used to preprocess sample data. The cache partition is a storage area in the memory. Optionally, each preprocessing program corresponds to a cache partition, and a cache partition corresponds to only one preprocessing program. The CPU-based distributed big data processing framework cluster allocates a portion of the full sample data to each preprocessing process. For any preprocessing process, the sample data to be processed allocated to the preprocessing process is stored in the cache partition corresponding to the preprocessing process.

[0060] S12, for each preprocessing process, the CPU-based distributed big data processing framework cluster uses the preprocessing process to preprocess the sample data in the corresponding cache partition.

[0061] Each preprocessing process is used to preprocess the sample data in its own cache partition. The form of preprocessing here can be set according to the actual situation. For example, algorithms such as data mining algorithms can be used to extract, clean and transform the sample data.

[0062] S13, when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the above-mentioned CPU-based distributed big data processing framework cluster will convert the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, and send the above-mentioned partition preprocessing data to the GPU-based deep learning framework cluster.

[0063] Each preprocessing process preprocesses the sample data in its corresponding cache partition. When any preprocessing process completes the preprocessing of the sample data in one of its own cache partitions, the data obtained by the preprocessing process preprocessing the sample data in the cache partition is converted into a preset format. The data converted into the preset format is called partition preprocessing data. The CPU-based distributed big data processing framework cluster sends the partition preprocessing data to the GPU-based deep learning framework cluster. The preset format can be a pass format, and it is necessary to ensure that the GPU-based deep learning framework cluster can recognize and use the data in this format to train the deep learning model.

[0064] Due to the different amounts of sample data assigned, different preprocessing speeds of different sample data, different processing speeds of the preprocessing process itself, etc., different preprocessing processes may take different times to process their corresponding sample data. The preprocessing process is used as the basic unit for data transmission. Whenever a preprocessing process completes the preprocessing of its own sample data, it converts the data preprocessed by the preprocessing process into a preset format and sends it to the GPU-based deep learning framework cluster.

[0065] S14, after receiving the partition preprocessing data, the GPU-based deep learning framework cluster trains a preset deep learning model based on the partition preprocessing data.

[0066] The GPU-based deep learning framework cluster in the embodiment of the present application can be a cluster of any deep learning framework built on GPU. In addition to GPU, the deep learning framework cluster can also include hardware such as memory and network card. The specific construction process of the deep learning framework cluster can refer to the construction process in the relevant technology. In one possible implementation, the above-mentioned GPU-based deep learning framework cluster is a GPU-based TensorFlow framework cluster. The preset deep learning model is the deep learning model that needs to be trained, and can be customized according to actual requirements.

[0067] When the GPU-based deep learning framework cluster receives the first partition preprocessed data, it immediately uses the partition preprocessed data to train the preset deep learning model. At this time, some preprocessing processes in the CPU-based distributed big data processing framework cluster may still be preprocessing sample data. Therefore, the overall deep learning model training time of the embodiment of the present application is as follows: Figure 3a As shown, using the existing technology, after all the sample data are trained, the data is copied. When the same deep learning model is obtained, the training time of the deep learning model is as follows: Figure 3b It can be seen that the embodiments of the present application can effectively shorten the training time of the deep learning model and increase the training efficiency of the deep learning model.

[0068] In an embodiment of the present application, a CPU-based distributed big data processing framework cluster includes multiple preprocessing processes, each preprocessing process processes the sample data in its corresponding cache partition respectively, and when the sample data processing of any cache partition is completed, the partition preprocessing data obtained by preprocessing the sample data in the cache partition is sent to a GPU-based deep learning framework cluster, and the GPU-based deep learning framework cluster immediately trains the deep learning model after receiving the partition preprocessing data. Compared with all sample data being copied to a GPU-based deep learning framework cluster after all preprocessing is completed, data transmission with a single cache partition as the basic unit can be achieved, reducing the performance time consumption caused by the CPU-based big data processing framework cluster to uniformly collect data distributed in various preprocessing processes, and at the same time, the partition preprocessing data that has been preprocessed first can be first transmitted to the GPU-based deep learning framework cluster for training, which can increase the training efficiency of the deep learning model.

[0069] In one possible implementation, see Figure 4, the above S13, when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the above CPU-based distributed big data processing framework cluster converts the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, and sends the above partition preprocessing data to the GPU-based deep learning framework cluster, including:

[0070] S131, when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, the CPU-based distributed big data processing framework cluster converts the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes multiple unit data; and sends each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster.

[0071] In an embodiment of the present application, the partitioned preprocessed data includes multiple unit data, and the partitioned preprocessed data is sent to a GPU-based deep learning framework cluster in the form of unit data, thereby realizing data flow processing in the form of a pipeline, which can improve the training efficiency of the deep learning model.

[0072] In one possible implementation, see Figure 4 In the above S14, after receiving the above partition preprocessing data, the GPU-based deep learning framework cluster trains a preset deep learning model based on the above partition preprocessing data, including:

[0073] S141, the GPU-based deep learning framework cluster stores the received unit data in a shared memory using a multi-threaded method, and trains a preset deep learning model using the unit data in the shared memory.

[0074] In an embodiment of the present application, the deep learning model is trained while the shared memory storage unit data of the GPU-based deep learning framework cluster is being stored, rather than waiting until all the data is put into the shared memory before starting the training.

[0075] In an embodiment of the present application, a GPU-based deep learning framework cluster stores received unit data in a shared memory in a multi-threaded manner, and the data is processed in a pipeline flow. At the same time, the unit data in the shared memory is used to train the deep learning model, which can increase the immediacy of deep learning model training and improve the training efficiency of the deep learning model.

[0076] In a possible implementation manner, the preset format is the Apache Arrow format, and the unit data is the Arrow Record Batch unit data;

[0077] The sending of each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster includes: using a Socket client to send each Arrow Record Batch unit data of the partition preprocessing data to a Socket server in the GPU-based deep learning framework cluster;

[0078] The above-mentioned GPU-based deep learning framework cluster uses a multi-threaded method to store the received unit data in a shared memory, including: the above-mentioned GPU-based deep learning framework cluster uses a multi-threaded method to store the Arrow Record Batch unit data received by its own Socket server in a shared memory.

[0079] The Apache Arrow format is a columnar data storage format in main memory. As a unified storage format, Apache Arrow can reduce the time spent on copying and converting data between upper-level computing engines. Moreover, since the Apache Arrow format also performs a certain amount of data compression on the original data, the network transmission traffic of the Apache Arrow format is also reduced to a certain extent. Arrow Record Batch is a logical unit in the Apache Arrow format storage, which contains a specific number of rows and all columns of data, called Arrow Record Batch unit data, where each column is stored in columnar form.

[0080] In an embodiment of the present application, the Apache Arrow format is used to implement data partitioning and copy unit sending, and the Apache Arrow format performs a certain amount of data compression on the original data, which can further reduce the training time of the entire deep learning model, thereby improving the training efficiency of the deep learning model.

[0081] See also Figure 5 The following takes the CPU-based distributed big data processing framework cluster as the CPU-based ApacheSpark framework cluster and the GPU-based deep learning framework cluster as the GPU-based TensorFlow framework cluster as examples for explanation:

[0082] S21, the CPU-based Apache Spark framework cluster allocates sample data to be processed to each preprocessing process (Executor) of its own, wherein, for each Executor, the sample data to be processed allocated by the Executor is stored in a cache partition (Partition) corresponding to the Executor.

[0083] Executor is a process that implements distributed computing in the Apache Spark framework. It contains CPU and main memory resources, such as Figure 6 As shown, the Executor corresponds to at least one Partition, can cache data in the Partition, and accept and calculate computing tasks on the Partition.

[0084] S22, for each Executor, the CPU-based Apache Spark framework cluster uses the Executor to preprocess the sample data in its corresponding Partition.

[0085] The Executor can run data mining algorithms and perform preprocessing operations such as extraction, cleaning, and transformation on the sample data in its own Partition.

[0086] S23, when any Executor completes the preprocessing of sample data in a cache partition corresponding to itself, the CPU-based Apache Spark framework cluster converts the preprocessed data for the cache partition into the Apache Arrow format to obtain partition preprocessed data, wherein the partition preprocessed data includes multiple Arrow Record Batch unit data; at the same time, the CPU-based Apache Spark framework cluster uses its own Socket client to send each Arrow Record Batch unit data of the partition preprocessed data to the Socket server in the GPU-based TensorFlow framework cluster.

[0087] In each Executor process, the data of each Partition is converted into ArrowRecord Batch unit data in units of Partition. For each Partition, a Socket client is created to send Arrow Record Batch unit data to the Socket server.

[0088] S24, the GPU-based TensorFlow framework cluster uses multi-threading to store the Arrow Record Batch unit data received by its own Socket server into shared memory, and uses the data in the shared memory to train the preset deep learning model.

[0089] The GPU-based TensorFlow framework cluster starts the Socket server, specifies the IP and port, receives the network data from the Socket server, generates the TensorFlow Dataset, and completes the deep learning algorithm training. The Socket data sent by the Partition of the Apache Spark framework cluster can be read in a multi-threaded manner and stored in the shared memory. At the same time, a child process is started to read the shared memory data to promote the training of the deep learning model. In this way, when some Partitions in the Apache Spark framework cluster are still in the preprocessing stage and the other Partitions are still sending data based on the Socket, the TensorFlow framework cluster can already promote the batch algorithm training of the deep learning model based on the Socket data that arrived first. A pipeline-style data transmission and deep learning model training synchronization operation is formed, which improves the overall performance. For batch algorithm training of deep learning models, such pipeline training is only used for the first epoch data. This is because from the second epoch, the data in the GPU-based TensorFlow framework cluster has been completely collected, and the data is cached in the GPU, and no longer needs to be obtained through network transmission.

[0090] The present application also provides a data processing system. Figure 7 The system comprises:

[0091] A CPU-based distributed big data processing framework cluster 701 and a GPU-based deep learning framework cluster 702, wherein the CPU-based distributed big data processing framework cluster includes a plurality of pre-processing processes 7011;

[0092] The CPU-based distributed big data processing framework cluster 701 is used to obtain sample data and allocate sample data to be processed to each of the preprocessing processes 7011, wherein, for each preprocessing process 7011, the sample data allocated to the preprocessing process 7011 is stored in the cache partition corresponding to the preprocessing process 7011; each of the preprocessing processes 7011 is used to process the sample data in the cache partition corresponding to each of the preprocessing processes 7011; when any preprocessing process 7011 completes the preprocessing of the sample data in a cache partition corresponding to itself, the data obtained by preprocessing the cache partition is converted into a preset format to obtain partition preprocessing data, and the partition preprocessing data is sent to the GPU-based deep learning framework cluster 702;

[0093] The GPU-based deep learning framework cluster 702 is used to train a preset deep learning model based on the partition preprocessing data after receiving the partition preprocessing data.

[0094] In one possible implementation, the CPU-based distributed big data processing framework cluster 701 is specifically used for: when any preprocessing process completes the preprocessing of sample data in a cache partition corresponding to itself, converting the data obtained by preprocessing the cache partition into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes multiple unit data; and sending each unit data of the partition preprocessing data to the GPU-based deep learning framework cluster.

[0095] In a possible implementation, the GPU-based deep learning framework cluster 702 is specifically used to store the received unit data in a shared memory using a multi-threaded method, and train a preset deep learning model using the unit data in the shared memory.

[0096] In a possible implementation manner, the preset format is the Apache Arrow format, and the unit data is the Arrow Record Batch unit data;

[0097] The CPU-based distributed big data processing framework cluster 701 is specifically used to: use its own Socket client to send each Arrow Record Batch unit data of the partition pre-processing data to the Socket server in the GPU-based deep learning framework cluster;

[0098] The GPU-based deep learning framework cluster 702 is specifically used to store the Arrow Record Batch unit data received by its own Socket server into the shared memory by using a multi-threaded method.

[0099] In a possible implementation, the CPU-based distributed big data processing framework cluster 701 is a CPU-based Apache Spark framework cluster, and the GPU-based deep learning framework cluster 702 is a GPU-based TensorFlow framework cluster.

[0100] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.

[0101] It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope disclosed in this application. Relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0102] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0103] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: The CPU-based Apache Spark framework cluster allocates sample data to be processed to each preprocessing process Executor of the cluster, wherein for each preprocessing process Executor, the sample data to be processed allocated by the preprocessing process Executor is stored in a cache partition Partition corresponding to the preprocessing process Executor, and the CPU-based Apache Spark framework cluster includes multiple preprocessing process Executors, and the preprocessing process Executors correspond to the cache partition Partitions one by one; For each preprocessing process Executor, the CPU-based Apache Spark framework cluster uses the preprocessing process Executor to preprocess the sample data to be processed in the corresponding cache partition Partition; When any preprocessing process Executor completes the preprocessing of the sample data to be processed in a cache partition Partition corresponding to itself, the CPU-based Apache Spark framework cluster converts the data obtained by preprocessing the cache partition Partition into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes a plurality of unit data, the preset format is the Apache Arrow format, and the unit data is Arrow Record Batch unit data; and uses the Socket client to send each Arrow Record Batch unit data of the partition preprocessing data to the Socket server in the GPU-based TensorFlow framework cluster; The GPU-based TensorFlow framework cluster stores the Arrow Record Batch unit data received by its own Socket server in a shared memory by using a multi-threaded method, reads the unit data in the shared memory, and trains a preset deep learning model.

2. A data processing system, characterized in that: The system comprises: A CPU-based Apache Spark framework cluster and a GPU-based TensorFlow framework cluster, wherein the CPU-based Apache Spark framework cluster includes a plurality of preprocessing process Executors, and the preprocessing process Executors correspond to cache partitions Partitions one by one; The CPU-based Apache Spark framework cluster is used to obtain sample data to be processed and allocate the sample data to be processed to each of the preprocessing process Executors, wherein for each preprocessing process Executor, the sample data to be processed allocated to the preprocessing process Executor is stored in the cache partition Partition corresponding to the preprocessing process Executor; each of the preprocessing process Executors is used to preprocess the sample data to be processed in the cache partition Partition corresponding to each of the preprocessing process Executors; when any preprocessing process Executor completes the preprocessing of the sample data to be processed in a cache partition Partition corresponding to itself, the data obtained by preprocessing the cache partition Partition is converted into a preset format to obtain partition preprocessing data, wherein the partition preprocessing data includes multiple unit data, the preset format is Apache Arrow format, and the unit data is Arrow Record Batch unit data; and the Socket client is used to send each Arrow Record Batch unit data of the partition preprocessing data to the Socket server in the GPU-based TensorFlow framework cluster; The GPU-based TensorFlow framework cluster is used to store Arrow Record Batch unit data received by its own Socket server in a shared memory in a multi-threaded manner, read the unit data in the shared memory, and train a preset deep learning model.