Interaction method and device based on computational graph and computer equipment

Through the interactive method based on computing graphs, the structure and performance before and after computing graph optimization is intuitively displayed, and the problem of low development efficiency caused by the complexity of computing graphs in the deep learning model is solved, dynamic interaction and real-time optimization display are realized, and deep learning is improved Model development and optimization efficiency.

CN119025100AInactive Publication Date: 2024-11-26BEIJING QINGCHENG JIZHI TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411205943.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The increased complexity of computational graphs in deep learning models leads to inefficient development, and existing tools lack dynamic interaction and real-time optimization display capabilities, making it difficult to intuitively understand and analyze the structure and performance of computational graphs.

Method used

Provide an interactive method based on calculation graphs. By obtaining calculation graph data, rendering the original calculation graph and optimizing and adjusting in response to user operations, displaying the optimized calculation graph and its graph structure differences from the original calculation graph, supporting node interaction and layer-by-layer debugging , Computing graph comparison, view adjustment and operator customization operations, etc., improve the development efficiency of computing graphs.

Benefits of technology

By intuitively displaying the structure before and after the optimization of the calculation graph, the developers' understanding of the calculation graph and the efficiency of the optimization process are improved, dynamic interaction and real-time optimization display are supported, the editing process of the calculation graph is simplified, and the development and optimization of deep learning models are enhanced. efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025100A_ABST
    Figure CN119025100A_ABST
Patent Text Reader

Abstract

The invention relates to an interaction method and device based on a computational graph, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining computational graph data, and rendering an original computational graph corresponding to the computational graph data into a computational graph interaction interface for display; in response to a trigger operation for an optimization entry in the computational graph interaction interface, performing optimization adjustment for a graph structure of the original computational graph to obtain an optimized computational graph; and displaying the optimized calculation graph and calculation graph optimization content in a calculation graph interaction interface, wherein the calculation graph optimization content at least comprises graph structure difference between the optimized calculation graph and the original calculation graph. By adopting the method, the development efficiency of the computational graph can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an interactive method, apparatus, computer device, computer-readable storage medium and computer program product based on a computational graph. Background Art

[0002] In the development and optimization process of deep learning models, computational graphs are a crucial component, and computational graphs usually contain a large number of computing nodes and vector data. However, as the scale of the model increases, the complexity of the computational graph also increases, making it more difficult to understand the structure and performance of the computational graph, resulting in low efficiency in the development of computational graphs. Summary of the invention

[0003] Based on this, it is necessary to provide an interactive method, device, computer equipment, computer-readable storage medium and computer program product based on computational graphs that can improve the efficiency of computational graph development in response to the above technical problems.

[0004] In a first aspect, the present application provides an interactive method based on a computational graph, comprising:

[0005] Obtain the calculation graph data, and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0006] In response to a trigger operation on an optimization entry in a computation graph interactive interface, an optimization adjustment is performed on a graph structure of an original computation graph to obtain an optimized computation graph;

[0007] The optimized computational graph and the computational graph optimization content are displayed in the computational graph interactive interface. The computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph.

[0008] In one of the embodiments, the method further includes: in response to a node interaction operation triggered on a target computational graph in the computational graph interaction interface, determining a target node selected by the node interaction operation in a graph structure of the target computational graph, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; determining a target graph structure to which the target node belongs and node information of the target node; and displaying the target graph structure and the node information in a node display area.

[0009] In one of the embodiments, the method further includes: in response to a layer-by-layer debugging operation triggered for a target computation graph in the computation graph interaction interface, determining the debugging results of each node in the target computation graph, wherein the target computation graph includes a computation graph that supports triggering for interaction and is displayed in the computation graph interaction interface; and displaying the debugging results of each node in the target computation graph in the computation graph interaction interface.

[0010] In one of the embodiments, the method further includes: in response to a computational graph comparison operation triggered for a target computational graph in the computational graph interaction interface, obtaining a computational graph to be compared, and rendering the computational graph to be compared into the computational graph interaction interface for display, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; performing a computational graph comparison between the target computational graph and the computational graph to be compared to obtain a comparison result; and displaying the target computational graph, the computational graph to be compared, and the comparison result in a computational graph comparison area.

[0011] In one of the embodiments, the method further includes: in response to a view adjustment operation triggered on a target computational graph in the computational graph interaction interface, adjusting a display view of the target computational graph according to the view adjustment operation, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; and displaying the target computational graph after view adjustment in the computational graph interaction interface.

[0012] In one of the embodiments, the method further includes: in response to a trigger operation on an operator customization entry in the computational graph interaction interface, displaying an operator operation area for triggering interactive operations on an operator, wherein the operator represents an operation performed by a node in the computational graph; in response to an operator customization operation triggered in the operator operation area, displaying an operator customization result obtained based on the operator customization operation in the operator operation area.

[0013] In a second aspect, the present application also provides an interactive device based on a computational graph, comprising:

