Distributed computing method, device, equipment and storage medium

Through the distributed computing method, user codes are parsed and tasks are divided, which solves the problem of low computing efficiency of large amounts of data and significantly improves the processing and analysis efficiency of remote sensing data and other fields.

CN116775276BActive Publication Date: 2024-09-06ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310535030.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2024-09-06
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

The calculation process of large amounts of data is slow, which reduces the efficiency of data processing and analysis, especially in fields such as remote sensing satellites and autonomous vehicles.

Method used

Through the distributed computing method, the code written by the user is obtained, parsed into a syntax tree, a logical execution plan is generated, operators are connected, computing tasks are divided, and the tasks are distributed to multiple distributed computing nodes for parallel execution.

Benefits of technology

It greatly improves the efficiency of processing and analyzing large amounts of data, especially in remote sensing data processing, which improves the speed and efficiency of the calculation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775276B
    Figure CN116775276B
Patent Text Reader

Abstract

The present disclosure relates to a distributed computing method, apparatus, device and storage medium. The present disclosure obtains the code written by the user on the user interface, parses the code into a syntax tree, and generates one or more logical execution plans according to the syntax tree. Then, for each logical execution plan in the one or more logical execution plans, the operators are connected according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and the computing link is divided into multiple computing tasks, and the multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain the computing results for the target data. When the target data is a large amount of data, such as a large amount of remote sensing data, the method described in this embodiment distributes the processing and analysis process of the large amount of remote sensing data to multiple distributed computing nodes for parallel execution, which greatly improves the efficiency of processing and analyzing the large amount of remote sensing data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information technology, and in particular to a distributed computing method, apparatus, device and storage medium. Background Art

[0002] At present, a large amount of data is generated in some application scenarios. For example, in the remote sensing satellite industry, a large amount of remote sensing data is generated. Autonomous driving vehicles generate a large amount of perception data during road testing.

[0003] However, due to the large amount of calculation for a large amount of data, the calculation process for a large amount of data is slow, which reduces the efficiency of processing and analyzing a large amount of data. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a distributed computing method, apparatus, device and storage medium to improve the efficiency of processing and analyzing the large amount of remote sensing data.

[0005] In a first aspect, an embodiment of the present disclosure provides a distributed computing method, including:

[0006] Acquire a code written by a user on a user interface, where the code is used to describe a calculation logic for target data;

[0007] Parsing the code into a syntax tree, and generating one or more logical execution plans according to the syntax tree;

[0008] For each of the one or more logical execution plans, connecting the operators according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and dividing the computing link into multiple computing tasks;

[0009] The multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain computing results for the target data.

[0010] In a second aspect, an embodiment of the present disclosure provides a distributed computing device, including:

[0011] An acquisition module, used to acquire a code written by a user on a user interface, wherein the code is used to describe a calculation logic for target data;

[0012] A parsing module, used for parsing the code into a syntax tree;

[0013] A generation module, used to generate one or more logical execution plans according to the syntax tree;

[0014] A connection module, configured to connect the operators in each of the one or more logical execution plans according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and divide the computing link into multiple computing tasks;

[0015] The distribution module is used to distribute the multiple computing tasks to multiple distributed computing nodes for parallel execution to obtain computing results for the target data.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0017] Memory;

[0018] Processor; and

[0019] Computer programs;

[0020] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0021] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.

[0022] The distributed computing method, apparatus, device and storage medium provided by the embodiments of the present disclosure obtain the code written by the user on the user interface, parse the code into a syntax tree, and generate one or more logical execution plans according to the syntax tree. Then, for each logical execution plan in the one or more logical execution plans, the operators are connected according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and the computing link is divided into multiple computing tasks, and the multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain the computing results for the target data. When the target data is a large amount of data, such as a large amount of remote sensing data, the method described in this embodiment can distribute the processing and analysis process of the large amount of remote sensing data to multiple distributed computing nodes for parallel execution, which greatly improves the efficiency of processing and analysis of the large amount of remote sensing data. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 A flow chart of a distributed computing method provided by an embodiment of the present disclosure;

[0026] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0027] Figure 3 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0028] Figure 4 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0029] Figure 5 A basic architecture diagram of the entire system provided for another embodiment of the present disclosure;

[0030] Figure 6 A schematic diagram of the structure of a distributed computing device provided in an embodiment of the present disclosure;

[0031] Figure 7 A schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. DETAILED DESCRIPTION

[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0034] It should be noted that the user codes (including but not limited to codes written by users on the user interface, or codes written by users through software development tools, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] In addition, the distributed computing method provided in this application involves the following terminology explanations, the details of which are as follows:

