Data scientific task processing method and electronic equipment

By transforming data science tasks into dense tensor expressions and expressing them in a deep learning framework, the problem of inefficiency in processing traditional data science tasks on multi-class heterogeneous hardware is solved, and efficient data science task processing and engineering simplicity are achieved. .

CN119493931APending Publication Date: 2025-02-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311037004.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing technology is difficult to develop, deploy, optimize and connect traditional data science tasks in multiple types of heterogeneous hardware, resulting in inefficient processing.

Method used

By converting data science tasks into dense tensor expressions and using tensor operators in deep learning frameworks to express the calculation process of the original algorithm, the tensor abstract expression of data science tasks is realized, and then deployed on heterogeneous hardware.

Benefits of technology

It improves the processing efficiency of data science tasks, realizes engineering simplicity and portability, avoids the failure of data science tasks transformation, and better utilizes the parallelization and optimization acceleration functions of deep learning tensor operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493931A_ABST
    Figure CN119493931A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data scientific task processing method and electronic equipment. The method is applied to the electronic equipment and comprises the following steps: determining a semi-ring type capable of expressing a data scientific task and linear algebraic expression of data; based on the linear algebraic expression of the data, converting the linear algebraic expression into a dense tensor expression of the data; based on the dense tensor expression of the data, a computed dense tensor expression of the data science task is derived from the computed linear algebraic expression of the data science task. According to the method provided by the embodiment of the invention, the tensor abstraction expression of the data science task can be obtained, the conversion feasibility of the data science task is improved, the conversion failure of the data science task is avoided, and the method can be deployed on heterogeneous hardware based on a deep learning and reasoning framework to achieve the project simplicity and portability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer data analysis, and in particular to a data science task processing method and electronic device. Background Art

[0002] Data science tasks are the process of collecting, analyzing, and interpreting data from the real world to extract useful information. In the field of data analysis, data science tasks (such as graph computing / Structured Query Language (SQL) query / data analysis / machine learning reasoning, etc.) are an indispensable part of the training data processing stage before deep learning tasks.

[0003] With the explosive growth of data and the rapid development of computer technology, large-scale end-to-end traditional data science tasks are constantly developing and evolving, which has a crucial impact on industry efficiency. However, due to the lack of mature solutions for the unified development, deployment, optimization and end-to-end connection of traditional data science tasks on multiple types of heterogeneous hardware, most of these data science tasks are still executed using traditional hardware such as the Central Processing Unit (CPU). When performing data analysis and data processing for data science tasks, computing power limitations lead to low processing efficiency of data science tasks.

[0004] Therefore, a new method for processing data science tasks is needed to improve the processing efficiency of data science tasks. Summary of the invention

[0005] In order to improve the processing efficiency of data science tasks, the present application provides a data science task processing method and an electronic device, and the present application also provides a computer-readable storage medium.

[0006] The present application embodiment adopts the following technical solutions:

[0007] In a first aspect, the present application provides a data science task processing method, the method being applied to an electronic device, the method comprising:

[0008] Identify the types of semirings and linear algebraic representations of data that can be used to express data science tasks;

[0009] Based on the linear algebraic expression of the data, converting into a dense tensor expression of the data;

[0010] Based on the dense tensor expression of the data, a dense tensor expression of the computation of the data science task is derived according to the linear algebraic expression of the computation of the data science task.

[0011] According to the method of the embodiment of the present application, multi-dimensional tensors are used to replace the vectors or matrices in the linear algebra implementation of the original task, and the tensor operators in the deep learning framework are used to express the calculation process of the original algorithm. This can obtain a tensor abstract expression of the data science task, improve the feasibility of data science task transformation, avoid data science task transformation failure, and can be deployed on heterogeneous hardware based on the deep learning and reasoning framework to achieve engineering simplicity and portability.

[0012] In an implementation of the first aspect, the method further includes:

[0013] Based on the dense tensor expression of the calculation of the data science task, a deep learning training framework and a deep learning compilation framework are used to realize the processing of the data science task.

[0014] In an implementation of the first aspect, the data science task includes any one of a graph computing task, a data analysis task, and a machine learning reasoning task.

[0015] In an implementation of the first aspect, the data science task includes the graph computing task, and the semi-ring type of the graph computing task includes any one of enhancement increase, minimum enhancement, logical OR, maximum enhancement and minimum enhancement.

[0016] In an implementation of the first aspect, the data science task includes the data analysis task or the machine learning reasoning task, and the semi-ring type of the data analysis task or the machine learning reasoning task includes enhancement and increase.

[0017] In an implementation of the first aspect, the deriving, based on the dense tensor expression of the data and according to the linear algebraic expression of the calculation of the data science task, the dense tensor expression of the calculation of the data science task includes:

[0018] Identify the optimal deep learning framework operator based on the linear algebraic expression of the computation of the data science task;

[0019] Based on the dense tensor expression of the data, the optimal deep learning framework operator is used to combine and implement the original computing process of the data science task.

[0020] According to the above implementation, based on dense tensor expression, the optimal tensor operator combination is used to achieve faster computing speed and smaller storage space, and better utilize the parallelization and optimization acceleration functions of deep learning tensor operators to achieve performance improvement of the original task.

[0021] In an implementation of the first aspect, the determining the optimal deep learning framework operator according to the linear algebraic expression of the calculation of the data science task includes:

