Topology mapping method, device and equipment and readable storage medium
By dividing the topology graph into multiple scaling levels and grid regions, and preprocessing and caching the data on the server side, the problem of low efficiency in traditional topology graph drawing is solved, achieving efficient topology graph drawing and an improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-17
Smart Images

Figure CN122420128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of telecommunications network management system technology, and in particular to a topology drawing method, apparatus, device and readable storage medium. Background Technology
[0002] The use of topology diagrams in telecommunications network management systems has a long history. They transform complex device connections into an intuitive graphical interface, allowing maintenance personnel to grasp the real-time status of the entire network at a glance, greatly enhancing the ability to quickly locate network faults and analyze their impact. Simultaneously, topology diagrams provide a clear framework for network change planning, effectively reducing operational risks. As the core of visualization, topology diagrams are not only a key tool for improving operational efficiency but also a crucial foundation for achieving intelligent analysis and automated management.
[0003] With the rapid development of cloud computing, the Internet of Things, and 5G technologies, modern telecommunications networks and data center networks are evolving towards ultra-large scale, heterogeneous integration, and high dynamism. The growth in network scale is not a simple linear accumulation; it brings about an explosive growth in connectivity, and the complexity of the corresponding topology and the amount of data that needs to be processed when drawing the topology also increase exponentially.
[0004] Traditional interface-based methods load all the data required to draw the topology map at once, placing high demands on network transmission quality. Due to the large amount of data to be transmitted, low transmission efficiency or timeouts are prone to occur in weak network environments. The efficiency of drawing the topology map on the interface deteriorates as the amount of topology data increases. According to test results, when the number of network facilities in the topology map is 30,000, drawing the topology map takes about 15 seconds, while when the number of network facilities is 100,000, drawing the topology map takes more than 30 seconds.
[0005] In summary, when the number of network facilities in the topology diagram is large, traditional interfaces load all the data required to draw the topology diagram at once, which places high demands on the quality of network transmission and results in low efficiency and a poor user experience when drawing the topology diagram. Summary of the Invention
[0006] This application provides a topology diagram drawing method, apparatus, device, and readable storage medium, aiming to solve the technical problems of low efficiency and poor user experience in drawing topology diagrams when the number of network facilities in the topology diagram is large, where traditional interface terminals load all the data required for drawing the topology diagram at once, which has high requirements for network transmission quality.
[0007] In a first aspect, embodiments of this application provide a method for drawing a topology map, wherein the topology map includes multiple scaling levels, and each scaling level of the topology map is divided into multiple grid regions, and the topology map drawing method includes: The server obtains the preprocessed scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph; For each scaling level of the topology graph in the preprocessing scaling level, preprocessed topology data is generated for each grid region of the topology graph, and the preprocessed topology data for each grid region of the topology graph in each scaling level of the preprocessing scaling level is cached. When the server receives a topology map drawing request from the interface, it looks up the cache based on the requested scaling level and requested grid area in the drawing request, and returns the preprocessed topology data corresponding to the requested scaling level and requested grid area to the interface for the interface to draw the topology map.
[0008] Optionally, generating preprocessed topology data for each grid region of the topology map includes: For each grid region of the topology map, all network facilities within the grid region are determined based on the scale corresponding to the zoom level. If the display distance between multiple network facilities within the grid area on the zoom level topology map is less than the preset distance, then the multiple network facilities will be aggregated into an aggregation point; If any network facility in the aggregation point has a connection with a network facility outside the aggregation point, then it is determined that there is a connection between the aggregation point and the network facility outside the aggregation point. Preprocessed topology data for the grid area is generated based on the network facilities within the grid area, the connections between network facilities, aggregation points, aggregation relationships, and the connections between aggregation points and network facilities outside the aggregation points.
[0009] Optionally, the step of looking up the cache based on the requested zoom level and requested grid region in the drawing request, and returning the preprocessed topology data corresponding to the requested zoom level and requested grid region to the interface includes: The cache is searched based on the requested zoom level and requested grid area in the drawing request; If the preprocessed topology data corresponding to the request scaling level and request grid area is found in the cache, the found preprocessed topology data corresponding to the request scaling level and request grid area will be returned to the interface. If the preprocessed topology data corresponding to the requested scaling level and the requested grid area is not found in the cache, the cache is searched for the scaling level that is closest to the requested scaling level and displays a more detailed topology map, and the preprocessed topology data corresponding to the requested grid area is returned to the interface.
[0010] Optionally, the topology graph drawing method further includes: When a new scaling level is added to the hotspot scaling level, preprocessed topology data is generated for each grid region of the topology map for each new scaling level, and the preprocessed topology data for each grid region of the topology map for each new scaling level is cached.
[0011] Optionally, the topology graph drawing method further includes: When the server detects changes in network facilities and the connections between them, it determines the topology and grid area of the affected scaling level based on the distance between the changed network facility and other network facilities. For the topology map and grid regions affected by the scaling level, preprocessed topology data is generated, and the cache is updated.
[0012] Optionally, the topology graph drawing method further includes: The server transmits the preprocessed topology data of each grid region of the topology map at each scaling level in the hotspot scaling level to the interface for caching, so that the interface can draw the topology map.
[0013] Optionally, the default scaling level of the topology map is the topology map scaling level corresponding to multiple levels of administrative regions, and the hotspot scaling level is the preset number of topology map scaling levels with the most user requests.
[0014] Secondly, embodiments of this application provide a topology map drawing apparatus, wherein the topology map includes multiple scaling levels, and each scaling level of the topology map is divided into multiple grid regions, and the topology map drawing apparatus includes: The acquisition module is used by the server to obtain the preprocessed scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph; The caching module is used to generate preprocessed topology data for each grid region of the topology map at each scaling level in the preprocessing scaling level, and to cache the preprocessed topology data for each grid region of the topology map at each scaling level in the preprocessing scaling level. The lookup and return module is used when the server receives a topology map drawing request from the interface. Based on the requested zoom level and requested grid area in the drawing request, it looks up the cache and returns the preprocessed topology data corresponding to the requested zoom level and requested grid area to the interface for the interface to draw the topology map.
[0015] Thirdly, embodiments of this application provide a topology drawing device, which includes a processor, a memory, and a topology drawing program stored in the memory and executable by the processor, wherein when the topology drawing program is executed by the processor, it implements the steps of the topology drawing method as described above.
[0016] Fourthly, embodiments of this application provide a readable storage medium storing a topology drawing program, wherein when the topology drawing program is executed by a processor, it implements the steps of the topology drawing method as described above.
[0017] The beneficial effects of the technical solutions provided in this application include: In this embodiment, the server obtains the preprocessed scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph. For each scaling level of the topology graph in the preprocessed scaling level, preprocessed topology data is generated for each grid region of the topology graph, and the preprocessed topology data for each grid region of the topology graph in each scaling level is cached. When the server receives a topology graph drawing request from the interface, it searches the cache based on the requested scaling level and requested grid region in the drawing request, and returns the preprocessed topology data corresponding to the requested scaling level and requested grid region to the interface for the interface to draw the topology graph. In this embodiment, the topology map is divided into multiple scaling levels. For example, the higher the scaling level, the smaller the geographical area displayed, and the more detailed the content displayed in the topology map, including more network facilities and their connections. For instance, the scaling levels corresponding to the five commonly used administrative levels of province, city, district, street, and community can be used as the default scaling levels. The scaling levels requested most by users can be statistically ranked to obtain the hotspot scaling levels. For each scaling level in the default and hotspot scaling levels, the server preprocesses and caches the topology data according to the grid area. The topology data mainly refers to the various network facilities and their connections. Thus, when the server receives the topology map drawing request from the interface, it can quickly query and return the preprocessed topology data from the cache, and only return the preprocessed topology data corresponding to the requested scaling level and the requested grid area. Compared with the traditional method of returning the topology data of all grid areas of the requested scaling level at once, this greatly reduces the dependence on network transmission quality. Furthermore, since the server preprocesses the topology data for commonly used and hotspot scaling levels, it can avoid real-time topology data processing on the interface or server, which can greatly improve response efficiency and significantly improve user experience. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating an embodiment of the topology graph drawing method of this application; Figure 2 This is a schematic diagram of a topology diagram according to an embodiment of the topology diagram drawing method of this application; Figure 3 This is a schematic diagram of a conventional method for drawing a topology graph, as described in an embodiment of the method for this application. Figure 4 This is a schematic diagram of the data processing model of an embodiment of the topology graph drawing method of this application; Figure 5 This is a schematic diagram of the functional modules of an embodiment of the topology drawing device of this application; Figure 6 This is a schematic diagram of the hardware structure of the topology drawing device involved in the embodiments of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0021] In a first aspect, embodiments of this application provide a method for drawing a topology graph.
[0022] In one embodiment, the topology map includes multiple scaling levels, and the topology map at each scaling level is divided into multiple grid regions, as shown below. Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the topology graph drawing method of this application, as shown below. Figure 1 As shown, the methods for drawing topology graphs include: Step S10: The server obtains the preprocessing scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph.
[0023] In this embodiment, it should first be noted that this embodiment is mainly applied to a telecommunications network management system and a power grid network management system. The system draws a topology map of network facilities on the interface to facilitate network fault analysis and location. The topology data used to draw the topology map on the interface comes from the server. The topology data mainly refers to the various network facilities and their connections. The topology map in this embodiment can be compared to the zoom levels of Baidu Maps, ranging from 1 to 19, with different scales for each zoom level. The higher the zoom level, the smaller the displayed geographical area, the more detailed the content, and the more network facilities and their connections are included in the topology map. Each zoom level's topology map is divided into multiple grid areas. Subsequent topology data preprocessing and topology map drawing are performed grid by grid area. Specifically, the grid areas can be divided using regular rectangular grids. The size of the grid areas can be dynamically determined based on the actual geographical area and network facility density to ensure that each grid area contains an appropriate number of network facilities (e.g., 200-500). The default scaling level can be set according to the business needs of the telecommunications network management system. For example, the default scaling level can be set to the topology map scaling level corresponding to five administrative regions: province, city, district, street, and community. During system initialization, the server reads the mapping relationship between these five administrative regions and map scaling levels from the configuration file to form a set of default scaling levels. Hotspot scaling levels can be obtained by statistically analyzing user historical request data. For example, the server continuously collects the scaling level parameters in the topology map drawing requests sent by the interface, and periodically (e.g., every 24 hours) statistically sorts the request frequency of each scaling level, selecting the scaling levels with the highest request frequency (e.g., Top 5) as hotspot scaling levels. The preprocessed scaling level is the result of taking the union of the default scaling level (e.g., level 5) and the hotspot scaling level (e.g., level 5) (e.g., a total of 10 levels). Compared with the full scaling levels of the topology map (19 levels), this greatly reduces the amount of topology map data that needs to be processed for scaling levels, while ensuring that basic business needs are covered and personalized user habits are met. It should be noted that during the initial system runtime, since there is no statistical data on user-requested scaling levels, the hotspot scaling level is empty. The topology map for the default scaling level can be processed first, and the processing of the hotspot scaling level topology map can be gradually added later.
[0024] Step S20: For each scaling level of the topology map in the preprocessing scaling level, generate preprocessed topology data for each grid region of the topology map, and cache the preprocessed topology data for each grid region of the topology map in each scaling level of the preprocessing scaling level.
[0025] In this embodiment, the topology map for each scaling level is divided into multiple grid regions. For each scaling level in the preprocessing scaling level, the topology data is preprocessed according to the divided grid regions. This preprocessing mainly involves generating the network facilities and their connections within each grid region. For each scaling level and each grid region, the server performs the following operations: First, based on the scale corresponding to that scaling level, it queries the database to retrieve all network facilities within that grid region. Then, it calculates the display distance between each network facility within the grid region. If the display distance between two or more network facilities at the current scaling level is less than a preset distance (e.g., 5 pixels), these network facilities are aggregated into an aggregation point. The location of the aggregation point is, for example, the geometric center of these network facilities. Next, it checks whether any network facility within the aggregation point has a connection relationship with network facilities outside the aggregation point. If so, a connection relationship is established between the aggregation point and the external network facilities. Finally, the various network facilities within the grid region, the aggregation point, the connections between network facilities, and the connections between the aggregation point and network facilities outside the aggregation point are packaged to generate preprocessed topology data, and stored in a distributed cache system using "scaling level_grid region identifier" as the key.
[0026] Step S30: When the server receives the topology map drawing request from the interface, it searches the cache based on the requested scaling level and requested grid area in the drawing request, and returns the preprocessed topology data corresponding to the requested scaling level and requested grid area to the interface for the interface to draw the topology map.
[0027] In this embodiment, when a user performs operations such as dragging and zooming the topology map on the interface, the interface can determine the zoom level of the topology map currently requested by the user, and calculate the set of grid areas to be displayed based on the coordinates of the upper left and lower right corners of the current viewport. Then, a drawing request containing the requested zoom level and the requested grid area identifier is sent to the server. Upon receiving the request, the server uses "requested zoom level_requested grid area identifier" as the key to search for the corresponding preprocessed topology data in the cache, returns the corresponding preprocessed topology data to the interface, and then the interface renders and draws the topology map based on the preprocessed topology data returned by the server. Figure 2 , Figure 2 This is a schematic diagram of a topology graph according to an embodiment of the topology graph drawing method of this application. Figure 2The topology map in the interface is a pre-drawn topology map at a specific scaling level. Since the server has already performed complex aggregation calculations on network infrastructure and their connections, generating pre-processed topology data, the interface only needs to perform simple graphical rendering based on the received pre-processed topology data. This significantly improves the efficiency of topology map drawing on the interface, thereby substantially enhancing the user experience. Furthermore, only the requested pre-processed topology data for the requested grid area is transmitted between the server and the interface, rather than the pre-processed topology data for the entire scaling level, greatly reducing reliance on network transmission quality.
[0028] In this embodiment, refer to Figure 3 , Figure 3 This is a schematic diagram of a data processing model of a conventional method for drawing a topology graph according to an embodiment of the method described in this application, such as... Figure 3 As shown, the traditional method involves the user interface reading all the data (topology data of all grid areas) required to draw a topology map at a specific zoom level from the server at once. Furthermore, the traditional method performs calculations and processing on the user interface based on the topology data for aggregation points of various network facilities and connection relationships. Finally, the topology map is drawn on the user interface. Once the user drags the map or changes the zoom level, the above steps must be repeated to update the topology map. (Refer to...) Figure 4 , Figure 4 This is a schematic diagram of the data processing model of an embodiment of the topology graph drawing method of this application, as shown below. Figure 4 As shown, this method scales the hotspot level (i.e., ...) on the server side. Figure 4 (Hotspot hierarchy) and default scaling level (i.e.) Figure 4 The default topology (based on the default hierarchy) performs calculations on the aggregation points of various network facilities according to grid regions, and caches the resulting preprocessed topology data on the server. When the user interface requests the topology, it sends the requested scaling level and the preprocessed topology data corresponding to the requested grid region to the user interface. Since the server has already performed complex aggregation calculations on network facilities and their connections to form preprocessed topology data, the user interface only needs to perform simple graphics rendering based on the received preprocessed topology data. This significantly improves the efficiency of drawing the topology map on the user interface, thereby significantly improving the user experience. Furthermore, only the preprocessed topology data of the requested grid region is transmitted between the server and the user interface, rather than the preprocessed topology data of the entire scaling level, which greatly reduces the dependence on network transmission quality.
[0029] Furthermore, in one embodiment, generating preprocessed topology data for each grid region of the topology graph includes: For each grid region of the topology map, all network facilities within the grid region are determined based on the scale corresponding to the zoom level. If the display distance between multiple network facilities within the grid area on the zoom level topology map is less than the preset distance, then the multiple network facilities will be aggregated into an aggregation point; If any network facility in the aggregation point has a connection with a network facility outside the aggregation point, then it is determined that there is a connection between the aggregation point and the network facility outside the aggregation point. Preprocessed topology data for the grid area is generated based on the network facilities within the grid area, the connections between network facilities, aggregation points, aggregation relationships, and the connections between aggregation points and network facilities outside the aggregation points.
[0030] In this embodiment, we continue to refer to... Figure 2 ,exist Figure 2 In the topology diagram shown at a certain zoom level, the aggregation facility brings together six network facilities that are relatively close to each other. Figure 2 The lines in the diagram represent connections between network facilities (optical fiber optic cables connect these facilities). Aggregating multiple network facilities into a single aggregation point avoids displaying overly dense network infrastructure in a high-zoom topology map, which could negatively impact the user's visual experience. If network facilities appear too densely packed within a certain area, it's necessary to aggregate them into a single aggregation point. Specifically, the preset distance determining whether multiple network facilities within a grid area are aggregated into a single aggregation point can be dynamically adjusted based on the zoom level. For example, the lower the zoom level (larger display area), the larger the preset distance, resulting in more aggregated facilities; conversely, the higher the zoom level (smaller display area), the smaller the preset distance, or even no aggregation at all. For instance, at the provincial zoom level, a preset distance of 20 pixels might aggregate hundreds of network facilities within a city into a few aggregation points; while at the community zoom level, a preset distance of 3 pixels might be used, aggregating only facilities physically very close together. For connection handling, not only direct connections but also indirect connections via other network facilities are considered to ensure the aggregated topology map accurately reflects network connectivity. The preprocessed topology data is stored using a lightweight data structure, including a list of aggregation points, a list of original facility information (retained only at high zoom levels), and a list of connectivity relationships. Each data entry contains necessary display attributes (such as location coordinates, type, and status) for rapid rendering on the user interface. Furthermore, network facilities can be aggregated based on business needs; for example, non-connected network facilities can be aggregated based on proximity; and ductwork, towers, etc., are only displayed at the highest zoom level of the topology map.
[0031] Further, in one embodiment, the step of looking up the cache based on the requested zoom level and requested grid region in the drawing request, and returning the preprocessed topology data corresponding to the requested zoom level and requested grid region to the interface includes: The cache is searched based on the requested zoom level and requested grid area in the drawing request; If the preprocessed topology data corresponding to the request scaling level and request grid area is found in the cache, the found preprocessed topology data corresponding to the request scaling level and request grid area will be returned to the interface. If the preprocessed topology data corresponding to the requested scaling level and the requested grid area is not found in the cache, the cache is searched for the scaling level that is closest to the requested scaling level and displays a more detailed topology map, and the preprocessed topology data corresponding to the requested grid area is returned to the interface.
[0032] In this embodiment, when a cache miss occurs, the server searches for the grid region data corresponding to the zoom level closest to the requested zoom level and displaying more detailed topology data. For example, if a user requests data at zoom level 8, but this level of data is not cached, the search starts from zoom level 9 and proceeds to the highest zoom level 19, returning the first data found. Since higher-level data contains more details, the server simplifies it (e.g., by increasing the aggregation threshold) before returning it, ensuring the interface displays a reasonable topology and avoids blank areas. Simultaneously, the server records this cache miss. If the same zoom level experiences frequent misses, the system automatically elevates it to a hot zoom level, triggering preprocessing and caching of data at that level, thereby gradually optimizing system performance.
[0033] Furthermore, in one embodiment, the topology graph drawing method further includes: When a new scaling level is added to the hotspot scaling level, preprocessed topology data is generated for each grid region of the topology map for each new scaling level, and the preprocessed topology data for each grid region of the topology map for each new scaling level is cached.
[0034] In this embodiment, the dynamic update of hotspot scaling levels is implemented through a background task. The server periodically (e.g., every 24 hours) analyzes user request logs and counts the request frequency for each scaling level. When the request frequency of a newly emerging scaling level exceeds a preset threshold (e.g., entering the Top 5), it is determined to be a newly added hotspot scaling level. For each newly added hotspot scaling level, the system starts an asynchronous task to generate preprocessed topology data one by one according to the grid area. To avoid excessive impact on system performance, data generation adopts a batch processing strategy, processing a fixed number (e.g., 100) of grid areas in each batch, and executing during periods of low system load (e.g., at night). The generated preprocessed data is added to the cache, and the preprocessed scaling level set is updated simultaneously to ensure that subsequent requests can hit the cache.
[0035] Furthermore, in one embodiment, the topology graph drawing method further includes: When the server detects changes in network facilities and the connections between them, it determines the topology and grid area of the affected scaling level based on the distance between the changed network facility and other network facilities. For the topology map and grid regions affected by the scaling level, preprocessed topology data is generated, and the cache is updated.
[0036] In this embodiment, network facility change detection can be achieved by monitoring database change logs. When a network facility is added, deleted, or its attributes are changed, or the connection relationship between facilities changes, the system calculates the geographical range affected by the change. For example, taking the point of change as the center, the affected grid area is determined according to the visible range corresponding to different zoom levels (e.g., a radius of 50 kilometers for the provincial zoom level and 10 kilometers for the city level). For each affected zoom level, the system only regenerates the preprocessed topology data of the affected grid area, rather than updating the entire dataset. For example, if a new network facility is added to a community, it mainly affects the grid area where the facility is located and its surrounding areas at the community and street zoom levels, while having little or no impact on the provincial and city zoom levels. When updating the cache, the system first marks the old data as expired before writing the new data to ensure data consistency, and simultaneously records the change log for subsequent analysis.
[0037] Furthermore, in one embodiment, the topology graph drawing method further includes: The server transmits the preprocessed topology data of each grid region of the topology map at each scaling level in the hotspot scaling level to the interface for caching, so that the interface can draw the topology map.
[0038] In this embodiment, when a user logs in or the system initializes, the server proactively pushes preprocessed topology data at a hotspot scaling level (e.g., Top 3) to the local cache on the user interface (e.g., the browser's LocalStorage or IndexedDB). The push strategy uses incremental updates, transmitting only changed data to reduce network traffic. The user interface cache can be managed using an LRU (Least Recently Used) strategy; when the cache space reaches a threshold, the least recently used data is automatically cleared. When a user performs map operations, the user interface prioritizes retrieving data from the local cache; if a cache miss occurs, it then requests data from the server, significantly reducing the number of network requests and response time. Furthermore, the user interface cache supports offline use, allowing the cached topology map to still be displayed even when the network is interrupted, thereby improving the user experience.
[0039] Furthermore, in one embodiment, the default scaling level of the topology map is the topology map scaling level corresponding to multiple levels of administrative regions, and the hotspot scaling level is the preset number of topology map scaling levels with the most user requests.
[0040] In this embodiment, the mapping relationship between administrative regions and scaling levels can be managed through a configuration table. For example, level 0 corresponds to the country, level 1 to the province / municipality, level 2 to the city, level 3 to the district / county, level 4 to the street, and level 5 to the community. The statistics of hotspot scaling levels adopt a sliding window mechanism, such as considering only user request data from the most recent 7 days to avoid interference from historical data in determining current hotspots. The statistics also consider differences in user roles; for example, operations and maintenance personnel may focus more on higher scaling levels (community level), while management personnel may focus more on lower scaling levels (province level). The system can separately calculate hotspot scaling levels for different role groups, providing personalized services. The number of hotspot scaling levels is dynamically adjusted. When system resources are sufficient, more hotspot levels (e.g., Top 10) can be cached; when resources are scarce, fewer (e.g., Top 3) can be cached to optimize resource utilization.
[0041] Secondly, embodiments of this application also provide a topology drawing apparatus.
[0042] In one embodiment, the topology map includes multiple scaling levels, and the topology map at each scaling level is divided into multiple grid regions, as shown below. Figure 5 , Figure 5 This is a functional module schematic diagram of an embodiment of the topology drawing device of this application, as shown below. Figure 5 As shown, the topology drawing device includes: The acquisition module 10 is used to obtain the preprocessing scaling level on the server side. The preprocessing scaling level is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph. Cache module 20 is used to generate preprocessed topology data for each grid region of the topology map for each scaling level in the preprocessing scaling level, and cache the preprocessed topology data for each grid region of the topology map for each scaling level in the preprocessing scaling level. The lookup return module 30 is used to, when the server receives a topology map drawing request from the interface, look up the cache based on the requested scaling level and requested grid area in the drawing request, and return the preprocessed topology data corresponding to the requested scaling level and requested grid area to the interface for the interface to draw the topology map.
[0043] Furthermore, in one embodiment, the generation of preprocessed topology data for each grid region of the topology graph is used for: For each grid region of the topology map, all network facilities within the grid region are determined based on the scale corresponding to the zoom level. If the display distance between multiple network facilities within the grid area on the zoom level topology map is less than the preset distance, then the multiple network facilities will be aggregated into an aggregation point; If any network facility in the aggregation point has a connection with a network facility outside the aggregation point, then it is determined that there is a connection between the aggregation point and the network facility outside the aggregation point. Preprocessed topology data for the grid area is generated based on the network facilities within the grid area, the connections between network facilities, aggregation points, aggregation relationships, and the connections between aggregation points and network facilities outside the aggregation points.
[0044] Furthermore, in one embodiment, the step of looking up the cache based on the requested zoom level and requested grid region in the drawing request, and returning the preprocessed topology data corresponding to the requested zoom level and requested grid region to the interface for: The cache is searched based on the requested zoom level and requested grid area in the drawing request; If the preprocessed topology data corresponding to the request scaling level and request grid area is found in the cache, the found preprocessed topology data corresponding to the request scaling level and request grid area will be returned to the interface. If the preprocessed topology data corresponding to the requested scaling level and the requested grid area is not found in the cache, the cache is searched for the scaling level that is closest to the requested scaling level and displays a more detailed topology map, and the preprocessed topology data corresponding to the requested grid area is returned to the interface.
[0045] Furthermore, in one embodiment, the topology drawing apparatus further includes a new module for: When a new scaling level is added to the hotspot scaling level, preprocessed topology data is generated for each grid region of the topology map for each new scaling level, and the preprocessed topology data for each grid region of the topology map for each new scaling level is cached.
[0046] Furthermore, in one embodiment, the topology drawing apparatus further includes an update module for: When the server detects changes in network facilities and the connections between them, it determines the topology and grid area of the affected scaling level based on the distance between the changed network facility and other network facilities. For the topology map and grid regions affected by the scaling level, preprocessed topology data is generated, and the cache is updated.
[0047] Furthermore, in one embodiment, the topology drawing device further includes an interface-side cache module, used for: The server transmits the preprocessed topology data of each grid region of the topology map at each scaling level in the hotspot scaling level to the interface for caching, so that the interface can draw the topology map.
[0048] Furthermore, in one embodiment, the default scaling level of the topology map is the topology map scaling level corresponding to multiple levels of administrative regions, and the hotspot scaling level is the preset number of topology map scaling levels with the most user requests.
[0049] The functions of each module in the above-mentioned topology drawing device correspond to the steps in the above-mentioned topology drawing method embodiment, and their functions and implementation processes will not be described in detail here.
[0050] Thirdly, embodiments of this application provide a topology drawing device.
[0051] Reference Figure 6 , Figure 6 This is a schematic diagram of the hardware structure of the topology drawing device involved in the embodiments of this application. In the embodiments of this application, the topology drawing device may include a processor, a memory, a communication interface, and a communication bus.
[0052] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0053] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the topology mapping device, as well as interfaces used for interconnecting the topology mapping device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0054] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0055] The processor can be a general-purpose processor, which can call a topology drawing program stored in memory and execute the topology drawing method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the topology drawing program is called can be referred to in various embodiments of the topology drawing method of this application, and will not be repeated here.
[0056] Those skilled in the art will understand that Figure 6 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0057] Fourthly, embodiments of this application also provide a readable storage medium.
[0058] The present application has a readable storage medium storing a topology drawing program, wherein when the topology drawing program is executed by a processor, it implements the steps of the topology drawing method described above.
[0059] The method implemented when the topology drawing program is executed can be referred to in various embodiments of the topology drawing method of this application, and will not be repeated here.
[0060] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0061] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0062] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0063] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0064] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0065] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0066] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for drawing a topology graph, characterized in that, The topology map includes multiple scaling levels, and each scaling level of the topology map is divided into multiple grid regions. The topology map drawing method includes: The server obtains the preprocessed scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph; For each scaling level of the topology graph in the preprocessing scaling level, preprocessed topology data is generated for each grid region of the topology graph, and the preprocessed topology data for each grid region of the topology graph in each scaling level of the preprocessing scaling level is cached. When the server receives a topology map drawing request from the interface, it looks up the cache based on the requested scaling level and requested grid area in the drawing request, and returns the preprocessed topology data corresponding to the requested scaling level and requested grid area to the interface for the interface to draw the topology map.
2. The topology graph drawing method as described in claim 1, characterized in that, The generation of preprocessed topology data for each grid region of the topology graph includes: For each grid region of the topology map, all network facilities within the grid region are determined based on the scale corresponding to the zoom level. If the display distance between multiple network facilities within the grid area on the zoom level topology map is less than the preset distance, then the multiple network facilities will be aggregated into an aggregation point; If any network facility in the aggregation point has a connection with a network facility outside the aggregation point, then it is determined that there is a connection between the aggregation point and the network facility outside the aggregation point. Preprocessed topology data for the grid area is generated based on the network facilities within the grid area, the connections between network facilities, aggregation points, aggregation relationships, and the connections between aggregation points and network facilities outside the aggregation points.
3. The topology graph drawing method as described in claim 1, characterized in that, The step of looking up the cache based on the requested zoom level and requested grid region in the drawing request, and returning the preprocessed topology data corresponding to the requested zoom level and requested grid region to the interface includes: The cache is searched based on the requested zoom level and requested grid area in the drawing request; If the preprocessed topology data corresponding to the request scaling level and request grid area is found in the cache, the found preprocessed topology data corresponding to the request scaling level and request grid area will be returned to the interface. If the preprocessed topology data corresponding to the requested scaling level and the requested grid area is not found in the cache, the cache is searched for the scaling level that is closest to the requested scaling level and displays a more detailed topology map, and the preprocessed topology data corresponding to the requested grid area is returned to the interface.
4. The topology graph drawing method as described in claim 1, characterized in that, The topology graph drawing method further includes: When a new scaling level is added to the hotspot scaling level, preprocessed topology data is generated for each grid region of the topology map for each new scaling level, and the preprocessed topology data for each grid region of the topology map for each new scaling level is cached.
5. The topology graph drawing method as described in claim 1, characterized in that, The topology graph drawing method further includes: When the server detects changes in network facilities and the connections between them, it determines the topology and grid area of the affected scaling level based on the distance between the changed network facility and other network facilities. For the topology map and grid regions affected by the scaling level, preprocessed topology data is generated, and the cache is updated.
6. The topology graph drawing method as described in claim 1, characterized in that, The topology graph drawing method further includes: The server transmits the preprocessed topology data of each grid region of the topology map at each scaling level in the hotspot scaling level to the interface for caching, so that the interface can draw the topology map.
7. The topology graph drawing method as described in claim 1, characterized in that, The default scaling level of the topology map is the topology map scaling level corresponding to multiple levels of administrative regions, and the hotspot scaling level is the preset number of topology map scaling levels with the most user requests.
8. A topology graph drawing device, characterized in that, The topology map includes multiple scaling levels, and each scaling level of the topology map is divided into multiple grid regions. The topology map drawing device includes: The acquisition module is used by the server to obtain the preprocessed scaling level, which is obtained by taking the union of the default scaling level and the hot spot scaling level of the topology graph; The caching module is used to generate preprocessed topology data for each grid region of the topology map at each scaling level in the preprocessing scaling level, and to cache the preprocessed topology data for each grid region of the topology map at each scaling level in the preprocessing scaling level. The lookup and return module is used when the server receives a topology map drawing request from the interface. Based on the requested zoom level and requested grid area in the drawing request, it looks up the cache and returns the preprocessed topology data corresponding to the requested zoom level and requested grid area to the interface for the interface to draw the topology map.
9. A topology graph drawing device, characterized in that, The topology drawing device includes a processor, a memory, and a topology drawing program stored in the memory and executable by the processor, wherein when the topology drawing program is executed by the processor, it implements the steps of the topology drawing method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a topology drawing program, wherein when the topology drawing program is executed by a processor, it implements the steps of the topology drawing method as described in any one of claims 1 to 7.