Application processing method, device, system and computer readable storage medium

By determining the correlation of data to be processed and dividing task shards in a distributed processing system, the inefficiency problem caused by unreasonable allocation of cluster resources is solved, and more efficient parallel processing and resource utilization are achieved.

CN111782348BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910271384.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-04
Publication Date
2024-09-20
Estimated Expiration
2039-04-04

AI Technical Summary

Technical Problem

Unreasonable resource allocation in clusters based on distributed processing systems leads to low parallel processing efficiency.

Method used

By determining the correlation between the data to be processed, the tasks are divided into shards and assigned to the executor node cluster for parallel processing. The correlation is used as the basis to allocate cluster resources to improve the parallel processing efficiency of the system.

Benefits of technology

It improves the parallel processing efficiency of the system, optimizes resource allocation, and improves the storage and processing speed of processing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111782348B
    Figure CN111782348B
Patent Text Reader

Abstract

The present disclosure relates to a method, device, system and computer-readable storage medium for processing an application, and relates to the field of computer technology. The method includes: in response to the application submitted by the user starting to run, determining the correlation between the data to be processed of the application; dividing the data to be processed according to the correlation; dividing the application into multiple task slices according to the division result; allocating each task slice to the corresponding executor node in the executor node cluster for parallel processing to obtain the processing result of each task slice. The technical solution disclosed in the present disclosure can improve the efficiency of parallel processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method for processing an application, a device for processing an application, a system for processing an application, and a computer-readable storage medium. Background Art

[0002] With the continuous development of computer technology and big data technology, image processing model algorithms based on a single physical computer are gradually developing towards big data and distributed parallel computing. For example, Apache Spark, as a big data processing framework built around speed, ease of use and complex analysis, has become a leader in image processing with its powerful iterative computing capabilities and is favored by major technology companies, related research institutions and open source communities at home and abroad.

[0003] In the related art, various tasks belonging to an application are processed in parallel based on cluster resources of a distributed processing system. Summary of the invention

[0004] The inventors of the present disclosure have discovered that the above-mentioned related technologies have the following problems: unreasonable allocation of cluster resources leads to low parallel processing efficiency.

[0005] In view of this, the present disclosure proposes a technical solution for processing an application program, which can improve the efficiency of parallel processing.

[0006] According to some embodiments of the present disclosure, a method for processing an application is provided, comprising: in response to an application submitted by a user starting to run, determining the correlation between each data to be processed of the application; dividing the data to be processed according to the correlation; dividing the application into multiple task slices according to the division result; and allocating each task slice to corresponding executor nodes in an executor node cluster for parallel processing to obtain the processing results of each task slice.

[0007] In some embodiments, determining the correlation between the data to be processed of the application includes: obtaining a storage path of the data to be processed of the application; and determining the correlation between the data to be processed according to the storage path.

[0008] In some embodiments, allocating each task slice to each executor node in the executor node cluster for parallel processing includes: applying to the executor node cluster for operating resources that match the size of each task slice; and allocating the multiple task slices to each executor node for parallel processing based on the operating resources.

[0009] In some embodiments, the processing method further includes: after receiving the processing results of each task slice returned by each executor node, sending the processing results to a database cluster for storage.

[0010] In some embodiments, the processing method further includes: receiving processing status of corresponding task slices periodically returned by each executor node.

[0011] In some embodiments, the application is submitted in a PySpark on k8s system, and source code of the PySpark onk8s system supports a user to submit the application on a non-cluster computer.

[0012] In some embodiments, the application is generated according to an image processing method developed by a user; and the data to be processed is a picture to be processed.

[0013] In some embodiments, said dividing the data to be processed according to the correlation includes: dividing the pictures to be processed according to the SKU (Stock Keeping Unit) to which the pictures to be processed belong.

[0014] According to other embodiments of the present disclosure, there is provided a processing device for an application, comprising: a determination unit, for determining, in response to an application submitted by a user starting to run, the correlation between each data to be processed of the application; a division unit, for dividing the data to be processed according to the correlation, and dividing the application into a plurality of task slices according to the division result; and an allocation unit, for allocating each task slice to corresponding each executor node in an executor node cluster for parallel processing, so as to obtain the processing result of each task slice.

[0015] According to some further embodiments of the present disclosure, there is provided a system for processing an application program, including: a driver node, for implementing the method for processing an application program in any one of the above embodiments; and an executor node cluster, for processing task slices of the application program in parallel.

[0016] In some embodiments, the processing system further includes: a data server, configured to provide the driver node with a storage path for each to-be-processed data of the application.

[0017] In some embodiments, the processing system further includes: a database cluster for storing processing results of the application sent by the driver node.