[0014] The original calculation graph display module is used to obtain the calculation graph data and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0015] An optimized calculation graph determination module is used to optimize and adjust the graph structure of the original calculation graph in response to a trigger operation on an optimization entry in the calculation graph interaction interface to obtain an optimized calculation graph;

[0016] The optimization result display module is used to display the optimized calculation graph and the calculation graph optimization content in the calculation graph interactive interface. The calculation graph optimization content at least includes the graph structure difference between the optimized calculation graph and the original calculation graph.

[0017] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0018] Obtain the calculation graph data, and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0019] In response to a trigger operation on an optimization entry in a computation graph interactive interface, an optimization adjustment is performed on a graph structure of an original computation graph to obtain an optimized computation graph;

[0020] The optimized computational graph and the computational graph optimization content are displayed in the computational graph interactive interface. The computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0022] Obtain the calculation graph data, and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0023] In response to a trigger operation on an optimization entry in a computation graph interactive interface, an optimization adjustment is performed on a graph structure of an original computation graph to obtain an optimized computation graph;

[0024] The optimized computational graph and the computational graph optimization content are displayed in the computational graph interactive interface. The computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph.

[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0026] Obtain the calculation graph data, and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0027] In response to a trigger operation on an optimization entry in a computation graph interactive interface, an optimization adjustment is performed on a graph structure of an original computation graph to obtain an optimized computation graph;

[0028] The optimized computational graph and the computational graph optimization content are displayed in the computational graph interactive interface. The computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph.

[0029] The above-mentioned interactive method, apparatus, computer device, computer-readable storage medium and computer program product based on the computational graph render the original computational graph corresponding to the computational graph data into the computational graph interactive interface for display, and in response to the trigger operation for the optimization entry in the computational graph interactive interface, optimize and adjust the graph structure of the original computational graph, and display the optimized computational graph obtained by the optimization adjustment and the computational graph optimization content in the computational graph interactive interface, and the computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph. The original computational graph is rendered and displayed in the computational graph interactive interface, and in response to the trigger operation for the optimization entry, the optimized computational graph and the graph structure difference between the optimized computational graph and the original computational graph are displayed in the computational graph interactive interface. By intuitively displaying the structure of the computational graph before and after optimization in the computational graph interactive interface, it is convenient for users to understand the structure and performance of the computational graph, thereby improving the development efficiency of the computational graph. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] FIG1 is an application environment diagram of an interactive method based on a computational graph in one embodiment;

[0032] Figure 2 A flowchart of an interactive method based on a computational graph in one embodiment;

[0033] Figure 3 A schematic diagram of a flow chart of a calculation graph comparison in one embodiment;

[0034] Figure 4 is a schematic diagram of the structure of a system module in an embodiment;

[0035] Figure 5 A schematic diagram of a process of triggering a viewing node in an embodiment;

[0036] Figure 6 A schematic diagram of a process of triggering an optimization calculation graph in one embodiment;

[0037] Figure 7 A schematic diagram of a process for triggering a custom operator interaction in an embodiment;

[0038] Figure 8 A schematic diagram of a process of triggering a comparison calculation graph in one embodiment;

[0039] Fig. 9A schematic diagram of a process of triggering layer-by-layer debugging analysis in one embodiment;

[0040] Fig.10 is a flowchart of an interactive method based on a computational graph in another embodiment;

[0041] Fig.11 is a structural block diagram of an interactive device based on a computational graph in one embodiment;

[0042] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The computation graph-based interaction method provided in the embodiment of the present application can be applied in the application environment shown in FIG1 . In which, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers.

[0045] The terminal 102 can obtain the calculation graph data from the server 104, and the calculation graph data can be uploaded to the server 104 for storage after the user edits the calculation graph. The terminal 102 can render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display, and the user can trigger the interactive operation for the displayed original calculation graph in the calculation graph interactive interface. In response to the user's trigger operation on the optimization entrance in the calculation graph interactive interface, the terminal 102 optimizes and adjusts the graph structure of the original calculation graph, and displays the optimized calculation graph and the calculation graph optimization content obtained by the optimization adjustment in the calculation graph interactive interface. The calculation graph optimization content at least includes the graph structure difference between the optimized calculation graph and the original calculation graph, and the user can perform further calculation graph development processing on the displayed optimized calculation graph and the calculation graph optimization content.

[0046] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0047] In an exemplary embodiment, Figure 2 As shown, a computational graph-based interaction method is provided, which is described by taking the method applied to the terminal in FIG. 1 as an example, and includes the following steps 202 to 206. Among them:

[0048] Step 202: Obtain computational graph data, and render the original computational graph corresponding to the computational graph data into a computational graph interactive interface for display.

