Overall scaling method and device for layered topological graph, equipment and medium

By calculating the height and width of the overall container and container, the overall scaling of the hierarchical topology diagram is achieved, which solves the problem of misalignment of layer information and topology diagrams, and ensures the synchronous scaling and scale control of the hierarchical topology diagram.

CN120010727APending Publication Date: 2025-05-16BEIJING YOUTEJIE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510100244.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

During the page scaling process of hierarchical topology diagrams, the elements of the layer information and topology diagrams are easily misaligned, resulting in misunderstanding of the system architecture.

Method used

By calculating the scaling height and width of the entire container, combining configuration information, the height and width of the first and second containers are calculated, and the current scaling ratio, the second container height and width are sent to the topology drawing component, synchronous scaling of the layer information and the topology diagram are achieved.

Benefits of technology

It avoids the misalignment problem between layer information and topology diagrams, ensures the correspondence between layers and graphs during the overall scaling of layer topology diagrams, flexibly controls the scaling ratio, and prevents the layer height from being blocked enough.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010727A_ABST
    Figure CN120010727A_ABST
Patent Text Reader

Abstract

The invention discloses an overall scaling method and device for a layered topological graph, equipment and a medium. The method comprises the following steps: determining a current scaling according to a scaling operation of a user on a page; when it is determined that the current zooming proportion belongs to the preset proportion interval, the zooming height and the zooming width of the whole container are calculated; calculating a first container height and a first container width; calculating the height and the width of the second container; and sending the current scaling, the height of the second container and the width of the second container to a topological graph drawing component in the second container to realize topological graph scaling through the topological graph drawing component, and scaling other elements of the page according to the current scaling and a preset integral container scaling style. By adopting the technical scheme, when the hierarchical topological graph in the page is zoomed, the layer information is kept corresponding to the elements of the topological graph, and the situation that the layer information and the topological graph are staggered is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for overall scaling of a layered topology graph. Background Art

[0002] A hierarchical topology diagram is a graphical representation method that divides and displays the structure and connection relationships of a complex system according to different levels. A hierarchical topology diagram usually contains multiple levels, each of which has relatively independent functions or attributes.

[0003] The layer information in the layered topology diagram helps users clearly see the position and role of each layer in the entire system topology. If the layer information is not aligned with the topology diagram, it may lead to misunderstanding of the system architecture.

[0004] However, in the prior art, when zooming a page displaying a layered topology map, due to the different scaling logic of the topology map and the layer information, it may result in only the topology map being scaled, or only the layer information being scaled. For example, for a page that displays layer information on the left and the topology map on the right, if only part of the information is zoomed, the elements in the topology map cannot be aligned with the layer information on the left. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for overall scaling of a layered topology map, which can ensure that when the layered topology map in a page is scaled, the layer information and the elements of the topology map remain corresponding, thereby avoiding misalignment between the layer information and the topology map.

[0006] According to one aspect of the present invention, a method for overall scaling of a layered topology graph is provided, comprising:

[0007] Determine the current zoom ratio according to the user's zoom operation on the page;

[0008] When it is determined that the current zoom ratio belongs to the preset ratio range, the zoom height and the zoom width of the entire container are calculated according to the actual height and the actual width of the entire container and the current zoom ratio;

[0009] Calculate the height and width of the first container according to the zoom height, zoom width, current zoom ratio and preset configuration information of the entire container;

[0010] Calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container;

[0011] The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0012] According to another aspect of the present invention, there is provided an overall scaling device for a layered topology graph, comprising:

[0013] A zoom ratio determination module, used to determine the current zoom ratio according to the user's zoom operation on the page;

[0014] The overall container parameter calculation module is used to calculate the zoom height and zoom width of the overall container according to the actual height and actual width of the overall container and the current zoom ratio when it is determined that the current zoom ratio belongs to a preset ratio interval;

[0015] A first container parameter calculation module, used to calculate the first container height and the first container width according to the zoom height, zoom width, current zoom ratio and preset configuration information of the whole container;

[0016] A second container parameter calculation module, used to calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the first container height and the first container width of the entire container;