[0036] ECI: Elastic Container Instance is an agile and secure serverless container operation service. You don't need to manage the underlying server, you only need to provide a packaged image to run the container.

[0037] Serverless, also known as serverless, emphasizes an architectural concept and service model that allows developers to focus on application business logic instead of worrying about infrastructure (servers, etc.). Serverless is also the next generation of computing engine.

[0038] STAC: The Spatio Temporal Asset Catalog (STAC) family of specifications aims to standardize the way geospatial asset metadata is structured and queried, which is any file that represents information about the Earth at a certain place and time.

[0039] Distributed: A distributed system is a system consisting of a group of computer nodes that communicate through a network and coordinate their work to complete a common task.

[0040] Spark: is a memory-based, general-purpose, and scalable distributed big data computing engine framework.

[0041] Remote sensing: refers to non-contact, long-distance detection technology, generally refers to the use of sensors and remote sensors to detect the radiation and reflection characteristics of electromagnetic waves of objects.

[0042] RDD: It is a resilient distributed dataset. RDD is the abbreviation of Resilient Distributed Dataset.

[0043] Kyuubi: is a distributed and multi-tenant gateway that provides query services such as SQL and code for data lake query engines such as Spark.

[0044] Data lake: is a place where data sets are stored, such as a data storage space.

[0045] In the remote sensing satellite industry, how to quickly process and analyze a large amount of remote sensing data has become an urgent problem to be solved. In addition, a large amount of remote sensing data is not only generated in the remote sensing satellite industry, but also in other scenarios. For example, a large amount of perception data is generated during road testing of autonomous vehicles. However, due to the large amount of calculation required for a large amount of data, the calculation process of a large amount of data is slow, which reduces the efficiency of processing and analyzing a large amount of data.

[0046] To address this problem, an embodiment of the present disclosure provides a distributed computing method, which is described below in conjunction with a specific embodiment.

[0047] Figure 1 A flow chart of a distributed computing method provided in an embodiment of the present disclosure. The method can be executed by a distributed computing device, which can be implemented in software and / or hardware, and can be configured in an electronic device, such as a server. The server can specifically be a cloud server. For example, a number of cloud servers can be deployed in the cloud, and each cloud server has computing, storage and other processing resources. In the cloud, multiple cloud servers can be organized to provide a certain service. Of course, a cloud server can also provide one or more services. The cloud can provide the service by providing a service interface to the outside, and the user calls the service interface to use the corresponding service. The service interface includes a software development kit (SDK), an application programming interface (API), and the like. Therefore, the distributed computing method provided in this embodiment can be executed by multiple cloud servers in the cloud, or it can be executed by one cloud server. Assuming that a cloud server executes the distributed computing method as an example, the cloud server can specifically be as follows Figure 2 In addition, the distributed computing method described in this embodiment can be applied to the following Figure 2 The application scenario shown in Figure 1. Figure 2 As shown, the application scenario includes a terminal 21 and a server 22, wherein the terminal 21 specifically includes a mobile phone, a computer or a tablet computer, etc. Figure 2 This method is described in detail. Figure 1 As shown, the specific steps of this method are as follows:

[0048] S101. Obtain a code written by a user on a user interface, where the code is used to describe a calculation logic for target data.

[0049] For example Figure 2The terminal 21 shown may be a user terminal. The terminal 21 may be provided with a user interface, and the user may write code on the user interface. The code describes the calculation logic of the target data according to the user's business needs. The target data may be a large amount of data such as remote sensing data and perception data as described above. Further, the terminal 21 may send the code written by the user on the user interface to the server 22.

[0050] S102: Parse the code into a syntax tree, and generate one or more logical execution plans according to the syntax tree.

[0051] After receiving the code written by the user, the server 22 may parse the code into a syntax tree.

[0052] Optionally, parsing the code into a syntax tree includes: abstracting the input, output and operation of each part in the code; and arranging the input, output and operation of each part into the syntax tree using a preset data structure.

[0053] For example, the server 22 may abstract the input, output, and operation of each part of the code, and then use a preset data structure such as Java Script Object Notation (JSON) to rearrange the input, output, and operation of each part of the code into a syntax tree, for example, an abstract syntax tree (AST).

[0054] Further, the server 22 may generate one or more logical execution plans based on the syntax tree. It is understandable that the logical execution plan is a mapping of the syntax tree, and some optimization operations may be performed when generating the logical execution plan. Therefore, the logical execution plan may be a subset of the syntax tree.

[0055] S103. For each logical execution plan in the one or more logical execution plans, connect the operators according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and divide the computing link into multiple computing tasks.