[0018] According to some further embodiments of the present disclosure, there is provided a device for processing an application, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method for processing the application in any one of the above embodiments based on instructions stored in the memory device.

[0019] According to some further embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for processing an application program in any of the above embodiments is implemented.

[0020] In the above embodiment, the relationship characteristics between the related data are mined and analyzed according to the correlation between the related data of the application program. Cluster resources are allocated based on the correlation, which can improve the efficiency of parallel processing of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0023] Figure 1 A flowchart showing some embodiments of the processing method of the application program of the present disclosure;

[0024] Figure 2 Show Figure 1 Flowcharts of some embodiments of step 110;

[0025] Figure 3 Show Figure 1 Flowcharts of some embodiments of step 140;

[0026] Figure 4 A signaling diagram showing some embodiments of the processing method of the application of the present disclosure;

[0027] Figure 5 A block diagram showing some embodiments of a processing device for an application of the present disclosure;

[0028] Figure 6 A block diagram illustrating some embodiments of a processing system for an application of the present disclosure;

[0029] Figure 7 A block diagram showing some other embodiments of a processing device for an application program of the present disclosure;

[0030] Figure 8 A block diagram showing some further embodiments of a processing device for an application program of the present disclosure. DETAILED DESCRIPTION

[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0032] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0033] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0034] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0035] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0036] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0037] Figure 1 A flowchart showing some embodiments of the processing method of the application program of the present disclosure.

[0038] like Figure 1 As shown, the method includes: step 110, determining the correlation between each data to be processed; step 120, dividing each data to be processed; step 130, dividing the task slices; and step 140, allocating the task slices.

[0039] In step 110 , in response to the application submitted by the user starting to run, correlations between various to-be-processed data of the application are determined.

[0040] In some embodiments, the business personnel can encapsulate the developed image processing method into an application program. For example, if the business personnel want to implement the developed image processing method in the PySpark on k8s (Kubernetes) system, the image processing method can be encapsulated into a pySpark application program.

[0041] In some embodiments, business personnel can submit applications in the PySpark on k8s system, and the source code of the PySpark on k8s system supports users to submit the application on non-cluster computers. For example, source code for external submission in client mode in the PySpark on k8s system can be developed to enable business users to submit pySpark tasks on non-cluster clients (such as ordinary development clients).

[0042] In this way, the problem of limited task delivery scenarios by business personnel can be solved (relevant technical business personnel need to jump to the cluster client through a springboard machine to deliver the application program), thereby improving operational flexibility and work efficiency.

[0043] In some embodiments, Figure 2 The embodiment in determines the correlation between the data to be processed.

[0044] Figure 2 Show Figure 1 Flowchart of some embodiments of step 110 in FIG.

[0045] like Figure 2 As shown, step 110 includes: step 1110, obtaining a storage path; and step 1120, determining correlation.

[0046] In step 1110, the storage path of each to-be-processed data of the application program is obtained. For example, the storage path of the data can be obtained through a data server.

[0047] In some embodiments, the data to be processed may be a picture to be processed, and the data server may be a picture server. For example, after the pySpark application is run, the driver node (Driver end) may obtain the URL (Uniform Resource Locator) of the picture to be processed through the picture server and load it into the memory.

[0048] In step 1120, the correlation between the data to be processed is determined according to the storage path.

[0049] In some embodiments, the images to be processed belong to different categories of goods, and the SKU to which the images to be processed belong can be determined through the URL. It can be determined that the images to be processed under the same SKU are related.

[0050] After determining the correlation between the data to be processed, you can continue to use Figure 1 The remaining steps in process the application.

[0051] In step 120, the data to be processed are divided according to the relevance. In some embodiments, the data to be processed can be divided into multiple data sets according to the relevance. For example, the URLs under the same SKU tag can be aggregated into one data set according to the SKU tag.

[0052] In step 130, the application is divided into a plurality of task slices according to the partitioning result. In some embodiments, the application can be divided into a plurality of task slices according to a plurality of data sets. For example, the number of partitions in the RDD (Resilient Distributed Dataset) can be set according to the number of determined SKU tags to achieve adaptive dynamic partition setting.

[0053] In step 140, each task slice is assigned to the corresponding executor node in the executor node cluster for parallel processing to obtain the processing result of each task slice. Figure 3 The embodiment in implements step 140.

[0054] Figure 3 Show Figure 1 Flowchart of some embodiments of step 140 in FIG.

[0055] like Figure 3 As shown, step 140 includes: step 1410, applying for operating resources; and step 1420, allocating task slices.