[0049] Among them, the computation graph is a graph structure used to represent and organize the mathematical calculation process in the deep learning model. It consists of nodes and edges. The nodes represent mathematical operations (such as addition, multiplication, activation function, etc.) or variables (such as input, weight, bias, etc.), while the edges represent the flow direction of data between these operations. Usually, tensors are transferred between nodes. Solid lines indicate data transfer dependencies, and dotted lines usually indicate control dependencies (i.e., execution order). The graph structure of the computation graph can intuitively describe the entire computation process from input data through a series of layers (such as convolutional layers, activation function layers, fully connected layers, etc.) to the final output result. The computation graph data is data that describes the computation graph, which can specifically include a computation graph configuration file. The corresponding computation graph can be generated based on the computation graph data. The original computation graph is a computation graph directly generated based on the computation graph data. The original computation graph can be a computation graph to be triggered for interaction. The computation graph interaction interface can be a human-computer interaction interface, which is used to support users to trigger interactive operations on the computation graph.

[0050] Exemplarily, the terminal can obtain the calculation graph data, specifically, the calculation graph data can be queried from the server, or the calculation graph data can be obtained from the local of the terminal. The calculation graph data can specifically include a calculation graph configuration file, which can include various information such as the definition and configuration description of the calculation graph. The calculation graph configuration file is parsed and rendered to generate the corresponding calculation graph. The terminal can render based on the calculation graph data, thereby rendering the original calculation graph described by the calculation graph data into the calculation graph interaction interface for display. The calculation graph interaction interface can specifically be an interface provided by the terminal to support users to interact with the calculation graph.

[0051] Step 204, in response to the triggering operation of the optimization entry in the computation graph interactive interface, the graph structure of the original computation graph is optimized and adjusted to obtain an optimized computation graph.

[0052] Among them, the optimization entry is an interactive operation entry for triggering structural optimization of the calculation graph, which can include various forms of controls such as buttons, texts, graphics, and pictures. The optimized calculation graph is the calculation graph obtained by optimizing the graph structure of the original calculation graph. The optimized calculation graph can be obtained by the user optimizing the graph structure of the original calculation graph, or it can be automatically optimized based on the original calculation graph.

[0053] Optionally, the user can trigger an interactive operation on the displayed original computational graph in the computational graph interaction interface. The specific computational graph interaction interface may include an optimization entry, and the user can trigger an interactive operation on the optimization entry, such as the user can click the optimization entry in the computational graph interaction interface. The terminal can optimize and adjust the graph structure of the original computational graph, and can specifically optimize and adjust the graph structure of the original computational graph based on at least one method of operator fusion, graph pruning, graph fusion, constant folding, asynchronous computing, or mixed precision computing, so as to obtain an optimized computational graph after the original computational graph is optimized and adjusted.

[0054] Step 206: display the optimized computation graph and the computation graph optimization content in the computation graph interactive interface, where the computation graph optimization content at least includes the graph structure difference between the optimized computation graph and the original computation graph.

[0055] The calculation graph optimization content at least includes the graph structure difference between the optimized calculation graph and the original calculation graph. The graph structure difference refers to the difference between the optimized calculation graph and the original calculation graph, that is, the optimization adjustment change of the optimized calculation graph relative to the original calculation graph. The calculation graph optimization content can be obtained by comparing the optimized calculation graph with the original calculation graph.

[0056] Exemplarily, the terminal may display the optimized computation graph in the computation graph interactive interface. Further, the terminal may determine the graph structure difference between the optimized computation graph and the original computation graph, thereby obtaining the computation graph optimization content associated with the optimized computation graph. The terminal may display the computation graph optimization content in the computation graph interactive interface. In some embodiments, the terminal may only display the optimized computation graph and the computation graph optimization content in the computation graph interactive interface, or may display the original computation graph, the optimized computation graph, and the computation graph optimization content in the computation graph interactive interface, so that the user can intuitively compare the original computation graph with the optimized computation graph.

[0057] In the above-mentioned interactive method based on computational graphs, the original computational graph corresponding to the computational graph data is rendered into the computational graph interactive interface for display. In response to the trigger operation for the optimization entry in the computational graph interactive interface, the graph structure of the original computational graph is optimized and adjusted, and the optimized computational graph obtained by the optimization adjustment and the computational graph optimization content are displayed in the computational graph interactive interface. The computational graph optimization content at least includes the graph structure difference between the optimized computational graph and the original computational graph. The original computational graph is rendered and displayed in the computational graph interactive interface. In response to the trigger operation for the optimization entry, the optimized computational graph and the graph structure difference between the optimized computational graph and the original computational graph are displayed in the computational graph interactive interface. By intuitively displaying the structure of the computational graph before and after optimization in the computational graph interactive interface, it is convenient for users to understand the structure and performance of the computational graph, thereby improving the development efficiency of the computational graph.