[0022] According to the linear algebraic expression of the calculation of the data science task, derive the calculation type corresponding to each step of the calculation;

[0023] According to the calculation type corresponding to each step of the calculation, determine the optimal deep learning framework operator corresponding to each step of the calculation.

[0024] In an implementation of the first aspect, determining, according to the calculation type corresponding to each step of the calculation, the optimal deep learning framework operator corresponding to each step of the calculation includes:

[0025] Based on the minimum tensor operation and / or the minimum number of operators, the optimal deep learning framework operator corresponding to each step of the calculation is determined.

[0026] In a second aspect, the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps described in the first aspect.

[0027] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Shown is a schematic diagram of the system architecture of HummingBird;

[0029] Figure 2 Shown is a schematic diagram of a decision tree as input;

[0030] Figure 3 Shown is based on Figure 1 A flowchart of data processing performed by the system shown;

[0031] Figure 4 FIG. 1 is a schematic diagram of a system architecture for processing data science tasks according to an embodiment of the present application;

[0032] Figure 5 The figure is a flow chart of a method for processing a data science task according to an embodiment of the present application;

[0033] Figure 6 It is a schematic diagram of a partial method flow for processing a data science task according to an embodiment of the present application;

[0034] Figure 7 FIG. 1 is a schematic diagram of a system architecture for processing data science tasks according to an embodiment of the present application;

[0035] Figure 8 Shown is a multi-node path diagram according to an embodiment of the present application;

[0036] Fig. 9 It is a schematic diagram of a calculation process under linear algebra expression according to an embodiment of the present application;

[0037] Fig.10 It is a schematic diagram of a calculation process under linear algebra expression according to an embodiment of the present application;

[0038] Fig.11 Shown is a multi-node path diagram according to an embodiment of the present application;

[0039] Fig.12 It is a schematic diagram of a calculation process under linear algebra expression according to an embodiment of the present application;

[0040] Fig.13 It is a schematic diagram of a calculation process under linear algebra expression according to an embodiment of the present application;

[0041] Fig.14 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0043] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0044] Regarding how to improve the processing efficiency of data science tasks, a feasible solution is to deploy the technical implementation of data science tasks on hardware and customize the solution at the hardware level. On each set of hardware, based on the underlying development programming languages ​​such as C++ and Compute Unified Device Architecture (CUDA), data science tasks are developed and deployed according to the hardware characteristics.

[0045] For example, a graphics processing unit (GPU) is a microprocessor that is mainly used to accelerate the processing of computer graphics calculations. Compared with the CPU, the GPU has a large number of cores, can process a large number of matrix operations and floating-point operations at the same time, and has good parallel computing capabilities, so it can perform efficient parallel computing when processing large-scale data.

[0046] For example, a neural processing unit (NPU) is a type of hardware specifically designed to accelerate artificial neural network calculations. An NPU usually contains hundreds or even thousands of processing units, which can complete a large number of matrix calculations and floating-point operations in a relatively short period of time. NPU has a highly parallel design and a customized instruction set for deep learning calculations. It has higher efficiency and lower power consumption in tensor operations, and can perform better in deep learning tasks.

[0047] For example, the Tensor Processing Unit (TPU) is an ASIC chip specifically designed to perform machine learning computing tasks, which can accelerate the training and reasoning of machine learning models. The design of TPU focuses on optimizing tensor data computing tasks (such as tensor multiplication, etc.), so it has an advantage in the speed of machine learning model training and reasoning.

[0048] Take the Real-time Acceleration Platform for Integrated Data Science (RAPIDS) framework as an example. By developing and running data science tasks on GPUs, data processing efficiency can be increased by more than 50 times.

[0049] However, since the underlying computing optimization involves multiple optimization strategies, such as parallel computing optimization, hardware architecture optimization such as memory, software and hardware collaborative optimization, and intelligent scheduling of computing tasks, these projects require developers to be familiar with the underlying architecture and use underlying programming languages ​​such as C or CUDA for optimization. As a result, the development and deployment of data science tasks on dedicated hardware to achieve customized solutions for underlying computing optimization is very complex and has a high development threshold.

[0050] In addition, different hardware is suitable for different underlying optimization solutions. For example, on the GPU, it is necessary to use the CUDA architecture and the C / CUDA language to optimize vectorized computing, matrix operations, parallel sorting, batch processing, multi-threaded mode, memory architecture, memory access, and other aspects. On the NPU, it is necessary to use the C language to optimize based on the hardware architecture, matrix and convolution operations, and computing unit scheduling. Therefore, the optimization solution for one set of hardware cannot be migrated to another set of hardware. The same task requires different customized solutions for hardware characteristics on different dedicated hardware, and the reusability is poor.

[0051] In response to the above-mentioned problems in developing and deploying data science tasks on dedicated hardware, in another feasible technical solution, the technical implementation of data science tasks is deployed at the software level to improve the processing efficiency of data science tasks.

[0052] For example, the TensorPageRank algorithm.

[0053] A tensor is a multi-dimensional array that can have any dimension. Its purpose is to construct high-dimensional vectors and matrices. For example, a two-dimensional array can represent a tensor, also called a second-order tensor or matrix. Usually, in machine learning and deep learning, data is represented in the form of tensors, so tensor operations are one of the important operations in machine learning and deep learning algorithms. Tensors have three properties:

