Method, device, electronic device and storage medium for displaying topological information
By displaying the topology diagram in Flink development and allowing modification of operator properties, the resource waste caused by inappropriate settings of operator properties is solved, and the program tuning efficiency is improved.
Patent Information
- Application Number
- CN202110088859.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-01-22
AI Technical Summary
During the program running developed by Flink, the operator attribute settings are biased from the operating memory of the physical machine, resulting in waste of resources. The existing technology requires pause of program modification and compilation, which is inefficient and has high labor costs.
By detecting topology information operations, the editing content is obtained to generate a target request, sent to the target engine to convert it into topology information, and the topology diagram is displayed on the display interface, including operator attribute information, allowing users to modify and update operator attributes.
It realizes previewing topology information and modifying operator properties before and after the program is run, avoiding frequent compilation and code modification, and improving operational efficiency.
Smart Images

Figure CN113761419B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for displaying topology information. Background Art
[0002] Currently, R&D users developing based on Flink can write corresponding program codes, edit the parallelism of operators in the program codes, and import the program into the engine for execution after editing. Operators refer to processing modules in the distributed engine. The number of operators is determined by the running memory of the physical machine in the engine. Parallelism corresponds to slots, and the chain strategy refers to a sharing method.
[0003] When implementing the technical solution based on the above method, the inventors found the following problems:
[0004] During actual operation, if the operator properties set in the program code deviate from the actual operation, for example, the physical machine has a large amount of running memory, which allows for a high degree of parallelism, but the parallelism set in the code is low, resulting in resource waste, R&D personnel will need to modify the operator properties in the code.
[0005] When modifying operator properties within the code, the currently running program code must be paused and the operator properties in the original code modified. After the operator properties are modified, the program code must be compiled again and imported into the engine for execution. If the modified code meets the actual requirements, no further modifications are required. If it still does not meet the requirements, the above steps must be repeated, resulting in low efficiency and high labor costs. Summary of the Invention
[0006] The present invention provides a method, device, electronic device and storage medium for displaying topology information, so as to achieve the technical effect of displaying topology information on a display interface, thereby facilitating users to modify the corresponding topology information.
[0007] In a first aspect, an embodiment of the present invention provides a method for displaying topology information, the method comprising:
[0008] When a topology information analysis operation that triggers the target program is detected, the edited content in each content editing control is obtained;
[0009] generating a target request according to the edited content, and sending the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, determines a target string corresponding to the topology information, and feeds back the target string;
[0010] The target character string is received, and a topology diagram corresponding to the target program is generated and displayed on a display interface based on the target character string; the topology diagram includes operator attribute information in the target program.
[0011] In a second aspect, an embodiment of the present invention further provides a device for displaying topology information, the device comprising:
[0012] The editing content determination module is used to obtain the editing content edited in each content editing control when detecting the operation of triggering the topology information parsing of the target program;
[0013] a target string generation module, configured to generate a target request based on the edited content, and send the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, determines a target string corresponding to the topology information, and feeds back the target string;
[0014] The topology map generating module is used to receive the target character string and generate a topology map corresponding to the target program displayed on a display interface based on the target character string; the topology map includes operator attribute information in the target program.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying topology information as described in any one of the embodiments of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to execute the method for displaying topology information as described in any one of the embodiments of the present invention.
[0020] The technical solution of the embodiment of the present invention, through pre-written business logic, obtains the target content edited in each content editing control when an operation that triggers the parsing of the topology information of the target program is detected, generates a target request based on the target content, and sends the target request to the target engine, so that the target engine determines the topology information corresponding to the target program based on the target request, and at the same time, feeds back the topology information. Furthermore, according to the received topology information, a topology map displayed in the corresponding can be reconstructed, which solves the problem in the prior art that the written program code is compiled and imported into the engine and run. When the running status is not good, it is necessary to modify the corresponding operator properties in the original code of the program, and then compile and import it into the engine, which has the technical problems of cumbersome, complex and low efficiency. It realizes the technical effect of being able to preview the topology map, modify the operator properties in the topology map, and then run the target program based on the modified operator properties. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings introduced here only illustrate some of the embodiments to be described by the present invention, and are not exhaustive. A person skilled in the art can derive other drawings based on these drawings without inventive effort.
[0022] Figure 1 A schematic diagram of a flow chart of a method for displaying topology information provided in a first embodiment of the present invention;
[0023] Figure 2 A schematic diagram of the topology structure provided in the first embodiment of the present invention;
[0024] Figure 3 A schematic diagram of a flow chart of a method for displaying topology information provided in the second embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the interface for modifying operator properties provided in the second embodiment of the present invention;
[0026] Figure 5 A schematic diagram of a flow chart of a method for displaying topology information provided in the second embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the structure of a topology information display device provided in the third embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0030] Example 1
[0031] Figure 1 This is a flow chart of a method for displaying topology information provided in the first embodiment of the present invention. This embodiment is applicable to situations where, after a target program is compiled and imported into a distributed engine, the topology information of the target program can be determined, and the topology information can be fed back to a web end so that the web end generates a topology map based on the fed-back topology information. The method can be executed by a device for displaying topology information, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, and the electronic device can be a server.
[0032] like Figure 1 The method of this embodiment includes:
[0033] S110 : When an operation of triggering the parsing of the topology information of the target program is detected, the edited content in each content editing control is obtained.
[0034] Among them, after the program written based on Flink is compiled, it can be imported into the distributed engine, and the topology information corresponding to the Flink program can be generated at this time. The web end can display a button for requesting the parsing of topology information. When it is detected that the user triggers the button, a request for parsing the topology information can be generated and sent to the Flink cluster. If the topology information of program A needs to be parsed at present, program A can be used as the target program. That is, the target program is the program whose topology information needs to be obtained at present. When the topology information of the target program needs to be parsed, the information associated with the target program can be edited in the display interface of the web end so as to generate a corresponding target request based on the associated information. The associated information can be the content edited in the content editing control.
[0035] In this embodiment, the content editing control may be a control for editing the program identification of the target program to be parsed, a control for editing the startup class of the target program, and a control for editing the startup parameters of the target program.
[0036] When a program is imported into the target engine, a program identifier (i.e., a program ID) corresponding to the application is generated. Each target program has a corresponding program ID. The program startup class can be understood as which program is executed, and the startup parameters can be the parameter information when launching the application.
[0037] Specifically, when parsing the target application's topology information, you can write the corresponding parameter information into the target application identifier edit control, the startup class edit control, and the startup parameter edit control on the web client. The edited parameter information serves as the edit content. The edited content in the edit controls allows the target cluster to generate the corresponding topology information based on the information carried in the request information.
[0038] For example, the user can edit the jar package (package identifier of the target program), startup (which programs to execute), and startup parameters in the content editing control. The information edited by the user in the content editing control can be used as the editing content.
[0039] It should be noted that when the target cluster generates topology information based on the received request, the program needs to be imported into the engine first. If the application is not imported into the engine, the corresponding topology information may not be generated.
[0040] Optionally, when the operation of triggering the parsing of the topology information of the target program is detected, before obtaining the edited content edited in each content editing control, it includes: importing the target program into the target engine, so that when the target request for parsing the topology information is received, the topology information is distributed and generated in the target engine according to the target program. Specifically, the target program can be compiled and the compiled target program can be imported into the target engine, that is, the distributed engine, so that when the target engine receives the target request for parsing the topology information, the topology information is generated according to the distribution of the target program in the target engine, and then the character string corresponding to the topology information is fed back to the web end, so that the web end can reconstruct the corresponding topology map.
[0041] S120: Generate a target request according to the edited content, and send the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, determines a target string corresponding to the topology information, and feeds back the target string.
[0042] The target request is generated based on the content edited by the user in the content editing control. This means that the target request can include information such as the program identifier, startup class, and startup parameters. The target engine refers to the engine cluster corresponding to the target program after it is imported into the distributed engine. The topology information is the topology information determined after the target program is imported into the distributed engine, such as the operators executing the target program and the operator parallelism. The target string is the string corresponding to the topology information.
[0043] Specifically, a target request can be generated based on the edited content and sent to the target engine, which processes the target program based on the target request and converts it into corresponding topology information. After the topology information conversion is completed, a string corresponding to the topology information can be generated and fed back to the web client, so that the web client can generate a topology map based on the received string, achieving the technical effect of displaying the topology map on the display interface.
[0044] For example, a target request is generated based on parameters such as jarId (package identifier), entryClass (startup class), and programArgs (startup) that the user edits in the content editing control. The target request can carry these identifiers. After receiving the target request, the target cluster (i.e., the Flink cluster) can generate the corresponding streamGraphJson (for streaming programs) or PlanJson (for batch programs), jobGraphPlan, and slotGroupPlan (slots), and feed this information back to the web client as the corresponding target string JSON.
[0045] S130: Receive the target character string, and generate a topology map corresponding to the target program and displayed on a display interface based on the target character string; the topology map includes operator attribute information in the target program.
[0046] The target string is the string corresponding to the topology information. This string can include the target program's operator attribute information, including parallelism and slot information. The topology graph is a structural diagram obtained by processing the string. Accordingly, the topology graph can also include the operator attribute information edited in the target program. Operator attribute information includes information such as parallelism and operation.
[0047] Specifically, after receiving the target string on the Web side, the target string can be rendered to obtain a topology corresponding to the target string, such as Figure 2 See Figure 2 ,The topology diagram includes information such as slot and parallelism.
[0048] In this embodiment, the generating of a topology diagram corresponding to the target program on the display interface based on the target character string includes: reconstructing the received target character string to obtain a topology diagram displayed on the display interface including the parallelism and slots for running the target program.
[0049] Specifically, the target string includes operator attribute information, including parallelism and slots. After receiving the target string, the target string can be reconstructed to reconstruct a topology diagram including the parallelism and slots of the target program running on the display interface.
[0050] Based on the example of S120, the Web end can draw the corresponding structural diagrams of jobGraphPlan and slotGroupPlan according to the feedback target string, that is, draw a topology diagram corresponding to the target program, achieving the technical effect of pre-drawing the topology diagram on the Web end.
[0051] The technical solution of the embodiment of the present invention, through pre-written business logic, obtains the target content edited in each content editing control when an operation that triggers the parsing of the topology information of the target program is detected, generates a target request based on the target content, and sends the target request to the target engine, so that the target engine determines the topology information corresponding to the target program based on the target request, and at the same time, feeds back the topology information. Furthermore, according to the received topology information, a topology map displayed in the corresponding can be reconstructed, which solves the problem in the prior art that the written program code is compiled and imported into the engine and run. When the running status is not good, it is necessary to modify the corresponding operator properties in the original code of the program, and then compile and import it into the engine, which has the technical problems of cumbersome, complex and low efficiency. It realizes the technical effect of being able to preview the topology map, modify the operator properties in the topology map, and then run the target program based on the modified operator properties.
[0052] Example 2
[0053] Figure 3 This is a flowchart of a topology information display method provided in Example 2 of the present invention. Building on the previous example, when a user modifies operator attributes in a topology graph, the modified operator attributes can be fed back to the target engine, causing the target engine to update the topology information based on the fed-back operator attributes. For specific implementation details, please refer to the technical solution of this example. Technical terms that are identical or corresponding to those in the previous example are not repeated here.
[0054] like Figure 3 As shown, the method includes:
[0055] S210: When an operation of triggering the parsing of the topology information of the target program is detected, the edited content in each content editing control is obtained.
[0056] Specifically, the content that users can edit in the content editing controls on the web page can include the target program's program ID (jar package), startup class (entryClass), and startup parameters (programArgs). The benefit of defining a startup class is that it allows you to determine which program segment within the target program to start, specifically the program segment whose topology information needs to be obtained.
[0057] S220: Generate a target request according to the edited content, and send the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, determines a target string corresponding to the topology information, and feeds back the target string.
[0058] Specifically, the target request generated based on the edited content can be: / jars / :jarid / jobplan, where jars represents the program package, jarid represents the package identifier, and entryClass represents the startup class. After generating the target request, it can be sent to the target engine, namely the Flink cluster. Upon receiving the target request, the target engine processes the target program corresponding to the target request, generates topology information, and converts the topology information into a corresponding target string and feeds it back to the web client, allowing the web client to draw the corresponding topology map based on the received target string.
[0059] S230: Receive the target character string, and generate a topology map corresponding to the target program and displayed on a display interface based on the target character string; the topology map includes operator attribute information in the target program.
[0060] Specifically, a topology corresponding to the target program can be drawn and displayed on the display interface according to the received target character string, and the topology includes operator attribute information of the target program.
[0061] S240: When it is detected that a target control in the topology graph is triggered, the update operator attribute information in the topology graph is obtained, and the update operator attribute information is sent to the target engine, so that the target engine changes the topology information of the target program to obtain updated topology information.
[0062] The user can modify the operator properties in the topology diagram. When the user modifies the operator properties and triggers the confirmation button, the updated operator properties in the topology diagram can be obtained. That is, the updated operator properties are the operator properties modified by the user in the topology diagram. The target control can be a "Confirm" button. The updated operator properties can be sent to the target engine, so that the target engine updates the topology information of the target program based on the received operator properties. The topology information obtained at this time can be used as the updated topology information, that is, the updated topology information is the topology information determined based on the updated operator properties.
[0063] It should be noted that at this time, only the graph topology information is updated, and the original program code of the target program is not updated.
[0064] Specifically, users can modify operator properties in the topology graph. If the updated operator properties need to be synchronized to the target cluster, even if the target cluster runs the program based on the updated operator properties, the "Confirm" target control can be triggered after the operator property change is completed. After the triggering of the confirm target control is detected, the operator properties in the topology graph can be obtained and used as the updated operator properties. At the same time, the updated operator properties are sent to the target engine, so that the target engine can adjust the topology information according to the updated operator properties and then run the program based on the adjusted topology information.
[0065] For example, when the user triggers Figure 2 When you click on an operator attribute, you can see the following pop-up window: Figure 4 As shown in the diagram, users can modify operator properties, such as parallelism, operator name, and slot information. When the user triggers the target control "Change", the updated operator property information can be fed back to the target cluster.
[0066] In this embodiment, after the updated operator properties are sent to the target cluster, in order to facilitate the user to confirm whether the target cluster adjusts the topology information based on the updated operator properties, corresponding target data can be generated and fed back to the Web end so that the user can confirm that the Flink cluster has updated the topology information.
[0067] Optionally, update target data corresponding to the updated topology information fed back by the target engine is received, and a topology map corresponding to the updated topology information is reconstructed based on the update target data.
[0068] The update target data is a character string corresponding to the updated topology information. In this case, the topology map is a topology map generated according to the user's update target data.
[0069] Specifically, after sending the update operator attributes to the target engine, the target engine can adjust the topology information based on the received update operator attributes. After the topology information adjustment is completed, it can feedback the string corresponding to the updated topology information. After receiving the updated string, the web client can reconstruct the target string to obtain the updated topology map.
[0070] In this embodiment, a specific implementation method is as follows: the user can modify the operator's name, parallelism, operator strategy, slot, and other attributes in the topology. After the user clicks "Confirm", the modified operator attribute information is sent to the Flink cluster, i.e., the target cluster. The target cluster updates the topology structure based on the received attribute information. The target cluster can then execute the corresponding task based on the updated topology structure.
[0071] In this embodiment, in order to adjust the topology information based on the updated operator attributes, when the target cluster receives the target request, it can generate not only the topology information but also the corresponding operator identifier.
[0072] Optionally, the target request is sent to the target engine so that the target engine determines the hash value of the target program executed by each operator, stores the hash value in the target engine and as a partial string in the target string; accordingly, the update operator attribute information is sent to the target engine so that the target engine changes the topology information of the target program to obtain updated topology information, including: sending the update operator attribute information to the target engine so that the target engine changes the topology information of the target program based on the hash value to obtain updated topology information.
[0073] A unique hash value can be generated based on the operator's corresponding position in the program. Without modifying the corresponding program, a hash value can be generated for each operator and remains unchanged. This approach ensures that after modifying operator properties in the topology, they are mapped one-to-one with the Flink cluster. Furthermore, the modified property information can be passed to the Flink-generated operators, achieving the purpose of modifying operator properties.
[0074] Specifically, when the target sends a target request to the target engine, the target engine can determine the hash value of each operator executing the target program, store the hash value in the target engine, and use the hash value as a partial string in the target string. Accordingly, after the user updates the operator attributes and sends the operator attributes to the target engine, the target engine can update the topology information of the target program based on the hash value and obtain the updated topology information.
[0075] The technical solution of the embodiment of the present invention, through pre-written business logic, obtains the target content edited in each content editing control when an operation that triggers the parsing of the topology information of the target program is detected, generates a target request based on the target content, and sends the target request to the target engine, so that the target engine determines the topology information corresponding to the target program based on the target request and feeds back the topology information. Furthermore, the Web end can reconstruct the corresponding topology map based on the received topology information, which solves the problem in the prior art that the written program code is compiled and imported into the engine and run. When the running status is not good, it is necessary to modify the corresponding operator properties in the original code of the program, and then compile and import it into the engine, which has the technical problems of cumbersome, complex and low efficiency. It realizes the technical effect of being able to preview the topology map, modify the operator properties in the topology map, and then run the target program based on the modified operator properties.
[0076] As an alternative embodiment of the above embodiment, Figure 5 This is a flowchart of a method for displaying topology information provided by Embodiment 2 of the present invention. After a user needs to determine the topology information of a target program, they can trigger the "Request Topology Resolution" button on the web display interface. The web client can then send a request to the target cluster to request the topology resolution interface. The Flink cluster (target cluster) can then generate the corresponding topology information based on the received request. Simultaneously, the Flink cluster can generate a corresponding target string based on the topology information and send the target string back to the web client. After receiving the target string, the web client can reconstruct a topology graph corresponding to the topology information from the target string. If the user needs to modify the topology information, they can modify the attribute information in the topology graph and, after the modification is complete, trigger the "Confirm" button. The web client can send the modified operator attributes to the Flink cluster. The Flink cluster regenerates the topology information based on the user's modified operator attributes and sends it back to the web client. After receiving the feedback, the web client can display the modified topology graph. This allows the user to easily confirm that the Flink cluster has adjusted the topology graph based on the updated operator attributes. The modified topology information can then be submitted to apply the user's modifications to the corresponding topology nodes, and the job can be submitted to run the target program based on the submitted job.
[0077] Example 3
[0078] Figure 6 This is a schematic structural diagram of a topology information display device provided in a third embodiment of the present invention. The device includes: an editing content determination module 310 , a target character string generation module 320 , and a topology map generation module 330 .
[0079] Among them, the editing content determination module 310 is used to obtain the editing content edited in each content editing control when a topology information operation that triggers the parsing of the target program is detected; the target string generation module 320 is used to generate a target request based on the editing content, and send the target request to the target engine, so that the target engine converts the target program into topology information based on the target request, determines the target string corresponding to the topology information, and feeds back the target string; the topology map generation module 330 is used to receive the target string, and generate a topology map corresponding to the target program displayed on the display interface based on the target string; the topology map includes operator attribute information in the target program.
[0080] The technical solution of the embodiment of the present invention, through pre-written business logic, obtains the target content edited in each content editing control when an operation that triggers the parsing of the topology information of the target program is detected, generates a target request based on the target content, and sends the target request to the target engine, so that the target engine determines the topology information corresponding to the target program based on the target request and feeds back the topology information. Furthermore, the Web end can reconstruct the corresponding topology map based on the received topology information, which solves the problem in the prior art that the written program code is compiled and imported into the engine and run. When the running status is not good, it is necessary to modify the corresponding operator properties in the original code of the program, and then compile and import it into the engine, which has the technical problems of cumbersome, complex and low efficiency. It realizes the technical effect of being able to preview the topology map, modify the operator properties in the topology map, and then run the target program based on the modified operator properties.
[0081] Based on the above technical solution, the editing content determination module is used to import the target program into the target engine before obtaining the editing content edited in each content editing control when a topology information operation that triggers the parsing of the target program is detected, so as to distribute and generate topology information in the target engine according to the target program when a target request for parsing the topology information is received.
[0082] On the basis of the above technical solutions, the editing content includes the program identifier of the target program, the startup class of the target program and the startup parameters of the target program.
[0083] Based on the above technical solutions, the target string generation module is also used to generate a target request sent to the target engine based on the program identifier, startup class and startup parameters in the editing content, so that the target engine converts the target program into topology information based on the target request, and converts the topology information into a target string.
[0084] On the basis of the above technical solutions, the topology map generating module is further used to reconstruct the received target character string to obtain a topology map including the parallelism and slots of the target running program displayed on the display interface.
[0085] Based on the above technical solutions, the device also includes: a topology information update module, which is used to obtain the update operator attribute information in the topology map when it is detected that the target control in the topology map is triggered, and send the update operator attribute information to the target engine, so that the target engine changes the topology information of the target program to obtain updated topology information.
[0086] Based on the above technical solutions, the device also includes: a topology map display module, which is used to receive updated target data corresponding to the updated topology information fed back by the target engine, and reconstruct a topology map corresponding to the updated topology information based on the updated target data.
[0087] Based on the above technical solutions, the device further includes: a hash value determination module, configured to send the target request to a target engine, so that the target engine determines a hash value of the target program executed by each operator, and stores the hash value in the target engine and as a partial string in the target string;
[0088] Correspondingly, the topology map display module is further used to: send the update operator attribute information to the target engine, so that the target engine changes the topology information of the target program based on the hash value to obtain updated topology information.
[0089] The device for displaying topology information provided by the embodiment of the present invention can execute the method for displaying topology information provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0090] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the embodiments of the present invention.
[0091] Example 4
[0092] Figure 7 This is a structural diagram of an electronic device provided in Example 4 of the present invention. Figure 7 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 7 The electronic device 40 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present invention.
[0093] like Figure 7 As shown, electronic device 40 is a general-purpose computing device. Components of electronic device 40 may include, but are not limited to, one or more processors or processing units 401, system memory 402, and a bus 403 connecting various system components (including system memory 402 and processing unit 401).
[0094] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0095] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0096] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, often called a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0097] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0098] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 40, and / or any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0099] The processing unit 401 executes various functional applications and data processing by running programs stored in the system memory 402 , such as implementing the method for displaying topology information provided by an embodiment of the present invention.
[0100] Example 5
[0101] The fifth embodiment of the present invention further provides a storage medium including computer-executable instructions, wherein the computer-executable instructions are used to execute a method for displaying topology information when executed by a computer processor.
[0102] The method includes:
[0103] When a topology information analysis operation that triggers the target program is detected, the edited content in each content editing control is obtained;
[0104] generating a target request according to the edited content, and sending the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, determines a target string corresponding to the topology information, and feeds back the target string;
[0105] The target character string is received, and a topology diagram corresponding to the target program is generated and displayed on a display interface based on the target character string; the topology diagram includes operator attribute information in the target program.
[0106] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0107] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0108] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0109] The computer program code for performing the operations of the embodiments of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for displaying topology information, characterized in that: include: When an operation of triggering the parsing of the topology information of the target program is detected, the editing content edited in each content editing control is obtained; the editing content includes the program identifier of the target program, the startup class of the target program, and the startup parameters of the target program; Generate a target request based on the program identifier, startup class, and startup parameters in the edited content, and send the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, converts the topology information into a target string, and feeds back the target string; wherein the target engine refers to the engine cluster corresponding to the target program after it is imported into the distributed engine, and the topology information includes operators and operator parallelism for executing the target program; receiving the target character string, and generating a topology map corresponding to the target program and displayed on a display interface based on the target character string; the topology map includes operator attribute information in the target program; The method further comprises: When it is detected that a target control in the topology graph is triggered, the update operator attribute information in the topology graph is obtained, and the update operator attribute information is sent to the target engine, so that the target engine changes the topology information of the target program, obtains updated topology information, and runs the target program based on the updated topology information; Receive updated target data corresponding to the updated topology information fed back by the target engine, and reconstruct a topology map corresponding to the updated topology information based on the updated target data.
2. The method according to claim 1, characterized in that Before obtaining the edited content in each content editing control when the topology information parsing operation of the target program is detected, the method includes: The target program is imported into the target engine, so that when a target request for parsing topology information is received, topology information is distributed and generated in the target engine according to the target program.
3. The method according to claim 1, characterized in that The target character string includes operator attribute information, and the operator attribute information includes parallelism and slots. The generating of a topology corresponding to the target program on a display interface based on the target character string includes: By reconstructing the received target character string, a topology diagram including the parallelism and slots for running the target program is obtained and displayed on a display interface.
4. The method according to claim 1, wherein Also includes: Sending the target request to a target engine so that the target engine determines a hash value of the target program executed by each operator, and storing the hash value in the target engine and as a partial character string in the target character string; The step of sending the update operator attribute information to the target engine so that the target engine changes the topology information of the target program to obtain updated topology information includes: The update operator attribute information is sent to the target engine, so that the target engine modifies the topology information of the target program based on the hash value to obtain updated topology information.
5. A device for displaying topological information, characterized in that: include: An editing content determination module is configured to obtain the editing content edited in each content editing control when an operation triggering parsing of the topology information of a target program is detected; the editing content includes a program identifier of the target program, a startup class of the target program, and startup parameters of the target program; a target string generation module, configured to generate a target request based on the program identifier, startup class, and startup parameters in the edited content, and send the target request to a target engine, so that the target engine converts the target program into topology information based on the target request, converts the topology information into a target string, and feeds back the target string; wherein the target engine refers to the engine cluster corresponding to the target program after it is imported into the distributed engine, and the topology information includes the operators and operator parallelism for executing the target program; A topology map generating module, configured to receive the target character string and generate a topology map corresponding to the target program and displayed on a display interface based on the target character string; the topology map includes operator attribute information in the target program; The device further comprises: a topology information updating module, configured to, when detecting that a target control in the topology graph is triggered, obtain attribute information of an update operator in the topology graph, and send the attribute information of the update operator to a target engine, so that the target engine changes the topology information of the target program, obtains updated topology information, and runs the target program based on the updated topology information; The topology map display module is used to receive updated target data corresponding to the updated topology information fed back by the target engine, and reconstruct a topology map corresponding to the updated topology information based on the updated target data.
6. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying topology information according to any one of claims 1 to 4. 7 . A storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to execute the method for displaying topology information according to claim 1 .