[0058] In an exemplary embodiment, the computational graph-based interaction method also includes: in response to a node interaction operation triggered on a target computational graph in a computational graph interaction interface, determining a target node selected by the node interaction operation in a graph structure of a target computational graph, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; determining a target graph structure to which the target node belongs and node information of the target node; and displaying the target graph structure and node information in a node display area.

[0059] Among them, the target calculation graph includes the calculation graph that supports triggering and interacting displayed in the calculation graph interaction interface, that is, the target calculation graph is the calculation graph that the user interacts with in response to the trigger, and may specifically include at least one of the original calculation graph and the optimized calculation graph. The node interaction operation is the interaction operation triggered by the user on the node in the calculation graph, which may specifically include but is not limited to various types of interaction operations such as the user clicking, long pressing, and double-clicking on the node in the calculation graph. The target node is the node that the user triggers the interaction on in the calculation graph. The target graph structure is the graph structure to which the target node belongs, and may specifically include the part of the calculation graph where the target node is located; the node information is the information of the target node, and may specifically include various detailed information such as the node name, number, node type, operation type, input and output, dependency or attribute information of the target node. The node display area is an area for displaying node information.

[0060] Optionally, at least one calculation graph can be displayed in the calculation graph interaction interface, and the user can trigger an interactive operation for the calculation graph displayed in the calculation graph interaction interface. For the target calculation graph in the calculation graph interaction interface, the user can trigger a node interaction operation, and the terminal responds to the node interaction operation to determine the target node selected by the node interaction operation in the graph structure of the target calculation graph. Specifically, the target node can be determined from the graph structure of the target calculation graph according to the action area of ​​the node interaction operation. For the target node, the terminal can determine the target graph structure to which the target node belongs and the node information of the target node. In a specific application, the terminal can extract the target graph structure to which the target node belongs from the graph structure of the target calculation graph, and obtain the node information of the target node based on the node identifier of the target node. The terminal can display the target graph structure and node information in the node display area, thereby supporting the user to intuitively view the detailed content of the target node.

[0061] In some embodiments, the terminal can also generate a data flow diagram based on the target graph structure to which the target node belongs. The data flow diagram can be obtained by inputting case data into the target graph structure to which the target node belongs and performing calculation processing, so that the data processing process of the target graph structure to which the target node belongs can be represented by the data flow diagram.

[0062] In this embodiment, the terminal responds to the node interaction operation triggered for the target computation graph, and displays the target graph structure to which the target node belongs and the node information of the target node in the node display area, thereby supporting the user to intuitively view the detailed content of the target node in the computation graph, facilitating the user to understand the structure and performance of each node in the computation graph, thereby improving the development efficiency of the computation graph.

[0063] In an exemplary embodiment, the computational graph-based interaction method also includes: in response to a layer-by-layer debugging operation triggered for a target computational graph in a computational graph interaction interface, determining the debugging results of each node in the target computational graph, the target computational graph including a computational graph that supports triggering for interaction and is displayed in the computational graph interaction interface; and displaying the debugging results of each node in the target computational graph in the computational graph interaction interface.

[0064] The target computation graph includes the computation graph that supports triggering and interaction displayed in the computation graph interaction interface, that is, the target computation graph is the computation graph that the user performs interactive operations on in response to the trigger. The layer-by-layer debugging operation is the interactive operation of layer-by-layer debugging triggered by the target computation graph. The debugging result is the result of each node obtained in the process of layer-by-layer debugging of the target computation.

[0065] Exemplarily, at least one calculation graph may be displayed in the calculation graph interaction interface, and the user may trigger a layer-by-layer debugging operation for the calculation graph displayed in the calculation graph interaction interface. Specifically, the user may trigger an operation for a layer-by-layer debugging control, such as a user may click, double-click, or long-press a layer-by-layer debugging control to generate a layer-by-layer debugging operation. The terminal determines the debugging results of each node in the target calculation graph in response to the layer-by-layer debugging operation. In a specific application, the terminal may perform layer-by-layer debugging for the target calculation graph and obtain the debugging results of each node. The debugging results may include, but are not limited to, various information such as the amount of calculation and time consumption. The terminal may display the debugging results of each node in the calculation graph interaction interface so that the user can view them.

[0066] In this embodiment, the terminal responds to the layer-by-layer debugging operation triggered for the target computation graph, and displays the debugging results of each node in the target computation graph in the computation graph interactive interface, which can support users to intuitively view the debugging results of layer-by-layer debugging of each node in the computation graph, making it easier for users to understand the structure and performance of each node in the computation graph, thereby improving the development efficiency of the computation graph.

[0067] In an exemplary embodiment, Figure 3 As shown, the computational graph-based interactive method includes a computational graph comparison process, specifically including steps 302 to 306. Among them:

[0068] Step 302, in response to a computation graph comparison operation triggered for a target computation graph in a computation graph interaction interface, obtain a computation graph to be compared, and render the computation graph to be compared into the computation graph interaction interface for display, wherein the target computation graph includes a computation graph that supports triggering for interaction and is displayed in the computation graph interaction interface.