[0054] Rank: the dimension of a tensor, also known as the order of a tensor, which is an integer;

[0055] Shape: The number of rows and columns of the tensor, both integers;

[0056] Data type (type): The data type of the elements in the tensor, which can be Boolean type (bool), integer (int), single-precision floating point number (float), double-precision floating point number (double), etc.

[0057] Tensor computing refers to the process of operating and calculating tensors using operators in deep learning and reasoning frameworks (including but not limited to PyTorch, MindSpore, ONNX, TensorFlow, TorchScript, AKG, ORT, TFRT, TVM, etc.). Mathematical and logical operations based on tensors (such as tensor multiplication, tensor indexing, etc.) are an efficient method for processing large amounts of data and are commonly used in many fields such as image and speech recognition, natural language processing, and recommendation systems. Due to the advantages of tensor computing such as high efficiency, parallelization, and easy optimization, it can be efficiently implemented on underlying hardware (such as GPU, NPU, TPU, etc.), thereby greatly improving the running speed and efficiency of deep learning algorithms.

[0058] The TensorPageRank algorithm belongs to graph computing, which has the following problems: (1) limited subtasks and scenarios (only one graph algorithm is discussed and the algorithm scenario is limited), (2) no tensorization abstraction process based on graph linear algebra expression is proposed, and (3) the optimal implementation of tensorization cannot be guaranteed.

[0059] Another example is the TQP algorithm. The TQP algorithm belongs to SQL query and data analysis, and has the following problems: (1) It cannot guarantee the optimal implementation of tensor calculation.

[0060] Another example is the HummingBird algorithm. HummingBird belongs to machine learning reasoning and has the following problems: (1) it does not guarantee the use of dense vectors for data expression, and there is expression sparsity; (2) it cannot guarantee the optimal implementation of tensor calculation.

[0061] Specifically, Figure 1 Shown is a schematic diagram of the system architecture of HummingBird.

[0062] like Figure 1 As shown, input 101 is a trained model in a traditional machine learning process (TrainedTraditional ML Pipeline). Input 101 includes multiple feature extractors (Featurizer1, Featurizer2, ...) and a machine learning model (ML Model).

[0063] After the input 101 passes through the Hummingbird (HB) framework 110, the Deep Neural Networks Runtimes (DNN Runtimes) 102 corresponding to the series of models of the input 101 can be directly output. The DNN Runtimes 102 include DNN Runtimes 1, DNN Runtimes 2, ...

[0064] The HB framework 110 includes a pipeline parser 111 , an optimizer 112 , and a tensor DAG compiler 113 .

[0065] Parser 111 parses each operator representing the target model in the input, and each operator is packaged into a container object. Each operator container maintains the input and output of the operator, as well as the operator signature, which is used to represent the operator type (such as "decision tree"). Parser 111 also introduces a set of extractor functions to extract the parameters of each operator (such as the weight of linear regression, the threshold of the decision tree). The operator signature determines which extractor function should be used. At startup, the extractor function obtains the relevant extractor function from the operator signature.

[0066] The optimizer 112 traverses the directed acyclic graph (DAG) of the container generated in the parsing phase in a topological order. During the traversal, the parameters of each operator are extracted through the referenced extractor function and stored in the container.

[0067] The tensor compiler 113 will execute a tensor conversion function based on the signature of each operator. Each conversion function receives the extracted parameters as input and generates a neural network module of the deep learning training framework and the deep learning compilation framework consisting of a small set of tensor operators, and then exports the generated module to the target runtime format.

[0068] Specifically, a deep learning training framework is a software framework for building, implementing, and deploying artificial intelligence applications. It provides a series of tools and interfaces to help developers implement various tasks based on tensor data (such as deep learning), which involve a large number of mathematical and statistical concepts and algorithms and require complex computing and data processing capabilities. Specifically, the deep learning framework provides a large number of operators to handle data processing and computing modules such as mathematical operations and neural network layers. These operators can be used in combination to express different computing operations. At the same time, the deep learning framework also provides some optimization tools, such as fast computational derivation and underlying graphics processor acceleration. Common deep learning training frameworks include MindSpore, TensorFlow, PyTorch, etc.

[0069] A deep learning compilation framework is a framework that can automatically convert deep learning neural network models based on tensor data expression into underlying hardware instructions. It can convert advanced neural network models into efficient, optimized underlying instructions, so that deep learning models can be executed faster and run on lower power, high-performance devices. A deep learning compilation framework usually consists of two components: the first is a front-end compiler, which converts advanced neural network models into intermediate representations (IR); the second is a back-end compiler, which converts the intermediate representation into an instruction set for specific underlying hardware, such as CPU, GPU, NPU, TPU, etc. The benefit of a deep learning compilation framework is that it can improve the operating efficiency of deep learning algorithms, reduce the waste of computing resources and power, and also improve the portability of algorithms, so that it can better serve a variety of different application scenarios. At present, common deep learning compilation frameworks include TensorFlow XLA, TVM, Glow, etc.

[0070] Take the specific process when the decision tree model is used as input as an example. Figure 2 Shown is a schematic diagram of a decision tree as input.

[0071] Figure 3 Shown is based on Figure 1 Flowchart of data processing performed by the system shown.