[0017] The layered topology map zoom module is used to send the current zoom ratio, the second container height and the second container width to the topology map drawing component in the second container, so as to realize the topology map zoom through the topology map drawing component, and realize the zoom of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0019] at least one processor; and

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the overall scaling method of the layered topology graph described in any embodiment of the present invention.

[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the overall scaling method of the layered topology graph described in any embodiment of the present invention when executed.

[0023] The technical solution of the embodiment of the present invention determines the current zoom ratio according to the user's zooming operation on the page. When it is determined that the current zoom ratio belongs to a preset ratio range, the zoom height and zoom width of the entire container are calculated, and the height, width, height and width of the first container, the first container width, and the height and width of the second container are calculated. The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology map drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style. The layered topology map can be zoomed as a whole instead of zooming the topology map separately, which can avoid the problem of mismatch between layers and maps after zooming. The maximum and minimum zoom ratios can be set to flexibly control the maximum and minimum ratios allowed for the overall zooming, and the minimum height of the layer can be set to avoid the problem of occlusion caused by insufficient layer height after zooming.

[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 is a flow chart of a method for overall scaling of a hierarchical topology graph provided according to Embodiment 1 of the present invention;

[0027] Figure 2 is a schematic diagram of a layered topology diagram provided according to an embodiment of the present invention;

[0028] Figure 3 A reduced hierarchical topology map page is provided according to an embodiment of the present invention;

[0029] Figure 4 is an enlarged hierarchical topology map page provided according to an embodiment of the present invention;

[0030] Figure 5is a flow chart of another overall scaling method for a hierarchical topology graph provided according to the second embodiment of the present invention;

[0031] Figure 6 is a schematic diagram of the structure of an overall scaling device for a layered topology graph provided according to Embodiment 3 of the present invention;

[0032] Figure 7 It is a structural schematic diagram of an electronic device for implementing the overall scaling method of a layered topology graph according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] Embodiment 1

[0036] Figure 1 This is a flowchart of a method for overall scaling of a layered topology map provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where the layer information in the layered topology map is scaled synchronously with the topology map. The method can be executed by an overall scaling device for a layered topology map. The overall scaling device for a layered topology map can be implemented in the form of hardware and / or software and can generally be configured in a computer or processor with data processing capabilities. Figure 1 As shown, the method includes:

[0037] S110: Determine a current zoom ratio according to a user's zoom operation on the page.

[0038] Optionally, the page may refer to a page that displays a hierarchical topology diagram.

[0039] Figure 2 is a schematic diagram of an optional hierarchical topology diagram. Figure 2 As shown, the left side of the page shows the layer information of the layered topology diagram, and the right side shows the topology diagram. Figure 2 The outermost box in the can be used as the overall container, which includes Figure 2 The left box and the right box in the figure, wherein the left box can be used as a first container, and the right box can be used as a second container, the first container is a layer information page carrier, and the second container is a topology map page carrier.

[0040] Figure 2 It can be seen as a layered topological map at the original scale. Figure 2 In the diagram, the layer information on the left is divided into the system layer, service layer, process layer and host layer. Each layer on the left corresponds to a topology node on the right.

[0041] It is understandable that since there is no layered logic in the topology map and it has a unique scaling logic, when the page displaying the layered topology map is scaled using the existing technology, the layer information and the topology map cannot be scaled proportionally.

[0042] Optionally, the zoom operation can be used to change the size of the hierarchical topology map in the page. Users can use the zoom operation to adjust the visual presentation size of the content to better view details or get an overall view. The zoom operation can be based on a zoom center, such as the center of the content, the position of the mouse pointer, or a fixed point, and enlarge or reduce the content according to a certain scale factor.

[0043] Optionally, the zoom ratio may refer to the ratio of the page to the original size after the user zooms in and out of the page, which determines the degree to which the content is zoomed in relative to the original size. For example, a zoom ratio of 0.5 means that the page is reduced to half of its original size, and a zoom ratio of 2 means that the page is enlarged to twice its original size.

[0044] Optionally, the zoom operation may be that the user directly inputs the zoom ratio. If the user directly inputs the zoom ratio, the zoom ratio entered by the user is used as the current zoom ratio. The zoom operation may also be that the user clicks on the zoom in or zoom out component on the page. If the user clicks on the zoom in or zoom out component on the page, the current zoom ratio is determined based on a pre-set scale factor and the zoom ratio before clicking the component. For example, the scale factor may be 0.1. When the user clicks on the zoom in component, if the zoom ratio before the click is 1, the current zoom ratio after the zoom operation is 1.1. When the user clicks on the zoom out component, the current zoom ratio after the zoom operation is 0.9. This is only an example.

[0045] S120: When it is determined that the current zoom ratio belongs to a preset ratio interval, the zoom height and zoom width of the entire container are calculated according to the actual height and actual width of the entire container and the current zoom ratio.

[0046] Optionally, for the page where the layered topology diagram is located, a maximum zoom ratio and a minimum zoom ratio in the configuration information are preset, and the maximum zoom ratio and the minimum zoom ratio constitute a preset ratio range.

[0047] Optionally, the height and width of the overall container can determine the height and width of the page.

[0048] It can be understood that, taking a page with a resolution of 1024*2048 as an example, when the zoom ratio is 0.5, the actual resolution of the page is 512*1024, and when the zoom ratio is 2, the actual resolution of the page is 2048*4096. However, due to the limitations of the screen display and in order to ensure the user's reading experience, the actual size after scaling cannot be directly used as the display size. Therefore, it is necessary to determine the scaled width and scaled height of the overall container based on the actual height and actual width of the overall container.

[0049] Optionally, the actual height and actual width of the entire container may represent the height and width of the page that have not been adaptively adjusted according to the screen display. For example, when zooming out, if the page is displayed according to the actual height and actual width of the entire container, the page may only occupy a small part of the screen, and the rest may be blank; the scaled height and scaled width may represent the height and width of the page after adaptive adjustment according to the screen display, so that the visible area in the page displays the layered topology diagram.

[0050] Figure 3 An optional reduced-size hierarchical topology map page. Figure 4 is an optional enlarged hierarchical topology map page. Figure 3 as well as Figure 4 As shown, when the page is displayed according to the zoom height and zoom width, whether zoomed in or out, the layered topology map is flattened in the entire screen. When zoomed out, the layer information and the topology map are zoomed out synchronously, and when zoomed in, the layer information and the topology map are zoomed in synchronously. When displaying the enlarged topology map, if all the information of the layered topology map cannot be displayed on the page, a scroll bar is added at the bottom and / or right side of the page so that the entire layered topology map can be viewed by dragging the scroll bar.

[0051] The first container is a layer information page carrier, the second container is a topology map page carrier, and the overall container includes the first container and the second container.

[0052] Optionally, the first container and the second container may be configured as two adjacent rectangles that share a common side, and the entire container may be determined based on the outermost contours of the first container and the second container. Figure 2 In order to distinguish different containers, a certain gap is left between the containers, but in fact the containers are closely connected.

[0053] Optionally, the scaling height newHeight of the entire container can be calculated according to the formula newHeight=Height / scale, where Height is the actual height of the entire container and scale is the current scaling ratio; the scaling width newWidth of the entire container can be calculated according to the formula newWidth=Width / scale, where Width is the actual width of the entire container.

[0054] S130: Calculate a first container height and a first container width according to a zoom height, a zoom width, a current zoom ratio, and preset configuration information of the entire container.

[0055] Optionally, the configuration information of the page also includes hierarchical setting information, which may include information such as the number of layer information on the left side of the hierarchical topology diagram, the layer information name of each layer, and the layer information style.

[0056] Optionally, based on the number of layer information in the hierarchy setting information, it can be determined whether the number of layers is greater than 0. If so, the single layer height layersHeight is calculated according to the formula layersHeight=newHeight / scale / layerList, where layerList is the number of layer information; if not, the single layer height is calculated according to the formula layersHeight=newHeight / scale.

[0057] Optionally, the configuration information of the page also includes a minimum layer height.

[0058] Optionally, after calculating the single-layer height, determine whether the single-layer height is greater than the minimum height. If so, determine the single-layer height as the target single-layer height of each layer in the first container; if not, determine the minimum layer as the target single-layer height of each layer in the first container.

[0059] Optionally, when the number of layers in the first container is greater than 0, after determining the target single-layer height, the product of the target single-layer height and the number of layers is calculated, and a determination is made as to whether the product is greater than the zoom height. If so, it means that the actual height of the layered topology map is still greater than the height that can be displayed on the page. In this case, the zoom height of the entire container is used as the height of the first container. If so, it means that the height of the topology map is less than the height that can be displayed on the page, and the topology map can be fully displayed vertically. In this case, the product is used as the height of the first container.

[0060] Optionally, an original width may be preset for the first container. The original width may be a fixed width of the first container that does not change with scaling. Alternatively, a ratio of the original width to the current scaling ratio may be determined as the width of the first container.

[0061] S140: Calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container.

[0062] Optionally, calculating the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container includes:

[0063] Determine whether the height of the first container is greater than the scaling height;

[0064] If yes, the height of the second container is calculated according to the formula topoHeight=layersHeight / scale; if no, the height of the second container is calculated according to the formula topoHeight=layerList*BoxMinHeight;

[0065] Among them, topoHeight is the height of the second container, layersHeight is the height of the first container, scale is the current zoom ratio, layerList is the number of layers in the first container, and BoxMinHeight is the minimum layer height;

[0066] Calculate the width of the second container according to the formula topoWidth = newWidth - layersWidth / scale;

[0067] Among them, topoWidth is the width of the second container, newWidth is the scaled width, and layersWidth is the width of the first container.

[0068] S150, sending the current zoom ratio, the second container height and the second container width to the topology drawing component in the second container, so as to implement topology map zooming through the topology drawing component, and implement zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0069] Optionally, the layer information in the first container in the layered topology diagram can be scaled along with the page. For example, when the page is zoomed in, the text, icons, etc. in the first container are evenly zoomed in. The scaling logic of the first container is the same as that of the overall container.