[0056] Since the syntax tree includes the operations of each part of the code, each logical execution plan includes at least some of the operations in the code, each operation can be regarded as a function, and a function can be regarded as an operator, so each logical execution plan can include multiple operators. Since there are certain front-to-back dependencies between the operations in the code, there are also certain front-to-back dependencies between the operators in each logical execution plan. Therefore, according to the front-to-back dependencies between the operators in each logical execution plan, the operators in each logical execution plan can be connected respectively to form a computing link (Directed Acyclic Graph, DAG) corresponding to each logical execution plan. Furthermore, the computing link can also be divided into multiple computing tasks, each of which is an execution task with a task as the smallest computing unit.

[0057] S104: Distribute the multiple computing tasks to multiple distributed computing nodes for parallel execution to obtain computing results for the target data.

[0058] Further, the server 22 may distribute the multiple computing tasks to multiple distributed computing nodes for parallel execution. For example, the server 22 divides the syntax tree into two logical execution plans. Since each logical execution plan may correspond to a computing link, the server 22 may generate two computing links. Further, the server 22 may divide each computing link into multiple computing tasks. For example, one of the computing links may be divided into multiple computing tasks, and the other computing link may also be divided into multiple computing tasks. Further, the server 22 may distribute the multiple computing tasks into which one of the computing links is divided to multiple distributed computing nodes for parallel execution. The multiple distributed computing nodes may be, for example, Figure 3 The computing nodes 31, 32, ..., 33 are shown. In addition, the server 22 can also distribute the multiple computing tasks divided into another computing link to multiple distributed computing nodes for parallel execution. The multiple distributed computing nodes can be, for example, Figure 3 The computing nodes 34, 35, ..., and 36 are shown. Specifically, for each of the computing nodes 31, 32, ..., 33, 34, 35, ..., and 36, at least one computing task can be executed on the computing node. After the computing node completes the at least one computing task, the computing result of the at least one computing task can be returned to the server 22. The server 22 can determine the computing result of the target data according to the computing results respectively returned by the computing nodes 31, 32, ..., 33, 34, 35, ..., and 36.

[0059] In addition, if the server 22 divides the syntax tree into a logical execution plan, since the logical execution plan may correspond to a computing link, the server 22 may generate a computing link. Further, the server 22 may divide the computing link into multiple computing tasks, and distribute the multiple computing tasks to multiple distributed computing nodes for parallel execution. The multiple distributed computing nodes may be, for example, Figure 4 The computing nodes 41, 42, ..., and 43 are shown. Each of the computing nodes 41, 42, ..., and 43 can execute at least one computing task. After the computing node completes the at least one computing task, the computing result of the at least one computing task can be returned to the server 22. The server 22 can determine the computing result of the target data according to the computing results respectively returned by the computing nodes 41, 42, ..., and 43.

[0060] The disclosed embodiment obtains the code written by the user on the user interface, parses the code into a syntax tree, and generates one or more logical execution plans based on the syntax tree. Then, for each logical execution plan in the one or more logical execution plans, the operators are connected according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and the computing link is divided into multiple computing tasks, and the multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain the computing results for the target data. When the target data is a large amount of data, such as a large amount of remote sensing data, the method described in this embodiment can distribute the processing and analysis process of the large amount of remote sensing data to multiple distributed computing nodes for parallel execution, which greatly improves the efficiency of processing and analysis of the large amount of remote sensing data.

[0061] Below Figure 5 The distributed computing method described in this embodiment is described in detail using the example of FIG. Figure 5 The following is the basic architecture diagram of the whole system. The system mainly consists of three parts: the first part is from the user to the second load balancer, the second part is from the second load balancer to the data publishing service, and the third part is as follows: Figure 5The right part shown. Among them, the first part is the request access layer. For example, when a user edits code on a web page, the web page can provide an interactive web page for the user terminal by calling the Jupyter notebook running in the server cluster. Further, the Software Development Kit (SDK) engine service parses the code and converts the code into a logical execution plan. The code is used to describe the calculation logic for the target data, and the corresponding calculation types are divided into online calculation (Interactive) and offline calculation (Batch). The second part is the operator chain call layer, which parses the incoming logical execution plan and generates a physical execution plan that can be executed according to the logical execution plan. The calculation results after execution are output in different ways according to different calculation types. The third part is the resource scheduling layer. Before the calculation request arrives, the environment needs to be initialized and the calculation resources are allocated. Through configuration, resources are applied to the container cluster management system (Kubernetes, referred to as K8S). When there are sufficient resources, the pod is started to pull up the computing node. Among them, in the Kubernetes cluster, Pod is the basis of all business types and the smallest unit level managed by K8S. It is a combination of one or more containers. These containers share storage, network, and namespace, as well as specifications for how to run. In a Pod, all containers are arranged and scheduled in the same way and run in a shared context. For specific applications, Pod is their logical host, and Pod contains multiple application containers related to the business.