[0072] by Figure 2 The decision tree model shown in the figure is taken as input, Figure 3 As shown, the specific steps of system processing are as follows:

[0073] Step 1: Create five tensors A, B, C, D, E that together capture the structure of the input decision tree.

[0074] Specifically, A captures the relationship between input features and internal nodes; B is set as the threshold for each internal node; for any pair of leaf nodes and internal nodes, C captures whether the internal node is the parent of the internal node, and if so, whether it is the left subtree or the right subtree; D captures the count of internal nodes whose internal nodes are the left children of their parent nodes in the path from the leaf node to the root of the tree; and E captures the mapping relationship between leaf nodes and class labels.

[0075] Step 2: Express the target inference data as tensor X.

[0076] Step 3: Multiply tensor X by tensor A, which means matching each input feature with the internal node that uses it.

[0077] Step 4: Compare the output of step 3 with tensor B, evaluate all internal decision nodes, and generate a tensor I of 0 and 1 based on the true / false results of the conditions.

[0078] Step 5: Multiply the output of step 4 with tensor C, perform a == comparison operation with tensor D, and generate a tensor of 0 and 1 based on the false / true result of the condition to represent the selected leaf node.

[0079] Step 6: Multiply the output of step 5 by tensor E to obtain a tensor representing the final classification result, which means mapping the selected leaf node to the class label.

[0080] The above software implementation scheme can execute the original task based on the deep learning framework and deep learning compilation framework by tensorizing some data science tasks and expressing the calculation of the original task with tensor calculation operations such as tensor multiplication and tensor comparison. Because the deep learning framework and deep learning compilation framework have engineering simplicity (can be directly operated with high-level programming languages ​​such as Python) and cross-hardware portability (can be directly deployed on different hardware such as GPU, NPU, TPU, etc. without modification), it can achieve the engineering simplicity and portability of deploying traditional data science tasks on heterogeneous hardware.

[0081] However, the above software implementation only covers the single task of machine learning reasoning, and does not include other data science tasks such as graph algorithms and data analysis, so the data science task processing implemented is relatively limited.

[0082] Furthermore, the expression and operation of tensors in the HB framework 110 are based on sparse vectors, and the execution efficiency of sparse vectors in deep learning framework operators is not high. The above software implementation scheme is not specifically designed based on dense vector representation.

[0083] Furthermore, for each algorithm, there can be multiple implementations based on tensorization and multiple combinations of tensor calculations. However, the above software implementation scheme does not explore the diversity of algorithm expression and select the optimal strategy, which makes it impossible to guarantee the optimal implementation of tensorization.

[0084] In the above schemes, there is no set of processes and theories to summarize and ensure the feasibility of data science task processing, including (1) the method of generating dense tensor expressions of data and calculations for each subtask, and (2) verifying the conditions and boundaries of the tensorization of data science tasks.

[0085] Furthermore, the above solutions do not propose a set of processes and theoretical summaries to ensure the efficiency of data science task processing, including (1) verifying the optimal operator combination expression of each computing module and (2) exploring the optimization goals of the optimal implementation of computational tensor quantization.

[0086] In view of the problems existing in the above software implementation scheme, an embodiment of the present application provides a data science task processing method. In the data science task processing method according to an embodiment of the present application, data in various data science tasks are expressed in the form of dense tensors, and calculations in data science tasks are implemented with tensor algebraic operators; thereby obtaining a tensor abstract expression of data science tasks, and can be deployed on heterogeneous hardware based on a deep learning and reasoning framework, achieving engineering simplicity and portability.

[0087] Specifically, a dense tensor usually refers to a high-rank tensor with repeated non-zero values, which are evenly distributed throughout the tensor. It can be understood that a dense tensor is a high-dimensional array filled with a large number of non-zero values, in which most of the indexes have corresponding non-zero elements. In an embodiment of the present application, dense tensor expression refers to the use of dense tensor form to represent data in the non-dense tensor form (such as sparse vectors or matrices with many zero values) in the original task.

[0088] Furthermore, in a data science task processing method according to an embodiment of the present application, for dense tensor expressions, an optimal tensor operator combination for expression calculation is used to better utilize the parallelization and optimization acceleration functions of deep learning tensor operators to achieve performance improvement of the original task.

[0089] Specifically, Figure 4 FIG. 1 is a schematic diagram of a system architecture for processing data science tasks according to an embodiment of the present application.

[0090] like Figure 4 As shown, the system includes a data training and processing flow task issuing module 310, a data preprocessing module 320, a tensor data expression and calculation module 330, and a deep learning training and compilation framework 340.

[0091] The data training and processing flow task delivery module 310 is used to extract and deliver data science tasks.

[0092] Specifically, in one embodiment, data science tasks include graph computing tasks, data analysis tasks, and machine learning reasoning tasks.

[0093] Graph computing tasks are tasks that implement graph algorithms. Graph algorithms refer to algorithms applied to graphs and network data structures (including directed graphs, undirected graphs, isomorphic graphs, and heterogeneous graphs). A graph is a collection of nodes and edges, where nodes represent objects in the graph and edges represent the relationships between nodes. Typically, graph algorithms traverse and retrieve nodes and edges in a graph to discover relationships and patterns between them, and use this information to derive new information. For example, in one embodiment, graph algorithms include single-node shortest path, breadth-first search, PageRank, SimRank, subgraph matching, and the like.