[0070] Optionally, in order to solve the problem that the scaling logic of the topology map is different from that of the page, it is necessary to calculate the height and width of the second container so that the topology map drawing component can redraw the topology map of the same size according to the size of the second container. For a single layered topology map, the number of layers is fixed, and the vertical distances between nodes at all levels in the topology map are equal. Therefore, the layer information after scaling must correspond to the topology map.

[0071] The technical solution of the embodiment of the present invention determines the current zoom ratio according to the user's zooming operation on the page. When it is determined that the current zoom ratio belongs to a preset ratio range, the zoom height and zoom width of the entire container are calculated, and the height, width, height and width of the first container, the first container width, and the height and width of the second container are calculated. The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology map drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style. The layered topology map can be zoomed as a whole instead of zooming the topology map separately, which can avoid the problem of mismatch between layers and maps after zooming. The maximum and minimum zoom ratios can be set to flexibly control the maximum and minimum ratios allowed for the overall zooming, and the minimum height of the layer can be set to avoid the problem of occlusion caused by insufficient layer height after zooming.

[0072] Embodiment 2

[0073] Figure 5 This is a flowchart of a method for scaling a hierarchical topology graph provided by Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifically describes a method for calculating the width and height of the first container and the second container. Figure 5 As shown, the method includes:

[0074] S210: Determine a current zoom ratio according to a user's zoom operation on the page.

[0075] After determining the current zoom ratio according to the user's zoom operation on the page, the following steps may also be included:

[0076] Determine the scale interval according to the maximum scale ratio and the minimum scale ratio in the configuration information;

[0077] When it is determined that the current zoom ratio does not belong to the ratio interval, the overall zooming operation on the layered topology graph is terminated.

[0078] Optionally, ending the overall zooming operation on the layered topology map can be understood as not zooming the page, and the page still maintains the zoom ratio before the user operation.

[0079] S220: When it is determined that the current zoom ratio belongs to a preset ratio interval, the zoom height and the zoom width of the entire container are calculated according to the actual height and the actual width of the entire container and the current zoom ratio.

[0080] S230: Calculate the target single-layer height according to the scaling height of the entire container, the layer setting information in the configuration information, and the current scaling ratio.

[0081] Calculating the target single-layer height according to the scaling height of the overall container, the layer setting information in the configuration information, and the current scaling ratio may include:

[0082] Determine the number of layers in the first container according to the layer setting information, and calculate the height of a single layer according to the scaling height of the entire container, the number of layers, the current scaling ratio, and a layer height calculation formula that matches the number of layers;

[0083] Determine whether the single-layer height is less than the minimum height in the configuration information; if so, use the minimum height as the target single-layer height; if not, use the calculated single-layer height as the target single-layer height.