[0069] The target computation graph includes the computation graph that supports triggering and interacting displayed in the computation graph interaction interface, that is, the target computation graph is the computation graph that the user interacts with for triggering. The computation graph comparison operation is an interactive operation for comparing computation graphs triggered by the target computation graph. The computation graph to be compared is the computation graph that needs to be compared with the target computation graph.

[0070] Exemplarily, at least one calculation graph may be displayed in the calculation graph interaction interface, and the user may trigger a calculation graph comparison operation for the calculation graph displayed in the calculation graph interaction interface. Specifically, the user may trigger an operation for a calculation graph comparison control, such as a user may click, double-click, or long-press the calculation graph comparison control to generate a calculation graph comparison operation. In response to the calculation graph comparison operation, the terminal obtains the calculation graph to be compared, and the terminal may render the calculation graph to be compared into the calculation graph interaction interface for display.

[0071] Step 304: perform a calculation graph comparison between the target calculation graph and the calculation graph to be compared to obtain a comparison result.

[0072] The comparison result is a result obtained by comparing the target computation graph with the computation graph to be compared. Optionally, the terminal may perform a computation graph comparison between the target computation graph and the computation graph to be compared, specifically, by comparing each node between the target computation graph and the computation graph to be compared, thereby obtaining a comparison result.

[0073] Step 306: Display the target computation graph, the computation graph to be compared, and the comparison result in the computation graph comparison area.

[0074] The calculation graph comparison area is an area for displaying the comparison result. Optionally, the terminal can display the target calculation graph, the calculation graph to be compared, and the comparison result in the calculation graph comparison area, respectively, so as to intuitively display the calculation graph difference between the target calculation graph and the calculation graph to be compared.

[0075] In this embodiment, the terminal responds to the calculation graph comparison operation triggered for the target calculation graph, and displays the target calculation graph, the calculation graph to be compared, and the comparison results in the calculation graph comparison area, so as to facilitate the user to understand the structural differences between different calculation graphs and improve the development efficiency of the calculation graph.

[0076] In an exemplary embodiment, the computational graph-based interaction method further includes: in response to a view adjustment operation triggered on a target computational graph in a computational graph interaction interface, adjusting a display view of the target computational graph according to the view adjustment operation, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; and displaying the target computational graph after view adjustment in the computational graph interaction interface.

[0077] The target computation graph includes the computation graph that supports triggering and interacting displayed in the computation graph interaction interface, that is, the target computation graph is the computation graph that the user interacts with in response to the trigger. The view adjustment operation is an interactive operation that changes the computation graph display view triggered by the target computation graph.

[0078] For example, at least one computational graph may be displayed in the computational graph interaction interface, and the user may trigger a view adjustment operation for the computational graph displayed in the computational graph interaction interface. Specifically, the user may trigger various types of interactive operations such as translation, zooming in, zooming out, and rotating the computational graph through gestures. In response to the view adjustment operation, the terminal adjusts the display view of the target computational graph according to the view adjustment operation, and displays the target computational graph after the view adjustment in the computational graph interaction interface.

[0079] In this embodiment, the terminal responds to the view adjustment operation triggered for the target calculation graph, and displays the target calculation graph after view adjustment in the calculation graph interaction interface, supporting users to intuitively view the calculation graph based on different display views, facilitating users to understand the structure and performance of the calculation graph, and helping to improve the development efficiency of the calculation graph.

[0080] In an exemplary embodiment, the computational graph-based interaction method further includes: in response to a trigger operation on an operator customization entry in a computational graph interaction interface, displaying an operator operation area for triggering interactive operations on the operator, wherein the operator represents the operation performed by the node in the computational graph; in response to an operator customization operation triggered in the operator operation area, displaying an operator customization result obtained based on the operator customization operation in the operator operation area.

[0081] Among them, the operator customization entry is an interactive operation entry for triggering operator customization for the calculation graph, which can include various forms of controls such as buttons, texts, graphics, and pictures. Operators represent the operations performed by nodes in the calculation graph, which can include but are not limited to mathematical operations (such as addition and multiplication), logical operations (such as AND, OR, and NOT), data conversion (such as type conversion and format adjustment), etc. Operators play the role of connecting data (or tensors) in the calculation graph, connecting different nodes through edges to form a complex calculation process. The operator operation area is used for users to perform interactive operations on custom operators, such as adding, editing, or deleting custom operators. Custom operators can be operators built by users according to actual needs. Operator customization operations are interactive operations triggered by users in the operator operation area to process custom operators and obtain operator customization results. Operator customization results can specifically include the results after inserting, deleting, or adjusting custom operators.