[0094] Data analysis tasks include table data analysis tasks. Table data analysis tasks refer to operations applied to reading, transforming, segmenting, grouping, summarizing, statistical analysis, and calculating and sorting table data. Table data consists of multiple rows and columns, and each cell expresses a value, text, or other content. For example, in one embodiment, table data analysis tasks include data operations such as arithmetic, comparison, compound, and logic on the table, and query operations such as projection, filtering, and aggregation.

[0095] Machine learning reasoning tasks refer to the process of using a trained machine learning model to solve problems with new data. The model needs to use information such as patterns and parameters summarized and trained from existing sample information to predict and classify unknown data. For example, in one embodiment, machine learning reasoning tasks include reasoning of common machine learning models, such as decision trees, random forests, support vector machines (SVMs), linear regression, logistic regression, k-nearest neighbors, and other models.

[0096] The data preprocessing module 320 is used to implement task splitting, data reading, data expression (ie, expression as a multi-dimensional array) and model information (such as parameter settings such as dimensions) extraction of hybrid tasks.

[0097] The tensor data expression and calculation module 330 is used to convert the calculation of the data science task into a dense tensor expression.

[0098] The deep learning training and compilation framework 340 is used to implement data processing for data science tasks based on dense tensor expressions of calculations for data science tasks.

[0099] Specifically, the tensor data expression and calculation module 330 includes a linear algebra expression unit 331 , a dense tensor operator expression unit 332 , and an optimal tensor operator selection unit 333 .

[0100] Figure 5 FIG. 1 is a flow chart of a method for processing a data science task according to an embodiment of the present application.

[0101] S410 , the linear algebra expression unit 331 determines a semiring type that can be used to express a data science task and a linear algebra expression of the data.

[0102] For example, in graph computing, the optional semiring types include the five categories listed in Table 1 below.

[0103] Table 1

[0104]

[0105] In data analysis and machine learning reasoning tasks, the semi-ring type is PlusMultiplies.

[0106] In one embodiment, in S410, a basic linear algebraic expression is selected according to a data science operation. The optional linear algebraic expressions are shown in Table 2 below.

[0107] Table 2

[0108]

[0109]

[0110] S420 , the dense tensor operator expression unit 332 converts the linear algebraic expression of the data of the data science task determined in S410 into a dense tensor expression of the data of the data science task.

[0111] For example, in a graph algorithm task, a homogeneous graph (N nodes, M edges) data can be expressed as three 1*M-dimensional tensors:

[0112] src tensor (index of the starting point in the graph);

[0113] dst tensor (index of the end point in the graph);

[0114] weight tensor (if necessary, used to express the weight of the edge in the graph).

[0115] If it is a heterogeneous graph, you can add a 1*N-dimensional node_type tensor and a 1*M-dimensional edge_type tensor; if you need to record the calculation results of each node, add a d tensor (the same as the d vector in Step 1).

[0116] For example, in a data analysis task (such as SQL query):

[0117] A set of bool / int / float / double data (N rows and M columns) can be expressed as an N*M dimensional tensor;

[0118] A set of string data (N rows and M columns, with a maximum character limit of Q for each string) can be expressed as a dense tensor of Q*N*M dimensions based on the int type through utf-8 encoding and padding operations.

[0119] For example, in machine learning reasoning tasks, dense tensor representations of data are required from different task dimensions. For example, a binary classification decision tree task can be expressed as 5 tensors (the dimensions depend on the number of layers of the decision tree).

[0120] S430, the optimal tensor operator selection unit 333 derives a dense tensor expression of the calculation of the data science task based on the dense tensor expression of the data of the data science task obtained in S420 and according to the linear algebraic expression of the calculation of the data science task.

[0121] Specifically, in S430, the optimal deep learning framework operator combination is used to implement the original computing process of the data science task.

[0122] Figure 6 The figure is a partial flow chart of a method for processing a data science task according to an embodiment of the present application.

[0123] Specifically, in one embodiment, S430 includes the following steps.

[0124] S431, obtain the linear algebraic expression of the calculation of the data science task.

[0125] S432, derive the calculation type corresponding to each step of the calculation based on the linear algebraic expression of the calculation of the data science task.

[0126] S433, determining the optimal deep learning framework operator corresponding to each step of the calculation according to the calculation type corresponding to each step of the calculation.

[0127] Specifically, in S433, the goal is (1) minimum tensor operations, and / or, (2) minimum number of operators.

[0128] S434, based on the dense tensor expression of the data of the data science task, uses the optimal deep learning framework operator combination to implement the original computing process of the data science task.

[0129] For example, in one embodiment, the correspondence between the calculation type and the deep learning framework operator is shown in Table 3 below.

[0130] Table 3

[0131]

[0132]

[0133] According to S410 to S430, multi-dimensional tensors are used to replace the vectors or matrices in the linear algebra implementation of the original task, and the tensor operators in the deep learning framework are used to express the calculation process of the original algorithm. This can obtain a tensor abstract expression of the data science task, improve the feasibility of data science task transformation, avoid data science task transformation failure, and can be deployed on heterogeneous hardware based on the deep learning and reasoning framework to achieve engineering simplicity and portability.