[0084] S240: Calculate the first container height according to the target single-layer height, the layer setting information, and the scaled overall container height.

[0085] Calculating the height of the first container according to the target single-layer height, the layer setting information, and the scaled overall container height may include:

[0086] Calculate the product of the number of layers and the target single-layer height, and determine whether the product result is greater than the scaling height;

[0087] If so, the multiplication result is used as the first container height; if not, the scaled height is used as the first container height.

[0088] Optionally, when the number of layers is 0, it can be determined whether the target single-layer height is greater than the zoom height; if so, the target single-layer height is used as the first container height; if not, the zoom height is used as the first container height.

[0089] S250: Calculate the first container width according to the current zoom ratio.

[0090] S260: Calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container.

[0091] Calculating the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container includes:

[0092] Determine whether the height of the first container is greater than the scaling height;

[0093] If yes, the height of the second container is calculated according to the formula topoHeight=layersHeight / scale; if no, the height of the second container is calculated according to the formula topoHeight=layerList*BoxMinHeight;

[0094] Among them, topoHeight is the height of the second container, layersHeight is the height of the first container, scale is the current zoom ratio, layerList is the number of layers in the first container, and BoxMinHeight is the minimum layer height;

[0095] Calculate the width of the second container according to the formula topoWidth = newWidth - layersWidth / scale;

[0096] Among them, topoWidth is the width of the second container, newWidth is the scaled width, and layersWidth is the width of the first container.

[0097] S270, sending the current zoom ratio, the second container height and the second container width to the topology drawing component in the second container, so as to implement topology map zooming through the topology drawing component, and implement zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0098] The technical solution of the embodiment of the present invention determines the current zoom ratio according to the user's zooming operation on the page. When it is determined that the current zoom ratio belongs to a preset ratio range, the zoom height and zoom width of the entire container are calculated, and the height, width, height and width of the first container, the first container width, and the height and width of the second container are calculated. The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology map drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style. The layered topology map can be zoomed as a whole instead of zooming the topology map separately, which can avoid the problem of mismatch between layers and maps after zooming. The maximum and minimum zoom ratios can be set to flexibly control the maximum and minimum ratios allowed for the overall zooming, and the minimum height of the layer can be set to avoid the problem of occlusion caused by insufficient layer height after zooming.

[0099] Embodiment 3

[0100] Figure 6 The schematic diagram of the structure of a device for scaling a hierarchical topology graph provided in the third embodiment of the present invention is shown in FIG. Figure 6 As shown, the device includes: a scaling ratio determining module 310 , an overall container parameter calculating module 320 , a first container parameter calculating module 330 , a second container parameter calculating module 340 , and a layered topology scaling module 350 .

[0101] The zoom ratio determination module 310 is used to determine the current zoom ratio according to the user's zoom operation on the page.

[0102] The overall container parameter calculation module 320 is used to calculate the zoom height and zoom width of the overall container according to the actual height and actual width of the overall container and the current zoom ratio when it is determined that the current zoom ratio belongs to a preset ratio interval.

[0103] The first container parameter calculation module 330 is used to calculate the first container height and the first container width according to the zoom height, zoom width, current zoom ratio and preset configuration information of the entire container.

[0104] The second container parameter calculation module 340 is used to calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the first container height and the first container width of the entire container.

