Data processing visualization method, platform and equipment and storage medium
Through the support layer of the hierarchical architecture system, the automatic conversion of visual node flow and python scripts is solved, and the problems of difficulty in migration of old code and complex node manual definition in graphical application programming are improved, and programming development efficiency is reduced and the probability of errors is reduced.
Patent Information
- Application Number
- CN202510063995.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, graphical application programming requires manual definition of each node, which leads to difficulty in migrating old codes, high complexity, and does not provide a user interface framework, which increases development costs.
The hierarchical architecture system is adopted, including the application layer, the support layer and the data layer. Through the support layer, it realizes efficient and automatic conversion of visual node flow and python scripts, solving the problems of difficulty in migration of old codes and complex node definitions. The support layer and the data layer are closely coordinated and are responsible for data storage, rapid retrieval and transmission.
It improves programming development efficiency, reduces development difficulty and error probability, provides convenient technical means, and makes full use of the intuitiveness of visual programming and the powerful functions and ecological resources of the Python language.
Smart Images

Figure CN119987753A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a data processing visualization method, platform, device and storage medium. Background Art
[0002] In a highly competitive business and technology environment, rapid application delivery is critical. Graphical application programming can encapsulate code blocks into graphical nodes, implement various functions through node connections, and provide a graphical user interface framework to interact with nodes, playing a vital role in modern software development.
[0003] In the prior art, graphical application programming forms a data processing flow through node connections, each node encapsulates a specific function, and corresponding functions are executed in sequence at the terminal according to the processing flow during runtime.
[0004] However, each node needs to be manually defined, relying on the annotations of functions to generate interface properties, and the nodes need to be manually managed, making it difficult for users to migrate old codes and requiring manual management of scripts, resulting in high complexity and time cost. Summary of the invention
[0005] The embodiments of the present application provide a data processing visualization method, platform, device and storage medium to achieve the effect of improving development efficiency.
[0006] In a first aspect, an embodiment of the present application provides a data processing visualization method, which is applied to a data processing visualization platform, wherein the visualization platform includes an application layer, a support layer, and a data layer, and the method includes: generating a run request signal in response to a user's drawing operation and a run trigger operation in a user interface framework of the application layer, and sending the run request signal to the support layer; receiving the run request signal through the support layer, and constructing a first visualization node flow according to the run request signal to obtain construction requirement information; obtaining data resources from the data layer according to the construction requirement information, and saving the data resources to the data node of the first visualization node flow; converting the first visualization node flow into a first python script through the support layer according to preset rules; and executing the first python script through the application layer to obtain a drawing result.
[0007] In a possible implementation, according to preset rules, the first visualization node stream is converted into a first python script through a supporting layer, including: obtaining all tail nodes in the first visualization node stream, wherein the tail node is a node without an output connection in the first visualization node stream; for any tail node, traversing the first visualization node stream in reverse order to determine whether there is a previous node connected to any tail node; if there is a previous node connected to any tail node, generating a python statement according to the connection relationship between any tail node and the previous node; if there is no previous node connected to any tail node, ending the current traversal, and continuing to determine whether there are any unprocessed tail nodes; if there are any unprocessed tail nodes, obtaining the next tail node, and looping "traversing the first visualization node stream in reverse order to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, generating a python statement according to the connection relationship between the next tail node and the previous node" until there is no previous node connected to any tail node; if there is no unprocessed tail node, all generated python statements are organized into a complete first python script in a preset order.
[0008] In a possible implementation, it also includes: in response to the user inputting instructions in the instruction input box of the user interface frame, obtaining a second python script; performing a syntax check on the second python script, and if the syntax is correct, sending the second python script to the support layer; receiving the second python script through the support layer, converting the second python script into a second visual node stream, and sending the second visual node stream to the application layer; receiving the second visual node stream sent by the support layer through the application layer, and displaying it.
[0009] In a possible implementation, the second python script is converted into a second visualization node flow, including: splitting the second python script into multiple independent statements; for each independent statement, determining whether the independent statement is a function call; if the independent statement is not a function call, generating a connection relationship between nodes, obtaining the next independent statement, and executing the step of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in a function retrieval table, and if the function call exists in the function retrieval table, generating a second visualization node according to the function call", wherein the function retrieval table is established according to the python script library of the data layer; if the independent statement is a function call, determining whether the function call exists in the function retrieval table; if the function call exists in the function retrieval table, generating a second visualization node according to the function call; if the function call does not exist in the function retrieval table, obtaining the next independent statement, and executing the step of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in the function retrieval table, and if the function call exists in the function retrieval table, generating a second visualization node according to the function call".
[0010] In a possible implementation, it also includes: reading the Python script library of the data layer through the support layer; parsing the Python script library through the support layer, and converting the Python script library into a visual node stream; splitting the visual node stream into individual nodes and components through the support layer, wherein the components include node combinations with preset functions and independently configurable; sending the components to the application layer through the support layer; the application layer receives the components and stores the components in a component box, wherein the component box is used to provide support for users to select, drag and drop, connect and configure components.
[0011] In a second aspect, an embodiment of the present application provides a data processing visualization platform, including an application layer, a support layer, and a data layer;
[0012] The application layer includes the user interface framework.
[0013] The user interface framework is used to generate an operation request signal in response to a user's drawing operation and an operation triggering operation, and send the operation request signal to the support layer.
[0014] The support layer is used to receive the operation request signal and construct a first visualization node flow according to the operation request signal to obtain construction requirement information.
[0015] The support layer is used to obtain data resources from the data layer according to the construction requirement information, and save the data resources to the data node of the first visualization node flow.
[0016] The support layer is used to convert the first visualization node flow into a first Python script through the support layer according to a preset rule.
[0017] The application layer is used to execute the first python script to obtain the drawing results.
[0018] In a possible implementation, the support layer includes a visualization tool; accordingly, the support layer is used to convert the first visualization node flow into a first Python script through the support layer according to a preset rule, including:
[0019] The visualization tool is used to obtain all tail nodes in the first visualization node stream, wherein the tail nodes are nodes without output connections in the first visualization node stream.
[0020] The visualization tool is used to traverse the first visualization node stream in reverse order for any tail node to determine whether there is a previous node connected to any tail node.
[0021] A visualization tool used to generate Python statements based on the connection relationship between any tail node and the previous node if there is a previous node connected to any tail node.
[0022] A visualization tool is used to end the current traversal if there is no previous node connected to any tail node, and continue to determine whether there is an unprocessed tail node. If there is an unprocessed tail node, obtain the next tail node, and execute "reverse traversal of the first visualization node stream to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, generate a Python statement according to the connection relationship between the next tail node and the previous node" until there is no previous node connected to any tail node.
[0023] The visualization tool is used to organize all generated Python statements into a complete first Python script in a preset order if there is no unprocessed tail node.
[0024] In a possible implementation, it further includes:
[0025] The user interface framework is used to obtain a second Python script in response to a user inputting an instruction in the instruction input box.
[0026] The application layer is used to perform syntax checking on the second python script. If the syntax is correct, the second python script is sent to the support layer.
[0027] The support layer is used to receive the second Python script, convert the second Python script into a second visualization node stream, and send the second visualization node stream to the application layer.
[0028] The application layer is used to receive the second visualization node stream sent by the support layer and display it.
[0029] In a possible implementation, the visualization tool, the support layer, is used to convert the second Python script into a second visualization node flow, including:
[0030] Visual tool for splitting a second python script into multiple independent statements.
[0031] A visualization tool used to determine whether each independent statement is a function call.
[0032] A visualization tool is used to generate a connection relationship between nodes if an independent statement is not a function call, obtain the next independent statement, and execute the steps of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in a function retrieval table, and if the function call exists in the function retrieval table, generating a second visualization node according to the function call", wherein the function retrieval table is established based on the Python script library of the data layer.
[0033] A visualization tool is used to determine whether the function call exists in the function search table if the independent statement is a function call.
[0034] The visualization tool is used to generate a second visualization node according to the function call if the function call exists in the function search table.
[0035] A visualization tool is used to obtain the next independent statement if the function call does not exist in the function search table, and execute the steps of "determining whether the next independent statement is a function call, and if the independent statement is a function call, determining whether the function call exists in the function search table, and if the function call exists in the function search table, generating a second visualization node according to the function call".
[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0037] Memory stores computer-executable instructions;
[0038] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0041] The data processing visualization method, platform, device and storage medium provided in the embodiment of the present application, through the application layer responding to the user's drawing and running triggering operation and sending the running request signal to the support layer, the support layer constructs the first visualization node flow according to the request to obtain the construction requirement information, and obtains the data resources from the data layer according to the construction requirement information and saves them to the data cache of the node flow, thereby realizing the integration of data and visualization logic. The support layer converts the first visualization node flow into a python script according to the preset rules, which greatly improves the efficiency of programming development, reduces the development difficulty and error probability, provides a convenient technical means for application development, and makes full use of the intuitiveness of visual programming and the powerful functions and ecological resources of the python language. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] Figure 1 A schematic diagram of the structure of the data processing visualization platform provided in the embodiment of the present application;
[0044] Figure 2 Schematic diagram of the data processing visualization method provided in the embodiment of the present application Figure 1 ;
[0045] Figure 3 A schematic diagram of a process of converting a first visualization node provided in an embodiment of the present application into a first python script;
[0046] Figure 4 Schematic diagram of the data processing visualization method provided in the embodiment of the present application Figure 2 ;
[0047] Figure 5 A flow chart showing the conversion of the second python script provided in the embodiment of the present application into a second visualization node flow;
[0048] Figure 6 An architectural diagram of a data processing visualization platform provided in an embodiment of the present application;
[0049] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0050] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0052] 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 one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0053] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail. Graphical application programming encapsulates code blocks into graphical nodes, realizes various functions through the connection of nodes, and provides a graphical user interface framework to interact with nodes. Graphical application programming makes complex programming simple, modular and easy to reuse through graphics, with the purpose of quickly and conveniently delivering applications that realize specific functions to users. At present, the technology for realizing graphical application programming has a programming model based on workflow, which forms a processing flow of data through node connection. Each node encapsulates a specific function. During operation, the corresponding function is executed in sequence in the terminal according to the processing flow, and a node editing panel is provided to realize the editing of node functions and codes. However, in this way, each node needs to be manually defined, and the attributes of the interface generated by the annotation of the function are relied on, which makes it difficult for users to migrate their old code, and it is necessary to manually manage the nodes, which increases the complexity and time cost of use, and does not provide a user interface framework. Developers need to implement the user interface themselves, thereby increasing the development cost. The technology for realizing graphical application programming also includes an integrated development environment that can develop front-end and back-end. In the front-end, the user interface is constructed in the form of dragging and dropping, scaling components, etc. in the graphical interface, and the parameters of the components are set in the back-end to realize various functions. However, this solution is developed using web (World Wide Web) technology and can only develop applications based on web technology.
[0054] In response to the above technical problems, the inventors came up with the idea of building a layered architecture system, covering the application layer, support layer and data layer. A lightweight and flexible user interface framework is built at the application layer; the support layer is used to achieve efficient and automatic conversion between visual node flows and python scripts, solving the problems of difficult migration of old codes and complex manual node definition. The support layer and the data layer work closely together to be responsible for data storage, rapid retrieval and transmission.
[0055] Based on the above creative findings, the inventor proposed the technical solution of the present application.
[0056] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0057] Figure 1 This is a schematic diagram of the structure of the data processing visualization platform provided in the embodiment of the present application. Figure 1 As shown, the data processing visualization platform includes a receiving device 101 , a processor 102 and a display device 103 .
[0058] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the data processing visualization method. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0059] In a specific implementation process, the receiving device 101 may be an input / output interface or a communication interface, and is used to receive a user's drawing operation and running trigger operation in the user interface framework.
[0060] The processor 102 can generate a run request in response to the user's drawing operation and run trigger operation, and send the run request to the support layer. By calling the support layer, a first visualization node flow is constructed according to the run request signal, construction requirement information is obtained, the data layer is called to obtain data resources, and the data resources are saved to the data node of the first visualization node flow. According to the preset rules, the first visualization node flow is converted into a first python script. The first python script is sent to the application layer, and the first python script is executed to obtain a drawing result.
[0061] The display device 103 can be used to display the drawing result executed by the application layer in the user interface framework.
[0062] It should be understood that the above-mentioned processor can be implemented by the processor reading instructions in the memory and executing the instructions, or it can be implemented by a chip circuit.
[0063] Figure 2 Schematic diagram of the data processing visualization method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the method includes:
[0064] S201: In response to a drawing operation and an operation triggering operation of a user in a user interface framework of an application layer, an operation request signal is generated, and the operation request signal is sent to a support layer.
[0065] Specifically, the user performs specific drawing operations on the user interface framework provided by the application layer, such as dragging various visual components, connecting components to form preliminary logical relationships, and performing run trigger operations, such as clicking a run button. The application layer captures these operations and generates a run request signal. The application layer sends this run request signal to the support layer.
[0066] S202: receiving an operation request signal through a support layer, and constructing a first visualization node flow according to the operation request signal to obtain construction requirement information.
[0067] Specifically, after receiving the operation request signal from the application layer, the support layer integrates and sorts out the information of various components and their connection relationships to form a complete and executable visual node flow structure. The support layer determines the key elements such as the node type, attributes, and connection mode between nodes to obtain the construction requirement information.
[0068] S203: Acquire data resources from the data layer according to the construction requirement information, and save the data resources to the data nodes of the first visualization node flow.
[0069] Specifically, according to the construction requirement information obtained above, the support layer sends a request to the data layer to obtain data resources from the data layer. These data resources may be various types of data, such as pictures, user data, etc. After obtaining the data, the support layer saves these data resources to the data nodes of the first visualization node flow, so that the data nodes in the node flow have actual data content, so that the first visualization node flow has complete information.
[0070] S204: According to a preset rule, convert the first visualization node flow into a first Python script through a supporting layer.
[0071] Specifically, the support layer converts the first visualization node flow that has been constructed and contains data resources into a first Python script according to a preset rule. Figure 3 A flow chart of converting the first visualization node provided in the embodiment of the present application into a first python script, as shown in FIG. Figure 3 As shown, the conversion method includes:
[0072] Sa1: Get all tail nodes in the first visualization node stream.
[0073] In the visualization node flow, each node has specific input and output connections, which reflect the flow direction of data between nodes and the logical relationship between nodes. The tail node is a node that has no output connection in the entire visualization node flow. They usually represent the final link in the data processing process or the node of the output result.
[0074] Sa2: For any tail node, traverse the first visualization node stream in reverse order to determine whether there is a previous node connected to any tail node.
[0075] Specifically, after obtaining the tail node, the support layer starts to perform reverse traversal for each tail node. During the reverse traversal, the input connection of the current tail node is carefully checked to determine whether there is a previous node connected to it.
[0076] For example, if the tail node is used to display the final calculation result, the reverse traversal is to find which node passed the data to it, and the node that provides the data is the previous node connected to it.
[0077] Sa3: If there is a previous node connected to any tail node, a Python statement is generated according to the connection relationship between any tail node and the previous node.
[0078] Specifically, once it is determined that there is a previous node connected to the current tail node, a Python statement needs to be generated based on the specific connection relationship between them. Different types of nodes and different connection methods between them correspond to different Python language expressions.
[0079] Sa4: If there is no previous node connected to any tail node, end the current traversal, continue to determine whether there is an unprocessed tail node, if there is an unprocessed tail node, get the next tail node, and loop "reverse traversal of the first visual node stream to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, generate a Python statement based on the connection relationship between the next tail node and the previous node" until there is no previous node connected to any tail node.
[0080] Specifically, when a tail node is traversed in reverse order, it is found that there is no previous node connected to it, which means that the source of the branch node flow has been traced back, and the reverse traversal operation for this tail node is terminated. Then, the support layer will select the next tail node and repeat the above process of reverse traversal, judging the previous node, and generating Python statements. This cycle is repeated to ensure that each tail node and its associated node branch are processed accordingly.
[0081] Sa5: If there is no unprocessed tail node, all generated Python statements are sorted into a complete first Python script in a preset order.
[0082] Specifically, after the corresponding python statements are generated for each tail node and its related node connection relationship, the order of these statements may be relatively messy, because they are generated by reverse traversing the tail nodes one by one. Therefore, they need to be sorted in a preset order. This preset order usually follows the grammatical rules of the python language and the normal logical order of program execution, such as defining variables first, then performing data processing operations, and finally outputting results. By reasonably sorting these python statements, it becomes a complete first python script with a clear structure, logical coherence, and can be correctly executed by the python interpreter.
[0083] S205: Execute the first python script through the application layer to obtain a drawing result.
[0084] Specifically, after the application layer receives the first python script converted by the support layer, it starts to execute the script. During the execution process, the python script will process and calculate the data according to its internal logic and generate corresponding results. These results are the drawing results, which may be graphics, data reports, status information updates, etc. displayed on the user interface. The application layer will process these drawing results appropriately, such as displaying them on the user interface frame in an appropriate manner.
[0085] In summary, the application layer responds to the user's drawing and operation triggering operations and sends the operation request signal to the support layer. The support layer constructs the first visual node flow according to the request to obtain the construction requirement information, and obtains data resources from the data layer according to the construction requirement information and saves them to the data ground of the node flow, thus realizing the integration of data and visualization logic. The support layer converts the first visual node flow into a python script according to the preset rules, which greatly improves the efficiency of programming development, reduces the difficulty of development and the probability of error, and provides a convenient technical means for application development, while making full use of the intuitiveness of visual programming and the powerful functions and ecological resources of the python language.
[0086] Figure 4 Schematic diagram of the data processing visualization method provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, the method includes:
[0087] S401: In response to a user inputting an instruction in an instruction input box of a user interface frame, a second Python script is obtained.
[0088] Specifically, in the user interface framework of the application layer, the command input box is a specific area dedicated to receiving user input. When the user operates in the command input box, whether manually entering the Python script content word by word or pasting an existing Python code snippet, the application layer will capture these operation behaviors in real time and accurately obtain the second Python script input by the user.
[0089] S402: Perform a syntax check on the second python script. If the syntax is correct, send the second python script to the support layer.
[0090] Specifically, after obtaining the second python script, the application layer will call the built-in syntax checking mechanism, which will perform a detailed analysis of each character and each line of code in the script based on the official syntax specifications of the python language. From the most basic variable naming rules and data type declarations to complex function definitions, class structures, and the use of various control flow statements, a comprehensive verification is performed. If no syntax errors are found during the inspection, this indicates that the script is correct and complete at the syntax level. At this time, the application layer will transfer the second python script to the support layer according to the established process. If a syntax error is detected, the application layer will promptly give the user a clear error prompt message on the user interface. The prompt message should indicate the location of the error, the type of error, and possible correction suggestions as detailed as possible.
[0091] S403: Receive a second python script through the support layer, convert the second python script into a second visualization node stream, and send the second visualization node stream to the application layer.
[0092] Specifically, Figure 5 A flow chart of converting the second python script provided in the embodiment of the present application into a second visualization node flow, such as Figure 5 As shown, the conversion method includes:
[0093] Sb1: Split the second python script into multiple independent statements.
[0094] Among them, the Python script is composed of a series of statements in a certain logical order. Through specific grammatical rules such as semicolons and newlines as statement separators, the Python script can be split into relatively independent statement units.
[0095] Specifically, when converting a Python script into a visual node flow, the script must first be disassembled.
[0096] Sb2: For each independent statement, determine whether the independent statement is a function call.
[0097] Among them, function call represents the execution operation of a defined function, which often involves data input, processing and output, and corresponds to the function node in the visualization node flow.
[0098] Specifically, by analyzing the grammatical structure of the statement, keywords such as whether the statement contains typical function call features such as function name and brackets, it is determined whether the independent statement belongs to a function call.
[0099] Sb3: If the independent statement is not a function call, a connection relationship between nodes is generated, and the next independent statement is obtained, and the step of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in the function retrieval table, and if the function call exists in the function retrieval table, generating a second visualization node according to the function call" is executed.
[0100] Among them, the function retrieval table is established based on the python script library of the data layer.
[0101] Specifically, when it is determined that an independent statement is not a function call, it means that it may be a variable declaration, assignment statement, or other types of statements such as a control flow statement. For such statements, they are more reflected in the visual node flow as data transfer and logical association between nodes, so the corresponding node connection relationship should be generated. Then the next independent statement is obtained to continue analysis and judgment, and the subsequent judgment steps are repeated.
[0102] Sb4: If the independent statement is a function call, determine whether the function call exists in the function search table.
[0103] Specifically, if an independent statement is a function call, it is determined whether a matching item can be found in the function search table for the function call.
[0104] Sb5: If the function call exists in the function search table, generate a second visualization node according to the function call.
[0105] Specifically, if the function call exists in the function search table, a corresponding second visualization node will be created according to a preset corresponding rule to reflect the function call.
[0106] Sb6: If the function call does not exist in the function retrieval table, obtain the next independent statement and execute the step of "determining whether the next independent statement is a function call; if the independent statement is a function call, determine whether the function call exists in the function retrieval table; if the function call exists in the function retrieval table, generate a second visualization node based on the function call".
[0107] Specifically, if a function call does not exist in the function search table, the next independent statement is obtained, and then the subsequent judgment and conversion related steps are repeated.
[0108] S404: Receive the second visualization node stream sent by the support layer through the application layer and display it.
[0109] Specifically, after receiving the second visualization node stream from the support layer, the application layer will present it in a specific display area of the user interface frame. The display method should highlight the visualization characteristics of the node stream.
[0110] For example, the shape, color, size and other visual elements of each node are displayed in a clear graphical interface, and the connection lines between nodes should intuitively indicate the flow and logical relationship of the data.
[0111] In summary, by disassembling the Python script and converting the function call into a visual node flow based on the function retrieval table to build the node connection relationship, the complex Python script logic can be presented in an intuitive visual node flow, which not only enhances the visualization of programming and facilitates users to understand the code logic structure, data flow and program functions, but also reduces the difficulty of code understanding and debugging. It improves the flexibility and efficiency of programming development.
[0112] In another embodiment of the present application, a component frame in a user interface framework can also be constructed based on the Python script library of the data layer. The method includes:
[0113] S501: Read the Python script library of the data layer through the support layer.
[0114] S502: Parse the Python script library through the support layer and convert the Python script library into a visual node flow.
[0115] Specifically, after obtaining the contents of the Python script library, the support layer begins to deeply parse it. This parsing process involves analyzing and understanding the grammatical structure, logical relationships, and function calls in the script. By using specific parsing algorithms and rules, the support layer can gradually transform the abstract code statements in the Python script into a visual node flow representation.
[0116] S503: Split the visualized node flow into individual nodes and components through the support layer, wherein the components include node combinations that have preset functions and can be independently configured.
[0117] Specifically, the entire visualization node flow is decomposed into individual nodes and components. The component here is a special combination form, which is composed of multiple nodes with associated relationships and preset functions.
[0118] S504: Send the component to the application layer through the support layer.
[0119] Specifically, after the support layer completes the splitting of the visualization node stream, it will pass the extracted components to the application layer.
[0120] S505: The application layer receives the component and stores the component in a component frame, where the component frame is used to provide support for the user to select, drag and drop, connect and configure the component.
[0121] Specifically, after receiving the components from the support layer, the application layer will store them in a special component frame in an orderly manner. This component frame is a visual interaction area designed by the application layer to facilitate user operations.
[0122] In summary, by parsing the Python script library of the data layer and splitting it into components and nodes of the visual node flow, the intuitive presentation of the code logic is greatly improved, the programming threshold is lowered, and the programming development efficiency is improved.
[0123] Figure 6 The architecture diagram of the data processing visualization platform provided in the embodiment of the present application is as follows: Figure 6 As shown, the platform includes an application layer, a support layer and a data layer.
[0124] The application layer includes the user interface framework.
[0125] The user interface framework is used to generate an operation request signal in response to a user's drawing operation and an operation triggering operation, and send the operation request signal to the support layer.
[0126] The support layer is used to receive the operation request signal and construct a first visualization node flow according to the operation request signal to obtain construction requirement information.
[0127] The support layer is used to obtain data resources from the data layer according to the construction requirement information, and save the data resources to the data node of the first visualization node flow.
[0128] The support layer includes visualization tools and data management modules. Acquiring data resources from the data layer is achieved through the data management module.
[0129] Specifically, it includes:
[0130] The visualization tool is used to obtain all tail nodes in the first visualization node stream, wherein the tail nodes are nodes without output connections in the first visualization node stream.
[0131] The visualization tool is used to traverse the first visualization node stream in reverse order for any tail node to determine whether there is a previous node connected to any tail node.
[0132] A visualization tool used to generate Python statements based on the connection relationship between any tail node and the previous node if there is a previous node connected to any tail node.
[0133] A visualization tool is used to end the current traversal if there is no previous node connected to any tail node, and continue to determine whether there is an unprocessed tail node. If there is an unprocessed tail node, obtain the next tail node, and execute "reverse traversal of the first visualization node stream to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, generate a Python statement according to the connection relationship between the next tail node and the previous node" until there is no previous node connected to any tail node.
[0134] The visualization tool is used to organize all generated Python statements into a complete first Python script in a preset order if there is no unprocessed tail node.
[0135] The support layer is used to convert the first visualization node flow into a first Python script through the support layer according to a preset rule.
[0136] The application layer is used to execute the first python script to obtain the drawing results.
[0137] In summary, the application layer responds to the user's drawing and operation triggering operations and sends the operation request signal to the support layer. The support layer constructs the first visual node flow according to the request to obtain the construction requirement information, and obtains data resources from the data layer according to the construction requirement information and saves them to the data ground of the node flow, thus realizing the integration of data and visualization logic. The support layer converts the first visual node flow into a python script according to the preset rules, which greatly improves the efficiency of programming development, reduces the difficulty of development and the probability of error, and provides a convenient technical means for application development, while making full use of the intuitiveness of visual programming and the powerful functions and ecological resources of the python language.
[0138] Continue to refer Figure 6 , when the user inputs instructions in the user interface framework, the data processing visualization platform includes:
[0139] The user interface framework is used to obtain a second Python script in response to a user inputting an instruction in the instruction input box.
[0140] The application layer is used to perform syntax checking on the second python script. If the syntax is correct, the second python script is sent to the support layer.
[0141] The support layer is used to receive the second Python script, convert the second Python script into a second visualization node stream, and send the second visualization node stream to the application layer.
[0142] Specifically, it includes:
[0143] Visual tool for splitting a second python script into multiple independent statements.
[0144] A visualization tool used to determine whether each independent statement is a function call.
[0145] A visualization tool is used to generate a connection relationship between nodes if an independent statement is not a function call, obtain the next independent statement, and execute the steps of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in a function retrieval table, and if the function call exists in the function retrieval table, generating a second visualization node according to the function call", wherein the function retrieval table is established based on the Python script library of the data layer.
[0146] A visualization tool is used to determine whether the function call exists in the function search table if the independent statement is a function call.
[0147] The visualization tool is used to generate a second visualization node according to the function call if the function call exists in the function search table.
[0148] A visualization tool is used to obtain the next independent statement if the function call does not exist in the function search table, and execute the steps of "determining whether the next independent statement is a function call, and if the independent statement is a function call, determining whether the function call exists in the function search table, and if the function call exists in the function search table, generating a second visualization node according to the function call".
[0149] The application layer is used to receive the second visualization node stream sent by the support layer and display it.
[0150] In summary, by disassembling the Python script and converting the function call into a visual node flow based on the function retrieval table to build the node connection relationship, the complex Python script logic can be presented in an intuitive visual node flow, which not only enhances the visualization of programming and facilitates users to understand the code logic structure, data flow and program functions, but also reduces the difficulty of code understanding and debugging. It improves the flexibility and efficiency of programming development.
[0151] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the electronic device further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.
[0152] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the above method.
[0153] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0154] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0155] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0156] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0157] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0158] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0159] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0160] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0161] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0162] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0163] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0164] If the 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 invention, 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. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0165] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0166] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A data processing visualization method, characterized in that: Applied to a data processing visualization platform, the visualization platform includes an application layer, a support layer and a data layer, and the method includes: In response to a drawing operation and an operation triggering operation of a user on the user interface framework of the application layer, generating an operation request signal, and sending the operation request signal to the support layer; Receiving the operation request signal through the support layer, and constructing a first visualization node flow according to the operation request signal to obtain construction requirement information; According to the construction requirement information, data resources are acquired from the data layer, and the data resources are saved to the data nodes of the first visualization node flow; According to a preset rule, converting the first visualization node flow into a first python script through the support layer; The first python script is executed through the application layer to obtain a drawing result.
2. The method according to claim 1, characterized in that The converting the first visualization node flow into a first Python script through the support layer according to a preset rule includes: Acquire all tail nodes in the first visualization node stream, wherein the tail nodes are nodes without output connections in the first visualization node stream; For any tail node, traverse the first visualization node stream in reverse order to determine whether there is a previous node connected to any tail node; If there is a previous node connected to any of the tail nodes, a Python statement is generated according to the connection relationship between any of the tail nodes and the previous node; If there is no previous node connected to any of the tail nodes, the current traversal is terminated, and it is continued to be determined whether there is any unprocessed tail node. If there is any unprocessed tail node, the next tail node is obtained, and the process of "traversing the first visualization node stream in reverse order to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, a Python statement is generated according to the connection relationship between the next tail node and the previous node" is executed repeatedly until there is no previous node connected to any tail node; If the unprocessed tail node does not exist, all generated Python statements are sorted into a complete first Python script in a preset order.
3. The method according to claim 1, characterized in that Also includes: In response to the user inputting an instruction in the instruction input box of the user interface frame, obtaining a second Python script; Performing a syntax check on the second Python script, and if the syntax is correct, sending the second Python script to the support layer; Receiving the second python script through the support layer, converting the second python script into a second visualization node stream, and sending the second visualization node stream to the application layer; The second visualization node stream sent by the support layer is received through the application layer and displayed.
4. The method according to claim 3, characterized in that: The converting the second python script into a second visualization node flow comprises: Split the second python script into multiple independent statements; For each independent statement, determine whether the independent statement is a function call; If the independent statement is not a function call, a connection relationship between nodes is generated, and the next independent statement is obtained, and the step of "determining whether the next independent statement is a function call, if the independent statement is a function call, determining whether the function call exists in the function search table, and if the function call exists in the function search table, generating a second visualization node according to the function call" is performed, wherein the function search table is established according to the Python script library of the data layer; If the independent statement is a function call, determining whether the function call exists in the function search table; If the function call exists in the function search table, generating a second visualization node according to the function call; If the function call does not exist in the function retrieval table, obtain the next independent statement, and execute the step of "determining whether the next independent statement is a function call; if the independent statement is a function call, determine whether the function call exists in the function retrieval table; if the function call exists in the function retrieval table, generate a second visualization node according to the function call".
5. The method according to claim 1, characterized in that Also includes: Read the Python script library of the data layer through the support layer; Parsing the python script library through the support layer, and converting the python script library into a visual node flow; Splitting the visualization node flow into individual nodes and components through the support layer, wherein the components include node combinations with preset functions and independently configurable; sending the component to the application layer through the support layer; The application layer receives the components and stores the components in a component frame, wherein the component frame is used to provide support for a user to select, drag and drop, connect, and configure the components.
6. A data processing visualization platform, characterized in that: Includes application layer, support layer and data layer; The application layer includes a user interface framework; The user interface framework is used to generate an operation request signal in response to a user's drawing operation and an operation triggering operation, and send the operation request signal to the support layer; The support layer is used to receive the operation request signal and construct a first visualization node flow according to the operation request signal to obtain construction requirement information; The support layer is used to obtain data resources from the data layer according to the construction requirement information, and save the data resources to the data nodes of the first visualization node flow; The support layer is used to convert the first visualization node flow into a first python script through the support layer according to a preset rule; The application layer is used to execute the first python script to obtain a drawing result.
7. The platform according to claim 6, characterized in that The support layer includes a visualization tool; Accordingly, the support layer is used to convert the first visualization node flow into a first Python script through the support layer according to a preset rule, including: The visualization tool is used to obtain all tail nodes in the first visualization node stream, wherein the tail nodes are nodes without output connections in the first visualization node stream; The visualization tool is used to traverse the first visualization node stream in reverse order for any tail node to determine whether there is a previous node connected to any tail node; The visualization tool is used to generate a Python statement according to the connection relationship between any tail node and the previous node if there is a previous node connected to any tail node; The visualization tool is used to terminate the current traversal if there is no previous node connected to any tail node, continue to determine whether there is an unprocessed tail node, and if there is an unprocessed tail node, obtain the next tail node, and cyclically execute "reverse traversal of the first visualization node stream to determine whether there is a previous node connected to the next tail node; if there is a previous node connected to the next tail node, generate a Python statement according to the connection relationship between the next tail node and the previous node" until there is no previous node connected to any tail node; The visualization tool is used to organize all generated Python statements into a complete first Python script in a preset order if the unprocessed tail node does not exist.
8. The platform according to claim 6, characterized in that Also includes: The user interface framework is used to obtain a second Python script in response to the user inputting a command in the command input box; The application layer is used to perform a syntax check on the second Python script, and if the syntax is correct, send the second Python script to the support layer; The support layer is configured to receive the second python script, convert the second python script into a second visualization node stream, and send the second visualization node stream to the application layer; The application layer is used to receive and display the second visualization node stream sent by the support layer.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.