[0134] Furthermore, according to S410 to S430, based on dense tensor expression, the optimal tensor operator combination is used, with the goals of (1) minimum tensor operations and (2) minimum number of operators, thereby achieving faster computing speed and smaller storage space, better utilizing the parallelization and optimization acceleration functions of deep learning tensor operators, and achieving performance improvement of the original task.

[0135] Furthermore, in one embodiment, Figure 4 The product form of the system shown is the program code included in traditional data science tasks (including graph computing, data analysis, machine learning) and deep learning platform software and deployed on server hardware.

[0136] Figure 7 FIG. 1 is a schematic diagram of a system architecture for processing data science tasks according to an embodiment of the present application.

[0137] like Figure 7 As shown, the data training and processing flow task issuing module 510, the data preprocessing module 520 and the tensor data expression and calculation module 530 are loaded in the first hardware architecture 501 (such as computer memory) in the form of program code.

[0138] The deep learning training and compilation framework 540 is implemented through the second hardware architecture 502 (such as GPU / NPU / TPU).

[0139] In one embodiment, when the system is running, the program codes of the data training and processing flow task distribution module 510, the data preprocessing module 520, and the tensor data expression and calculation module 530 run in the host memory of the server, and the deep learning training and compilation framework 540 runs in the GPU / NPU / TPU memory.

[0140] For example, in one embodiment, the system runs on a server with an NVIDIA GPU card in the open source MindSpore deep learning training framework, wherein the NVIDIA GPU card provides computing acceleration capabilities through the CUDA programming interface.

[0141] Furthermore, the method and system for processing data science tasks in the embodiments of the present application can be applied to different deep learning training and reasoning frameworks (for example: MindSpore, PyTorch, TensorFlow, ONNX, AKG, TorchScript, XLA, TFRT, ORT, TVM, etc.), and can also be applied to different hardware platforms (for example, CPU, GPU, NPU, etc.).

[0142] The following describes in detail the specific process of implementing data science task processing according to the data science task processing method provided by this application through specific embodiments.

[0143] For example, for the single source shortest path algorithm (Single Source Shortest Path) in the graph algorithm, the data science task processing method according to the present application can accelerate the calculation process of the single source shortest path algorithm (Single Source Shortest Path) in the graph algorithm in the application.

[0144] The single-node shortest path algorithm is summarized as follows: given a directed graph with weights on the edges and a target node, find the shortest distance from the target node to other nodes in the graph (that is, the sum of the weights of the edges that constitute the shortest path).

[0145] Figure 8 The figure shows a multi-node path diagram according to an embodiment of the present application.

[0146] like Figure 8 As shown, there are four nodes A, B, C, and D. The directed arrows between the nodes represent directed paths between the nodes, and the numbers on the arrows represent the path lengths.

[0147] by Figure 8 As input, let the target node be A, then the result vector is [0, 0.1, 0.2, 0.3], which means the shortest distance from A to A is 0, the shortest path from A to B (A→B) is 0.1, the shortest path from A to C (A→B→C) is 0.2, and the shortest path from A to D (A→B→C→D) is 0.3.

[0148] Referring to S410 to S430, according to the data science task processing method provided by this application, the shortest path algorithm is implemented in the MindSpore deep learning framework. The specific implementation steps are as follows:

[0149] In S410 , it can be determined from the task type (shortest path) that the semi-ring type is the MinPlus type.

[0150] From the task operation (Single-nodeset traversal in the shortest path algorithm), it can be determined that the linear expression type of the data is the multiplication of vector d and matrix A (vector-matrix multiplication). The vector d is the result vector (1*N dimension) expressing the shortest path from the target node s to other nodes. In initialization, d = [inf, inf, …, inf] (inf means infinity), and d(s) = 0. Matrix A is a matrix expressing the data storage in the graph. A_ij in the matrix represents the weight of edge e_ij in the original graph. If edge e_ij does not exist in the original graph, A_ij = inf.

[0151] In S420, the task type graph algorithm can determine: Figure 8 Dense tensor expressions include:

[0152] src tensor (index of the starting point in the graph),

[0153] dst tensor (index of the end point in the graph);

[0154] weight tensor (used to express the weight of the edge in the graph);

[0155] d tensor (records the calculation results of each node).

[0156] The specific data of the above four dense tensors are shown in the following Table 4.

[0157] Table 4

[0158]

[0159] Fig. 9 The figure is a schematic diagram of the calculation process under the linear algebra expression in one embodiment of the present application.

[0160] In S430, the calculation of the corresponding linear algebraic expression of the shortest path algorithm is as follows: Fig. 9 shown. Fig. 9 The calculation process shown can be summarized as a two-step linear algebra operation between vector d and matrix d: (step 1) adding vector d to matrix A; (step 2) finding the minimum value within the matrix column.

[0161] Specifically, Fig. 9 The process shown can correspond to the following code:

[0162] 1. d = [inf, inf, …, inf];

[0163] 2. d(s) = 0;

[0164] 3.for k=1to n-1;

[0165] 4.d=d+min.A.

[0166] Furthermore, in S430, according to the above linear algebra steps (1) and (2), based on the optimization goal of "minimum tensor operations, minimum number of operators", the corresponding MindSpore deep learning framework operator combination and its calculation process are inferred, which correspond to: (1) tensor d is added to weight with src as the index (using MindSpore's gather operator); (2) the above result is minimized with dst as the index (using the min operation in MindSpore's scatter_reduce operator).