[0082] Exemplarily, the computation graph interaction interface may include an operator customization entry, and the user may trigger an interactive operation for the operator customization entry, such as the user may click on the operator customization entry in the computation graph interaction interface. The terminal may display an operator operation area, and the operator operation area is used for the user to trigger an interactive operation for the operator. After the user triggers an operator customization operation in the operator operation area, the terminal responds to the operator customization operation, determines an operator customization result obtained based on the operator customization operation, and specifically obtains a result after the custom operator is inserted, deleted, or adjusted, and the terminal may display the operator customization result in the operator operation area.

[0083] In this embodiment, the terminal responds to a trigger operation on an operator customization entry to display an operator operation area for triggering interactive operations on the operator, and responds to an operator customization operation triggered in the operator operation area to display the operator customization results obtained based on the operator customization operation in the operator operation area, supporting users to flexibly edit customized operators, which is conducive to simplifying the calculation graph editing process, thereby improving the development efficiency of the calculation graph.

[0084] The present application also provides an application scenario, which applies the above-mentioned interaction method based on computational graphs. Specifically, the application of the interaction method based on computational graphs in the application scenario is as follows:

[0085] In the process of developing and optimizing deep learning models, computational graphs are a crucial component. The computational graph represents the structure of the model, including nodes (such as neural network layers) and edges (data flows). However, as the scale of the model increases, the complexity of the computational graph also increases, making it difficult for developers to intuitively understand and analyze the structure and performance of the computational graph. Most of the existing computational graph visualization tools have limited functions and lack the ability to dynamically interact and display in real time. Therefore, developing an efficient, intuitive and feature-rich computational graph visualization tool is of great significance to improving the efficiency of developing and optimizing deep learning models.

[0086] Specifically, in the prior art, visualization tools for computational graphs mainly include TensorBoard, Netron, etc. These tools can display the computational graphs of neural network models to a certain extent, but they have the following shortcomings:

[0087] 1. Static display: Most existing tools are static displays and lack dynamic interactive functions, making it difficult to intuitively adjust the structure and optimize the display.

[0088] 2. Lack of real-time optimization display: The changes before and after the calculation graph optimization cannot be displayed in real time, which affects the developer's understanding of the optimization process and results.

[0089] 3. Limited support for custom operators: Existing tools have limited support for custom operators and cannot intuitively display and debug the execution status and performance of custom operators.

[0090] Therefore, in terms of difficulty of understanding, existing computational graph visualization tools are mostly static displays, making it difficult for developers to intuitively understand and analyze the structure and performance of large-scale deep learning models; in terms of functionality, they lack dynamic interactive functions, making it impossible to perform real-time structural adjustments and optimization displays during the visualization process, limiting the practicality of the tools; in terms of optimization support types, existing tools are unable to display the changes before and after computational graph optimization in real time, affecting developers' understanding and application of the optimization process and results; in terms of custom operator support, there is limited support for display and debugging of custom operators, making it difficult for developers to intuitively display and optimize the execution and performance of custom operators; in terms of multi-model comparison, existing tools usually do not support comparative displays of multiple computational graphs, making it difficult for developers to intuitively compare the structural and performance differences of different models, i.e., multi-model comparison is difficult.

[0091] Based on this, the computational graph-based interactive method provided in this embodiment aims to provide a visualization tool and method for deep learning computational graphs. By providing an interactive visualization interface combined with real-time optimization display, it helps developers understand and optimize computational graphs more intuitively, thereby improving development and debugging efficiency.

[0092] Specifically, the computational graph visualization tool of this embodiment provides an interactive visualization interface, supports operations such as zooming in, zooming out, and panning, and enables developers to freely browse and analyze the structure of the computational graph. In addition, in this embodiment, different types of computational units and data flows are distinguished by the color and shape of nodes and edges, and the overall structure of the computational graph is intuitively displayed.

[0093] For real-time optimization display processing, combined with AI (Artificial Intelligence) compiler technology, the changes before and after the optimization of the calculation graph are displayed in real time to help developers understand the optimization process and results. In addition, it supports dynamic adjustment of the calculation graph structure, automatic adjustment according to optimization suggestions, and real-time update of visualization results. For custom operator display processing, it supports visualization and optimization of custom operators, intuitively displays the execution status and performance of custom operators through a visual interface, and specifically provides the insertion, deletion, and adjustment functions of custom operators to facilitate developers to conduct experiments and debugging.

[0094] For multi-model comparison, it supports the comparative display of multiple calculation graphs, and intuitively compares the structure and performance of different models by side-by-side or superposition. In addition, it also provides a calculation graph structure similarity analysis function to help developers find similarities and differences between models.

[0095] For debugging and analysis tools, debugging tools are provided to support the step-by-step execution of calculation graphs, helping developers to discover and solve problems. In addition, performance analysis tools are also provided to help developers optimize performance by visually displaying the amount of calculation and time consumption of each node in the calculation graph.