[0056] In step 1410, the execution resource matching the size of each task slice is applied to the executor node cluster. For example, the driver side applies for the execution resource through the API (Application Programming Interface) server of the Kubernetes executor node cluster according to the adaptive partition size.

[0057] In step 1420, multiple task slices are allocated to each executor node for parallel processing according to the operating resources. For example, the driver distributes the image processing task to each executor node in the executor node cluster for execution according to the adaptive partitioning and operating resource application.

[0058] In some embodiments, each Executor receives the task information sent by the Driver and performs the corresponding image processing. The Driver can receive the processing status of the corresponding task slices periodically returned by each executor node.

[0059] In some embodiments, after receiving the processing results of each task slice returned by each executor node, the processing results are sent to the database cluster for storage. For example, the Driver receives the image processing results of each Executor and summarizes them until the entire task is completed and then inserts the processing results into the database cluster (such as a Mysql cluster) in batches. This unified storage method avoids the problems of low storage efficiency and reduced system processing speed caused by frequent read and write operations on the database.

[0060] Figure 4 A signaling diagram illustrating some embodiments of the processing method of the application of the present disclosure.

[0061] like Figure 4 As shown, in event 410, in response to the execution of the application program, the driver node obtains the storage address of the data to be processed from the data server.

[0062] In event 420, the driver node divides each data to be processed according to data dependencies.

[0063] In event 430, the driver node divides the application into a plurality of task slices according to the division result.

[0064] In event 440, the driver node applies for operating resources from the data server according to the division of task slices.

[0065] In event 450, the driver node allocates tasks to each executor node in the executor node cluster according to the requested operating resources and task slices.

[0066] At event 460, each executor node in the executor node cluster processes its own task slice in parallel.

[0067] In event 470, each executor node periodically returns its processing status to the driver node.

[0068] In event 480, each executor node periodically returns its processing result to the driver node.

[0069] In event 490, the driver node aggregates the processing results of each executor node and sends them to the database cluster for storage.

[0070] In the above embodiment, the relationship characteristics between the related data are mined and analyzed according to the correlation between the related data of the application program. Cluster resources are allocated based on the correlation, which can improve the efficiency of parallel processing of the system.

[0071] Figure 5 A block diagram illustrating some embodiments of a processing device for an application of the present disclosure.

[0072] like Figure 5 As shown, the application processing device 5 includes a determination unit 51 , a division unit 52 and an allocation unit 53 .

[0073] The determination unit 51 starts running in response to the application submitted by the user, and determines the correlation between the data to be processed of the application. The division unit 52 divides the data to be processed according to the correlation, and divides the application into multiple task slices according to the division result. The allocation unit 53 allocates each task slice to the corresponding executor node in the executor node cluster for parallel processing to obtain the processing result of each task slice.

[0074] In some embodiments, the determining unit 51 obtains the storage path of each to-be-processed data of the application program, and determines the correlation between each to-be-processed data according to the storage path.

[0075] In some embodiments, the allocation unit 53 applies to the executor node cluster for operating resources that match the size of each task slice. The allocation unit 53 allocates multiple task slices to each executor node for parallel processing according to the operating resources.

[0076] In some embodiments, the processing device 5 further includes a receiving unit 54 and a sending unit 55. The receiving unit 54 receives the processing status and processing results of the corresponding task slices periodically returned by each executor node. After the receiving unit 54 receives the processing results of each task slice returned by each executor node, the sending unit 55 sends the processing results to the database cluster for storage.

[0077] In some embodiments, the application is submitted in the PySpark on k8s system, and the source code of the PySpark on k8s system supports users to submit applications on non-cluster computers.

[0078] In some embodiments, the application is generated according to the image processing method developed by the user, and the data to be processed are pictures to be processed. The dividing unit 52 divides each picture to be processed according to the SKU to which each picture to be processed belongs.

[0079] In the above embodiment, the relationship characteristics between the related data are mined and analyzed according to the correlation between the related data of the application program. Cluster resources are allocated based on the correlation, which can improve the efficiency of parallel processing of the system.

[0080] Figure 6 A block diagram illustrating some embodiments of a processing system for an application of the present disclosure.

[0081] like Figure 6As shown, the application processing system 6 includes: a driver node 61, which is used to implement the application processing method in any of the above embodiments; and an executor node cluster 62, which is used to process each task slice of the application in parallel.

[0082] In some embodiments, the processing system 6 further includes a data server 63 for providing the driver node with a storage path for each data to be processed of the application.

[0083] In some embodiments, the processing system 6 further includes a database cluster 64 for storing processing results of the application programs sent from the driver nodes.