[0062] Specifically, in Figure 5 In the illustrated embodiment, the distributed computing method specifically includes the following steps:

[0063] Step 1: Convert the code into a syntax tree.

[0064] For example, the user writes code on the interactive web page provided by Jupyter Notebook. This embodiment does not limit the programming language used by the user when writing the code. For example, it can be a computer programming language such as Python. The code describes the calculation logic of the target data such as remote sensing data or other perception data according to the user's business needs. Further, the SDK Engine Service converts the code into a syntax tree. Specifically, the input, output and operation of each part of the code are abstracted, and then the input, output and operation are rearranged into a syntax tree using the data structure of JSON. The syntax tree can be recorded as FunctionJson. Specifically, the syntax tree contains all the computing logic and computing nodes required by the code, which is convenient for the optimization and execution of subsequent iterative calculations. Among them, the SDK Engine Service can be deployed in one or more cloud servers in the cloud, or the SDK Engine Service can be deployed on one or more computers in the cluster.

[0065] Step 2: Distribute user requests by computing type.

[0066] For example, overall computing is divided into two categories: online computing and offline computing. Online computing usually has higher requirements for low latency, and for online computing, it is necessary to split the target data to be processed into multiple sub-data, and then calculate the multiple sub-data in parallel, and respond to the user quickly based on the parallel calculation results of the multiple sub-data. Offline computing belongs to the calculation of the entire large data set, with higher resolution accuracy and longer time consumption.

[0067] In a possible implementation, one or more logical execution plans are generated according to the syntax tree, including: if the calculation type for the target data is online calculation, splitting the target data into multiple sub-data; and generating a logical execution plan corresponding to each sub-data according to the position of each sub-data in the target data.

[0068] For example, the interactive web page includes not only a code editing area, but also control buttons, such as a submit button. After the user finishes editing the code on the interactive web page, he can click the submit button. At this time, the SDK Engine Service can receive the user request, which includes the code. Further, the SDK Engine Service converts the code into a syntax tree.

[0069] For online computing, the SDK Engine Service can send the syntax tree to the GeoServer, which splits the target data to be processed by the code into multiple sub-data. For example, the target data can be an image, which is stored in the Object Storage Service. The GeoServer can divide the image into multiple tiles, each of which is 256x256 in size, and each tile can be recorded as a sub-data. For example, the GeoServer splits the image into N tiles. Further, the GeoServer can determine the position information, i.e., the boundary information, of each of the N tiles in the image, and generate a logical execution plan corresponding to the tile based on the position information of each tile in the image and the syntax tree, that is, the syntax tree is split into N logical execution plans based on the position information of each tile in the image. In addition, the GeoServer can also generate N computing requests, each of which includes the position information of a tile and the logical execution plan corresponding to the tile. Then, the geoserver can distribute the N computing requests to the Spark gateways through Server Load Balance, and each Spark gateway can receive one or more computing requests. Spark is an open source cluster computing framework whose main purpose is to process data generated in real time.

[0070] For offline computing, there is no need to split the tiles, and the SDK Engine Service can send the syntax tree to a Spark gateway through load balancing. Generate one or more logical execution plans based on the syntax tree, including: if the calculation type for the target data is offline calculation, generate the logical execution plan based on the syntax tree. For example, in a feasible implementation, the Spark gateway can generate a logical execution plan based on the syntax tree. Alternatively, the SDK Engine Service can generate a logical execution plan based on the syntax tree, and then send the logical execution plan to a Spark gateway.

[0071] Step 3: Select computing nodes, manage and route computing requests.

[0072] For example, for online computing, after N computing requests are distributed to multiple Spark gateways, each Spark gateway uniformly routes and schedules the one or more computing requests it receives. For example, each Spark gateway can perform permission verification for each computing request it receives, select a serverless for each computing request, and forward the computing request to the serverless. Specifically, a serverless can receive one or more computing requests. In this embodiment, multiple geographic servers can constitute a cluster, multiple Spark gateways can constitute a cluster, and multiple serverless can constitute a cluster. These clusters can be different clusters or the same cluster. Among them, the nodes in each cluster can be horizontally expanded, for example, capacity expansion or contraction for different request levels, that is, adding or reducing nodes for different request levels. Among them, the Spark gateway and serverless can interact. Specifically, the Spark gateway can trigger the serverless to manage the start, stop and passive cancellation of the Spark computing instance and the computing request.