[0167] Fig.10 The figure is a schematic diagram of the calculation process under the linear algebra expression in one embodiment of the present application.

[0168] An example of dense tensor operations on a complete MindSpore is as follows Fig.10 shown.

[0169] Specifically, Fig.10 The process shown can correspond to the following code:

[0170] 1. d = [inf, inf, …, inf];

[0171] 2. d(s) = 0;

[0172] 3.for iin len(d);

[0173] 4.prev_d = d.clone();

[0174] 5.tmp=d.gather(dim=0,index=src);

[0175] 6.tmp+=weight;

[0176] 7.d=d.scatter_reduce(dim=0,src=tmp,index=dst,reduce="amin");

[0177] 8.if prev_d == d;

[0178] 9.return d.

[0179] For another example, with respect to the breadth-first search (Breath-First Search) in the graph algorithm, the data science task processing method according to the present application can accelerate the inference process of the breadth-first search (Breath-First Search) in the graph algorithm in the application program.

[0180] The breadth-first search algorithm is summarized as follows: given a directed graph and a target node, find the number of hops from the target node to other nodes in the graph.

[0181] Fig.11 The figure shows a multi-node path diagram according to an embodiment of the present application.

[0182] like Fig.11 As shown, there are four nodes A, B, C, and D, and the directed arrows between the nodes represent directed paths between the nodes.

[0183] by Fig.11 As input, let the target node be A, then the result vector is [1,2,3,3], which means the number of hops from A to point A (starting point) is 1, the number of hops from A to point B (A→B) is 2, the number of hops from A to point C (A→B→C) is 3, and the number of hops from A to point D (A→B→D) is 3.

[0184] Referring to S410 to S430, according to the data science task processing method provided by this application, a breadth-first search algorithm is implemented in the MindSpore deep learning framework. The specific implementation steps are as follows:

[0185] In S410 , it can be determined from the task type (search) that the semi-ring type is the LogicalOrAnd type.

[0186] The task operation (single-nodeset traversal or multi-nodeset traversal in the search algorithm) can determine that the data linear expression type is the multiplication of vector d and matrix A (vector-matrix multiplication, used to express single-target node search) or the multiplication of matrix D and matrix A (matrix-matrix multiplication, used to express multi-target node search).

[0187] The following takes a single target node search as an example, where vector d is the result vector (1*N dimension) expressing the breadth-first hop count from the target node s to other nodes. In initialization, d = [0, 0, ..., 0] (inf means infinity) and d(s) = 1. Matrix A is an adjacency matrix expressing the data storage in the graph. In the matrix, A_ij = 1 means that the edge e_ij exists in the original graph, and A_ij = 0 means that the edge e_ij does not exist in the original graph.

[0188] In S420, the task type graph algorithm can determine: Fig.11 Dense tensor expressions include:

[0189] src tensor (index of the starting point in the graph);

[0190] dst tensor (index of the end point in the graph);

[0191] d tensor (records the calculation results of each node).

[0192] The specific data of the above three dense tensors are shown in the following Table 5.

[0193] Table 5

[0194]

[0195] Fig.12 The figure is a schematic diagram of the calculation process under the linear algebra expression in one embodiment of the present application.

[0196] In S430, the calculation of the corresponding linear algebraic expression of the breadth-first search algorithm is as follows: Fig.12 shown. Fig.12 The calculation process shown can be summarized as three linear algebra operations between vector d and matrix a: (1) the current vector is copied from vector d, and the current vector records the currently traversed index; (2) vector d is assigned level based on the current index; (3) the current vector is reassigned based on the NOT operation of vector d through the AND OR operation of the current vector and matrix A.

[0197] Specifically, Fig.12 The process shown can correspond to the following code:

[0198] 1.d=[0,0,…,0];

[0199] 2. d(s) = 1;

[0200] 3.current = d.copy();

[0201] 4.for level=1toN-1;

[0202] 5.d[current]=level;

[0203] 6.clear(current);

[0204] 7.current[d]=current AND OR.A;

[0205] 8.return d.

[0206] Furthermore, in S430, according to the three steps (1), (2), and (3) of the above linear algebra steps, based on the optimization goal of "minimum tensor operations, minimum number of operators", the corresponding MindSpore deep learning framework operator combination and its calculation process are inferred, which correspond to: (1) the current_mask vector is copied from the vector d, and the current_mask tensor records the currently traversed index; (2) the tensor d is assigned level based on the current_mask index; (3) the current_mask vector is reassigned based on the logical_not operation of the vector d through the logical_and logical_or operation of the current_mask vector based on the src tensor / dst tensor.

[0207] Fig.13 The figure is a schematic diagram of the calculation process under the linear algebra expression in one embodiment of the present application.

[0208] An example of dense tensor operations on a complete MindSpore is as follows Fig.13 shown.

[0209] Specifically, Fig.13 The process shown can correspond to the following code:

[0210] 1.level=1;

[0211] 2.d=zeros(N)AND d[s]=level;

[0212] 3.current_mask = d.clone();

[0213] 4.for level=1toN-1;

[0214] 5.dst_mask=current_mask.gather(dim=0,index=src);

[0215] 6.next_hop=mask_select(dst,dst_mask>0);

[0216] 7.unprocessed_mask=logical_not(logical_or(d,current_mask));