[0105] The layered topology map zoom module 350 is used to send the current zoom ratio, the second container height and the second container width to the topology map drawing component in the second container, so as to realize the topology map zooming through the topology map drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0106] The technical solution of the embodiment of the present invention determines the current zoom ratio according to the user's zooming operation on the page. When it is determined that the current zoom ratio belongs to a preset ratio range, the zoom height and zoom width of the entire container are calculated, and the height, width, height and width of the first container, the first container width, and the height and width of the second container are calculated. The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology map drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style. The layered topology map can be zoomed as a whole instead of zooming the topology map separately, which can avoid the problem of mismatch between layers and maps after zooming. The maximum and minimum zoom ratios can be set to flexibly control the maximum and minimum ratios allowed for the overall zooming, and the minimum height of the layer can be set to avoid the problem of occlusion caused by insufficient layer height after zooming.

[0107] Based on the above embodiments, the first container parameter calculation module 330 may include:

[0108] A single-layer height calculation unit is used to calculate the target single-layer height according to the scaling height of the overall container, the layer setting information in the configuration information, and the current scaling ratio;

[0109] A first container height calculation unit, used for calculating the first container height according to the target single-layer height, the layer setting information and the scaled overall container height;

[0110] The first container width calculation unit is used to calculate the first container width according to the current zoom ratio.

[0111] Based on the above embodiments, the single-layer height calculation unit can be specifically used for:

[0112] Determine the number of layers in the first container according to the layer setting information, and calculate the height of a single layer according to the scaling height of the entire container, the number of layers, the current scaling ratio, and a layer height calculation formula that matches the number of layers;

[0113] Determine whether the single-layer height is less than the minimum height in the configuration information; if so, use the minimum height as the target single-layer height; if not, use the calculated single-layer height as the target single-layer height.

[0114] Based on the above embodiments, the first container height calculation unit may be specifically used for:

[0115] Calculate the product of the number of layers and the target single-layer height, and determine whether the product result is greater than the scaling height;

[0116] If so, the multiplication result is used as the first container height; if not, the scaled height is used as the first container height.

[0117] Based on the above embodiments, the second container parameter calculation module 340 can be specifically used for:

[0118] Determine whether the height of the first container is greater than the scaling height;

[0119] If yes, the height of the second container is calculated according to the formula topoHeight=layersHeight / scale; if no, the height of the second container is calculated according to the formula topoHeight=layerList*BoxMinHeight;

[0120] Among them, topoHeight is the height of the second container, layersHeight is the height of the first container, scale is the current zoom ratio, layerList is the number of layers in the first container, and BoxMinHeight is the minimum layer height;

[0121] Calculate the width of the second container according to the formula topoWidth = newWidth - layersWidth / scale;

[0122] Among them, topoWidth is the width of the second container, newWidth is the scaled width, and layersWidth is the width of the first container.

[0123] On the basis of the above embodiments, the first container is a layer information page carrier, the second container is a topology map page carrier, and the overall container includes the first container and the second container.

[0124] On the basis of the above embodiments, a proportional interval determination module may be further included, which is used to:

[0125] Determine the scale interval according to the maximum scale ratio and the minimum scale ratio in the configuration information;

[0126] When it is determined that the current zoom ratio does not belong to the ratio interval, the overall zooming operation on the layered topology graph is terminated.

[0127] The overall scaling device for a layered topology graph provided in an embodiment of the present invention can execute the overall scaling method for a layered topology graph provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0128] Embodiment 4

[0129] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0130] like Figure 7As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0131] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0132] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the overall scaling method of the hierarchical topology map described in an embodiment of the present invention. That is:

[0133] Determine the current zoom ratio according to the user's zoom operation on the page;

[0134] When it is determined that the current zoom ratio belongs to the preset ratio range, the zoom height and the zoom width of the entire container are calculated according to the actual height and the actual width of the entire container and the current zoom ratio;

[0135] Calculate the height and width of the first container according to the zoom height, zoom width, current zoom ratio and preset configuration information of the entire container;

[0136] Calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container;

[0137] The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

[0138] In some embodiments, the overall scaling method of the layered topology map can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the overall scaling method of the layered topology map described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the overall scaling method of the layered topology map in any other appropriate manner (for example, by means of firmware).

[0139] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0140] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0141] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 of the foregoing.