[0073] For offline computing, the Spark gateway can generate a logical execution plan based on the syntax tree. Alternatively, when the Spark gateway receives the logical execution plan sent by the SDK Engine Service, it can forward the logical execution plan to serverless.

[0074] Step 4: Operator chain call.

[0075] For example, each serverless can also correspond to a client, which can be a K8S client. The K8S client can interact with the K8S cluster. Specifically, the K8S cluster may include the following: Figure 5The main process (K8S Master), Spark driver process (Spark Driver Pod), and execution process (Executor Pod) are shown. Among them, K8SMaster includes a process scheduler (Pod Scheduler) and an application interface server (API Server). K8SMaster is used to apply for the resources required by Spark Driver Pod. After K8S Master applies for resources for Spark Driver Pod, K8S Master can schedule Spark Driver Pod, that is, start Spark Driver Pod. Specifically, K8SMaster and Spark Driver Pod can run on different servers in the K8S cluster, or K8S Master and Spark Driver Pod can run on the same server in the K8S cluster. When Spark Driver Pod is started, Spark Driver Pod can apply to K8S Master for the resources required by Executor Pod. After K8S Master allocates corresponding resources to each Executor Pod, K8S Master can schedule each Executor Pod, that is, start each Executor Pod. In addition, K8S Master can also send monitoring events for the execution process to Spark Driver Pod, so that Spark Driver Pod periodically obtains the heartbeat message of each Executor Pod so that Spark Driver Pod can determine whether each Executor Pod is alive. In addition, each Executor Pod can be registered in Spark Driver Pod, so that Spark Driver Pod can manage each Executor Pod, for example, start Executor Pod, stop Executor Pod.

[0076] For online computing, Figure 5Each serverless shown can receive one or more computing requests respectively. Furthermore, each serverless can send information to the K8S cluster through the K8S Client, which includes the address information of the Spark Driver Pod that has been started and selected by the serverless, system parameters, and the logical execution plan contained in each computing request. Among them, the system parameters may include the system parameters of the K8S Master, the system parameters of the Spark DriverPod, and the system parameters of the Executor Pod. Among them, the system parameters of the K8S Master may specifically be the central processing unit (CPU), memory, etc. occupied by the K8S Master. The system parameters of the Spark DriverPod may specifically be the CPU, memory, etc. occupied by the Spark Driver Pod. The system parameters of the Executor Pod may specifically be the CPU, memory, etc. occupied by the Executor Pod.

[0077] It is understandable that for online computing, a serverless can select one or more started Spark Driver Pods. In a feasible implementation, the number of computing requests received by the serverless is consistent with the number of started Spark Driver Pods selected by the serverless. For example, when the serverless receives a computing request, the serverless can select a started Spark Driver Pod. Further, the SparkDriver Pod can receive information, such as receiving information sent by the serverless, which includes the address information of the Spark DriverPod, system parameters, and the logical execution plan contained in the computing request. Further, the SparkDriver Pod can parse the logical execution plan. Then, according to the front-to-back dependency relationship between the operators in the logical execution plan, the operators in the logical execution plan are connected, such as serially connected, to generate a computing link. The core of the serial connection is the elastic distributed data set of Spark RDD, and each function in the logical execution plan acts on the RDD to form a completed computing link. In addition, during the concatenation process, a large number of optimization operations can be performed on the logical execution plan. For example, by pushing down predicates, data filtering and retrieval can be moved as far as possible before triggering the calculation to reduce useless data reading; by pruning and merging, duplicate nodes in the logical execution plan are deleted and merged to streamline the entire calculation link and avoid repeated calculations. In addition, during the concatenation process, the real calculation process is not triggered. Only when a special operator is encountered, the real calculation process is triggered. That is, when a special operator is encountered, the logical execution plan is converted to a physical execution plan, and the calculation link is divided into multiple calculation tasks. Serverless can deliver the multiple calculation tasks to the started Spark DriverPod. Further, the Spark Driver Pod submits multiple calculation tasks to the calculation node and obtains the calculation results. For example, the multiple calculation tasks are assigned to multiple Executor Pods managed by the Spark Driver Pod, so that each Executor Pod executes at least one calculation task, that is, one Executor Pod can be regarded as a calculation node.For another example, when serverless receives multiple computing requests, serverless can select a started Spark Driver Pod for each computing request, so that each Spark Driver Pod processes multiple computing tasks corresponding to one computing request. Similarly, each Spark Driver Pod can distribute multiple computing tasks corresponding to one computing request to multiple Executor Pods managed by the Spark Driver Pod, so that each Executor Pod executes at least one computing task. In another feasible implementation, the number of computing requests received by serverless is unrelated to the number of started Spark Driver Pods selected by serverless. For example, each started Spark Driver Pod selected by serverless processes at least multiple computing tasks corresponding to one computing request.