[0217] 8.current_mask=zeros(N)AND current_mask[next_hop]=1;

[0218] 9.target_mask=logical_and(unprocessed_mask,current_mask);

[0219] 10.d=result.masked_fill(target_mask,level);

[0220] 11.if not any(target_mask);

[0221] 12.break;

[0222] 13.return d.

[0223] In the above code, zeros() in 2., gather() in 5., mask_select() in 6., logical_not(logical_or()) in 7., zeros() in 8., logical_and() in 9., masked_fill() in 10., and any() in 11. are the optimal operators.

[0224] In the description of the embodiments of the present application, for the convenience of description, the device is described by dividing it into various modules according to its functions. The division of each module is merely a division of logical functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or one or more software and / or hardware.

[0225] Specifically, the device proposed in the embodiment of the present application can be fully or partially integrated into a physical entity during actual implementation, or it can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in a processor element or instructions in the form of software.

[0226] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0227] An embodiment of the present application further provides an electronic device.

[0228] Fig.14 Schematic diagram of the structure of an electronic device according to an embodiment of the present application.

[0229] like Fig.14 As shown, the electronic device 900 includes a memory 902 for storing computer program instructions and a processor 901 for executing program instructions, wherein when the computer program instructions are executed by the processor 901, the electronic device 900 is triggered to execute the method steps described in the embodiments of the present application.

[0230] Specifically, in one embodiment of the present application, the above-mentioned one or more computer programs are stored in the above-mentioned memory 902, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned electronic device 900, the above-mentioned electronic device 900 executes the method steps described in the embodiment of the present application.

[0231] It is understandable that the structural description of the electronic device 900 in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include other components besides the processor 901 and the memory 902.

[0232] The processor 901 may be a device on a chip (SOC), and the processor 901 may include a central processing unit (CPU), and may further include other types of processors.

[0233] The processor involved in the processor 901 may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units, NPU) and an image signal processor (Image Signal Processing, ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.

[0234] The processor 901 may include one or more processing units. For example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 900 may also include one or more processors 901. The controller may generate an operation control signal based on the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0235] In some embodiments, the processor 901 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. Among them, the USB interface is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge an electronic device, and can also be used to transmit data between an electronic device and a peripheral device.

[0236] The electronic device 900 may also include an external memory interface, which is used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 901 through the external memory interface to implement a data storage function. For example, files such as music and videos are stored in the external memory card.

[0237] The memory 902 may include a code storage area and a data storage area. The code storage area may store an operating system. The data storage area may store data created during the use of the electronic device 900, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc.

[0238] The memory 902 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or may be any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.

[0239] The processor 901 and the memory 902 may be integrated into one processing device, or more commonly, they are independent components.

[0240] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.

[0241] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0242] In the several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0243] Specifically, in one embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the method provided in the embodiment of the present application.

[0244] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer executes the method provided by the embodiment of the present application.

[0245] The embodiments described in this application are described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0246] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0247] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0248] It should also be noted that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0249] In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

[0250] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

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

[0252] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0253] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0254] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data science task processing method, characterized in that: The method is applied to an electronic device, and the method comprises: Identify the types of semirings and linear algebraic representations of data that can be used to express data science tasks; Based on the linear algebraic expression of the data, converting into a dense tensor expression of the data; Based on the dense tensor expression of the data, a dense tensor expression of the computation of the data science task is derived according to the linear algebraic expression of the computation of the data science task.

2. The method according to claim 1, characterized in that The method further comprises: Based on the dense tensor expression of the calculation of the data science task, a deep learning training framework and a deep learning compilation framework are used to realize the processing of the data science task.

3. The method according to claim 1, characterized in that: The data science task includes any one of a graph computing task, a data analysis task, and a machine learning reasoning task.

4. The method according to claim 3, characterized in that: The data science task includes the graph computing task, and the semi-ring type of the graph computing task includes any one of strengthening increase, minimum strengthening, logical OR, maximum strengthening and minimum increasing.

5. The method according to claim 3, characterized in that: The data science task includes the data analysis task or the machine learning reasoning task, and the semi-ring type of the data analysis task or the machine learning reasoning task includes strengthening and increasing.

6. The method according to any one of claims 1 to 5, characterized in that The step of deriving a dense tensor expression of the calculation of the data science task based on the dense tensor expression of the data and according to the linear algebraic expression of the calculation of the data science task comprises: Identify the optimal deep learning framework operator based on the linear algebraic expression of the computation of the data science task; Based on the dense tensor expression of the data, the optimal deep learning framework operator is used to combine and implement the original computing process of the data science task.

7. The method according to claim 6, characterized in that The step of confirming the optimal deep learning framework operator based on the linear algebraic expression of the calculation of the data science task comprises: According to the linear algebraic expression of the calculation of the data science task, derive the calculation type corresponding to each step of the calculation; According to the calculation type corresponding to each step of the calculation, determine the optimal deep learning framework operator corresponding to each step of the calculation.

8. The method according to claim 6, characterized in that Determining the optimal deep learning framework operator corresponding to each step of the calculation according to the calculation type corresponding to each step of the calculation includes: Based on the minimum tensor operation and / or the minimum number of operators, the optimal deep learning framework operator corresponding to each step of the calculation is determined.

9. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps as claimed in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 8.