[0142] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0144] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0145] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0146] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for overall scaling of a hierarchical topology graph, characterized in that: include: Determine the current zoom ratio according to the user's zoom operation on the page; When it is determined that the current zoom ratio belongs to the preset ratio range, the zoom height and the zoom width of the entire container are calculated according to the actual height and the actual width of the entire container and the current zoom ratio; Calculate the height and width of the first container according to the zoom height, zoom width, current zoom ratio and preset configuration information of the entire container; Calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container; The current zoom ratio, the second container height and the second container width are sent to the topology drawing component in the second container, so as to realize the topology map zooming through the topology drawing component, and realize the zooming of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

2. The method according to claim 1, characterized in that: Calculating the height and width of the first container according to the zoom height, zoom width, current zoom ratio and preset configuration information of the entire container includes: Calculate the target single-layer height based on the scaling height of the overall container, the layer setting information in the configuration information, and the current scaling ratio; Calculating the height of the first container according to the target single-layer height, the layer setting information, and the scaled overall container height; Calculate the first container width based on the current zoom ratio.

3. The method according to claim 2, characterized in that Calculate the target single-layer height based on the scaling height of the overall container, the layer setting information in the configuration information, and the current scaling ratio, including: Determine the number of layers in the first container according to the layer setting information, and calculate the height of a single layer according to the scaling height of the entire container, the number of layers, the current scaling ratio, and a layer height calculation formula that matches the number of layers; Determine whether the single-layer height is less than the minimum height in the configuration information; if so, use the minimum height as the target single-layer height; if not, use the calculated single-layer height as the target single-layer height.

4. The method according to claim 3, characterized in that: Calculating the height of the first container according to the target single-layer height, the layer setting information, and the scaled overall container height, including: Calculate the product of the number of layers and the target single-layer height, and determine whether the product result is greater than the scaling height; If so, the multiplication result is used as the first container height; if not, the scaled height is used as the first container height.

5. The method according to claim 3, characterized in that: Calculating the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the height of the first container, and the width of the first container, including: Determine whether the height of the first container is greater than the scaling height; If yes, the height of the second container is calculated according to the formula topoHeight=layersHeight / scale; if no, the height of the second container is calculated according to the formula topoHeight=layerList*BoxMinHeight; Among them, topoHeight is the height of the second container, layersHeight is the height of the first container, scale is the current zoom ratio, layerList is the number of layers in the first container, and BoxMinHeight is the minimum layer height; Calculate the width of the second container according to the formula topoWidth = newWidth - layersWidth / scale; Among them, topoWidth is the width of the second container, newWidth is the scaled width, and layersWidth is the width of the first container.

6. The method according to claim 1, characterized in that The first container is a layer information page carrier, the second container is a topology map page carrier, and the overall container includes the first container and the second container.

7. The method according to claim 1, characterized in that After determining the current zoom ratio according to the user's zoom operation on the page, it also includes: Determine the scale interval according to the maximum scale ratio and the minimum scale ratio in the configuration information; When it is determined that the current zoom ratio does not belong to the ratio interval, the overall zooming operation on the layered topology graph is terminated.

8. An overall scaling device for a layered topology graph, characterized in that: include: A zoom ratio determination module, used to determine the current zoom ratio according to the user's zoom operation on the page; The overall container parameter calculation module is used to calculate the zoom height and zoom width of the overall container according to the actual height and actual width of the overall container and the current zoom ratio when it is determined that the current zoom ratio belongs to a preset ratio interval; A first container parameter calculation module, used to calculate the first container height and the first container width according to the zoom height, zoom width, current zoom ratio and preset configuration information of the whole container; A second container parameter calculation module, used to calculate the height and width of the second container according to the zoom height, zoom width, current zoom ratio, configuration information, the first container height and the first container width of the entire container; The layered topology map zoom module is used to send the current zoom ratio, the second container height and the second container width to the topology map drawing component in the second container, so as to realize the topology map zoom through the topology map drawing component, and realize the zoom of other elements of the page according to the current zoom ratio and the preset overall container zoom style.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the overall scaling method for the layered topology graph according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the overall scaling method of the layered topology graph according to any one of claims 1 to 7 when executed.