[0084] In the above embodiment, the relationship characteristics between the related data are mined and analyzed according to the correlation between the related data of the application program. Cluster resources are allocated based on the correlation, which can improve the efficiency of parallel processing of the system.

[0085] Figure 7 A block diagram showing some other embodiments of a processing device for an application program of the present disclosure.

[0086] like Figure 7 As shown, the processing device 7 of the application in this embodiment includes: a memory 71 and a processor 72 coupled to the memory 71, and the processor 72 is configured to execute the processing method of the application in any embodiment of the present disclosure based on the instructions stored in the memory 71.

[0087] The memory 71 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, a database, and other programs.

[0088] Figure 8 A block diagram showing some further embodiments of a processing device for an application program of the present disclosure.

[0089] like Figure 8 As shown, the processing device 8 of the application of this embodiment includes: a memory 810 and a processor 820 coupled to the memory 810, and the processor 820 is configured to execute the processing method of the application in any one of the aforementioned embodiments based on the instructions stored in the memory 810.

[0090] The memory 810 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0091] The application processing device 8 may also include an input / output interface 830, a network interface 840, a storage interface 850, etc. These interfaces 830, 840, 850, the memory 810, and the processor 820 may be connected, for example, via a bus 860. The input / output interface 830 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 840 provides a connection interface for various networked devices. The storage interface 850 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0092] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0093] So far, the processing method of the application program, the processing device of the application program, the processing system of the application program, and the computer-readable storage medium according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed herein.

[0094] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0095] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A method for processing an application, comprising: In response to the application submitted by the user starting to run, determining the correlation between the various data to be processed of the application; According to the correlation, the data to be processed are divided; According to the division result, the application is divided into a plurality of task slices; Allocate each task slice to the corresponding executor node in the executor node cluster for parallel processing to obtain the processing results of each task slice; Wherein, determining the correlation between the various to-be-processed data of the application program includes: Obtaining a storage path of each to-be-processed data of the application, wherein the storage path is used to determine the stock keeping unit (SKU) to which each to-be-processed data belongs; Determine, according to the storage path, the correlation between the data to be processed, wherein the data to be processed belonging to the same SKU are correlated; The dividing the data to be processed according to the correlation includes: The data to be processed are divided according to the SKUs to which the data to be processed belong.

2. The processing method according to claim 1, wherein: The step of allocating each task slice to each executor node in the executor node cluster for parallel processing includes: Applying to the executor node cluster for operating resources that match the size of each task slice; According to the operating resources, the multiple task slices are allocated to the executor nodes for parallel processing.

3. The processing method according to claim 1, further comprising: After receiving the processing results of the task slices returned by the executor nodes, the processing results are sent to the database cluster for storage.

4. The processing method according to claim 1, further comprising: Receive the processing status of the corresponding task slices regularly returned by each executor node.

5. The processing method according to any one of claims 1 to 4, wherein: The application is submitted in the PySpark on k8s system, and the source code of the PySpark on k8s system supports the user to submit the application on a non-cluster computer.

6. The processing method according to any one of claims 1 to 4, wherein: The application generates the data to be processed as a picture to be processed according to an image processing method developed by a user.

7. A device for processing an application, comprising: a determination unit, configured to determine the correlation between the various to-be-processed data of the application program in response to the application program submitted by the user starting to run; A partitioning unit, configured to partition the data to be processed according to the correlation, and to partition the application into a plurality of task slices according to the partitioning result; An allocating unit, used for allocating each task slice to corresponding executor nodes in the executor node cluster for parallel processing, so as to obtain processing results of each task slice; Wherein, determining the correlation between the various to-be-processed data of the application program includes: Obtaining a storage path of each to-be-processed data of the application, wherein the storage path is used to determine the stock keeping unit (SKU) to which each to-be-processed data belongs; Determine, according to the storage path, the correlation between the data to be processed, wherein the data to be processed belonging to the same SKU are correlated; The dividing the data to be processed according to the correlation includes: The data to be processed are divided according to the SKUs to which the data to be processed belong.

8. A system for processing an application, comprising: A driver node, used to implement the processing method of the application program according to any one of claims 1 to 6; A cluster of executor nodes is used to process each task slice of the application in parallel.

9. The processing system of claim 8, further comprising: The data server is used to provide the driver node with the storage path of each to-be-processed data of the application.

10. The processing system of claim 8, further comprising: The database cluster is used to store the processing results of the application sent by the driver node.

11. A device for processing an application, comprising: Memory; and A processor coupled to the memory, wherein the processor is configured to execute the application processing method according to any one of claims 1 to 6 based on instructions stored in the memory device.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for processing an application program according to any one of claims 1 to 6 is implemented.