[0078] Optionally, the multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain computing results for the target data, including: for a logical execution plan corresponding to each sub-data, the multiple computing tasks corresponding to the logical execution plan are distributed to multiple distributed computing nodes for parallel execution to obtain computing results corresponding to each sub-data; based on the computing results corresponding to each sub-data, the computing results for the target data are generated.

[0079] For example, for online computing, when serverless receives one or more computing requests, each computing request includes the location information of a tile and the logical execution plan corresponding to the tile. Therefore, serverless can select a started Spark Driver Pod for each computing request it receives, and deliver multiple computing tasks corresponding to a computing request to a started Spark Driver Pod, so that the Spark Driver Pod distributes the multiple computing tasks to multiple Executor Pods, and each Executor Pod executes at least one computing task to obtain the computing result of each computing task. In addition, the multiple Executor Pods under the Spark Driver Pod can also feed back their respective computing results to the Spark Driver Pod, so that the Spark Driver Pod can generate the computing result of the tile corresponding to the computing request according to the computing result of each computing task in the multiple computing tasks. Further, the Spark Driver Pod can feed back the computing result of the tile to the serverless, and the serverless receives the computing results of the tiles fed back by each of the selected Spark Driver Pods, so that each serverless can receive the computing result of at least one tile. Furthermore, each serverless can transmit the calculation results of at least one tile it receives upward in sequence. When reaching the geographic server, the geographic server fuses the calculation results of each tile to obtain the calculation results of the target data, such as an image.

[0080] For offline computing, when serverless receives the logical execution plan, serverless sends information to the K8S cluster through K8SClient, which includes the address information of the Spark Driver Pod that has been started and selected by serverless, system parameters, and the logical execution plan. Further, the Spark Driver Pod receives the information and parses the logical execution plan. Then, according to the front-end and back-end dependencies between the operators in the logical execution plan, the operators in the logical execution plan are connected, such as in series, to generate a computing link. The Spark Driver Pod can divide the computing link into multiple computing tasks, and submit the multiple computing tasks to the computing node to obtain the computing results of the target data.

[0081] Step 5: Resource scheduling and scaling.

[0082] For example, for online computing or offline computing, when computing is actually triggered, DAG is divided into multiple computing tasks. In order to run each computing task, a computing node is applied to the K8S cluster. The computing node can be the Executor Pod described above. Assuming that multiple computing nodes are applied for, each computing node executes at least one computing task, so that the multiple computing tasks can be executed in parallel on multiple computing nodes. The multiple computing nodes are recorded as multiple distributed computing nodes.

[0083] On the basis of the above embodiment, after distributing the multiple computing tasks to multiple distributed computing nodes for parallel execution, the method also includes: if the number of the computing tasks is greater than a preset threshold, increasing the number of the distributed computing nodes; if the time length during which the distributed computing nodes are in an idle state is greater than or equal to a preset time length, reclaiming the computing resources of the distributed computing nodes.

[0084] For example, when the number of computing tasks that the DAG is divided into is greater than the preset threshold, the system will automatically pull up computing nodes that match the number for expansion computing. If there are no computing tasks that need to be calculated at present, and the computing node is in an idle state for a time greater than or equal to the preset time, the computing node can be automatically paused and the computing resources of the computing node can be recovered to the K8S cluster so that the K8S cluster can use it for the next allocation. In this way, computing resources can be fully utilized, capacity can be expanded when busy, and capacity can be reduced when idle, avoiding unnecessary waste of resources.

[0085] Step 6: Display and persist the calculation results.

[0086] For online computing, the method also includes: displaying the calculation results of the target data on the user interface. For example, each serverless can receive the calculation results of at least one tile. Serverless can compress and escape the calculation results of each tile to form a template format that can be recognized by the geographic server. Further, each serverless can transmit the calculation results of at least one tile it receives upward in sequence. When it reaches the geographic server, the geographic server merges the calculation results of each tile to obtain the calculation results of the target data, such as an image. Further, the geographic server sends the calculation results of the image to the SDK Engine Service, and the SDK Engine Service displays the calculation results of the image in a user interface, such as an interactive web page where the user programming is located, so that the user can view it.

[0087] For offline computing, after distributing the multiple computing tasks to multiple distributed computing nodes for parallel execution and obtaining the computing results for the target data, the method further includes: storing the computing results of the target data in the form of a distributed file in the object storage server; and sending the distributed file to the user terminal based on the user's download request for the distributed file. For example, the computing results of the target data are stored in the form of a distributed file on the OSS, and then a data publishing service is triggered based on the user's download request for the distributed file, thereby sending the distributed file to the user terminal, which can specifically be a user terminal that displays an interactive web page. Specifically, the user terminal can display the download address of the distributed file on the interactive web page, and when the user clicks on the download address, the OSS sends the distributed file to the user terminal, so that the user terminal downloads the distributed file locally.