[0096] Specifically, Figure 4 As shown, it includes a user interface module, a visualization engine, a data processing module and a compilation interface, wherein: the visualization engine is responsible for rendering and interacting with the computational graph, and provides operations such as zooming in, zooming out, and panning; the compiler interface is connected to the AI ​​compiler to obtain optimization suggestions and results of the computational graph; the data processing module is responsible for parsing and processing the computational graph data, and converting the computational graph into a format suitable for visualization; the user interface module provides a user operation interface, and supports custom operator insertion, deletion, and adjustment functions.

[0097] like Figure 5 An example of an interactive visualization interface is shown in Figure 1. Figure 5 In the interface, the left side is the hierarchical tree of the computational graph, and the right side is the detailed display area of ​​the computational graph. Users can click on a node in the hierarchical tree to view the corresponding computational graph part in the detailed display area.

[0098] like Figure 6 As shown in the figure, an example of the real-time optimization display interface is shown. Specifically, the changes in the optimization process and the optimization results are displayed between the calculation graph display areas before and after the optimization. Users can click the optimization suggestion button to automatically adjust the calculation graph structure and update the visualization results in real time.

[0099] like Figure 7 As shown in the figure, an example of the custom operator display interface is shown. The specific interface provides the functions of inserting, deleting, and adjusting custom operators. Users can intuitively display and debug the execution status and performance of custom operators through the visual interface.

[0100] like Figure 8 Figure 1 shows an example of a multi-model comparison interface. The interface supports the side-by-side display of multiple computational graphs, distinguishing the structure and performance of different models by color and shape. Users can find similarities and differences between different models by dragging and comparing.

[0101] like Fig. 9 Figure 1 shows an example of the debugging and analysis tool interface. The interface provides the function of executing the calculation graph layer by layer to help developers find and solve problems. At the same time, the performance analysis tool helps developers optimize performance by visually displaying the calculation amount and time consumption of each node.

[0102] like Fig.10The figure shows the overall interaction logic. Specifically, the visualization tool is initialized and the deep learning model calculation graph is loaded. After parsing the calculation graph structure, the calculation graph nodes and edges are rendered, so that the calculation graph is rendered for display, supporting users to trigger interactive operations and displaying the corresponding interactive results based on the interactive operations triggered by the user. Specifically, when the user clicks on a node, the node details are displayed; when the user triggers zooming in / out / panning, the view is adjusted; when the user triggers multi-model comparison, multiple models are selected, and the model comparison is displayed side by side or superimposed, so that the user can analyze the model differences; when the user triggers optimization display, optimization suggestions are obtained, and the comparison before and after optimization is displayed, so that the user can analyze the model differences; when the user triggers debugging and analysis, the calculation graph is executed layer by layer, and the calculation amount and time consumption of each node are displayed, so that the user can analyze the model differences; when the user triggers dynamic adjustment, the calculation graph structure is updated and the calculation graph is re-rendered, so that the user can analyze the model differences; when the user triggers a custom operator, according to the operations such as inserting / deleting / adjusting custom operators triggered by the user, the calculation graph is updated and rendered, so that the user can analyze the model differences.

[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0104] Based on the same inventive concept, the embodiment of the present application also provides a computational graph-based interactive device for implementing the computational graph-based interactive method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more computational graph-based interactive device embodiments provided below can refer to the limitations of the computational graph-based interactive method above, and will not be repeated here.

[0105] In an exemplary embodiment, Fig.11 As shown, a computation graph-based interactive device 1100 is provided, comprising: an original computation graph display module 1102, an optimized computation graph determination module 1104, and an optimized result display module 1108, wherein:

[0106] The original calculation graph display module 1102 is used to obtain the calculation graph data and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display;

[0107] The optimized computation graph determination module 1104 is used to optimize and adjust the graph structure of the original computation graph in response to a trigger operation on the optimization entry in the computation graph interaction interface to obtain an optimized computation graph;

[0108] The optimization result display module 1108 is used to display the optimized calculation graph and the calculation graph optimization content in the calculation graph interactive interface, and the calculation graph optimization content at least includes the graph structure difference between the optimized calculation graph and the original calculation graph.

[0109] In one embodiment, it also includes a node interaction response module, which is used to respond to the node interaction operation triggered on the target computational graph in the computational graph interaction interface, determine the target node selected by the node interaction operation in the graph structure of the target computational graph, the target computational graph includes the computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; determine the target graph structure to which the target node belongs and the node information of the target node; and display the target graph structure and the node information in the node display area.

[0110] In one embodiment, a layer-by-layer debugging response module is further included, which is used to respond to the layer-by-layer debugging operation triggered on the target computation graph in the computation graph interaction interface, determine the debugging results of each node in the target computation graph, and the target computation graph includes the computation graph that supports triggering and interacting displayed in the computation graph interaction interface; the debugging results of each node in the target computation graph are displayed in the computation graph interaction interface.

