US-20260128952-A1 - Topology Information Display Method, Apparatus, and Device, and Computer-Readable Storage Medium
Abstract
A method includes obtaining topology information of a common subnet corresponding to a display request specific to a first network resource, where the common subnet includes a first subnet and a second subnet, the first subnet is a subnet that includes the first network resource, the second subnet is a subnet other than the first subnet, and the topology information includes information about at least one network resource of the first subnet and the second subnet, and a connection relationship between the at least one network resource; and displaying the first network resource in a distinguishable manner on a basis of displaying the topology information.
Inventors
- Changsheng Sun
- Chen Huang
- Jusan Liu
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260507
- Application Date
- 20251229
- Priority Date
- 20230630
Claims (20)
- 1 . A method comprising: obtaining topology information of a common subnet corresponding to a display request specific to a first network resource, wherein the common subnet comprises a first subnet and a second subnet, wherein the first subnet comprises the first network resource, and wherein the topology information comprises first information about at least one network resource of the first subnet and the second subnet and comprises a first connection relationship between the at least one network resource; displaying the topology information; and displaying, based on topology view of the topology information, the first network resource
- 2 . The method according to claim 1 , wherein the first network resource comprises a plurality of network elements, wherein the common subnet is in a network topology, comprises the first network resource, and comprises a smallest quantity of the network elements or is of a lowest level in the network topology.
- 3 . The method according to claim 2 , wherein any one of the plurality of network elements corresponds to a reference subnet, wherein the reference subnet is in the network topology, comprises any one of the network elements, and comprises a smallest quantity of the network elements or is of a lowest level in the network topology.
- 4 . The method according to claim 1 , wherein the at least one network resource comprises: the first subnet and the second subnet; network elements in the first subnet and the second subnet; or first network elements in the first subnet and second network elements in the second subnet.
- 5 . The method according to claim 1 , further comprising: obtaining association information of the common subnet, wherein the association information comprises second information about a second network resource connected to the common subnet and comprises a second connection relationship between the second network resource and the at least one network resource; and displaying, based on displaying the topology information, the association information.
- 6 . The method according to claim 5 , wherein obtaining the association information comprises: determining, in a third subnet connected to the common subnet and based on the topology information and a subnet parameter of the third subnet, the second network resource, wherein the subnet parameter comprises at least one of a subnet density or a subnet depth, wherein the subnet density indicates a degree of density of network elements in the third subnet, and wherein the subnet depth indicates a relative level of the third subnet with respect to a reference level; and determining, based on the second network resource, the association information.
- 7 . The method according to claim 1 , wherein the common subnet is in a network topology, and wherein obtaining the topology information comprises: obtaining an identifier that is of the first network resource and that is carried in the display request; and determining, based on the identifier and the network topology, the topology information.
- 8 . An apparatus comprising: a memory configured to store instructions; and one or more processors coupled to the memory, wherein when executed by the one or more processors, the instructions cause the apparatus to: obtain topology information of a common subnet corresponding to a display request specific to a first network resource, wherein the common subnet comprises a first subnet and a second subnet, wherein the first subnet comprises the first network resource, and wherein the topology information comprises first information about at least one network resource of the first subnet and the second subnet and comprises a first connection relationship between the at least one network resource; display the topology information; and display, based on a topology view of the topology information, the first network resource.
- 9 . The apparatus according to claim 8 , wherein the first network resource comprises a plurality of network elements, wherein the common subnet is in a network topology, comprises the first network resource, and comprises a smallest quantity of the network elements or is of a lowest level in the network topology.
- 10 . The apparatus according to claim 9 , wherein the common subnet comprises a plurality of reference subnets corresponding to the plurality of network elements.
- 11 . The apparatus according to claim 8 , wherein the at least one network resource comprises any one of: the first subnet and the second subnet; network elements in the first subnet and the second subnet; or first network elements in the first subnet and second network elements in the second subnet.
- 12 . The apparatus according to claim 8 , wherein when executed by the one or more processors, the instructions further cause the apparatus to: obtain association information of the common subnet, wherein the association information comprises second information about a second network resource connected to the common subnet, and comprises a second connection relationship between the second network resource and the at least one network resource; and display, based on displaying the topology information, the association information.
- 13 . The apparatus according to claim 12 , wherein when executed by the one or more processors, the instructions further cause the apparatus to further obtain the association information by: determining, in a third subnet connected to the common subnet and based on the topology information and a subnet parameter of the third subnet, the second network resource, wherein the subnet parameter comprises at least one of subnet density or subnet depth, wherein the subnet density indicates a degree of density of network elements in the third subnet, and wherein the subnet depth indicates a relative level of the third subnet with respect to a reference level; and determining, based on the second network resource, the association information.
- 14 . The apparatus according to claim 8 , wherein the common subnet is in a network topology, and wherein when executed by the one or more processors, the instructions further cause the apparatus to further obtain the topology information by: obtaining an identifier that is of the first network resource and that is carried in the display request; and determining, based on the identifier and the network topology, the topology information.
- 15 . A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable storage medium and that, when executed by one or more processors, cause an apparatus to: obtain topology information of a common subnet corresponding to a display request to a first network resource, wherein the common subnet comprises a first subnet and a second subnet, wherein the first subnet comprises the first network resource, and wherein the topology information comprises first information about at least one network resource of the first subnet and the second subnet and comprises a first connection relationship between the at least one network resource; display the topology information; and display, based on a topology view of the topology information, the first network resource.
- 16 . The computer program product according to claim 15 , wherein the first network resource comprises a plurality of network elements, wherein the common subnet is in a network topology, comprises the first network resource, and comprises a smallest quantity of the network elements or is of a lowest level in the network topology.
- 17 . The computer program product according to claim 15 , wherein at least one network resource comprises any one of: the first subnet and the second subnet; network elements in the first subnet and the second subnet; or first network elements in the first subnet and second network elements in the second subnet.
- 18 . The computer program product according to claim 15 , wherein when executed by the one or more processors, the computer-executable instructions further cause the apparatus to: obtain association information of the common subnet, wherein the association information comprises second information about a second network resource connected to the common subnet, and comprises a second connection relationship between the second network resource and the at least one network resource; and display, based on displaying the topology information, the association information.
- 19 . The computer program product according to claim 18 , wherein when executed by the one or more processors, the computer-executable instructions further cause the apparatus to further obtain the association information by: determining, in a third subnet connected to the common subnet and based on the topology information and a subnet parameter of the third subnet, the second network resource, wherein the subnet parameter comprises at least one of subnet density or subnet depth, wherein the subnet density indicates a degree of density of network elements in the third subnet, and wherein the subnet depth indicates a relative level of the third subnet with respect to a reference level; and determining, based on the second network resource, the association information.
- 20 . The computer program product according to claim 15 , wherein the common subnet is in a network topology, and wherein when executed by the one or more processors, the computer-executable instructions further cause the apparatus to further obtain the topology information by: obtaining an identifier that is of the first network resource and that is carried in the display request; and determining, based on the identifier and the network topology, the topology information.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This is a continuation of International Patent Application No. PCT/CN2024/076395, filed on Feb. 6, 2024, which claims priority to Chinese Patent Application No. 202310798719.3, filed on Jun. 30, 2023, which are hereby incorporated by reference in their entireties. FIELD This disclosure relates to the field of communication technologies, and in particular, to a topology information display method, apparatus, and device, and a computer-readable storage medium. BACKGROUND With development of communication technologies, information in a communication process is increasingly diversified and abundant. For example, topology information may be presented by using a network topology. Therefore, topology information that needs to be displayed may be determined, and the determined topology information is displayed accordingly, to meet a requirement of a user for obtaining the topology information. SUMMARY This disclosure provides a topology information display method, apparatus, and device, and a computer-readable storage medium, to display more comprehensive topology information. Technical solutions are as follows. According to a first aspect, a topology information display method is provided. The method includes: obtaining topology information of a common subnet corresponding to a display request specific to a first network resource, where the common subnet includes a first subnet and a second subnet, the first subnet is a subnet that includes the first network resource, the second subnet is a subnet other than the first subnet, and the topology information includes information about at least one network resource of the first subnet and the second subnet, and a connection relationship between the at least one network resource; and displaying the first network resource in a distinguishable manner on a basis of displaying the topology information. The topology information including the information about the at least one network resource of the first subnet and the second subnet and the connection relationship between the at least one network resource is displayed, so that the displayed topology information is more comprehensive. The first network resource is displayed in a distinguishable manner in the topology information, so that the first network resource is displayed with a good visualization effect. In a possible implementation, the common subnet is a subnet that is in a network topology and that includes the first network resource and includes a smallest quantity of network elements and/or is of a lowest level. The common subnet is determined by using this method, so that integrity of the first network resource in the common subnet can be ensured, and redundancy in topology information of the common subnet caused by determining a subnet with an excessively large extent as the common subnet can be prevented. In a possible implementation, the first network resource includes a plurality of network elements, any one of the plurality of network elements corresponds to a reference subnet, and the reference subnet is a subnet that is in the network topology and that includes the any one of the network elements and includes a smallest quantity of network elements and/or is of a lowest level; and the common subnet is a subnet that is in the network topology and that includes the plurality of reference subnets corresponding to the plurality of network elements and includes a smallest quantity of network elements and/or is of a lowest level. If the first network resource includes the plurality of network elements, the plurality of reference subnets are first determined, and then the common subnet including the plurality of reference subnets is determined. This can ensure accuracy of the determined common subnet, further ensure integrity of the first network resource in the common subnet, and reduce possible redundancy in topology information of the common subnet. In a possible implementation, the at least one network resource of the first subnet and the second subnet includes any one of the following: the first subnet and the second subnet; network elements in the first subnet and the second subnet; or network elements in the first subnet and network elements in the second subnet. Differences in the at least one network resource of the first subnet and the second subnet result in different corresponding displayed content of the at least one network resource, so that a manner of displaying the at least one network resource is more flexible. In a possible implementation, the method further includes: obtaining association information of the common subnet, where the association information includes information about a second network resource connected to the common subnet, and a connection relationship between the second network resource and the at least one network resource of the first subnet and the second subnet; and displaying the association information of the common subnet on the b