[0088] In this embodiment, the distributed computing method can be executed by multiple cloud servers in the cloud, and the multiple cloud servers can include the SDK Engine Service, geographic server, Spark gateway, serverless, K8S cluster, OSS, etc. as shown above.

[0089] In this embodiment, the user writes code on an interactive web page, making the operation simple, flexible, and easy to expand operators, thereby lowering the threshold for users such as remote sensing professionals to use remote sensing data. Since the cloud server has a wealth of professional remote sensing function computing capabilities, users can make arbitrary combinations to meet various complex demand scenarios. In addition, when ultra-large-scale remote sensing data is divided into multiple tiles, the distributed tile computing based on the pyramid layering can act on the RDD chain computing rules between multiple operators for each tile, thereby greatly improving complex computing capabilities and computing efficiency. In addition, since the tile data is calculated in memory, the input / output (IO) operations required for the intermediate results to fall to the disk during the calculation process are reduced, avoiding the interaction between traditional computing and disks and unnecessary network IO. In addition, by dynamically scaling the computing nodes, tasks of different computing types can give full play to their computing characteristics and use resource scaling to complete the dynamic adjustment of distributed computing.

[0090] Figure 6 The distributed computing device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the distributed computing method, such as Figure 6 As shown, the distributed computing device 60 includes:

[0091] An acquisition module 61 is used to acquire a code written by a user on a user interface, where the code is used to describe a calculation logic for target data;

[0092] A parsing module 62, used for parsing the code into a syntax tree;

[0093] A generating module 63, configured to generate one or more logical execution plans according to the syntax tree;

[0094] A connection module 64 is used to connect the operators in each of the one or more logical execution plans according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and divide the computing link into multiple computing tasks;

[0095] The distribution module 65 is used to distribute the multiple computing tasks to multiple distributed computing nodes for parallel execution to obtain computing results for the target data.

[0096] Optionally, the distributed computing device 60 also includes: an adding module 66 and a recycling module 67; after the distribution module 65 distributes the multiple computing tasks to multiple distributed computing nodes for parallel execution, if the number of the computing tasks is greater than a preset threshold, the adding module 66 is used to increase the number of the distributed computing nodes; if the time length during which the distributed computing nodes are in an idle state is greater than or equal to a preset time length, the recycling module 67 is used to recycle the computing resources of the distributed computing nodes.

[0097] Optionally, when the parsing module 62 parses the code into a syntax tree, it is specifically used to:

[0098] Abstract the input, output, and operations of each part of the code;

[0099] The input, output and operation of each part are arranged into the syntax tree using a preset data structure.

[0100] Optionally, when the generating module 63 generates one or more logical execution plans according to the syntax tree, it is specifically used to:

[0101] If the calculation type for the target data is online calculation, split the target data into multiple sub-data;

[0102] According to the position of each sub-data in the target data, a logical execution plan corresponding to each sub-data is generated.

[0103] Optionally, the distribution module 65 distributes the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution, and obtains the computing results for the target data, specifically for:

[0104] For the logic execution plan corresponding to each sub-data, multiple computing tasks corresponding to the logic execution plan are distributed to multiple distributed computing nodes for parallel execution to obtain the computing results corresponding to each sub-data;

[0105] A calculation result for the target data is generated according to the calculation result corresponding to each sub-data.

[0106] Optionally, the distributed computing device 60 further includes: a display module 68, configured to display the calculation result of the target data on the user interface.

[0107] Optionally, when the generating module 63 generates one or more logical execution plans according to the syntax tree, it is specifically used to: if the calculation type for the target data is offline calculation, generate the logical execution plan according to the syntax tree.

[0108] Optionally, the distributed computing device 60 further includes: a storage module 69 and a sending module 610. After the distribution module 65 distributes the multiple computing tasks to multiple distributed computing nodes for parallel execution and obtains the computing results for the target data, the storage module 69 is used to store the computing results for the target data in the object storage server in the form of a distributed file; the sending module 610 is used to send the distributed file to the user terminal based on the user's download request for the distributed file.

[0109] Figure 6 The distributed computing device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.

[0110] The internal functions and structure of the distributed computing device are described above, and the device can be implemented as an electronic device. Figure 7 This is a schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. Figure 7 As shown, the electronic device includes a memory 71 and a processor 72 .