[0111] In one embodiment, it also includes a calculation graph comparison response module, which is used to respond to the calculation graph comparison operation triggered for the target calculation graph in the calculation graph interaction interface, obtain the calculation graph to be compared, and render the calculation graph to be compared into the calculation graph interaction interface for display, wherein the target calculation graph includes the calculation graph that supports triggering interaction and is displayed in the calculation graph interaction interface; perform a calculation graph comparison between the target calculation graph and the calculation graph to be compared to obtain a comparison result; and display the target calculation graph, the calculation graph to be compared, and the comparison result in the calculation graph comparison area.

[0112] In one embodiment, it also includes a view adjustment response module, which is used to respond to a view adjustment operation triggered on a target computational graph in a computational graph interaction interface, adjust the display view of the target computational graph according to the view adjustment operation, and the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; and display the target computational graph after view adjustment in the computational graph interaction interface.

[0113] In one embodiment, it also includes an operator customization response module, which is used to respond to the trigger operation of the operator customization entry in the calculation graph interaction interface, display the operator operation area used to trigger the interactive operation on the operator, and the operator represents the operation performed by the node in the calculation graph; in response to the operator customization operation triggered in the operator operation area, the operator customization result obtained based on the operator customization operation is displayed in the operator operation area.

[0114] Each module in the above-mentioned interactive device based on the computational graph can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0115] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, an interactive method based on a computational graph is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0116] Those skilled in the art will understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0118] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0119] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0120] It should be noted that the user information (including but not limited to user device information, user personal information, 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 regulations.

[0121] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An interactive method based on a computational graph, characterized in that: The method comprises: Obtaining computational graph data, and rendering the original computational graph corresponding to the computational graph data into a computational graph interactive interface for display; In response to a trigger operation on an optimization entry in the computation graph interaction interface, optimizing and adjusting the graph structure of the original computation graph to obtain an optimized computation graph; The optimized computation graph and the computation graph optimization content are displayed in the computation graph interaction interface, and the computation graph optimization content at least includes the graph structure difference between the optimized computation graph and the original computation graph.

2. The method according to claim 1, characterized in that The method further comprises: In response to a node interaction operation triggered on a target computational graph in the computational graph interaction interface, determining a target node selected by the node interaction operation in a graph structure of the target computational graph, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; Determine the target graph structure to which the target node belongs and the node information of the target node; In the node display area, the target graph structure and the node information are displayed.

3. The method according to claim 1, characterized in that The method further comprises: In response to a layer-by-layer debugging operation triggered on a target computation graph in the computation graph interaction interface, determining a debugging result of each node in the target computation graph, wherein the target computation graph includes a computation graph that supports triggering for interaction and is displayed in the computation graph interaction interface; The debugging results of each node in the target calculation graph are displayed in the calculation graph interactive interface.

4. The method according to claim 1, characterized in that: The method further comprises: In response to a computation graph comparison operation triggered on a target computation graph in the computation graph interaction interface, obtaining a computation graph to be compared, and rendering the computation graph to be compared in the computation graph interaction interface for display, wherein the target computation graph includes a computation graph that supports triggering for interaction and is displayed in the computation graph interaction interface; Performing a calculation graph comparison between the target calculation graph and the to-be-compared calculation graph to obtain a comparison result; In the calculation graph comparison area, the target calculation graph, the calculation graph to be compared, and the comparison result are displayed.

5. The method according to claim 1, characterized in that The method further comprises: In response to a view adjustment operation triggered on a target computational graph in the computational graph interaction interface, adjusting a display view of the target computational graph according to the view adjustment operation, wherein the target computational graph includes a computational graph that supports triggering interaction and is displayed in the computational graph interaction interface; The target computational graph after view adjustment is displayed in the computational graph interactive interface.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to a trigger operation on a custom entry of an operator in the computation graph interaction interface, an operator operation area for triggering an interactive operation on the operator is displayed, wherein the operator represents an operation performed by a node in the computation graph; In response to an operator customization operation triggered in the operator operation area, an operator customization result obtained based on the operator customization operation is displayed in the operator operation area.

7. An interactive device based on a computational graph, characterized in that: The device comprises: The original calculation graph display module is used to obtain the calculation graph data and render the original calculation graph corresponding to the calculation graph data into the calculation graph interactive interface for display; An optimized calculation graph determination module is used to optimize and adjust the graph structure of the original calculation graph in response to a trigger operation on the optimization entry in the calculation graph interaction interface to obtain an optimized calculation graph; The optimization result display module is used to display the optimized calculation graph and the calculation graph optimization content in the calculation graph interaction interface, and the calculation graph optimization content at least includes the graph structure difference between the optimized calculation graph and the original calculation graph.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Graph processing method, system and device

    CN114283099A

  • Method and device for comparing process flow diagrams and nonvolatile storage medium

    CN114757164A

  • Algorithm process arrangement method and device, computer equipment and storage medium

    CN117632951A

  • Model processing method and device, electronic equipment and storage medium

    CN117933334A