[0111] The memory 71 is used to store programs. In addition to the above-mentioned programs, the memory 71 can also be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0112] The memory 71 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0113] The processor 72 is coupled to the memory 71 and executes the program stored in the memory 71 to:

[0114] Acquire a code written by a user on a user interface, where the code is used to describe a calculation logic for target data;

[0115] Parsing the code into a syntax tree, and generating one or more logical execution plans according to the syntax tree;

[0116] For each of the one or more logical execution plans, connecting the operators according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and dividing the computing link into multiple computing tasks;

[0117] The multiple computing tasks are distributed to multiple distributed computing nodes for parallel execution to obtain computing results for the target data.

[0118] Further, if Figure 7 As shown, the electronic device may also include: a communication component 73, a power component 74, an audio component 75, a display 76 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.

[0119] The communication component 73 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 73 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 73 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0120] The power supply assembly 74 provides power to various components of the electronic device. The power supply assembly 74 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

[0121] The audio component 75 is configured to output and / or input audio signals. For example, the audio component 75 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 71 or sent via the communication component 73. In some embodiments, the audio component 75 also includes a speaker for outputting audio signals.

[0122] The display 76 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0123] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the distributed computing method described in the above embodiment.

[0124] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0125] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A distributed computing method, wherein: The method comprises: Acquire a code written by a user on a user interface, where the code is used to describe a calculation logic for target data; Parsing the code into a syntax tree, and generating one or more logical execution plans according to the syntax tree, wherein the logical execution plan is a subset of the syntax tree, each logical execution plan includes at least part of the operations in the code, and each operation corresponds to an operator; For each of the one or more logical execution plans, connecting the operators according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and dividing the computing link into multiple computing tasks; Distributing the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution to obtain computing results for the target data; The calculation types for the target data include online calculation and offline calculation; Generate one or more logical execution plans according to the syntax tree, including: If the calculation type for the target data is online calculation, split the target data into multiple sub-data; Generate a logic execution plan corresponding to each sub-data according to the position of each sub-data in the target data; Generate one or more logical execution plans according to the syntax tree, including: If the calculation type for the target data is offline calculation, the logical execution plan is generated according to the syntax tree.

2. The method according to claim 1, wherein: After distributing the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution, the method further comprises: If the number of computing tasks is greater than a preset threshold, increasing the number of distributed computing nodes; If the time duration during which the distributed computing node is in an idle state is greater than or equal to a preset time duration, the computing resources of the distributed computing node are recycled.

3. The method according to claim 1, wherein: Parse the code into a syntax tree, including: Abstract the input, output, and operations of each part of the code; The input, output and operation of each part are arranged into the syntax tree using a preset data structure.

4. The method according to claim 1, wherein: Distributing the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution to obtain computing results for the target data includes: For the logic execution plan corresponding to each sub-data, multiple computing tasks corresponding to the logic execution plan are distributed to multiple distributed computing nodes for parallel execution to obtain the computing results corresponding to each sub-data; A calculation result for the target data is generated according to the calculation result corresponding to each sub-data.

5. The method according to claim 4, wherein: The method further comprises: The calculation result of the target data is displayed on the user interface.

6. The method according to claim 1, wherein: After distributing the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution and obtaining computing results for the target data, the method further includes: Storing the calculation results of the target data in the form of distributed files in an object storage server; Based on a user's download request for the distributed file, the distributed file is sent to a user terminal.

7. A distributed computing device, wherein: include: An acquisition module, used to acquire a code written by a user on a user interface, wherein the code is used to describe a calculation logic for target data; A parsing module, used for parsing the code into a syntax tree; A generating module, configured to generate one or more logic execution plans according to the syntax tree, wherein the logic execution plan is a subset of the syntax tree, each logic execution plan includes at least some operations in the code, and each operation corresponds to an operator; A connection module, configured to connect the operators in each of the one or more logical execution plans according to the dependency relationship between the operators in the logical execution plan to form a computing link corresponding to the logical execution plan, and divide the computing link into multiple computing tasks; A distribution module, used to distribute the plurality of computing tasks to a plurality of distributed computing nodes for parallel execution, so as to obtain computing results for the target data; The calculation types for the target data include online calculation and offline calculation; When the generating module generates one or more logical execution plans according to the syntax tree, it is specifically used to: If the calculation type for the target data is online calculation, split the target data into multiple sub-data; Generate a logic execution plan corresponding to each sub-data according to the position of each sub-data in the target data; When the generating module generates one or more logic execution plans according to the syntax tree, it is specifically used to: if the calculation type for the target data is offline calculation, generate the logic execution plan according to the syntax tree.

8. An electronic device, wherein: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.